From report at bugs.python.org Tue Oct 1 00:16:48 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 01 Oct 2019 04:16:48 +0000 Subject: [issue38319] shutil.copyfile(): os.sendfile() fails with OverflowError on 32-bit system In-Reply-To: <1569829071.99.0.925566441615.issue38319@roundup.psfhosted.org> Message-ID: <1569903408.96.0.801801113573.issue38319@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16093 pull_request: https://github.com/python/cpython/pull/16506 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 00:21:40 2019 From: report at bugs.python.org (paul rubin) Date: Tue, 01 Oct 2019 04:21:40 +0000 Subject: [issue38333] add type signatures to library function docs Message-ID: <1569903700.63.0.276076850828.issue38333@roundup.psfhosted.org> New submission from paul rubin : It would be nice if the library reference manual had type signatures for all the stdlib functions at some point. It might be possible to extract a lot of them automatically from typeshed and semi-automatically paste them into the doc files. It might also be ok to do this gradually. I can help with this but wouldn't want to take on the entire task. ---------- assignee: docs at python components: Documentation messages: 353634 nosy: docs at python, phr priority: normal severity: normal status: open title: add type signatures to library function docs type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 00:55:18 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 01 Oct 2019 04:55:18 +0000 Subject: [issue38333] add type signatures to library function docs In-Reply-To: <1569903700.63.0.276076850828.issue38333@roundup.psfhosted.org> Message-ID: <1569905718.8.0.775834127327.issue38333@roundup.psfhosted.org> Raymond Hettinger added the comment: I believe there was an explicit decision not to do this. For the time being, optional typing is still optional. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 00:55:46 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 01 Oct 2019 04:55:46 +0000 Subject: [issue38333] add type signatures to library function docs In-Reply-To: <1569903700.63.0.276076850828.issue38333@roundup.psfhosted.org> Message-ID: <1569905746.75.0.538174304136.issue38333@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: docs at python -> gvanrossum nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 01:00:06 2019 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 01 Oct 2019 05:00:06 +0000 Subject: [issue38333] add type signatures to library function docs In-Reply-To: <1569903700.63.0.276076850828.issue38333@roundup.psfhosted.org> Message-ID: <1569906006.63.0.929293197798.issue38333@roundup.psfhosted.org> Guido van Rossum added the comment: Even if this not desirable for the source code, it still makes sense to add the types to the docs, at least when they are simple and compact. The proposed notation from PEP 604 ('|' for unions) might help with compactness. Many docs are unnecessarily vague about types. ---------- assignee: gvanrossum -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 01:01:12 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 01 Oct 2019 05:01:12 +0000 Subject: [issue38319] shutil.copyfile(): os.sendfile() fails with OverflowError on 32-bit system In-Reply-To: <1569829071.99.0.925566441615.issue38319@roundup.psfhosted.org> Message-ID: <1569906072.17.0.53514203129.issue38319@roundup.psfhosted.org> Giampaolo Rodola' added the comment: Looks like it worked: https://buildbot.python.org/all/#/builders/176/builds/1383 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 01:01:18 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 01 Oct 2019 05:01:18 +0000 Subject: [issue38319] shutil.copyfile(): os.sendfile() fails with OverflowError on 32-bit system In-Reply-To: <1569829071.99.0.925566441615.issue38319@roundup.psfhosted.org> Message-ID: <1569906078.71.0.894916668359.issue38319@roundup.psfhosted.org> Change by Giampaolo Rodola' : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 02:42:23 2019 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Tue, 01 Oct 2019 06:42:23 +0000 Subject: [issue38333] add type signatures to library function docs In-Reply-To: <1569903700.63.0.276076850828.issue38333@roundup.psfhosted.org> Message-ID: <1569912143.0.0.669955016968.issue38333@roundup.psfhosted.org> Vedran ?a?i? added the comment: > Many docs are ... vague about types. ... and I consider that a feature. At least if you do that, make an explicit decision not to introduce TypeErrors for "disagreeing with the documented signature". For example, I'd be ok with sum being documented as taking an iterable of numbers and returning a number, but it would be a catastrophe if as a consequence of that, sum of a list of lists would stop working. ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 03:26:19 2019 From: report at bugs.python.org (Andrei Troie) Date: Tue, 01 Oct 2019 07:26:19 +0000 Subject: [issue38332] invalid content-transfer-encoding in encoded-word causes KeyError In-Reply-To: <1569877053.41.0.568400002445.issue38332@roundup.psfhosted.org> Message-ID: <1569914779.14.0.247969687488.issue38332@roundup.psfhosted.org> Change by Andrei Troie : ---------- keywords: +patch pull_requests: +16094 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16503 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 03:37:55 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Tue, 01 Oct 2019 07:37:55 +0000 Subject: [issue33418] Memory leaks in functions In-Reply-To: <1525370063.61.0.682650639539.issue33418@psf.upfronthosting.co.za> Message-ID: <1569915475.31.0.771833207968.issue33418@roundup.psfhosted.org> Change by Neil Schemenauer : ---------- pull_requests: +16095 pull_request: https://github.com/python/cpython/pull/16502 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 03:43:53 2019 From: report at bugs.python.org (Roundup Robot) Date: Tue, 01 Oct 2019 07:43:53 +0000 Subject: [issue22377] %Z in strptime doesn't match EST and others In-Reply-To: <1410301455.57.0.912701656833.issue22377@psf.upfronthosting.co.za> Message-ID: <1569915833.85.0.599867867774.issue22377@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +16096 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16507 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 03:46:08 2019 From: report at bugs.python.org (karl) Date: Tue, 01 Oct 2019 07:46:08 +0000 Subject: [issue22377] %Z in strptime doesn't match EST and others In-Reply-To: <1410301455.57.0.912701656833.issue22377@psf.upfronthosting.co.za> Message-ID: <1569915968.53.0.508324877698.issue22377@roundup.psfhosted.org> karl added the comment: I created a PR following the recommendations of p-ganssle https://github.com/python/cpython/pull/16507 ---------- nosy: +karlcow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 03:46:11 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 01 Oct 2019 07:46:11 +0000 Subject: [issue38326] Concerns with the last minute changes to the PEP 587 API In-Reply-To: <1569852491.15.0.285571416668.issue38326@roundup.psfhosted.org> Message-ID: <1569915971.64.0.598156185474.issue38326@roundup.psfhosted.org> ?ukasz Langa added the comment: I suggest closing this and following up in BPO-38304 about a possible graceful error message during invalid embedding. ---------- priority: release blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 03:47:20 2019 From: report at bugs.python.org (Andrei Troie) Date: Tue, 01 Oct 2019 07:47:20 +0000 Subject: [issue38332] invalid content-transfer-encoding in encoded-word causes KeyError In-Reply-To: <1569877053.41.0.568400002445.issue38332@roundup.psfhosted.org> Message-ID: <1569916040.5.0.982646977495.issue38332@roundup.psfhosted.org> Andrei Troie added the comment: I agree with you that according to the RFC, the cte can of course only be "B" or "Q". My point is that, in my example, if you try to do that you get a KeyError propagating all the way down to email.message.get(), which I believe is incorrect. Consider an encoded word which is syntactically incorrect in a different way, like if for instance it's missing the terminating '?=': '=?UTF-8?Q?somevalue' Currently, this case will cause _encoded_words.py to throw a ValueError on this line: _, charset, cte, cte_string, _ = ew.split('?') Which is then caught by _header_value_parser.get_encoded_word() and handled appropriately. To me this is the same kind of thing. I agree that an exception should be thrown, I just don't think it should propagate all the way back to the caller of email.message.get(). On a separate note, I agree with you that perhaps _encoded_words.decode() should throw more specific exceptions instead of ValueError and KeyError but that's a separate thing. I can fix that if you prefer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 03:49:41 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 01 Oct 2019 07:49:41 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1569916181.1.0.450350315102.issue38006@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset b3612070b746f799901443b65725008bc035872b by ?ukasz Langa (Neil Schemenauer) in branch '3.8': Restore tp_clear for function object. (#16502) https://github.com/python/cpython/commit/b3612070b746f799901443b65725008bc035872b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 03:51:09 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 01 Oct 2019 07:51:09 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1569916268.99.0.989208419549.issue38006@roundup.psfhosted.org> ?ukasz Langa added the comment: Thanks a million everyone, this is now hopefully solved. I'm leaving it open for Neil to experiment with his unit test (which would be amazing to have!). ---------- priority: release blocker -> normal versions: -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 03:52:28 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 01 Oct 2019 07:52:28 +0000 Subject: [issue38304] PEP 587 implementation is not ABI forward compatible In-Reply-To: <1569630765.03.0.323163871576.issue38304@roundup.psfhosted.org> Message-ID: <1569916348.87.0.938493956738.issue38304@roundup.psfhosted.org> ?ukasz Langa added the comment: Will you forward port your change to master, Victor? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 03:55:07 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 01 Oct 2019 07:55:07 +0000 Subject: [issue38319] shutil.copyfile(): os.sendfile() fails with OverflowError on 32-bit system In-Reply-To: <1569829071.99.0.925566441615.issue38319@roundup.psfhosted.org> Message-ID: <1569916507.12.0.937070940612.issue38319@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 938c00ca9e4207a2531041edff2e82490b02047f by ?ukasz Langa (Miss Islington (bot)) in branch '3.8': bpo-38319: Fix shutil._fastcopy_sendfile(): set sendfile() max block size (GH-16491) (#16506) https://github.com/python/cpython/commit/938c00ca9e4207a2531041edff2e82490b02047f ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 03:59:20 2019 From: report at bugs.python.org (=?utf-8?q?Ricardo_B=C3=A1nffy?=) Date: Tue, 01 Oct 2019 07:59:20 +0000 Subject: [issue38294] Documentation on 3.6->3.7 re.escape no longer escaping "/" or ":" should be obvious In-Reply-To: <1569603997.59.0.0237297108404.issue38294@roundup.psfhosted.org> Message-ID: <1569916760.85.0.77544200194.issue38294@roundup.psfhosted.org> Change by Ricardo B?nffy : ---------- title: re.escape no longer escapes "/" or ":" -> Documentation on 3.6->3.7 re.escape no longer escaping "/" or ":" should be obvious _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 03:59:39 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 01 Oct 2019 07:59:39 +0000 Subject: [issue38242] Revert the new asyncio Streams API In-Reply-To: <1569020325.08.0.390897413838.issue38242@roundup.psfhosted.org> Message-ID: <1569916779.92.0.983602243547.issue38242@roundup.psfhosted.org> Change by ?ukasz Langa : ---------- priority: release blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 04:17:22 2019 From: report at bugs.python.org (Daniel Hillier) Date: Tue, 01 Oct 2019 08:17:22 +0000 Subject: [issue38334] zipfile: Seeking encrypted file breaks after seeking backwards Message-ID: <1569917842.05.0.044912868688.issue38334@roundup.psfhosted.org> New submission from Daniel Hillier : Seeking back beyond the decrypted / unzipped buffer doesn't reset the decrypter's crc key values. All data read after seeking back beyond the buffer is garbled. ---------- components: Library (Lib) messages: 353646 nosy: dhillier priority: normal severity: normal status: open title: zipfile: Seeking encrypted file breaks after seeking backwards type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 04:22:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 08:22:25 +0000 Subject: [issue38321] Compiler warnings when building Python 3.8 In-Reply-To: <1569838124.87.0.490940014864.issue38321@roundup.psfhosted.org> Message-ID: <1569918145.33.0.100789632925.issue38321@roundup.psfhosted.org> STINNER Victor added the comment: > d:\dev\cpython\modules\expat\xmltok.c This file is copied directly from https://github.com/libexpat/libexpat/ project. Would you mind to propose your patch there? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 04:26:27 2019 From: report at bugs.python.org (Antoine Pietri) Date: Tue, 01 Oct 2019 08:26:27 +0000 Subject: [issue38306] High level API for loop.run_in_executor(None, ...)? In-Reply-To: <1569681785.01.0.799144749415.issue38306@roundup.psfhosted.org> Message-ID: <1569918387.1.0.0130524081601.issue38306@roundup.psfhosted.org> Antoine Pietri added the comment: > run_in_executor doesn't necessarily create a new thread each time so create_thread would be misleading. run_in_thread might be better. Right, the idea was to have an analogy with create_task, because the run_in_executor would be wrapped in a Task. I'm okay with run_thread() too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 04:28:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 08:28:10 +0000 Subject: [issue38326] Concerns with the last minute changes to the PEP 587 API In-Reply-To: <1569852491.15.0.285571416668.issue38326@roundup.psfhosted.org> Message-ID: <1569918490.48.0.700132161239.issue38326@roundup.psfhosted.org> STINNER Victor added the comment: Nick merged my two PRS, so the initial concern is gone :-) I close the issue. Thanks for the feedback, it was an interesting talk. Sorry for the bad timing. I dislike working under pressure of a deadline :-( ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 04:28:24 2019 From: report at bugs.python.org (Ma Lin) Date: Tue, 01 Oct 2019 08:28:24 +0000 Subject: [issue38321] Compiler warnings when building Python 3.8 In-Reply-To: <1569838124.87.0.490940014864.issue38321@roundup.psfhosted.org> Message-ID: <1569918504.72.0.62677816137.issue38321@roundup.psfhosted.org> Ma Lin added the comment: > This file is copied directly from https://github.com/libexpat/libexpat/ > project. Would you mind to propose your patch there? ok, I will report to there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 04:30:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 08:30:00 +0000 Subject: [issue38304] PEP 587 implementation is not ABI forward compatible In-Reply-To: <1569630765.03.0.323163871576.issue38304@roundup.psfhosted.org> Message-ID: <1569918600.7.0.185207532938.issue38304@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16098 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/16508 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 04:31:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 08:31:22 +0000 Subject: [issue38304] PEP 587 implementation is not ABI forward compatible In-Reply-To: <1569630765.03.0.323163871576.issue38304@roundup.psfhosted.org> Message-ID: <1569918682.13.0.54110464011.issue38304@roundup.psfhosted.org> STINNER Victor added the comment: > Will you forward port your change to master, Victor? Sure, it was my plan: PR 16508. I chose to fix 3.8 first to unblock the 3.8.0rc1 release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 04:56:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 08:56:41 +0000 Subject: [issue38304] PEP 587 implementation is not ABI forward compatible In-Reply-To: <1569630765.03.0.323163871576.issue38304@roundup.psfhosted.org> Message-ID: <1569920201.45.0.765947132029.issue38304@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 3c30a76f3d3c0dcc1fb4de097fa4a3a4c92c0b0b by Victor Stinner in branch 'master': bpo-38304: Remove PyConfig.struct_size (GH-16500) (GH-16508) https://github.com/python/cpython/commit/3c30a76f3d3c0dcc1fb4de097fa4a3a4c92c0b0b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 05:03:08 2019 From: report at bugs.python.org (Dominic Littlewood) Date: Tue, 01 Oct 2019 09:03:08 +0000 Subject: [issue38297] Imports at top of module is often not used In-Reply-To: <1569608194.16.0.811329598218.issue38297@roundup.psfhosted.org> Message-ID: <1569920588.67.0.674204917104.issue38297@roundup.psfhosted.org> Dominic Littlewood <11dlittlewood at gmail.com> added the comment: With all due respect, I disagree with what you're saying here. "It's a bit misleading to use the stdlib as a guideline" ... when looking at the style guide for the stdlib? I appreciate that PEP 8 is used for other purposes, but its main purpose is clear from its very first line. "There are reasons we do this in certain spots" Yes, there are. And given that there are so many of these different spots where it would give better performance to ignore the rule, PEP 8 should reflect that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 05:11:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 09:11:22 +0000 Subject: [issue38304] PEP 587 implementation is not ABI forward compatible In-Reply-To: <1569630765.03.0.323163871576.issue38304@roundup.psfhosted.org> Message-ID: <1569921082.38.0.580774020176.issue38304@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16099 pull_request: https://github.com/python/cpython/pull/16509 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 05:16:22 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 01 Oct 2019 09:16:22 +0000 Subject: [issue38297] Imports at top of module is often not used In-Reply-To: <1569608194.16.0.811329598218.issue38297@roundup.psfhosted.org> Message-ID: <1569921382.76.0.795105560819.issue38297@roundup.psfhosted.org> Christian Heimes added the comment: A considerable amount of code is a lot older than PEP 8, some even over a decade older. Even newer code in the stdlib does not conform to PEP 8 for multiple reasons, e.g. external modules was incorporated into the stdlib. PEP 8 sections "Introduction" and "A Foolish Consistency is the Hobgoblin of Little Minds" explain why parts stdlib do not follow PEP 8. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 05:22:30 2019 From: report at bugs.python.org (Matteo Dell'Amico) Date: Tue, 01 Oct 2019 09:22:30 +0000 Subject: [issue38200] Adding itertools.pairwise to the standard library? In-Reply-To: <1568736008.51.0.85414927582.issue38200@roundup.psfhosted.org> Message-ID: <1569921750.08.0.872872683154.issue38200@roundup.psfhosted.org> Matteo Dell'Amico added the comment: Sorry for taking so long to answer, I didn't see notifications somehow. Raymond, my use case is in general something that happens when I'm doing analytics on sequences of events (e.g., URLs visited by a browser) or paths in a graph. I look at pairs and do something based on the pair of events (e.g., did the user likely clicked an advertising link? did they go to a potentially risky webpage, possibly by clicking a link?) I see the argument for generalizing to a sliding window, although that may lead people to choosing inefficient algorithms for sliding average or median. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 05:53:30 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 01 Oct 2019 09:53:30 +0000 Subject: [issue38270] Tests: Avoid MD5 or check for MD5 availablity In-Reply-To: <1569406198.76.0.145895264341.issue38270@roundup.psfhosted.org> Message-ID: <1569923610.06.0.242148466382.issue38270@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 06:06:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 10:06:19 +0000 Subject: [issue38304] PEP 587 implementation is not ABI forward compatible In-Reply-To: <1569630765.03.0.323163871576.issue38304@roundup.psfhosted.org> Message-ID: <1569924379.75.0.72466411036.issue38304@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8462a4936b3a551dc546a6adea04a70b0a07ca67 by Victor Stinner in branch 'master': bpo-38304: PyConfig_InitPythonConfig() cannot fail anymore (GH-16509) https://github.com/python/cpython/commit/8462a4936b3a551dc546a6adea04a70b0a07ca67 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 06:06:35 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 01 Oct 2019 10:06:35 +0000 Subject: [issue38304] PEP 587 implementation is not ABI forward compatible In-Reply-To: <1569630765.03.0.323163871576.issue38304@roundup.psfhosted.org> Message-ID: <1569924395.22.0.860413153076.issue38304@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16100 pull_request: https://github.com/python/cpython/pull/16510 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 06:09:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 10:09:30 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1569924570.51.0.107104928901.issue36670@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16101 pull_request: https://github.com/python/cpython/pull/16511 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 06:20:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 10:20:59 +0000 Subject: [issue38321] Compiler warnings when building Python 3.8 In-Reply-To: <1569838124.87.0.490940014864.issue38321@roundup.psfhosted.org> Message-ID: <1569925259.11.0.635813343666.issue38321@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16102 pull_request: https://github.com/python/cpython/pull/16512 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 06:26:07 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 01 Oct 2019 10:26:07 +0000 Subject: [issue38304] PEP 587 implementation is not ABI forward compatible In-Reply-To: <1569630765.03.0.323163871576.issue38304@roundup.psfhosted.org> Message-ID: <1569925567.48.0.784630395252.issue38304@roundup.psfhosted.org> miss-islington added the comment: New changeset d49f096cc41f57155efe71cd089c29b38c218488 by Miss Islington (bot) in branch '3.8': bpo-38304: PyConfig_InitPythonConfig() cannot fail anymore (GH-16509) https://github.com/python/cpython/commit/d49f096cc41f57155efe71cd089c29b38c218488 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 06:27:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 10:27:28 +0000 Subject: [issue38304] PEP 587 implementation is not ABI forward compatible In-Reply-To: <1569630765.03.0.323163871576.issue38304@roundup.psfhosted.org> Message-ID: <1569925648.41.0.0321917364169.issue38304@roundup.psfhosted.org> STINNER Victor added the comment: It was decided to abandon the idea of stable ABI for PyConfig: see bpo-38326. I now close this issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 06:28:14 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 10:28:14 +0000 Subject: [issue38205] Py_UNREACHABLE() no longer behaves as a function call In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1569925694.97.0.254708537512.issue38205@roundup.psfhosted.org> STINNER Victor added the comment: The initial issue has been fixed in 3.8 and master. I close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 06:29:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 10:29:39 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1569925779.36.0.741263568911.issue36670@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 982bfa4da07b2e5749a0f4e68f99e972bcc3a549 by Victor Stinner in branch 'master': bpo-36670: Multiple regrtest bugfixes (GH-16511) https://github.com/python/cpython/commit/982bfa4da07b2e5749a0f4e68f99e972bcc3a549 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 06:29:47 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 01 Oct 2019 10:29:47 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1569925787.68.0.0643292072308.issue36670@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16103 pull_request: https://github.com/python/cpython/pull/16513 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 06:30:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 10:30:23 +0000 Subject: [issue38190] regrtest: test suite completes but Tests Result is not displayed and the process hangs In-Reply-To: <1568662315.14.0.520273367874.issue38190@roundup.psfhosted.org> Message-ID: <1569925823.18.0.678679946039.issue38190@roundup.psfhosted.org> STINNER Victor added the comment: I pushed different regrtest bugfixes. The situation should now be less worse. I close the issue. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 06:33:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 10:33:10 +0000 Subject: [issue37507] multiprocessing: Add a stop() method to ForkServer In-Reply-To: <1562336538.11.0.898279442139.issue37507@roundup.psfhosted.org> Message-ID: <1569925990.14.0.7438088258.issue37507@roundup.psfhosted.org> STINNER Victor added the comment: _test_multiprocessing.py calls: # Stop the ForkServer process if it's running from multiprocessing import forkserver forkserver._forkserver._stop() It seems like multiprocessing tests are the main consumer of this method. So let's keep it private for now. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 06:40:38 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 01 Oct 2019 10:40:38 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1569926438.5.0.289297297311.issue36670@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16104 pull_request: https://github.com/python/cpython/pull/16514 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 06:45:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 10:45:17 +0000 Subject: [issue37474] Should Py_Initialize() control the floating point mode? In-Reply-To: <1562002743.95.0.49076601863.issue37474@roundup.psfhosted.org> Message-ID: <1569926717.86.0.615228131552.issue37474@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +16105 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16515 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 06:45:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 10:45:55 +0000 Subject: [issue38321] Compiler warnings when building Python 3.8 In-Reply-To: <1569838124.87.0.490940014864.issue38321@roundup.psfhosted.org> Message-ID: <1569926755.47.0.245087949414.issue38321@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 2f90261280e36a179831d72ce794115be31c88bb by Victor Stinner in branch 'master': bpo-38321: Fix compiler warning in _randommodule.c (GH-16512) https://github.com/python/cpython/commit/2f90261280e36a179831d72ce794115be31c88bb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 06:47:55 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 01 Oct 2019 10:47:55 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1569926875.14.0.558492108677.issue36670@roundup.psfhosted.org> miss-islington added the comment: New changeset 6b4c70abcaa348c84a2c1bb6f5a46596cf358e36 by Miss Islington (bot) in branch '3.8': bpo-36670: Multiple regrtest bugfixes (GH-16511) https://github.com/python/cpython/commit/6b4c70abcaa348c84a2c1bb6f5a46596cf358e36 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 06:48:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 10:48:44 +0000 Subject: [issue37245] Azure Pipeline 3.8 CI: multiple tests hung and timed out on macOS 10.13 In-Reply-To: <1560340622.3.0.842050597369.issue37245@roundup.psfhosted.org> Message-ID: <1569926924.93.0.359010763168.issue37245@roundup.psfhosted.org> STINNER Victor added the comment: It seems like macOS job pass again on Azure Pipelines. I close the issue. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 06:50:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 10:50:13 +0000 Subject: [issue37146] opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting In-Reply-To: <1559594083.93.0.475089830437.issue37146@roundup.psfhosted.org> Message-ID: <1569927013.48.0.293589682811.issue37146@roundup.psfhosted.org> STINNER Victor added the comment: It seems like nobody came up with a solution for the debug mode since June. I close the issue. Reopen it if you would like to propose a solution. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 06:56:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 10:56:16 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1569927376.84.0.973360919639.issue36670@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Lorenz Mende for the nice bug report, investigating the issue and proposing fix. I wrote a PR based on your work with some minor changes. I included it in a large regrtest change to fix other bugs. regrtest should work again with locales other than English. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 06:58:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 10:58:04 +0000 Subject: [issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py In-Reply-To: <1569032250.18.0.545337961077.issue38243@roundup.psfhosted.org> Message-ID: <1569927484.08.0.824304034772.issue38243@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8eb64155ff26823542ccf0225b3d57b6ae36ea89 by Victor Stinner (Dong-hee Na) in branch '2.7': [2.7] bpo-38243: Escape the server title of DocXMLRPCServer (GH-16447) https://github.com/python/cpython/commit/8eb64155ff26823542ccf0225b3d57b6ae36ea89 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 06:58:56 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 01 Oct 2019 10:58:56 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1569927536.2.0.0142502599123.issue36670@roundup.psfhosted.org> miss-islington added the comment: New changeset d6a92b55944bf1ef4992e4375f02a7132717bf53 by Miss Islington (bot) in branch '3.7': bpo-36670: Multiple regrtest bugfixes (GH-16511) https://github.com/python/cpython/commit/d6a92b55944bf1ef4992e4375f02a7132717bf53 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 06:59:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 10:59:41 +0000 Subject: [issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py In-Reply-To: <1569032250.18.0.545337961077.issue38243@roundup.psfhosted.org> Message-ID: <1569927581.17.0.665081231442.issue38243@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16106 pull_request: https://github.com/python/cpython/pull/16516 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:01:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 11:01:42 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1569927702.09.0.296537916024.issue36670@roundup.psfhosted.org> STINNER Victor added the comment: > We could avoid typeperf command by accessing directly performance counters: (...) Honestly, it sounds very complicated. I don't think that it's worth it. With Lorenz's fix, regrtest now "just works". So I think that it's good enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:09:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 11:09:51 +0000 Subject: [issue37802] micro-optimization of PyLong_FromSize_t() In-Reply-To: <1565357260.71.0.37857302813.issue37802@roundup.psfhosted.org> Message-ID: <1569928191.21.0.566152488689.issue37802@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16107 pull_request: https://github.com/python/cpython/pull/16517 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:09:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 11:09:51 +0000 Subject: [issue38321] Compiler warnings when building Python 3.8 In-Reply-To: <1569838124.87.0.490940014864.issue38321@roundup.psfhosted.org> Message-ID: <1569928191.31.0.669379657429.issue38321@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16108 pull_request: https://github.com/python/cpython/pull/16517 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:12:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 11:12:32 +0000 Subject: [issue37474] Should Py_Initialize() control the floating point mode? In-Reply-To: <1562002743.95.0.49076601863.issue37474@roundup.psfhosted.org> Message-ID: <1569928352.08.0.877426088631.issue37474@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 5e0ea7540f577c9684e272000fdfc80d29bb78a2 by Victor Stinner in branch 'master': bpo-37474: Don't call fedisableexcept() on FreeBSD (GH-16515) https://github.com/python/cpython/commit/5e0ea7540f577c9684e272000fdfc80d29bb78a2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:14:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 11:14:10 +0000 Subject: [issue37474] Should Py_Initialize() control the floating point mode? In-Reply-To: <1562002743.95.0.49076601863.issue37474@roundup.psfhosted.org> Message-ID: <1569928450.84.0.635900697582.issue37474@roundup.psfhosted.org> STINNER Victor added the comment: Sorry, I failed to find time to convert attached tests to tests in the Python test suite. But I understood that existing tests should be enough to control the rounding mode. I removed the call. If something goes wrong, we can add it back. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:27:09 2019 From: report at bugs.python.org (Krishna Oza) Date: Tue, 01 Oct 2019 11:27:09 +0000 Subject: [issue38331] Exec not recognizing global variables inside function In-Reply-To: <1569875978.41.0.850227388561.issue38331@roundup.psfhosted.org> Message-ID: <1569929229.23.0.4039025182.issue38331@roundup.psfhosted.org> Krishna Oza added the comment: adding self to nosy list. ---------- nosy: +Krishna Oza _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:28:39 2019 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 01 Oct 2019 11:28:39 +0000 Subject: [issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py In-Reply-To: <1569032250.18.0.545337961077.issue38243@roundup.psfhosted.org> Message-ID: <1569929319.16.0.418304954403.issue38243@roundup.psfhosted.org> Change by Dong-hee Na : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:29:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 11:29:56 +0000 Subject: [issue38321] Compiler warnings when building Python 3.8 In-Reply-To: <1569838124.87.0.490940014864.issue38321@roundup.psfhosted.org> Message-ID: <1569929396.23.0.272438865162.issue38321@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 6314abcc08f5d0f3d3a915dc9455ea223fa65517 by Victor Stinner in branch 'master': bpo-37802: Fix a compiler warning in longobject.c (GH-16517) https://github.com/python/cpython/commit/6314abcc08f5d0f3d3a915dc9455ea223fa65517 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:29:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 11:29:56 +0000 Subject: [issue37802] micro-optimization of PyLong_FromSize_t() In-Reply-To: <1565357260.71.0.37857302813.issue37802@roundup.psfhosted.org> Message-ID: <1569929396.29.0.744470488001.issue37802@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 6314abcc08f5d0f3d3a915dc9455ea223fa65517 by Victor Stinner in branch 'master': bpo-37802: Fix a compiler warning in longobject.c (GH-16517) https://github.com/python/cpython/commit/6314abcc08f5d0f3d3a915dc9455ea223fa65517 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:32:48 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 11:32:48 +0000 Subject: [issue38321] Compiler warnings when building Python 3.8 In-Reply-To: <1569838124.87.0.490940014864.issue38321@roundup.psfhosted.org> Message-ID: <1569929568.82.0.940973052816.issue38321@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16109 pull_request: https://github.com/python/cpython/pull/16518 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:43:43 2019 From: report at bugs.python.org (Sanjay) Date: Tue, 01 Oct 2019 11:43:43 +0000 Subject: [issue38335] simplify overlaps function in ipaddress.py Message-ID: <1569930223.76.0.865877463422.issue38335@roundup.psfhosted.org> New submission from Sanjay : the current implementation of overlaps function tests either network or broadcast address is in other but we can skip checking broadcast address is in other because we anyway check if other.network_address in self without loss of generality if we assume self has smaller prefixlen than other then when self.broadcast_address in other then other.network_address *SHOULD* be in self but the reverse is not true so my first patch was to make the function logic simply do `self.network_address in other or other.network_address in self` but the current PR does a different change. We have introduced two new functions subnet_of and supernet_of for two networks A, B there are only three possibilities 1. they don't overlap 2. A is subnet of B 3. B is subnet of A so we can reuse the existing function and just do `return self.subnet_of(other) or self.supernet_of(other)` the only thing is while overlaps() function returns false when we try to compare with a network or with diff version the other throws exception so I added a typecheck in the beginning. P.S the docstring is slightly convoluted for newcomers, based on the three possibilities it should say "Tell if self is supernet or subnet of other" because "partly contained" can also mean two ranges intersect which can never happen to network prefixes. I have not made that change but can make it. There are also some other issues I want to address but I want to do one at a time. ---------- components: Library (Lib) files: skip_broadcast_in.patch keywords: patch messages: 353676 nosy: Sanjay priority: normal severity: normal status: open title: simplify overlaps function in ipaddress.py versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48634/skip_broadcast_in.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:45:26 2019 From: report at bugs.python.org (Sanjay) Date: Tue, 01 Oct 2019 11:45:26 +0000 Subject: [issue38335] simplify overlaps function in ipaddress.py In-Reply-To: <1569930223.76.0.865877463422.issue38335@roundup.psfhosted.org> Message-ID: <1569930326.32.0.891740945099.issue38335@roundup.psfhosted.org> Change by Sanjay : ---------- pull_requests: +16110 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16519 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:50:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 11:50:02 +0000 Subject: [issue3832] add force_shared Library option to create shared lib even with use_stub=False In-Reply-To: <1221100214.51.0.623800325069.issue3832@psf.upfronthosting.co.za> Message-ID: <1569930602.14.0.330203352452.issue3832@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16111 pull_request: https://github.com/python/cpython/pull/16518 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:51:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 11:51:17 +0000 Subject: [issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py In-Reply-To: <1569032250.18.0.545337961077.issue38243@roundup.psfhosted.org> Message-ID: <1569930677.33.0.230185451528.issue38243@roundup.psfhosted.org> STINNER Victor added the comment: I prefer to keep it open until the 3.5 backport is merged. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:52:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 11:52:03 +0000 Subject: [issue3832] add force_shared Library option to create shared lib even with use_stub=False In-Reply-To: <1221100214.51.0.623800325069.issue3832@psf.upfronthosting.co.za> Message-ID: <1569930723.79.0.214019169711.issue3832@roundup.psfhosted.org> STINNER Victor added the comment: New changeset bfe1f74e39d0049a829962050e86a6a2d2a2781e by Victor Stinner in branch '3.8': [3.8] bpo-3832: Fix compiler warnings (GH-16518) https://github.com/python/cpython/commit/bfe1f74e39d0049a829962050e86a6a2d2a2781e ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:52:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 11:52:03 +0000 Subject: [issue22273] abort when passing certain structs by value using ctypes In-Reply-To: <1408988002.99.0.886549500758.issue22273@psf.upfronthosting.co.za> Message-ID: <1569930723.58.0.371051240161.issue22273@roundup.psfhosted.org> STINNER Victor added the comment: New changeset bfe1f74e39d0049a829962050e86a6a2d2a2781e by Victor Stinner in branch '3.8': [3.8] bpo-3832: Fix compiler warnings (GH-16518) https://github.com/python/cpython/commit/bfe1f74e39d0049a829962050e86a6a2d2a2781e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:52:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 11:52:03 +0000 Subject: [issue38321] Compiler warnings when building Python 3.8 In-Reply-To: <1569838124.87.0.490940014864.issue38321@roundup.psfhosted.org> Message-ID: <1569930723.72.0.257967922986.issue38321@roundup.psfhosted.org> STINNER Victor added the comment: New changeset bfe1f74e39d0049a829962050e86a6a2d2a2781e by Victor Stinner in branch '3.8': [3.8] bpo-3832: Fix compiler warnings (GH-16518) https://github.com/python/cpython/commit/bfe1f74e39d0049a829962050e86a6a2d2a2781e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:52:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 11:52:03 +0000 Subject: [issue38248] inconsistency in asyncio.Task between cancellation while running vs. cancellation immediately after it finishes In-Reply-To: <1569141924.07.0.413373545347.issue38248@roundup.psfhosted.org> Message-ID: <1569930723.49.0.428281658687.issue38248@roundup.psfhosted.org> STINNER Victor added the comment: New changeset bfe1f74e39d0049a829962050e86a6a2d2a2781e by Victor Stinner in branch '3.8': [3.8] bpo-3832: Fix compiler warnings (GH-16518) https://github.com/python/cpython/commit/bfe1f74e39d0049a829962050e86a6a2d2a2781e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:54:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 11:54:21 +0000 Subject: [issue3832] add force_shared Library option to create shared lib even with use_stub=False In-Reply-To: <1221100214.51.0.623800325069.issue3832@psf.upfronthosting.co.za> Message-ID: <1569930861.65.0.13454206187.issue3832@roundup.psfhosted.org> STINNER Victor added the comment: Oops, the previous comment should be for bpo-38321. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:54:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 11:54:45 +0000 Subject: [issue38321] Compiler warnings when building Python 3.8 In-Reply-To: <1569838124.87.0.490940014864.issue38321@roundup.psfhosted.org> Message-ID: <1569930885.21.0.199220735345.issue38321@roundup.psfhosted.org> STINNER Victor added the comment: New changeset bfe1f74e39d0049a829962050e86a6a2d2a2781e by Victor Stinner in branch '3.8': [3.8] bpo-3832: Fix compiler warnings (GH-16518) https://github.com/python/cpython/commit/bfe1f74e39d0049a829962050e86a6a2d2a2781e (oops, I made a typo in the bpo number in the commit title.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:55:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 11:55:21 +0000 Subject: [issue38321] Compiler warnings when building Python 3.8 In-Reply-To: <1569838124.87.0.490940014864.issue38321@roundup.psfhosted.org> Message-ID: <1569930921.31.0.3134155889.issue38321@roundup.psfhosted.org> STINNER Victor added the comment: Ok, most warnings have been fixed in 3.8 and master. I close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:56:31 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Tue, 01 Oct 2019 11:56:31 +0000 Subject: [issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence Message-ID: <1569930991.59.0.212656372364.issue38336@roundup.psfhosted.org> New submission from G?ry : The [language documentation](https://docs.python.org/3/reference/datamodel.html#invoking-descriptors) states: > Data descriptors with __set__() and __get__() defined always override a redefinition in an instance dictionary. In contrast, non-data descriptors can be overridden by instances. This override is not limited to data descriptors defining `__set__()` (and `__get__()`). It is also true for data descriptors defining `__delete__()` (and `__get__()`) and data descriptors defining both `__set__()` and `__delete__()` (and `__get__()`). In other words, _any_ data descriptors (objects defining either `__set__()` or `__delete__()` or both) defining `__get__()` override an attribute redefinition in an instance dictionary. ---------- assignee: docs at python components: Documentation messages: 353685 nosy: docs at python, maggyero priority: normal severity: normal status: open title: Remove the __set__ method restriction on data descriptors for attribute lookup precedence type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:56:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 11:56:33 +0000 Subject: [issue38248] inconsistency in asyncio.Task between cancellation while running vs. cancellation immediately after it finishes In-Reply-To: <1569141924.07.0.413373545347.issue38248@roundup.psfhosted.org> Message-ID: <1569930993.64.0.636070358387.issue38248@roundup.psfhosted.org> STINNER Victor added the comment: Can this issue be closed now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:57:03 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Tue, 01 Oct 2019 11:57:03 +0000 Subject: [issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence In-Reply-To: <1569930991.59.0.212656372364.issue38336@roundup.psfhosted.org> Message-ID: <1569931023.13.0.160076223279.issue38336@roundup.psfhosted.org> Change by G?ry : ---------- keywords: +patch pull_requests: +16112 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16520 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:58:11 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Tue, 01 Oct 2019 11:58:11 +0000 Subject: [issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence In-Reply-To: <1569930991.59.0.212656372364.issue38336@roundup.psfhosted.org> Message-ID: <1569931091.38.0.746062223849.issue38336@roundup.psfhosted.org> G?ry added the comment: I have opened a PR here: https://github.com/python/cpython/pull/16520 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 08:00:44 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Tue, 01 Oct 2019 12:00:44 +0000 Subject: [issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence In-Reply-To: <1569930991.59.0.212656372364.issue38336@roundup.psfhosted.org> Message-ID: <1569931244.42.0.671682756924.issue38336@roundup.psfhosted.org> Change by G?ry : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 08:01:59 2019 From: report at bugs.python.org (Jonas Drotleff) Date: Tue, 01 Oct 2019 12:01:59 +0000 Subject: [issue38337] inspect: getmembers calls properties Message-ID: <1569931319.11.0.161787180553.issue38337@roundup.psfhosted.org> New submission from Jonas Drotleff : When calling inspect.getmembers on a class that has a property (@property), the property will be called by the getattr call in getmembers. Example: import inspect class Example: def __init__(self, var): self._var = var print('__init__') def foo(self, bar): print(bar) print('foo') @property def var(self): print('Access property') return self._var if __name__ == '__main__': ex = Example('Hello') print('--- getmembers from instance ---') print(inspect.getmembers(ex)) print('--- getmembers from class ---') print(inspect.getmembers(Example)) Result: __init__ --- getmembers from instance --- Access property [('__class__', ), ..., ('var', 'Hello')] --- getmembers from class --- [('__class__', ), ..., ('var', )] Expected: __init__ --- getmembers from instance --- [('__class__', ), ..., ('var', )] --- getmembers from class --- [('__class__', ), ..., ('var', )] ---------- components: Library (Lib) messages: 353688 nosy: jnsdrtlf priority: normal severity: normal status: open title: inspect: getmembers calls properties type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 08:07:43 2019 From: report at bugs.python.org (Jonas Drotleff) Date: Tue, 01 Oct 2019 12:07:43 +0000 Subject: [issue38337] inspect: getmembers calls properties In-Reply-To: <1569931319.11.0.161787180553.issue38337@roundup.psfhosted.org> Message-ID: <1569931663.61.0.986732735918.issue38337@roundup.psfhosted.org> Change by Jonas Drotleff : ---------- keywords: +patch pull_requests: +16113 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16521 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 08:21:52 2019 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 01 Oct 2019 12:21:52 +0000 Subject: [issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py In-Reply-To: <1569032250.18.0.545337961077.issue38243@roundup.psfhosted.org> Message-ID: <1569932512.79.0.674126476138.issue38243@roundup.psfhosted.org> Dong-hee Na added the comment: > I prefer to keep it open until the 3.5 backport is merged. Sorry, I didn't find it. Yes, we should let it open until the PR is merged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 08:46:23 2019 From: report at bugs.python.org (Mike) Date: Tue, 01 Oct 2019 12:46:23 +0000 Subject: [issue36054] Way to detect CPU count inside docker container In-Reply-To: <1550681782.39.0.211832814896.issue36054@roundup.psfhosted.org> Message-ID: <1569933983.49.0.940090301415.issue36054@roundup.psfhosted.org> Mike added the comment: Is this issue still being worked on as a core feature? I needed a solution for this using 2.7.11 to enable some old code to work properly/nicely in a container environment on AWS Batch and was forced to figure out what OpenJDK was doing and came up with a solution. The process in OpenJDK seems to be, find where the cgroups for docker are located in the file system, then depending on the values in different files you can determine the number of CPUs available. The inelegant code below is what worked for me: def query_cpu(): if os.path.isfile('/sys/fs/cgroup/cpu/cpu.cfs_quota_us'): cpu_quota = int(open('/sys/fs/cgroup/cpu/cpu.cfs_quota_us').read().rstrip()) #print(cpu_quota) # Not useful for AWS Batch based jobs as result is -1, but works on local linux systems if cpu_quota != -1 and os.path.isfile('/sys/fs/cgroup/cpu/cpu.cfs_period_us'): cpu_period = int(open('/sys/fs/cgroup/cpu/cpu.cfs_period_us').read().rstrip()) #print(cpu_period) avail_cpu = int(cpu_quota / cpu_period) # Divide quota by period and you should get num of allotted CPU to the container, rounded down if fractional. elif os.path.isfile('/sys/fs/cgroup/cpu/cpu.shares'): cpu_shares = int(open('/sys/fs/cgroup/cpu/cpu.shares').read().rstrip()) #print(cpu_shares) # For AWS, gives correct value * 1024. avail_cpu = int(cpu_shares / 1024) return avail_cpu This solution makes several assumptions about the cgroup locations within the container vs dynamically finding where those files are located as OpenJDK does. I also haven't included the more robust method in case cpu.quota and cpu.shares are -1. Hopefully this is a start for getting this implemented. ---------- nosy: +mcnelsonphd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 08:51:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 12:51:30 +0000 Subject: [issue36054] On Linux, os.count() should read cgroup cpu.shares and cpu.cfs (CPU count inside docker container) In-Reply-To: <1550681782.39.0.211832814896.issue36054@roundup.psfhosted.org> Message-ID: <1569934290.41.0.329471556743.issue36054@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Way to detect CPU count inside docker container -> On Linux, os.count() should read cgroup cpu.shares and cpu.cfs (CPU count inside docker container) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 08:55:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 12:55:54 +0000 Subject: [issue38338] [2.7] test_ssl fails Message-ID: <1569934554.24.0.56143952582.issue38338@roundup.psfhosted.org> New submission from STINNER Victor : SSLv23 and TLS v1.0 are disabled by RHEL8 crypto policy. AMD64 RHEL8 2.7: https://buildbot.python.org/all/#/builders/245/builds/5 test_protocol_sslv23 (test.test_ssl.ThreadedTests) Connecting to an SSLv23 server with various client options ... Could not scan /etc/ssl/openssl.cnf for MinProtocol: [Errno 2] No such file or directory: '/etc/ssl/openssl.cnf' PROTOCOL_TLS->PROTOCOL_TLS CERT_NONE PROTOCOL_TLSv1->PROTOCOL_TLS CERT_NONE ERROR ====================================================================== ERROR: test_protocol_sslv23 (test.test_ssl.ThreadedTests) Connecting to an SSLv23 server with various client options ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/test/test_ssl.py", line 189, in f return func(*args, **kwargs) File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/test/test_ssl.py", line 2402, in test_protocol_sslv23 try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, 'TLSv1') File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/test/test_ssl.py", line 2134, in try_protocol_combo chatty=False, connectionchatty=False) File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/test/test_ssl.py", line 2062, in server_params_test s.connect((HOST, server.port)) File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/ssl.py", line 864, in connect self._real_connect(addr, False) File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/ssl.py", line 855, in _real_connect self.do_handshake() File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/ssl.py", line 828, in do_handshake self._sslobj.do_handshake() SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:727) and test_protocol_tlsv1_1 (test.test_ssl.ThreadedTests) Connecting to a TLSv1.1 server with various client options. ... Could not scan /etc/ssl/openssl.cnf for MinProtocol: [Errno 2] No such file or directory: '/etc/ssl/openssl.cnf' PROTOCOL_TLSv1_1->PROTOCOL_TLSv1_1 CERT_NONE {PROTOCOL_TLS->PROTOCOL_TLSv1_1} CERT_NONE PROTOCOL_TLSv1_1->PROTOCOL_TLS CERT_NONE ERROR ====================================================================== ERROR: test_protocol_tlsv1_1 (test.test_ssl.ThreadedTests) Connecting to a TLSv1.1 server with various client options. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/test/test_ssl.py", line 189, in f return func(*args, **kwargs) File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/test/test_ssl.py", line 2477, in test_protocol_tlsv1_1 try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1_1, 'TLSv1.1') File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/test/test_ssl.py", line 2134, in try_protocol_combo chatty=False, connectionchatty=False) File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/test/test_ssl.py", line 2062, in server_params_test s.connect((HOST, server.port)) File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/ssl.py", line 864, in connect self._real_connect(addr, False) File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/ssl.py", line 855, in _real_connect self.do_handshake() File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/ssl.py", line 828, in do_handshake self._sslobj.do_handshake() SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:727) ---------- assignee: christian.heimes components: SSL, Tests messages: 353691 nosy: christian.heimes, vstinner priority: normal severity: normal status: open title: [2.7] test_ssl fails versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 08:56:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 12:56:28 +0000 Subject: [issue38338] [2.7] test_ssl fails In-Reply-To: <1569934554.24.0.56143952582.issue38338@roundup.psfhosted.org> Message-ID: <1569934588.38.0.102157039478.issue38338@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 08:57:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 12:57:07 +0000 Subject: [issue38338] [2.7] test_ssl fails on RHEL8 In-Reply-To: <1569934554.24.0.56143952582.issue38338@roundup.psfhosted.org> Message-ID: <1569934627.77.0.108167120218.issue38338@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: [2.7] test_ssl fails -> [2.7] test_ssl fails on RHEL8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 09:20:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 13:20:50 +0000 Subject: [issue38339] [3.5] The doc job of Travis CI fails on Python 3.5: needs at least Sphinx v1.8 Message-ID: <1569936050.09.0.437024380138.issue38339@roundup.psfhosted.org> New submission from STINNER Victor : Example: https://travis-ci.org/python/cpython/jobs/590339147 $ python --version Python 3.6.3 $ pip --version pip 9.0.1 from /home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages (python 3.6) Could not locate requirements.txt. Override the install: key in your .travis.yml to install dependencies. before_script.1 0.00s$ cd Doc before_script.2 8.58s$ python -m pip install sphinx~=1.6.1 blurb 1.88s$ make check suspicious html SPHINXOPTS="-q -W -j4" python3 tools/rstlint.py -i tools -i ./venv -i README.rst No problems found. make[1]: Entering directory `/home/travis/build/python/cpython/Doc' mkdir -p build Building NEWS from Misc/NEWS.d with blurb PATH=./venv/bin:$PATH sphinx-build -b suspicious -d build/doctrees -D latex_elements.papersize= -q -W -j4 . build/suspicious Sphinx version error: This project needs at least Sphinx v1.8 and therefore cannot be built with this version. make[1]: *** [build] Error 1 make[1]: Leaving directory `/home/travis/build/python/cpython/Doc' Suspicious check complete; look for any errors in the above output or in build/suspicious/suspicious.csv. If all issues are false positives, append that file to tools/susp-ignored.csv. make: *** [suspicious] Error 1 The command "make check suspicious html SPHINXOPTS="-q -W -j4"" exited with 2. cache.2 store build cache ---------- assignee: docs at python components: Documentation messages: 353692 nosy: docs at python, mdk, vstinner priority: normal severity: normal status: open title: [3.5] The doc job of Travis CI fails on Python 3.5: needs at least Sphinx v1.8 versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 09:23:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 13:23:42 +0000 Subject: [issue38339] [3.5] The doc job of Travis CI fails on Python 3.5: needs at least Sphinx v1.8 In-Reply-To: <1569936050.09.0.437024380138.issue38339@roundup.psfhosted.org> Message-ID: <1569936222.18.0.971372503731.issue38339@roundup.psfhosted.org> STINNER Victor added the comment: This issue prevents to merge the following 3.5 pull requests: https://github.com/python/cpython/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+base%3A3.5+ ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 09:24:11 2019 From: report at bugs.python.org (ECAS India) Date: Tue, 01 Oct 2019 13:24:11 +0000 Subject: [issue38340] ERROR WHILE BUILDING pyworld for x86_64-linux-gnu-gcc Message-ID: <1569936251.44.0.0859719635079.issue38340@roundup.psfhosted.org> New submission from ECAS India : creating build/temp.linux-x86_64-3.7/lib/World creating build/temp.linux-x86_64-3.7/lib/World/src x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Ilib/World/src -I/usr/include/python3.7m -I/usr/local/lib/python3.7/dist-packages/numpy/core/include -c pyworld/pyworld.cpp -o build/temp.linux-x86_64-3.7/pyworld/pyworld.o x86_64-linux-gnu-gcc: error: pyworld/pyworld.cpp: No such file or directory x86_64-linux-gnu-gcc: fatal error: no input files compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 ---------------------------------------- Failed building wheel for pyworld Running setup.py clean for pyworld Failed to build pyworld ---------- files: Screenshot from 2019-10-01 18-53-25.png messages: 353694 nosy: ECAS India priority: normal severity: normal status: open title: ERROR WHILE BUILDING pyworld for x86_64-linux-gnu-gcc type: compile error versions: Python 3.7 Added file: https://bugs.python.org/file48635/Screenshot from 2019-10-01 18-53-25.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 09:25:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 13:25:28 +0000 Subject: [issue38339] [3.5] The doc job of Travis CI fails on Python 3.5: needs at least Sphinx v1.8 In-Reply-To: <1569936050.09.0.437024380138.issue38339@roundup.psfhosted.org> Message-ID: <1569936328.19.0.690529231769.issue38339@roundup.psfhosted.org> STINNER Victor added the comment: I suggest to backport https://github.com/python/cpython/pull/10676 to 3.5: use Sphinx 1.8.2 in .travis.yml. Commit in the 3.6 branch: commit 23a98abd4256f931ed89b65ec6babd4f06dbff97 Author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> Date: Sat Dec 8 21:34:30 2018 -0800 [3.7] Doc: Bump sphinx. (GH-10676) (GH-10803) (cherry picked from commit 2db96ae7444880d66d4ef65abab8a5e6ff328711) Co-authored-by: Julien Palard diff --git a/.travis.yml b/.travis.yml index ed4e46c782..8250fd91b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,7 @@ matrix: - cd Doc # Sphinx is pinned so that new versions that introduce new warnings won't suddenly cause build failures. # (Updating the version is fine as long as no warnings are raised by doing so.) - - python -m pip install sphinx~=1.6.1 blurb + - python -m pip install sphinx==1.8.2 blurb script: - make check suspicious html SPHINXOPTS="-q -W -j4" - os: linux ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 09:27:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 13:27:13 +0000 Subject: [issue38339] [3.5] The doc job of Travis CI fails on Python 3.5: needs at least Sphinx v1.8 In-Reply-To: <1569936050.09.0.437024380138.issue38339@roundup.psfhosted.org> Message-ID: <1569936433.1.0.6913943827.issue38339@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +16115 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16522 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 09:28:07 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 01 Oct 2019 13:28:07 +0000 Subject: [issue38340] ERROR WHILE BUILDING pyworld for x86_64-linux-gnu-gcc In-Reply-To: <1569936251.44.0.0859719635079.issue38340@roundup.psfhosted.org> Message-ID: <1569936487.73.0.0121065283684.issue38340@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This is an issue tracker for CPython. The build log seems like an issue with pyworld package. I would suggest creating an issue in their tracker. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 09:28:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 13:28:55 +0000 Subject: [issue38339] [3.5] The doc job of Travis CI fails on Python 3.5: needs at least Sphinx v1.8 In-Reply-To: <1569936050.09.0.437024380138.issue38339@roundup.psfhosted.org> Message-ID: <1569936535.38.0.510129404962.issue38339@roundup.psfhosted.org> STINNER Victor added the comment: I proposed PR 16522 to update Sphinx from version 1.6.1 to 1.8.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 10:03:07 2019 From: report at bugs.python.org (Sanjay) Date: Tue, 01 Oct 2019 14:03:07 +0000 Subject: [issue38337] inspect: getmembers calls properties In-Reply-To: <1569931319.11.0.161787180553.issue38337@roundup.psfhosted.org> Message-ID: <1569938587.96.0.742008377806.issue38337@roundup.psfhosted.org> Sanjay added the comment: the issue happens in 2.7 as well ---------- nosy: +Sanjay versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 11:35:07 2019 From: report at bugs.python.org (Charalampos Stratakis) Date: Tue, 01 Oct 2019 15:35:07 +0000 Subject: [issue37096] Add large-file tests for modules using sendfile(2) In-Reply-To: <1559200699.13.0.758657145229.issue37096@roundup.psfhosted.org> Message-ID: <1569944107.21.0.496609356315.issue37096@roundup.psfhosted.org> Charalampos Stratakis added the comment: After this change I get some disk space issues on the Fedora rawhide buildbot for the clang installed build only (and strangely enough not for the other jobs). There are currently around 9GB of free space there: https://buildbot.python.org/all/#/builders/188/builds/1110 ====================================================================== ERROR: test_tofromfile (test.test_array.DoubleTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-x86_64.clang-installed/build/target/lib/python3.9/test/test_array.py", line 374, in test_tofromfile f.close() OSError: [Errno 28] No space left on device ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 12:01:15 2019 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 01 Oct 2019 16:01:15 +0000 Subject: [issue38248] inconsistency in asyncio.Task between cancellation while running vs. cancellation immediately after it finishes In-Reply-To: <1569141924.07.0.413373545347.issue38248@roundup.psfhosted.org> Message-ID: <1569945675.38.0.0693245872436.issue38248@roundup.psfhosted.org> Change by Yury Selivanov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 12:02:56 2019 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 01 Oct 2019 16:02:56 +0000 Subject: [issue37146] opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting In-Reply-To: <1559594083.93.0.475089830437.issue37146@roundup.psfhosted.org> Message-ID: <1569945776.09.0.772960370073.issue37146@roundup.psfhosted.org> Yury Selivanov added the comment: > It seems like nobody came up with a solution for the debug mode since June. I close the issue. Reopen it if you would like to propose a solution. I think the only solution is to have a flag to disable optimizations, inlcluding this one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 12:42:10 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 01 Oct 2019 16:42:10 +0000 Subject: [issue37096] Add large-file tests for modules using sendfile(2) In-Reply-To: <1559200699.13.0.758657145229.issue37096@roundup.psfhosted.org> Message-ID: <1569948130.86.0.427985570941.issue37096@roundup.psfhosted.org> Giampaolo Rodola' added the comment: Sorry about that. I'm attaching a patch which skips those tests if there's not enough free disk space. If you confirm it works I'll make a PR. ---------- Added file: https://bugs.python.org/file48636/disk-space.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 13:06:05 2019 From: report at bugs.python.org (Zachary Ware) Date: Tue, 01 Oct 2019 17:06:05 +0000 Subject: [issue38313] Crash/No start In-Reply-To: <1569726233.14.0.289073858967.issue38313@roundup.psfhosted.org> Message-ID: <1569949565.52.0.735762960417.issue38313@roundup.psfhosted.org> Zachary Ware added the comment: Feel free to reopen if you can answer the questions in my previous message. ---------- resolution: -> works for me stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 13:08:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 17:08:29 +0000 Subject: [issue37096] Add large-file tests for modules using sendfile(2) In-Reply-To: <1559200699.13.0.758657145229.issue37096@roundup.psfhosted.org> Message-ID: <1569949709.1.0.359192808466.issue37096@roundup.psfhosted.org> STINNER Victor added the comment: Should we decorate the new files with @requires('largefile', '...')? Documentation: largefile - It is okay to run some test that may create huge files. These tests can take a long time and may consume >2 GiB of disk space temporarily. It may be interesting to add an option to regrtest to specify how much space can be used by tests, an option similar to -M/--memlimit which is for memory. I don't recall if largefile is enabled by default on buildbots or not :-p ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 13:19:53 2019 From: report at bugs.python.org (Charalampos Stratakis) Date: Tue, 01 Oct 2019 17:19:53 +0000 Subject: [issue37096] Add large-file tests for modules using sendfile(2) In-Reply-To: <1559200699.13.0.758657145229.issue37096@roundup.psfhosted.org> Message-ID: <1569950393.87.0.470105470541.issue37096@roundup.psfhosted.org> Charalampos Stratakis added the comment: It seems that the -uall argument is passed to regrtest invocation for the buildbot run [0] which invokes the largefile tests (including all the resource intensive tests). However when configure is run you can see: checking whether to enable large file support... no [0] https://github.com/python/cpython/blob/master/Lib/test/libregrtest/cmdline.py#L81 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 13:43:04 2019 From: report at bugs.python.org (Tony Cappellini) Date: Tue, 01 Oct 2019 17:43:04 +0000 Subject: [issue37424] subprocess.run timeout does not function if shell=True and capture_output=True In-Reply-To: <1561618790.88.0.611701645761.issue37424@roundup.psfhosted.org> Message-ID: <1569951784.27.0.891099265896.issue37424@roundup.psfhosted.org> Tony Cappellini added the comment: I'm still seeing hangs with subprocess.run() in Python 3.7.4 Unfortunately, it involves talking to an NVME SSD on Linux, so I cannot easily submit code to duplicate it. ---------- nosy: +cappy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 13:55:25 2019 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 01 Oct 2019 17:55:25 +0000 Subject: [issue38333] add type signatures to library function docs In-Reply-To: <1569912143.0.0.669955016968.issue38333@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: I'm sorry, but that's unacceptable. On Mon, Sep 30, 2019 at 23:42 Vedran ?a?i? wrote: > > Vedran ?a?i? added the comment: > > > Many docs are ... vague about types. > > ... and I consider that a feature. At least if you do that, make an > explicit decision not to introduce TypeErrors for "disagreeing with the > documented signature". > > For example, I'd be ok with sum being documented as taking an iterable of > numbers and returning a number, but it would be a catastrophe if as a > consequence of that, sum of a list of lists would stop working. > > ---------- > nosy: +veky > > _______________________________________ > Python tracker > > _______________________________________ > -- --Guido (mobile) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 14:00:22 2019 From: report at bugs.python.org (Tony Cappellini) Date: Tue, 01 Oct 2019 18:00:22 +0000 Subject: [issue37424] subprocess.run timeout does not function if shell=True and capture_output=True In-Reply-To: <1561618790.88.0.611701645761.issue37424@roundup.psfhosted.org> Message-ID: <1569952822.43.0.274093840921.issue37424@roundup.psfhosted.org> Tony Cappellini added the comment: Using Python 3.7.4, I'm calling subprocess.run() with the following arguments. .run() still hangs even though a timeout is being passed in. subprocess.run(cmd_list, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=False, timeout=timeout_val, check=True, universal_newlines=True) cmd_list contains the name of the bash script below, which is ./rescan.sh ------------------------------------------------------------------ #!/usr/bin/bash echo Rescanning system for PCIe devices echo "Rescan device" echo 1 > /sys/bus/pci/rescan sleep 5 if [ `lspci | grep -ic "Non-Volatile memory controller"` -gt 0 ] then echo "Device Detected after Rescan" else echo "Device NOT detected after Rescan" exit 1 fi echo Rescan Done This script is scanning for NVME SSDs, so duplicating the issue is not as straightforward as submitting a python script. The OS is CentOS 7. uname -a shows 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux I know the Kernel is old, but we have a restriction against updating it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 14:29:30 2019 From: report at bugs.python.org (Tim Peters) Date: Tue, 01 Oct 2019 18:29:30 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1569954570.37.0.419140675844.issue38006@roundup.psfhosted.org> Tim Peters added the comment: Neil, about this comment: # - ct is not yet trash (it actually is but the GC doesn't know because of # the missing tp_traverse method). I believe gc should know ct is trash. ct is in the cf list, and the latter does have tp_traverse. What gc won't know is that `a` is trash, because `a` is attached to ct, and ct doesn't have tp_traverse. It should blow up anyway :-) Maybe with a simpler structure it would be easier to rearrange code to nudge the callback into getting cleared before use? Z <- Y <- A <-> B -> WZ -> C where WZ is a weakref to Z with callback C, and Y doesn't implement tp_traverse. The only cycle is between A and B, which could just as well be the same object. All the other stuff hangs off that cycle. It's all trash, but we won't know in advance that Z is part of it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 16:23:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 20:23:56 +0000 Subject: [issue37096] Add large-file tests for modules using sendfile(2) In-Reply-To: <1559200699.13.0.758657145229.issue37096@roundup.psfhosted.org> Message-ID: <1569961436.78.0.737885895101.issue37096@roundup.psfhosted.org> STINNER Victor added the comment: > checking whether to enable large file support... no That's only at the C level to decide how to pass a file position. It's unrelated to the regrtest "largefile" resource. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 16:26:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 20:26:06 +0000 Subject: [issue37424] subprocess.run timeout does not function if shell=True and capture_output=True In-Reply-To: <1561618790.88.0.611701645761.issue37424@roundup.psfhosted.org> Message-ID: <1569961566.08.0.0211341598222.issue37424@roundup.psfhosted.org> STINNER Victor added the comment: > I'm still seeing hangs with subprocess.run() in Python 3.7.4 That's not surprising, the fix has been pushed at 2019-09-11. Python 3.7.5 will include the fix and it will be released soon: https://www.python.org/dev/peps/pep-0537/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 16:28:42 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 01 Oct 2019 20:28:42 +0000 Subject: [issue38331] Exec not recognizing global variables inside function In-Reply-To: <1569875978.41.0.850227388561.issue38331@roundup.psfhosted.org> Message-ID: <1569961722.92.0.434496977098.issue38331@roundup.psfhosted.org> Ronald Oussoren added the comment: I don't think this is a bug. def func(): print(var) This captures the globals at the time of definition, that is "global" references are resolved using the func.__globals__ attribute which is the globals dictionary at the time the function is created exec("func()", globals=my_globals;locals=my_globals) This runs code with a different globals dictionary, but that doesn't affect the already defined function because it resolves names with the previously captured globals dictionary. This is basically the mechanism that ensures that functions defined in a module use that modules global namespace, and not the globals from where they are called. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 16:40:45 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 01 Oct 2019 20:40:45 +0000 Subject: [issue36470] dataclasses.replace raises an exception if InitVar with default argument is not provided. In-Reply-To: <1553860338.68.0.823118501948.issue36470@roundup.psfhosted.org> Message-ID: <1569962445.5.0.543113062189.issue36470@roundup.psfhosted.org> Change by Eric V. Smith : ---------- assignee: -> eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 16:50:47 2019 From: report at bugs.python.org (Norman Denayer) Date: Tue, 01 Oct 2019 20:50:47 +0000 Subject: [issue38341] Add SMTPNotSupportedError in the exports of smtplib Message-ID: <1569963046.98.0.477841717728.issue38341@roundup.psfhosted.org> New submission from Norman Denayer : Long story short: smtplib.SMTPNotSupportedError seems the only exception not present in __all__ variable exposed by smtplib.py Context: I currently face an issue running mypy on one of my module: ...tools/email.py:46: error: Module has no attribute "SMTPNotSupportedError" except smtplib.SMTPNotSupportedError: Digging into the context of this error, I note this exception is not exposed in the list __all__. Regards, Norman ---------- components: email messages: 353712 nosy: Norman.Denayer, barry, r.david.murray priority: normal severity: normal status: open title: Add SMTPNotSupportedError in the exports of smtplib type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 16:52:28 2019 From: report at bugs.python.org (Roundup Robot) Date: Tue, 01 Oct 2019 20:52:28 +0000 Subject: [issue38341] Add SMTPNotSupportedError in the exports of smtplib In-Reply-To: <1569963046.98.0.477841717728.issue38341@roundup.psfhosted.org> Message-ID: <1569963147.99.0.96003009692.issue38341@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +16116 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16525 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 16:55:23 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Tue, 01 Oct 2019 20:55:23 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1569963323.42.0.838084079366.issue38006@roundup.psfhosted.org> Neil Schemenauer added the comment: ?ukasz, is there some reason you removed old versions (2.7, 3.6, etc)? The bug is present on those versions of Python and it should be trivial to backport the fix. If those branches are maintained, I think we should fix it. Attached is a small test program (gc_weakref_bug_demo2.py) that causes the same crash as in this bug report (SEGV inside _PyFunction_Vectorcall). Setting things up is quite tricky and it depends on the order that things are cleared in delete_garbage(). Maybe still worth making a unit test for it? Instead of using the 'dummy' function, you can also use types.SimpleNamespace(). Calling repr() on it after tp_clear will result in a crash or an assert failure. Those two crashes are not needed to confirm the bug. Just the fact that 'callback' runs is proof enough. So, in a unit test, the callback to just set a global to indicate failure. ---------- Added file: https://bugs.python.org/file48637/gc_weakref_bug_demo2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 18:22:11 2019 From: report at bugs.python.org (Anthony Tuininga) Date: Tue, 01 Oct 2019 22:22:11 +0000 Subject: [issue38342] ImportError: cannot import name 'MetadataPathFinder' from 'importlib.metadata' Message-ID: <1569968531.94.0.379845933414.issue38342@roundup.psfhosted.org> New submission from Anthony Tuininga : Running the suggested code found at https://docs.python.org/3.8/whatsnew/3.8.html regarding the new importlib.metadata module from importlib.metadata import version, requires, files version('requests') yields the error Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.8/importlib/metadata/__init__.py", line 365, in version return distribution(package).version File "/usr/local/lib/python3.8/importlib/metadata/__init__.py", line 338, in distribution return Distribution.from_name(package) File "/usr/local/lib/python3.8/importlib/metadata/__init__.py", line 159, in from_name dists = resolver(name) File "", line 1381, in find_distributions ImportError: cannot import name 'MetadataPathFinder' from 'importlib.metadata' (/usr/local/lib/python3.8/importlib/metadata/__init__.py) ---------- components: Library (Lib) messages: 353714 nosy: atuining priority: normal severity: normal status: open title: ImportError: cannot import name 'MetadataPathFinder' from 'importlib.metadata' type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 18:27:41 2019 From: report at bugs.python.org (=?utf-8?q?Ionel_Cristian_M=C4=83rie=C8=99?=) Date: Tue, 01 Oct 2019 22:27:41 +0000 Subject: [issue38227] Setting a signal handler gets multiprocessing.Pool stuck In-Reply-To: <1568929295.79.0.555392640133.issue38227@roundup.psfhosted.org> Message-ID: <1569968861.72.0.715706456082.issue38227@roundup.psfhosted.org> Change by Ionel Cristian M?rie? : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 19:01:39 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 01 Oct 2019 23:01:39 +0000 Subject: [issue38343] Version name in PC/layout read incorrectly for RC Message-ID: <1569970899.08.0.367684181352.issue38343@roundup.psfhosted.org> New submission from Steve Dower : I noticed that when the nuget.org packages published for 3.8.0rc1, they were given the version "3.8.0". 3.7.5rc1 was okay because it's still using the old approach to setting the version. This needs to be fixed before any more RCs are released. I'll see if I can get the incorrectly versioned files removed from nuget and replace them with RCs. ---------- assignee: steve.dower components: Windows keywords: 3.8regression messages: 353715 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: Version name in PC/layout read incorrectly for RC type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 19:04:16 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 01 Oct 2019 23:04:16 +0000 Subject: [issue38343] Version name in PC/layout read incorrectly for RC In-Reply-To: <1569970899.08.0.367684181352.issue38343@roundup.psfhosted.org> Message-ID: <1569971056.4.0.651959130234.issue38343@roundup.psfhosted.org> Change by Steve Dower : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 19:09:37 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 01 Oct 2019 23:09:37 +0000 Subject: [issue38343] Version name in PC/layout read incorrectly for RC In-Reply-To: <1569970899.08.0.367684181352.issue38343@roundup.psfhosted.org> Message-ID: <1569971377.85.0.287739570608.issue38343@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +16118 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16527 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 19:42:31 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 01 Oct 2019 23:42:31 +0000 Subject: [issue38343] Version name in PC/layout read incorrectly for RC In-Reply-To: <1569970899.08.0.367684181352.issue38343@roundup.psfhosted.org> Message-ID: <1569973351.42.0.875855357477.issue38343@roundup.psfhosted.org> Steve Dower added the comment: New changeset b9a8b8296cd7be22f8b5bf92af686a788c47c7bf by Steve Dower in branch 'master': bpo-38343: Fixes version handling for nuget packages (GH-16527) https://github.com/python/cpython/commit/b9a8b8296cd7be22f8b5bf92af686a788c47c7bf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 19:42:37 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 01 Oct 2019 23:42:37 +0000 Subject: [issue38343] Version name in PC/layout read incorrectly for RC In-Reply-To: <1569970899.08.0.367684181352.issue38343@roundup.psfhosted.org> Message-ID: <1569973357.41.0.860097275668.issue38343@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16119 pull_request: https://github.com/python/cpython/pull/16528 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 19:46:06 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 01 Oct 2019 23:46:06 +0000 Subject: [issue38343] Version name in PC/layout read incorrectly for RC In-Reply-To: <1569970899.08.0.367684181352.issue38343@roundup.psfhosted.org> Message-ID: <1569973566.32.0.0294159949871.issue38343@roundup.psfhosted.org> Steve Dower added the comment: I already republished correctly-versioned files and unlisted the wrong ones (as well as contacting support to see whether they can delete them completely so they don't impact the final release). The change above fixes the issue. It will need cherry-picking for the v3.8.0 tag (or the v3.8.0rc2 tag...). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 20:00:52 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 02 Oct 2019 00:00:52 +0000 Subject: [issue38343] Version name in PC/layout read incorrectly for RC In-Reply-To: <1569970899.08.0.367684181352.issue38343@roundup.psfhosted.org> Message-ID: <1569974452.54.0.829167363038.issue38343@roundup.psfhosted.org> miss-islington added the comment: New changeset a11df75269b5d47248be617ed02e96c1d1938fd1 by Miss Islington (bot) in branch '3.8': bpo-38343: Fixes version handling for nuget packages (GH-16527) https://github.com/python/cpython/commit/a11df75269b5d47248be617ed02e96c1d1938fd1 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 20:01:20 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 02 Oct 2019 00:01:20 +0000 Subject: [issue38343] Version name in PC/layout read incorrectly for RC In-Reply-To: <1569970899.08.0.367684181352.issue38343@roundup.psfhosted.org> Message-ID: <1569974480.55.0.206654581075.issue38343@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 20:09:47 2019 From: report at bugs.python.org (Eric Snow) Date: Wed, 02 Oct 2019 00:09:47 +0000 Subject: [issue38187] test.test_tools.test_c_analyzer fails in refleak mode In-Reply-To: <1568646466.84.0.78149770012.issue38187@roundup.psfhosted.org> Message-ID: <1569974987.22.0.875268949192.issue38187@roundup.psfhosted.org> Change by Eric Snow : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 20:23:55 2019 From: report at bugs.python.org (Daniel Hillier) Date: Wed, 02 Oct 2019 00:23:55 +0000 Subject: [issue38334] zipfile: Seeking encrypted file breaks after seeking backwards In-Reply-To: <1569917842.05.0.044912868688.issue38334@roundup.psfhosted.org> Message-ID: <1569975835.93.0.854000276183.issue38334@roundup.psfhosted.org> Change by Daniel Hillier : ---------- keywords: +patch pull_requests: +16120 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16529 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 20:39:03 2019 From: report at bugs.python.org (Emmanuel Arias) Date: Wed, 02 Oct 2019 00:39:03 +0000 Subject: [issue38332] invalid content-transfer-encoding in encoded-word causes KeyError In-Reply-To: <1569877053.41.0.568400002445.issue38332@roundup.psfhosted.org> Message-ID: <1569976743.53.0.730994697804.issue38332@roundup.psfhosted.org> Emmanuel Arias added the comment: Hi Andrei sorry for my last message. Now I understand perfectly your idea and your PR. IMO this is a correct patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 21:47:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 01:47:56 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1569980876.62.0.959315717695.issue36670@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16121 pull_request: https://github.com/python/cpython/pull/16530 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 01:47:38 2019 From: report at bugs.python.org (=?utf-8?q?Mathias_Fr=C3=B6hlich?=) Date: Wed, 02 Oct 2019 05:47:38 +0000 Subject: [issue18309] Make python slightly more relocatable In-Reply-To: <1372262450.0.0.792872111515.issue18309@psf.upfronthosting.co.za> Message-ID: <1569995258.77.0.195009160545.issue18309@roundup.psfhosted.org> Mathias Fr?hlich added the comment: Ok, so far. But what shall I do now? It would be nice that python is a bit smarter in finding its increasing important module files when being embedded into an application. Anybody out there who wants to look at that contribution? best Mathias ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 02:01:56 2019 From: report at bugs.python.org (=?utf-8?b?0JDQu9C10LrRgdCw0L3QtNGAINCh0LXQvNC10L3QvtCy?=) Date: Wed, 02 Oct 2019 06:01:56 +0000 Subject: [issue38342] ImportError: cannot import name 'MetadataPathFinder' from 'importlib.metadata' In-Reply-To: <1569968531.94.0.379845933414.issue38342@roundup.psfhosted.org> Message-ID: <1569996116.13.0.873484254785.issue38342@roundup.psfhosted.org> ????????? ??????? added the comment: on windows ```C:\>py -c "import sys;from importlib.metadata import version, requires, files;print(sys.version);print(version('requests'))" 3.8.0b4 (tags/v3.8.0b4:d93605d, Aug 29 2019, 23:21:28) [MSC v.1916 64 bit (AMD64)] 2.22.0 ``` ---------- nosy: +iamsav _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 02:30:23 2019 From: report at bugs.python.org (James Abel) Date: Wed, 02 Oct 2019 06:30:23 +0000 Subject: [issue38344] activate.bat else needs to be on the same line as the if Message-ID: <1569997823.02.0.0977203709428.issue38344@roundup.psfhosted.org> New submission from James Abel : In activate.bat, the else needs to be on the same line as the if ---------- components: Windows messages: 353722 nosy: James Abel, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: activate.bat else needs to be on the same line as the if type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 02:30:42 2019 From: report at bugs.python.org (Robert Kearns) Date: Wed, 02 Oct 2019 06:30:42 +0000 Subject: [issue38345] Add end lines to pyclbr objects Message-ID: <1569997842.45.0.505629355226.issue38345@roundup.psfhosted.org> Change by Robert Kearns : ---------- components: Library (Lib) nosy: RobertKearns priority: normal severity: normal status: open title: Add end lines to pyclbr objects type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 02:31:55 2019 From: report at bugs.python.org (James Abel) Date: Wed, 02 Oct 2019 06:31:55 +0000 Subject: [issue38344] activate.bat else needs to be on the same line as the if In-Reply-To: <1569997823.02.0.0977203709428.issue38344@roundup.psfhosted.org> Message-ID: <1569997915.71.0.279899009029.issue38344@roundup.psfhosted.org> Change by James Abel : ---------- keywords: +patch pull_requests: +16122 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16533 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 02:40:26 2019 From: report at bugs.python.org (Robert Kearns) Date: Wed, 02 Oct 2019 06:40:26 +0000 Subject: [issue38345] Add end lines to pyclbr objects Message-ID: <1569998426.95.0.986811491718.issue38345@roundup.psfhosted.org> Change by Robert Kearns : ---------- keywords: +patch pull_requests: +16124 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16534 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 02:41:31 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 02 Oct 2019 06:41:31 +0000 Subject: [issue38342] ImportError: cannot import name 'MetadataPathFinder' from 'importlib.metadata' In-Reply-To: <1569968531.94.0.379845933414.issue38342@roundup.psfhosted.org> Message-ID: <1569998491.81.0.219120400316.issue38342@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +jaraco _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 03:20:26 2019 From: report at bugs.python.org (Mariusz Wawrzonkowski) Date: Wed, 02 Oct 2019 07:20:26 +0000 Subject: [issue38106] [2.7] Race in PyThread_release_lock on macOS - can lead to memory corruption and deadlock In-Reply-To: <1568200653.3.0.865964137512.issue38106@roundup.psfhosted.org> Message-ID: <1570000826.57.0.693507387503.issue38106@roundup.psfhosted.org> Mariusz Wawrzonkowski added the comment: I can confirm that I have the deadlock because of the reason described above. When I change the PyThread_release_lock source locally to signal before releasing the mutex, then my deadlock does not occur anymore. I have tested it on a heave multithreading model. ---------- nosy: +mariosoft _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 03:51:17 2019 From: report at bugs.python.org (Florimond Manca) Date: Wed, 02 Oct 2019 07:51:17 +0000 Subject: [issue38342] ImportError: cannot import name 'MetadataPathFinder' from 'importlib.metadata' In-Reply-To: <1569968531.94.0.379845933414.issue38342@roundup.psfhosted.org> Message-ID: <1570002677.93.0.802089440934.issue38342@roundup.psfhosted.org> Florimond Manca added the comment: Can confirm this on 3.8.0rc1+ / macOS Mojave: ```console $ python -c "import importlib.metadata; print(list(importlib.metadata.distributions()))" Traceback (most recent call last): File "", line 1, in File "/Users/florimond/.pyenv/versions/3.8-dev/lib/python3.8/importlib/metadata/__init__.py", line 175, in resolver() File "", line 1381, in find_distributions ImportError: cannot import name 'MetadataPathFinder' from 'importlib.metadata' (/Users/florimond/.pyenv/versions/3.8-dev/lib/python3.8/importlib/metadata/__init__.py) ``` I discovered this pytest started failing on 3.8-dev because it uses `importlib.metadata.distributions()` internally. 3.8.0b4+ used to be fine I believe. I'd assume this is a rather critical bug? ---------- nosy: +Florimond Manca _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 04:08:36 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 02 Oct 2019 08:08:36 +0000 Subject: [issue38342] ImportError: cannot import name 'MetadataPathFinder' from 'importlib.metadata' In-Reply-To: <1569968531.94.0.379845933414.issue38342@roundup.psfhosted.org> Message-ID: <1570003716.97.0.394730637077.issue38342@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: The library was synced with https://bugs.python.org/issue38121 which seems to be related to this. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 04:23:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 08:23:36 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1570004616.02.0.257993237306.issue38006@roundup.psfhosted.org> STINNER Victor added the comment: Oh, Neil missed "bpo-38006: " prefix in his commit. Here it is: commit bcda460baf25062ab68622b3f043f52b9db4d21d Author: Neil Schemenauer Date: Mon Sep 30 10:06:45 2019 -0700 Clear weakrefs in garbage found by the GC (#16495) Fix a bug due to the interaction of weakrefs and the cyclic garbage collector. We must clear any weakrefs in garbage in order to prevent their callbacks from executing and causing a crash. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 04:52:49 2019 From: report at bugs.python.org (Jim Jeon) Date: Wed, 02 Oct 2019 08:52:49 +0000 Subject: [issue38346] Wrong behavior when using `assert_called_with` with mutable object Message-ID: <1570006369.69.0.450054962888.issue38346@roundup.psfhosted.org> New submission from Jim Jeon : When `assert_called_with` is used with mutable object, test fails if the object has changed. I think this is not what it meant to do. https://docs.python.org/dev/library/unittest.mock-examples.html#coping-with-mutable-arguments The same situation is explained in this document. But I don't understand why they did not fix and just are proposing some solutions to the users. ---------- components: Tests files: Screen Shot 2019-10-02 at 5.22.05 PM.png messages: 353727 nosy: Jim Jeon priority: normal severity: normal status: open title: Wrong behavior when using `assert_called_with` with mutable object type: enhancement versions: Python 3.7 Added file: https://bugs.python.org/file48638/Screen Shot 2019-10-02 at 5.22.05 PM.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 05:15:35 2019 From: report at bugs.python.org (=?utf-8?b?UsO8ZGlnZXIgUGzDvG0=?=) Date: Wed, 02 Oct 2019 09:15:35 +0000 Subject: [issue38347] pathfix.py does not find Python scripts that have '-' in its filename Message-ID: <1570007735.24.0.378926810144.issue38347@roundup.psfhosted.org> New submission from R?diger Pl?m : Tools/scripts/pathfix.py does not find Python scripts that contain a '-' in their filename when working recursively. This is caused by the regular expression used to detect whether a filename is a Python script: r'^[a-zA-Z0-9_]+\.py$' r'^[a-zA-Z0-9_-]+\.py$' fixes this. I am not sure if you want to allow further characters in script names like spaces or other special characters. The pull request I will create will only fix the '-' issue. ---------- components: Demos and Tools messages: 353728 nosy: rpluem priority: normal severity: normal status: open title: pathfix.py does not find Python scripts that have '-' in its filename type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 05:42:07 2019 From: report at bugs.python.org (=?utf-8?b?UsO8ZGlnZXIgUGzDvG0=?=) Date: Wed, 02 Oct 2019 09:42:07 +0000 Subject: [issue38347] pathfix.py does not find Python scripts that have '-' in its filename In-Reply-To: <1570007735.24.0.378926810144.issue38347@roundup.psfhosted.org> Message-ID: <1570009327.48.0.143161828105.issue38347@roundup.psfhosted.org> Change by R?diger Pl?m : ---------- keywords: +patch pull_requests: +16125 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16536 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 06:00:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 10:00:39 +0000 Subject: [issue38347] pathfix.py does not find Python scripts that have '-' in its filename In-Reply-To: <1570007735.24.0.378926810144.issue38347@roundup.psfhosted.org> Message-ID: <1570010439.28.0.301310672244.issue38347@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 06:21:06 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 02 Oct 2019 10:21:06 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1570011666.3.0.547333736424.issue38006@roundup.psfhosted.org> ?ukasz Langa added the comment: > ?ukasz, is there some reason you removed old versions (2.7, 3.6, etc)? The bug is present on those versions of Python and it should be trivial to backport the fix. If those branches are maintained, I think we should fix it. Sorry, I did that by mistake. ---------- versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 06:47:14 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 10:47:14 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1570013234.35.0.697595922647.issue36670@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16126 pull_request: https://github.com/python/cpython/pull/16537 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 07:21:40 2019 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Wed, 02 Oct 2019 11:21:40 +0000 Subject: [issue38346] Wrong behavior when using `assert_called_with` with mutable object In-Reply-To: <1570006369.69.0.450054962888.issue38346@roundup.psfhosted.org> Message-ID: <1570015300.14.0.274328027503.issue38346@roundup.psfhosted.org> Vedran ?a?i? added the comment: I don't see what the "fix" should be. Python doesn't have value semantics. Functions are called with objects, not with their values. Imagine a was global variable, and then you say: a = mutable_object() f(a) a.mutate() f.assert_called_with(a) In your view of the world, this should raise?? ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 07:35:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 11:35:27 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1570016127.56.0.101538831278.issue36670@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 2ea71a07d0a720707094ee55f78fd232c40724bc by Victor Stinner in branch 'master': bpo-36670: regrtest bug fixes (GH-16537) https://github.com/python/cpython/commit/2ea71a07d0a720707094ee55f78fd232c40724bc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 07:35:36 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 02 Oct 2019 11:35:36 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1570016136.08.0.115257088278.issue36670@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16127 pull_request: https://github.com/python/cpython/pull/16538 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 07:54:22 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 02 Oct 2019 11:54:22 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1570017262.19.0.0264495672583.issue36670@roundup.psfhosted.org> miss-islington added the comment: New changeset a72de9338882b8013a4bb8adb930fe3308682e28 by Miss Islington (bot) in branch '3.8': bpo-36670: regrtest bug fixes (GH-16537) https://github.com/python/cpython/commit/a72de9338882b8013a4bb8adb930fe3308682e28 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 08:03:41 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 02 Oct 2019 12:03:41 +0000 Subject: [issue38346] Wrong behavior when using `assert_called_with` with mutable object In-Reply-To: <1570006369.69.0.450054962888.issue38346@roundup.psfhosted.org> Message-ID: <1570017821.84.0.243687275528.issue38346@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: As explained copy would cause backwards incompatible change on objects that depend on identity comparison. I am not sure if this can be fixed in a backwards compatible manner. > One possibility would be for mock to copy the arguments you pass in. This could then cause problems if you do assertions that rely on object identity for equality. ---------- nosy: +cjw296, lisroach, mariocj89, michael.foord, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 08:09:15 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 02 Oct 2019 12:09:15 +0000 Subject: [issue38346] Wrong behavior when using `assert_called_with` with mutable object In-Reply-To: <1570006369.69.0.450054962888.issue38346@roundup.psfhosted.org> Message-ID: <1570018155.37.0.973988015451.issue38346@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: See also https://bugs.python.org/issue28848 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 08:35:13 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 02 Oct 2019 12:35:13 +0000 Subject: [issue38342] ImportError: cannot import name 'MetadataPathFinder' from 'importlib.metadata' In-Reply-To: <1569968531.94.0.379845933414.issue38342@roundup.psfhosted.org> Message-ID: <1570019713.05.0.549058175543.issue38342@roundup.psfhosted.org> Jason R. Coombs added the comment: I believe importlib/metadata/__init__ was moved to importlib.metadata. I?ll inspect the repo for correctness, but there may be another issue with the old files lingering. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 10:09:30 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 02 Oct 2019 14:09:30 +0000 Subject: [issue38342] ImportError: cannot import name 'MetadataPathFinder' from 'importlib.metadata' In-Reply-To: <1569968531.94.0.379845933414.issue38342@roundup.psfhosted.org> Message-ID: <1570025370.76.0.129600307073.issue38342@roundup.psfhosted.org> Jason R. Coombs added the comment: I've confirmed that the `metadata` directory doesn't exist in the repo. It also doesn't appear on my Python 3.8.0b4 installation on macOS: ``` cpython master $ ls /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/ __init__.py _bootstrap.py abc.py metadata.py util.py __pycache__ _bootstrap_external.py machinery.py resources.py cpython master $ python3.8 -V Python 3.8.0b4 ``` I installed b4 clean. I also installed 3.8.0rc1 over 3.8.0b4 and everything is fine. It's possible that installing 3.8.0b4 over 3.8.0b3 would leave the old package lingering. Can you confirm that's how 3.8.0rc1 was installed? I've crafted this command which should correct the situation in such an environment:: python -c "import importlib.metadata, shutil, pathlib; file = pathlib.Path(importlib.metadata.__file__); str(file).endswith('__init__.py') and shutil.rmtree(file.parent) and print('removed', file.parent)" Please give that a try and see if it corrects the condition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 10:38:28 2019 From: report at bugs.python.org (Huyston) Date: Wed, 02 Oct 2019 14:38:28 +0000 Subject: [issue38331] Exec not recognizing global variables inside function In-Reply-To: <1569875978.41.0.850227388561.issue38331@roundup.psfhosted.org> Message-ID: <1570027108.21.0.576932208055.issue38331@roundup.psfhosted.org> Huyston added the comment: Ronald Oussoren, I understand your comment and it makes sense in the module perspective. However, when using 'exec', we are explicitly passing a globals dict (and locals) that the target code should consider. As the documentation states: "If globals and locals are given, they are used for the global and local variables, respectively." In my point of view, the function is not considering the given globals and locals dict. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 10:39:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 14:39:28 +0000 Subject: [issue38319] shutil.copyfile(): os.sendfile() fails with OverflowError on 32-bit system In-Reply-To: <1569829071.99.0.925566441615.issue38319@roundup.psfhosted.org> Message-ID: <1570027168.14.0.747549270211.issue38319@roundup.psfhosted.org> STINNER Victor added the comment: 32-bit buildbots are back to green. Thanks for the fix! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 10:54:08 2019 From: report at bugs.python.org (Anthony Tuininga) Date: Wed, 02 Oct 2019 14:54:08 +0000 Subject: [issue38342] ImportError: cannot import name 'MetadataPathFinder' from 'importlib.metadata' In-Reply-To: <1569968531.94.0.379845933414.issue38342@roundup.psfhosted.org> Message-ID: <1570028048.88.0.232648858384.issue38342@roundup.psfhosted.org> Anthony Tuininga added the comment: Yes. I had tried b3 earlier, installed b4 over b3 and then rc1 over b4. Removing the cruft using the command you specified caused the problem to go away. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 10:59:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 14:59:02 +0000 Subject: [issue38338] [2.7] test_ssl fails on RHEL8 In-Reply-To: <1569934554.24.0.56143952582.issue38338@roundup.psfhosted.org> Message-ID: <1570028342.03.0.0765004439207.issue38338@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +16128 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16539 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 11:02:36 2019 From: report at bugs.python.org (Batuhan) Date: Wed, 02 Oct 2019 15:02:36 +0000 Subject: [issue38342] ImportError: cannot import name 'MetadataPathFinder' from 'importlib.metadata' In-Reply-To: <1569968531.94.0.379845933414.issue38342@roundup.psfhosted.org> Message-ID: <1570028556.33.0.769542164168.issue38342@roundup.psfhosted.org> Batuhan added the comment: https://gitlab.com/python-devs/importlib_metadata/issues/92 ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 11:14:59 2019 From: report at bugs.python.org (Batuhan) Date: Wed, 02 Oct 2019 15:14:59 +0000 Subject: [issue38348] Make python -m ast more configurable Message-ID: <1570029299.56.0.0303865742584.issue38348@roundup.psfhosted.org> New submission from Batuhan : Allow user to set indent level and parsing status of type comments ---------- components: Library (Lib) messages: 353741 nosy: BTaskaya, serhiy.storchaka priority: normal severity: normal status: open title: Make python -m ast more configurable versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 11:30:45 2019 From: report at bugs.python.org (Batuhan) Date: Wed, 02 Oct 2019 15:30:45 +0000 Subject: [issue38348] Make python -m ast more configurable In-Reply-To: <1570029299.56.0.0303865742584.issue38348@roundup.psfhosted.org> Message-ID: <1570030245.87.0.0171098991935.issue38348@roundup.psfhosted.org> Change by Batuhan : ---------- keywords: +patch pull_requests: +16129 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16540 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 11:52:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 15:52:50 +0000 Subject: [issue38338] [2.7] test_ssl fails on RHEL8 In-Reply-To: <1569934554.24.0.56143952582.issue38338@roundup.psfhosted.org> Message-ID: <1570031570.51.0.127577763255.issue38338@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b3e7045f8314e7b62cd95861d207fe2f97e47198 by Victor Stinner in branch 'master': bpo-38338, test.pythoninfo: add more ssl infos (GH-16539) https://github.com/python/cpython/commit/b3e7045f8314e7b62cd95861d207fe2f97e47198 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 11:57:14 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 02 Oct 2019 15:57:14 +0000 Subject: [issue38338] [2.7] test_ssl fails on RHEL8 In-Reply-To: <1569934554.24.0.56143952582.issue38338@roundup.psfhosted.org> Message-ID: <1570031834.26.0.858927935342.issue38338@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16130 pull_request: https://github.com/python/cpython/pull/16541 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 11:57:24 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 02 Oct 2019 15:57:24 +0000 Subject: [issue38338] [2.7] test_ssl fails on RHEL8 In-Reply-To: <1569934554.24.0.56143952582.issue38338@roundup.psfhosted.org> Message-ID: <1570031844.15.0.458901193387.issue38338@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16131 pull_request: https://github.com/python/cpython/pull/16542 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 12:10:03 2019 From: report at bugs.python.org (jackotonye) Date: Wed, 02 Oct 2019 16:10:03 +0000 Subject: [issue38349] Email example using imaginary library installation error. The install shows that it only supports python 2.x but is listed for python 3.6+ Message-ID: <1570032603.68.0.429442517445.issue38349@roundup.psfhosted.org> New submission from jackotonye : https://docs.python.org/3.7/library/email.examples.html ---------- assignee: docs at python components: Documentation messages: 353743 nosy: docs at python, jackotonye priority: normal severity: normal status: open title: Email example using imaginary library installation error. The install shows that it only supports python 2.x but is listed for python 3.6+ type: resource usage versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 12:10:48 2019 From: report at bugs.python.org (jackotonye) Date: Wed, 02 Oct 2019 16:10:48 +0000 Subject: [issue38349] Email example using imaginary library installation error. The install shows that it only supports python 2.x but is listed under python 3.6+ docs. In-Reply-To: <1570032603.68.0.429442517445.issue38349@roundup.psfhosted.org> Message-ID: <1570032648.53.0.366017505181.issue38349@roundup.psfhosted.org> Change by jackotonye : ---------- title: Email example using imaginary library installation error. The install shows that it only supports python 2.x but is listed for python 3.6+ -> Email example using imaginary library installation error. The install shows that it only supports python 2.x but is listed under python 3.6+ docs. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 12:13:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 16:13:30 +0000 Subject: [issue38338] [2.7] test_ssl fails on RHEL8 In-Reply-To: <1569934554.24.0.56143952582.issue38338@roundup.psfhosted.org> Message-ID: <1570032810.05.0.348309466913.issue38338@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16132 pull_request: https://github.com/python/cpython/pull/16543 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 12:15:00 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 02 Oct 2019 16:15:00 +0000 Subject: [issue38338] [2.7] test_ssl fails on RHEL8 In-Reply-To: <1569934554.24.0.56143952582.issue38338@roundup.psfhosted.org> Message-ID: <1570032900.29.0.723946070211.issue38338@roundup.psfhosted.org> miss-islington added the comment: New changeset ab98cd8aee5a5a7222b82ff13d61f0d33e72a889 by Miss Islington (bot) in branch '3.7': bpo-38338, test.pythoninfo: add more ssl infos (GH-16539) https://github.com/python/cpython/commit/ab98cd8aee5a5a7222b82ff13d61f0d33e72a889 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 12:20:48 2019 From: report at bugs.python.org (SilentGhost) Date: Wed, 02 Oct 2019 16:20:48 +0000 Subject: [issue38349] Email example using imaginary library installation error. The install shows that it only supports python 2.x but is listed under python 3.6+ docs. In-Reply-To: <1570032603.68.0.429442517445.issue38349@roundup.psfhosted.org> Message-ID: <1570033248.3.0.655431547559.issue38349@roundup.psfhosted.org> SilentGhost added the comment: imaginary in the example is not meant to refer to https://pypi.org/project/Imaginary/ it's meant to refer to a module that you could write that would do all the dirty work. Perhaps, it's not the best name to use provided there is an actual module on pypi, alternatively half-baked outdated modules could be remove. ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 12:35:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 16:35:07 +0000 Subject: [issue38350] ./configure --with-pydebug should use -O0 rather than -Og Message-ID: <1570034107.68.0.232468214894.issue38350@roundup.psfhosted.org> New submission from STINNER Victor : In Python 2.7, when using ./configure --with-pydebug, Python is built using -O0 compiler optimization level: disable all optimizations. The comment is quite explicit: "Optimization messes up debuggers, so turn it off for debug builds". if test "$Py_DEBUG" = 'true' ; then # Optimization messes up debuggers, so turn it off for # debug builds. OPT="-g -O0 -Wall $STRICT_PROTO" else OPT="-g $WRAP -O3 -Wall $STRICT_PROTO" fi In Python 3, -Og is preferred over -O0 for pydebug, if -Og is available: if test "$Py_DEBUG" = 'true' ; then # Optimization messes up debuggers, so turn it off for # debug builds. if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then OPT="-g -Og -Wall" else OPT="-g -O0 -Wall" fi else OPT="-g $WRAP -O3 -Wall" fi Problem: in my experience, gdb traceback doesn't make sense sometimes, and gdb fails to inspect some function arguments and some variables which are displayed as . See a very concrete example with a test_gdb failure on x86-64 when Python is compiled using gcc -Og: https://bugzilla.redhat.com/show_bug.cgi?id=1734327#c22 My colleague who is working on gdb suggests to use -O0: https://bugzilla.redhat.com/show_bug.cgi?id=1734327#c27 Since I started contributing to Python, I always forced gcc -O0 because any other optimization level caused me many issues in gdb. I'm using -O0 for 10 years with sucess. The GCC documentation says "It is a better choice than -O0 for producing debuggable code because some compiler passes that collect debug information are disabled at -O0." But my experience says the opposite. Note: instead of -g, we could use -g3 to include debug information for macros and defines. -- I'm proposing to change the *default* compiler flags from -Og to -O0. Obviously, Linux distributions and developers are free to override the compiler optimization level. For example: ./configure --with-pydebug CFLAGS="-Og" ensures that Python is always built using -Og. I propose to modify 3.7, 3.8 and master branches. ---------- components: Build messages: 353746 nosy: vstinner priority: normal severity: normal status: open title: ./configure --with-pydebug should use -O0 rather than -Og versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 12:36:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 16:36:39 +0000 Subject: [issue38338] [2.7] test_ssl fails on RHEL8 In-Reply-To: <1569934554.24.0.56143952582.issue38338@roundup.psfhosted.org> Message-ID: <1570034199.61.0.592881572984.issue38338@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 403ca7ea70232e520af18511fbfb89b58ef2a046 by Victor Stinner in branch '2.7': [2.7] bpo-38338, test.pythoninfo: add more ssl infos (GH-16543) https://github.com/python/cpython/commit/403ca7ea70232e520af18511fbfb89b58ef2a046 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 12:44:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 16:44:00 +0000 Subject: [issue38350] ./configure --with-pydebug should use -O0 rather than -Og In-Reply-To: <1570034107.68.0.232468214894.issue38350@roundup.psfhosted.org> Message-ID: <1570034640.37.0.940081739879.issue38350@roundup.psfhosted.org> STINNER Victor added the comment: I basically propose to revert bpo-23445 change: commit 3d6c784371bccc2407048652bce50c5bccf9b1af Author: Antoine Pitrou Date: Wed Feb 11 19:39:16 2015 +0100 Issue #23445: pydebug builds now use "gcc -Og" where possible, to make the resulting executable faster. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 12:45:36 2019 From: report at bugs.python.org (Mariatta) Date: Wed, 02 Oct 2019 16:45:36 +0000 Subject: [issue38351] Modernize email example from %-formatting to f-string Message-ID: <1570034736.68.0.500723145519.issue38351@roundup.psfhosted.org> New submission from Mariatta : A string was formatted with %s in the code example https://github.com/python/cpython/blob/b3e7045f8314e7b62cd95861d207fe2f97e47198/Doc/includes/email-simple.py#L15 ``` msg['Subject'] = 'The contents of %s' % textfile ``` It would be great to modernize that into fstring. Doc can be read at: https://docs.python.org/3.7/library/email.examples.html ---------- assignee: docs at python components: Documentation keywords: easy, newcomer friendly messages: 353749 nosy: Mariatta, docs at python priority: normal severity: normal stage: needs patch status: open title: Modernize email example from %-formatting to f-string versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 12:50:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 16:50:41 +0000 Subject: [issue38350] ./configure --with-pydebug should use -O0 rather than -Og In-Reply-To: <1570034107.68.0.232468214894.issue38350@roundup.psfhosted.org> Message-ID: <1570035041.0.0.311026541522.issue38350@roundup.psfhosted.org> STINNER Victor added the comment: test_gdb is failing in different architectures and different operating systems: * Fedora, Python 3.8, x86-64: https://bugzilla.redhat.com/show_bug.cgi?id=1734327 * RHEL8, Python 3.6, s390x https://bugzilla.redhat.com/show_bug.cgi?id=1712977 * RHEL 8, Python 3.6, ppc64le https://bugzilla.redhat.com/show_bug.cgi?id=1714733 I'm quite sure that most issues are caused by the compiler optimization level which is not -O0. See also bpo-37631: the debug build of the RHEL8 package is supposed to be compiled using -O0 using EXTRA_CFLAGS variable, but -O0 in EXTRA_CFLAGS variable is overriden by -02 in CFLAGS_NODIST. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 12:52:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 16:52:39 +0000 Subject: [issue38350] ./configure --with-pydebug should use -O0 rather than -Og In-Reply-To: <1570034107.68.0.232468214894.issue38350@roundup.psfhosted.org> Message-ID: <1570035159.04.0.113054220447.issue38350@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +16133 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16544 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 12:52:53 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 02 Oct 2019 16:52:53 +0000 Subject: [issue38338] [2.7] test_ssl fails on RHEL8 In-Reply-To: <1569934554.24.0.56143952582.issue38338@roundup.psfhosted.org> Message-ID: <1570035173.8.0.445469704288.issue38338@roundup.psfhosted.org> miss-islington added the comment: New changeset 183733dfb6b4779d1a5e47f41a2fb86c6be08dda by Miss Islington (bot) in branch '3.8': bpo-38338, test.pythoninfo: add more ssl infos (GH-16539) https://github.com/python/cpython/commit/183733dfb6b4779d1a5e47f41a2fb86c6be08dda ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 12:56:27 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 02 Oct 2019 16:56:27 +0000 Subject: [issue38342] ImportError: cannot import name 'MetadataPathFinder' from 'importlib.metadata' In-Reply-To: <1569968531.94.0.379845933414.issue38342@roundup.psfhosted.org> Message-ID: <1570035387.86.0.966292679854.issue38342@roundup.psfhosted.org> Brett Cannon added the comment: Closing as not a bug as this seems to be an issue from installing over a b3 or earlier build where the importlib/metadata/ directory gets left behind and thus take priority in import over importlib/metadata.py. ---------- nosy: +brett.cannon resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 12:56:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 16:56:56 +0000 Subject: [issue38350] ./configure --with-pydebug should use -O0 rather than -Og In-Reply-To: <1570034107.68.0.232468214894.issue38350@roundup.psfhosted.org> Message-ID: <1570035416.22.0.207101919996.issue38350@roundup.psfhosted.org> STINNER Victor added the comment: My use case is to debug a crash using a Python compiled in debug module, like python3-debug program in Fedora. Since the debug ABI is now compatible with the release build, the idea is to attempt to reproduce a crash in gdb using python3-debug instead of python3, and then use gdb to see what's going on. With -Og, the call stack is wrong sometimes, and some function arguments and local variables cannot be read (displayed as ). On Travis CI, a few months ago, Python was built in debug mode using -O3. But it was a side effect of OpenSSL flags if I recall correctly. With my PR 16544, Travis CI now uses -O0. ---------- nosy: +pablogsal, pitrou, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 12:57:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 16:57:46 +0000 Subject: [issue23445] Use -Og for debug builds In-Reply-To: <1423672122.39.0.391181135666.issue23445@psf.upfronthosting.co.za> Message-ID: <1570035466.44.0.0435784036698.issue23445@roundup.psfhosted.org> STINNER Victor added the comment: I created bpo-38350 to propose to revert this change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 13:01:04 2019 From: report at bugs.python.org (jackotonye) Date: Wed, 02 Oct 2019 17:01:04 +0000 Subject: [issue38349] Email example using imaginary library installation error. The install shows that it only supports python 2.x but is listed under python 3.6+ docs. In-Reply-To: <1570033248.3.0.655431547559.issue38349@roundup.psfhosted.org> Message-ID: jackotonye added the comment: Might be best to make it a little more obvious since most examples are considered executable code. That would require little modification. On Wed, Oct 2, 2019 at 12:20 PM SilentGhost wrote: > > SilentGhost added the comment: > > imaginary in the example is not meant to refer to > https://pypi.org/project/Imaginary/ it's meant to refer to a module that > you could write that would do all the dirty work. Perhaps, it's not the > best name to use provided there is an actual module on pypi, alternatively > half-baked outdated modules could be remove. > > ---------- > nosy: +SilentGhost > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 13:21:58 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 02 Oct 2019 17:21:58 +0000 Subject: [issue38344] activate.bat else needs to be on the same line as the if In-Reply-To: <1569997823.02.0.0977203709428.issue38344@roundup.psfhosted.org> Message-ID: <1570036918.11.0.562301326934.issue38344@roundup.psfhosted.org> Steve Dower added the comment: Should be a straightforward fix (replace the "else" with "if not defined..."), but since it slipped through testing we probably want a regression test in test_venv as well. (+RM for the 3.8 regression) ---------- keywords: +3.8regression nosy: +lukasz.langa priority: normal -> release blocker versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 13:25:51 2019 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Wed, 02 Oct 2019 17:25:51 +0000 Subject: [issue38351] Modernize email example from %-formatting to f-string In-Reply-To: <1570034736.68.0.500723145519.issue38351@roundup.psfhosted.org> Message-ID: <1570037151.33.0.751619941683.issue38351@roundup.psfhosted.org> Fred L. Drake, Jr. added the comment: Does it make sense to change just one example? I'm not sure what the long-term stance is on whether %-formatting should be replaced at this point, but shouldn't this be a matter of which string formatting approach we want overall, rather than adjusting only specific examples? ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 13:33:10 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 02 Oct 2019 17:33:10 +0000 Subject: [issue38344] activate.bat else needs to be on the same line as the if In-Reply-To: <1569997823.02.0.0977203709428.issue38344@roundup.psfhosted.org> Message-ID: <1570037589.99.0.672362950548.issue38344@roundup.psfhosted.org> Steve Dower added the comment: Adding this to the end of test_unicode_in_batch_file seems to be sufficient to cause the test to fail: self.assertEqual(err.strip(), '') Potentially we should add that additional check throughout this test module, but I don't think that's needed for a post-RC fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 13:42:26 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Oct 2019 17:42:26 +0000 Subject: [issue22214] Tkinter: Don't stringify callback arguments In-Reply-To: <1408285449.26.0.836464630135.issue22214@psf.upfronthosting.co.za> Message-ID: <1570038146.5.0.215528016276.issue22214@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +16134 pull_request: https://github.com/python/cpython/pull/16545 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 13:46:24 2019 From: report at bugs.python.org (Sanjay) Date: Wed, 02 Oct 2019 17:46:24 +0000 Subject: [issue38335] simplify overlaps function in ipaddress.py In-Reply-To: <1569930223.76.0.865877463422.issue38335@roundup.psfhosted.org> Message-ID: <1570038384.95.0.284111190914.issue38335@roundup.psfhosted.org> Change by Sanjay : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 13:52:38 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Oct 2019 17:52:38 +0000 Subject: [issue22214] Tkinter: Don't stringify callback arguments In-Reply-To: <1408285449.26.0.836464630135.issue22214@psf.upfronthosting.co.za> Message-ID: <1570038758.46.0.805351426298.issue22214@roundup.psfhosted.org> Serhiy Storchaka added the comment: PR 16545 solves the problem by using OS specific methods for converting between Python and Tcl strings. It is not ideal, but is good enough for most real cases. Now you can paste, copy and print non-BMP characters. The code containing them can be displayed weird, but the result of print looks OK. >>> '\N{PERSONAL COMPUTER}' '?' >>> print('?') ? As a side effect, printing '\udcf0\udc9f\udc90\udc8d' on Linux and '\ud83d\udcbb' on Windows should have the same effect as printing '\U0001f4bb'. I do not know about macOS, but expect the same behavior as on Linux. Could anybody test please? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 13:52:50 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Oct 2019 17:52:50 +0000 Subject: [issue22214] Tkinter: Don't stringify callback arguments In-Reply-To: <1408285449.26.0.836464630135.issue22214@psf.upfronthosting.co.za> Message-ID: <1570038769.99.0.158704123262.issue22214@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 13:54:03 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Oct 2019 17:54:03 +0000 Subject: [issue22214] Tkinter: Don't stringify callback arguments In-Reply-To: <1408285449.26.0.836464630135.issue22214@psf.upfronthosting.co.za> Message-ID: <1570038843.97.0.0389369664172.issue22214@roundup.psfhosted.org> Serhiy Storchaka added the comment: Oops, it is better to attach it to issue13153. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 13:56:02 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Oct 2019 17:56:02 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1570038962.59.0.941567054335.issue13153@roundup.psfhosted.org> Serhiy Storchaka added the comment: PR 16545 solves the problem by using OS specific methods for converting between Python and Tcl strings. It is not ideal, but is good enough for most real cases. Now you can paste, copy and print non-BMP characters. The code containing them can be displayed weird, but the result of print looks OK. >>> '\N{PERSONAL COMPUTER}' '?' >>> print('?') ? As a side effect, printing '\udcf0\udc9f\udc90\udc8d' on Linux and '\ud83d\udcbb' on Windows should have the same effect as printing '\U0001f4bb'. I do not know about macOS, but expect the same behavior as on Linux. Could anybody test please? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 13:56:20 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Oct 2019 17:56:20 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1570038980.64.0.849130134086.issue13153@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +16135 pull_request: https://github.com/python/cpython/pull/16545 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 13:57:21 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Oct 2019 17:57:21 +0000 Subject: [issue22214] Tkinter: Don't stringify callback arguments In-Reply-To: <1408285449.26.0.836464630135.issue22214@psf.upfronthosting.co.za> Message-ID: <1570039041.61.0.67305059139.issue22214@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- Removed message: https://bugs.python.org/msg353759 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 13:57:31 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Oct 2019 17:57:31 +0000 Subject: [issue22214] Tkinter: Don't stringify callback arguments In-Reply-To: <1408285449.26.0.836464630135.issue22214@psf.upfronthosting.co.za> Message-ID: <1570039051.82.0.795977732951.issue22214@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- Removed message: https://bugs.python.org/msg353760 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 14:16:12 2019 From: report at bugs.python.org (Mariatta) Date: Wed, 02 Oct 2019 18:16:12 +0000 Subject: [issue38351] Modernize email example from %-formatting to f-string In-Reply-To: <1570034736.68.0.500723145519.issue38351@roundup.psfhosted.org> Message-ID: <1570040172.91.0.275441813932.issue38351@roundup.psfhosted.org> Mariatta added the comment: I think updating one isolated code example is less invasive and easier to review, instead of one big PR to change everything from "%s" to str.format or f-string. I brought up this example code merely because I happen to be reading this page. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 14:31:17 2019 From: report at bugs.python.org (Karl Kornel) Date: Wed, 02 Oct 2019 18:31:17 +0000 Subject: [issue38352] In typing docs, note explicit import needed for IO and Pattern/Match Message-ID: <1570041077.58.0.399304866649.issue38352@roundup.psfhosted.org> New submission from Karl Kornel : Hello! In https://github.com/python/cpython/blob/master/Lib/typing.py#L115-L117, there is a note about the io and re classes not being included in typing.__all__. I am a relatively new user of typing, and I did `from typing import *` in my code. I ran the code through mypy first, which reported no problems, but then running Python 3.6 failed with a NameError (name 'IO' is not defined). Reading through the typing source, it's clear that this was an intentional decision. So, instead of reporting a bug, I'd like to request a documentation enhancement! The docs for typing make no mention of typing.io or typing.re. So, my request is: In the sections for the IO/TextIO/BinaryIO and Pattern/Match classes, include text warning the user that these types are not imported when you do `from typing import *`. ---------- assignee: docs at python components: Documentation messages: 353763 nosy: Karl Kornel, docs at python priority: normal severity: normal status: open title: In typing docs, note explicit import needed for IO and Pattern/Match type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 14:42:40 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 02 Oct 2019 18:42:40 +0000 Subject: [issue38344] activate.bat else needs to be on the same line as the if In-Reply-To: <1569997823.02.0.0977203709428.issue38344@roundup.psfhosted.org> Message-ID: <1570041760.75.0.0138449473932.issue38344@roundup.psfhosted.org> Steve Dower added the comment: Also adding Ned - this made it into 3.7 as well. ---------- nosy: +ned.deily versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 14:52:54 2019 From: report at bugs.python.org (Tal Einat) Date: Wed, 02 Oct 2019 18:52:54 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1570042374.73.0.610315182816.issue13153@roundup.psfhosted.org> Tal Einat added the comment: Serhiy, this looks like a great step in the right direction! Tested on Win10 with PR GH-16545 (commit f4db0e7e00). Here is a copy/paste from an IDLE shell session: >>> '\N{PERSONAL COMPUTER}' '????' >>> print('?') SyntaxError: 'utf-8' codec can't encode characters in position 7-12: surrogates not allowed Note that in the first output, the second and third chars in the string aren't visible in IDLE; i.e. what is actually displayed is '??'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 16:04:04 2019 From: report at bugs.python.org (Tal Einat) Date: Wed, 02 Oct 2019 20:04:04 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1570046644.21.0.616309770175.issue13153@roundup.psfhosted.org> Tal Einat added the comment: Not sure if this helps, but a bit of experimentation brought this up: >>> '\N{PERSONAL COMPUTER}'.encode('utf-8') b'\xf0\x9f\x92\xbb' >>> '????'.encode('utf-16le') b'\xf0\x00\x9f\x00\x92\x00\xbb\x00' >>> '????'.encode('utf-16') b'\xff\xfe\xf0\x00\x9f\x00\x92\x00\xbb\x00' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 16:18:16 2019 From: report at bugs.python.org (Tal Einat) Date: Wed, 02 Oct 2019 20:18:16 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1570047496.92.0.067338209661.issue13153@roundup.psfhosted.org> Tal Einat added the comment: More info: >>> '\N{PERSONAL COMPUTER}'.encode('utf-8').decode('latin-1') == '????' True ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 16:33:50 2019 From: report at bugs.python.org (David Bolen) Date: Wed, 02 Oct 2019 20:33:50 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1570048430.18.0.746810899129.issue36670@roundup.psfhosted.org> David Bolen added the comment: Just an FYI that this change is generating warnings on my Windows 10 buildbot with some regularity about a failure to parse testperf output, such as: Warning -- Failed to parse typeperf output: '"10/01/2019 07:58:50.056"' from https://buildbot.python.org/all/#/builders/217/builds/487 Now, clearly there's no queue length in that output so the parsing warning is accurate, but does the overall build have to reflect a warning in such cases, given that it's just a test harness issue, and not anything going wrong with the actual tests? Previously any such cases would be ignored silently, so this probably isn't a new issue but just one that is now shows up as an overall build warning. I don't know why both fields aren't present although it seems plausible that it's just a partial line from the I/O (I don't think it guarantees it receives full lines), and the queue length field would appear on the following read. ---------- nosy: +db3l _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 16:51:07 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Oct 2019 20:51:07 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1570049467.15.0.751933405772.issue13153@roundup.psfhosted.org> Serhiy Storchaka added the comment: Sorry, I did not test the last version on Windows. There was a bug which caused using the Linux version on Windows. Now it should be fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 16:54:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 20:54:00 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1570049640.15.0.65277481426.issue36670@roundup.psfhosted.org> STINNER Victor added the comment: > Just an FYI that this change is generating warnings on my Windows 10 buildbot with some regularity about a failure to parse testperf output, such as: Warning -- Failed to parse typeperf output: '"10/01/2019 07:58:50.056"' Aha, interesting. I added a warning to debug the code. > Now, clearly there's no queue length in that output so the parsing warning is accurate, but does the overall build have to reflect a warning in such cases, given that it's just a test harness issue, and not anything going wrong with the actual tests? The build is marked as "warning" (orange) which is different than "fail" (red). Warnings are used to detect bugs or interesting issues, but not considered as a regression. > I don't know why both fields aren't present although it seems plausible that it's just a partial line from the I/O (I don't think it guarantees it receives full lines), and the queue length field would appear on the following read. Right, the code doesn't ensure that a line ends with a newline character. Could you try to run manually the following command to check its output? typeperf "\System\Processor Queue Length" -si 1 Maybe uncomplete lines should be buffered in read_output(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 17:04:37 2019 From: report at bugs.python.org (Matej Cepl) Date: Wed, 02 Oct 2019 21:04:37 +0000 Subject: [issue38014] Python 3.7 does not compile In-Reply-To: <1567477987.66.0.578307493025.issue38014@roundup.psfhosted.org> Message-ID: <1570050277.02.0.990512930834.issue38014@roundup.psfhosted.org> Matej Cepl added the comment: Isn?t https://bugzilla.suse.com/1152793 (removal of stropts.h from glibc) cause of this? ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 17:05:46 2019 From: report at bugs.python.org (David Bolen) Date: Wed, 02 Oct 2019 21:05:46 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1570050346.04.0.29744272019.issue36670@roundup.psfhosted.org> David Bolen added the comment: Oh, I agree it's just a warning, and I suspect few people look into warnings, but since it's not from an actual test, I'm not sure the overall build should be flagged. The manual typeperf looks fine, but there's no way I could tell visually how the I/O is being done under the covers. My bet is typeperf is probably issuing multiple output calls, one for the leading timestamp and then one for each value. So regrtest just happens to interleave its own read in between the two. The subsequent read would then get the trailing ",####" which the current code would parse normally as it only cares about the second field. In which case it's not even affecting the load monitoring, other than the warning message. I suspect it's happening on the Windows 10 buildbot as the machine is reasonably fast. But to your earlier comment about things just working previously, I'm not sure there's that much value in adding code to deal with this case. I'd probably just remove the warning to restore the earlier behavior. The current code still ignores other issues like an actual read failure in read_output. Or, if there's a way to generate the message without it being considered an overall test build warning, that would work too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 17:06:23 2019 From: report at bugs.python.org (Matej Cepl) Date: Wed, 02 Oct 2019 21:06:23 +0000 Subject: [issue38014] Python 3.7 does not compile In-Reply-To: <1567477987.66.0.578307493025.issue38014@roundup.psfhosted.org> Message-ID: <1570050383.23.0.655027073827.issue38014@roundup.psfhosted.org> Matej Cepl added the comment: Sorry, got confused. My openSUSE bug has nothing to do with it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 17:12:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 21:12:43 +0000 Subject: [issue38353] Cleanup the path configuration implementation code (getpath.c) Message-ID: <1570050763.22.0.787922067096.issue38353@roundup.psfhosted.org> New submission from STINNER Victor : Place holder issue for changes related to path configuration cleanup changes (Modules/getpath.c). ---------- components: Interpreter Core messages: 353774 nosy: vstinner priority: normal severity: normal status: open title: Cleanup the path configuration implementation code (getpath.c) versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 17:13:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 21:13:00 +0000 Subject: [issue38353] Cleanup the path configuration implementation code (getpath.c) In-Reply-To: <1570050763.22.0.787922067096.issue38353@roundup.psfhosted.org> Message-ID: <1570050780.81.0.805395298563.issue38353@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +16136 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16548 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 17:32:12 2019 From: report at bugs.python.org (Enji Cooper) Date: Wed, 02 Oct 2019 21:32:12 +0000 Subject: [issue38354] Fix for bug 30378 regressed SysLogHandler Message-ID: <1570051932.55.0.313239800858.issue38354@roundup.psfhosted.org> New submission from Enji Cooper : The change made for bug 30378 caused a regression in our code by making lookups for SysLogHandler addresses at init time, instead of making them more lazy. Example: >>> import logging.handlers >>> LOGGER = logging.getLogger("logger") >>> LOGGER.addHandler(logging.handlers.SysLogHandler(address=('resolvessometimesbutnotthefirsttime.com', logging.handlers.SYSLOG_UDP_PORT))) Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python2.7/logging/handlers.py", line 767, in __init__ ress = socket.getaddrinfo(host, port, 0, socktype) socket.gaierror: [Errno -2] Name or service not known This is exacerbated by the fact that a lot of code the organization I work for (and to be honest, I have written in the past) initializes global loggers once at import time. If the SysLogHandler is added to the global logger and the DNS resolution isn't possible (/etc/hosts is empty on Unix or does not contain the entry, and DNS out is to lunch), it will fall on its face at initialization time. There needs to be a more graceful way of initializing loggers like this, or a way of delaying the host resolution, so it fails gracefully and doesn't crash the entire program (restoring the previous behavior). Example: SMTPHandler doesn't do name resolution until it calls emit, which seems like a much more logical place to do the operation (especially since DNS records can change or become invalid). ---------- components: Library (Lib) messages: 353775 nosy: calcheng, ngie priority: normal severity: normal status: open title: Fix for bug 30378 regressed SysLogHandler type: crash versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 17:32:35 2019 From: report at bugs.python.org (Enji Cooper) Date: Wed, 02 Oct 2019 21:32:35 +0000 Subject: [issue38354] Fix for bug 30378 regressed SysLogHandler by making it resolve addresses at initialization instead of in `.emit()` In-Reply-To: <1570051932.55.0.313239800858.issue38354@roundup.psfhosted.org> Message-ID: <1570051955.97.0.939565525109.issue38354@roundup.psfhosted.org> Change by Enji Cooper : ---------- title: Fix for bug 30378 regressed SysLogHandler -> Fix for bug 30378 regressed SysLogHandler by making it resolve addresses at initialization instead of in `.emit()` _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 17:42:35 2019 From: report at bugs.python.org (paul rubin) Date: Wed, 02 Oct 2019 21:42:35 +0000 Subject: [issue38333] add type signatures to library function docs In-Reply-To: <1569903700.63.0.276076850828.issue38333@roundup.psfhosted.org> Message-ID: <1570052555.9.0.591966850606.issue38333@roundup.psfhosted.org> paul rubin added the comment: Yes, the suggestion was just for the docs, and since those are intended for human rather than machine consumption, it's fine if there are some blurry cases where there is no signature. Ideally in those cases, the issue should be explained in the doc text. I actually don't see what's wrong with including signatures in the source code as well, as long as doing so doesn't break anyone's existing code. I agree with Veky that one should be very hesitant about breaking existing working code, even if that code relies on undocumented behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 17:51:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 21:51:29 +0000 Subject: [issue38353] Cleanup the path configuration implementation code (getpath.c) In-Reply-To: <1570050763.22.0.787922067096.issue38353@roundup.psfhosted.org> Message-ID: <1570053089.15.0.317455607901.issue38353@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 61691d833631fed42b86605b09e1535e3e8d40e5 by Victor Stinner in branch 'master': bpo-38353: Cleanup includes in the internal C API (GH-16548) https://github.com/python/cpython/commit/61691d833631fed42b86605b09e1535e3e8d40e5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 17:53:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 21:53:10 +0000 Subject: [issue38353] Cleanup the path configuration implementation code (getpath.c) In-Reply-To: <1570050763.22.0.787922067096.issue38353@roundup.psfhosted.org> Message-ID: <1570053190.89.0.417433331426.issue38353@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16137 pull_request: https://github.com/python/cpython/pull/16549 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 18:13:00 2019 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 02 Oct 2019 22:13:00 +0000 Subject: [issue38333] add type signatures to library function docs In-Reply-To: <1569903700.63.0.276076850828.issue38333@roundup.psfhosted.org> Message-ID: <1570054380.69.0.49203887201.issue38333@roundup.psfhosted.org> Guido van Rossum added the comment: @phr To be clear, I agree that there's nothing wrong with adding signatures to docs. We just need to find a way to do it. There will definitely be some cases where it's better not to have a type rather than trying to spell out the actual type in the docs. My "unacceptable" comment was meant in response to Vedran's suggestion that it would be okay to lie in the docs about the signature for sum(). If the truth is too subtle to use a specific type signature we should keep the words. (The words for sum() are actually pretty clear.) FWIW: My objection against vague docs was specifically about situations where the word "string" is used without clarifying if this allows bytes. I've also seen docs that were even more vague, e.g. "a name" or "a filename". Signatures in the code won't "break" the code (they are ignored at runtime) but if present they should nevertheless be precise since they will be used by type checkers. Signatures in code are *not* just documentation. Only in very limited situations would I be okay with lies in signatures -- this would have to be done on a case by case basis. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 18:14:19 2019 From: report at bugs.python.org (David Bolen) Date: Wed, 02 Oct 2019 22:14:19 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1570054459.13.0.0669928774781.issue36670@roundup.psfhosted.org> David Bolen added the comment: I've confirmed the partial read with some local modifications, and the failures are always split between time stamp and value: Warning -- Failed to parse typeperf output: '"10/02/2019 17:42:26.229"' 0.0 Warning -- Missing first field: ,"0.000000" 0.0 Adding multiple variables to the typeperf command can vary the split position, but I've only seen it at a variable boundary (starting with the comma). So I'm guessing with the current implementation the above is probably the only point where the I/Os can be interleaved. Also, CRLF seems to only appear at the start of each read, never at the end. You can see that behavior interactively too where the cursor waits at the end of the line between samples. So changes to wait for a complete line to be read would also delay load values by one sample interval. So I'm thinking just reverting to silently ignoring this case is probably simplest. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 18:15:33 2019 From: report at bugs.python.org (Enji Cooper) Date: Wed, 02 Oct 2019 22:15:33 +0000 Subject: [issue38354] Fix for bug 30378 regressed SysLogHandler by making it resolve addresses at initialization instead of in `.emit()` In-Reply-To: <1570051932.55.0.313239800858.issue38354@roundup.psfhosted.org> Message-ID: <1570054533.82.0.719604100062.issue38354@roundup.psfhosted.org> Enji Cooper added the comment: Capturing more context here, based on internal discussion: other handlers are doing address resolution in `emit()` (HTTPHandler, SMTPHandler), which is expensive. In order for SysLogHandler to not regress behavior and not become expensive, performance-wise, it would probably be best to use `functools.lru_cache()`, using the address and a timeout as the key when resolving the addresses to avoid always doing address resolutions, e.g., DNS lookups: https://docs.python.org/3/library/functools.html#functools.lru_cache . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 18:24:47 2019 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 02 Oct 2019 22:24:47 +0000 Subject: [issue37631] EXTRA_CFLAGS get overrided by CFLAGS_NODIST In-Reply-To: <1563536952.58.0.764226132067.issue37631@roundup.psfhosted.org> Message-ID: <1570055087.82.0.0469581998003.issue37631@roundup.psfhosted.org> Charalampos Stratakis added the comment: Dug a bit further here. The issue is that CFLAGS_NODIST will always come after normal CFLAGS (which are subsets of PY_CFLAGS and PY_CFLAGS_NODIST) [0][1]. The EXTRA_CFLAGS variable is appended at the end of PY_CFLAGS [2], hence as reported here, whatever compiler flag comes after, embedded within PY_CFLAGS_NODIST, will override the previous flags if they contradict each other. So basically EXTRA_CFLAGS can be used only for flags that can't be overwritten by PY_CFLAGS_NODIST, which in my opinion, is not very useful in the context of just adding extra flags. Commit adding the variable to Python 2.5: https://github.com/python/cpython/commit/08cd598c2145d00f1517c93cabf80a5d7d2a4bc0 "EXTRA_CFLAGS has been introduced as an environment variable to hold compiler flags that change binary compatibility" Apparently it was added in order to avoid using the OPT variable for the various debug builds described in https://github.com/python/cpython/blob/master/Misc/SpecialBuilds.txt On another note this flag will get passed down to distutils, so if it was used for building the interpreter, C extensions compiled by users will also inherit it. Honestly I am not sure what the best solution would be here. If the various sub-debug special builds are still relevant and they stack, by doing for example $ make CFLAGS_NODIST="-DPy_TRACE_REFS" EXTRA_CFLAGS="-DPy_REF_DEBUG" then the issue can be closed, and the documentation can be more explicit that the EXTRA_CFLAGS is to be used only for the special builds. If the EXTRA_CFLAGS can also be used for adding our own flags, then the flag handling needs to change to take this into account. [0] https://github.com/python/cpython/blob/master/setup.py#L85 [1] https://github.com/python/cpython/blob/master/Makefile.pre.in#L115 [2] https://github.com/python/cpython/blob/master/Makefile.pre.in#L97 ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 18:37:37 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 02 Oct 2019 22:37:37 +0000 Subject: [issue38355] ntpath.realpath() fails on sys.executable Message-ID: <1570055857.28.0.434394542652.issue38355@roundup.psfhosted.org> New submission from Steve Dower : The change to error handling did not include ERROR_CANT_ACCESS_FILE, but this error occurs in the Store package install. After suppressing this error, it then occurs again when stripping the prefix - we should just check for the same error here to determine whether it's safe to remove the prefix of a file we can't access. ---------- assignee: steve.dower components: Windows keywords: 3.8regression messages: 353782 nosy: lukasz.langa, paul.moore, steve.dower, tim.golden, zach.ware priority: release blocker severity: normal status: open title: ntpath.realpath() fails on sys.executable versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 18:40:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 22:40:41 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1570056041.18.0.773812445806.issue36670@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16138 pull_request: https://github.com/python/cpython/pull/16550 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 18:41:37 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 02 Oct 2019 22:41:37 +0000 Subject: [issue38355] ntpath.realpath() fails on sys.executable In-Reply-To: <1570055857.28.0.434394542652.issue38355@roundup.psfhosted.org> Message-ID: <1570056097.18.0.93662176026.issue38355@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +16139 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16551 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 18:41:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 22:41:56 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1570056116.84.0.389273045594.issue36670@roundup.psfhosted.org> STINNER Victor added the comment: Ok, I managed to reproduce the bug using this change: diff --git a/Lib/test/libregrtest/win_utils.py b/Lib/test/libregrtest/win_utils.py index f0c17b906f..78429faa89 100644 --- a/Lib/test/libregrtest/win_utils.py +++ b/Lib/test/libregrtest/win_utils.py @@ -14,7 +14,7 @@ BUFSIZE = 8192 LOAD_FACTOR_1 = 0.9200444146293232478931553241 # Seconds per measurement -SAMPLING_INTERVAL = 5 +SAMPLING_INTERVAL = 0 # Windows registry subkey of HKEY_LOCAL_MACHINE where the counter names # of typeperf are registered COUNTER_REGISTRY_KEY = (r"SOFTWARE\Microsoft\Windows NT\CurrentVersion" I wrote PR 16550 to handle partial lines. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 18:53:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 22:53:01 +0000 Subject: [issue38356] test_asyncio: SubprocessThreadedWatcherTests leaks threads Message-ID: <1570056781.39.0.894014377654.issue38356@roundup.psfhosted.org> New submission from STINNER Victor : Warning seen o AMD64 Ubuntu Shared 3.x buildbot: https://buildbot.python.org/all/#/builders/141/builds/2593 test_devnull_output (test.test_a=syncio.test_subprocess.SubprocessThreadedWatcherTests) ... Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2) The ThreadedChildWatcher class of asyncio.unix_events doesn't seem to have a method to join all threads. It should be done in tests to prevent "leaking" threads which can have side effects on following tests. ---------- components: Tests, asyncio messages: 353784 nosy: asvetlov, vstinner, yselivanov priority: normal severity: normal status: open title: test_asyncio: SubprocessThreadedWatcherTests leaks threads versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 18:53:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 22:53:10 +0000 Subject: [issue38356] test_asyncio: SubprocessThreadedWatcherTests leaks threads In-Reply-To: <1570056781.39.0.894014377654.issue38356@roundup.psfhosted.org> Message-ID: <1570056790.56.0.0964253285658.issue38356@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 18:53:55 2019 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 02 Oct 2019 22:53:55 +0000 Subject: [issue37631] EXTRA_CFLAGS get overrided by CFLAGS_NODIST In-Reply-To: <1563536952.58.0.764226132067.issue37631@roundup.psfhosted.org> Message-ID: <1570056835.9.0.615417971958.issue37631@roundup.psfhosted.org> Charalampos Stratakis added the comment: Also this is due to an expected behaviour from gcc. From the documentation: "If you use multiple -O options, with or without level numbers, the last such option is the one that is effective. " ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 19:04:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 23:04:12 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1570057452.74.0.0879032904856.issue36670@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 3e04cd268ee9a57f95dc78d8974b21a6fac3f666 by Victor Stinner in branch 'master': bpo-36670, regrtest: Fix WindowsLoadTracker() for partial line (GH-16550) https://github.com/python/cpython/commit/3e04cd268ee9a57f95dc78d8974b21a6fac3f666 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 19:17:19 2019 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Wed, 02 Oct 2019 23:17:19 +0000 Subject: [issue38351] Modernize email example from %-formatting to f-string In-Reply-To: <1570034736.68.0.500723145519.issue38351@roundup.psfhosted.org> Message-ID: <1570058239.75.0.52131467203.issue38351@roundup.psfhosted.org> Fred L. Drake, Jr. added the comment: I agree that it's less invasive and easier to review. My question (and it's just that) is whether we've made a decision to prefer one formatting syntax over others (outside of examples discussing the formatting approaches themselves). If a decision is made to prefer one over others, it's worth making that decision separately, and then using separate PRs to deal with updates to different parts of the docs. Added Julien Palard to the issue; I'd value input on this. ---------- nosy: +JulienPalard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 19:56:23 2019 From: report at bugs.python.org (Michael Everitt) Date: Wed, 02 Oct 2019 23:56:23 +0000 Subject: [issue38318] Issues linking with ncurses and tinfo (cannot resolve symbols) In-Reply-To: <1569809156.07.0.948937719189.issue38318@roundup.psfhosted.org> Message-ID: <1570060583.69.0.680364522951.issue38318@roundup.psfhosted.org> Michael Everitt added the comment: Attached patch seems to fix build failure for python2.7 with uclibc-ng. ---------- keywords: +patch Added file: https://bugs.python.org/file48639/fix-tinfo-probably-python-2_7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 19:57:38 2019 From: report at bugs.python.org (Michael Everitt) Date: Wed, 02 Oct 2019 23:57:38 +0000 Subject: [issue38318] Issues linking with ncurses and tinfo (cannot resolve symbols) In-Reply-To: <1569809156.07.0.948937719189.issue38318@roundup.psfhosted.org> Message-ID: <1570060658.64.0.971295342456.issue38318@roundup.psfhosted.org> Michael Everitt added the comment: Attached patch seems to fix build with python3.6 withh uclibc-ng. Tested on x86_64 and ARMv6zk. ---------- Added file: https://bugs.python.org/file48640/fix-tinfo-probably-python-3_6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 20:06:08 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 03 Oct 2019 00:06:08 +0000 Subject: [issue38351] Modernize email example from %-formatting to f-string In-Reply-To: <1570034736.68.0.500723145519.issue38351@roundup.psfhosted.org> Message-ID: <1570061168.19.0.184707835611.issue38351@roundup.psfhosted.org> Kyle Stanley added the comment: Welcome back from the OOOS break Mariatta! > My question (and it's just that) is whether we've made a decision to prefer one formatting syntax over others (outside of examples discussing the formatting approaches themselves). I agree that we should reach a consensus on the preferred string formatting style. However, there seems to be two separate questions here: 1) Should the code examples in the docs be updated to use f-strings? 2) Should ALL instances of the old string formatting be updated to use f-strings? This would affect every *.py; potentially leading to additional code churn, which adds clutter to the commit logs and git blame. The first one is far less costly and has very minimal risk of breakage. The cost of updating every *.py to use f-strings is worth considering, but is significantly higher and has more potential consequences, especially for the regression tests. I'm personally in favor of updating the code examples first and discussing the second question in a python-dev thread due to the wide impact. > If a decision is made to prefer one over others, it's worth making that decision separately, and then using separate PRs to deal with updates to different parts of the docs. Once we reach a decision on the matter, I think this particular issue could serve as a great first PR for a new contributor to become familiar with the workflow, so it would be a good candidate for the "newcomer friendly" label. Most python users are well acquainted with string formatting. I wouldn't mind opening a PR to fix it myself, but I think that leaving it open for a new contributor to work on as an intro to the workflow would be far more beneficial. Although there may be a benefit to use f-strings instead here, there's certainly no rush to have it completed in a short period of time. I would be in favor of having each PR address a single documentation file. This would help accelerate the review process and provide a valuable learning experience to a greater number of new contributors, in comparison to a single PR that updates every single code example in the docs. ---------- nosy: +aeros167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 20:10:47 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 03 Oct 2019 00:10:47 +0000 Subject: [issue38351] Modernize email example from %-formatting to f-string In-Reply-To: <1570034736.68.0.500723145519.issue38351@roundup.psfhosted.org> Message-ID: <1570061447.61.0.464026766837.issue38351@roundup.psfhosted.org> Kyle Stanley added the comment: > so it would be a good candidate for the "newcomer friendly" label Never mind, just noticed this was already labeled as newcomer friendly. I only saw the "easy" label at first. (: If consensus is reached for this, we can open a separate issue for addressing the other doc files, something along the lines of "Update code examples to use f-strings". As mentioned earlier I think it would be worth having each new contributor update all of the instances in a single *.rst in a PR, but it can be a single issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 20:12:54 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 03 Oct 2019 00:12:54 +0000 Subject: [issue38356] test_asyncio: SubprocessThreadedWatcherTests leaks threads In-Reply-To: <1570056781.39.0.894014377654.issue38356@roundup.psfhosted.org> Message-ID: <1570061574.38.0.922265425663.issue38356@roundup.psfhosted.org> Kyle Stanley added the comment: I can try to work on fixing this. ---------- nosy: +aeros167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 20:47:56 2019 From: report at bugs.python.org (karl) Date: Thu, 03 Oct 2019 00:47:56 +0000 Subject: [issue19683] test_minidom has many empty tests In-Reply-To: <1385047059.66.0.790496754317.issue19683@psf.upfronthosting.co.za> Message-ID: <1570063676.44.0.221790770593.issue19683@roundup.psfhosted.org> karl added the comment: @zach.ware @r.david.murray So I was looking at that issue. There is a lot of work. I had a couple of questions, because there are different categories # Empty tests for existing functions. This seems to be straightforward as they would complete the module. Example: ```python def testGetAttributeNode(self): pass ``` https://github.com/python/cpython/blob/3e04cd268ee9a57f95dc78d8974b21a6fac3f666/Lib/test/test_minidom.py#L412 which refers to: `GetAttributeNode` https://github.com/python/cpython/blob/3e04cd268ee9a57f95dc78d8974b21a6fac3f666/Lib/xml/dom/minidom.py#L765-L768 https://github.com/python/cpython/blob/3e04cd268ee9a57f95dc78d8974b21a6fac3f666/Lib/test/test_minidom.py#L285-L294 # Tests without any logical reference in the module. This is puzzling because I'm not sure which DOM feature they should be testing. For example: ``` def testGetAttrList(self): pass ``` https://github.com/python/cpython/blob/3e04cd268ee9a57f95dc78d8974b21a6fac3f666/Lib/test/test_minidom.py#L383-L384 Or maybe this is just supposed to test Element.attributes returning a list of attributes, such as `NamedNodeMap [ def="ghi", jkl="mno"]` returned by a browser. ``` >>> import xml.dom.minidom >>> from xml.dom.minidom import parse, Node, Document, parseString >>> from xml.dom.minidom import getDOMImplementation >>> dom = parseString("") >>> el = dom.documentElement >>> el.setAttribute("def", "ghi") >>> el.setAttribute("jkl", "mno") >>> el.attributes ``` or is it supposed to test something like ``` >>> el.attributes.items() [('def', 'ghi'), ('jkl', 'mno')] ``` This is slightly confusing. And the missing docstrings are not making it easier. # Tests which do not really test the module(?) I think for example about this, which is testing that `del` is working, but it doesn't have anything to do with the DOM. ``` def testDeleteAttr(self): dom = Document() child = dom.appendChild(dom.createElement("abc")) self.confirm(len(child.attributes) == 0) child.setAttribute("def", "ghi") self.confirm(len(child.attributes) == 1) del child.attributes["def"] self.confirm(len(child.attributes) == 0) dom.unlink() ``` https://github.com/python/cpython/blob/3e04cd268ee9a57f95dc78d8974b21a6fac3f666/Lib/test/test_minidom.py#L285-L294 Specifically when there is a function for it: `removeAttribute` https://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-6D6AC0F9 which is tested just below that test. https://github.com/python/cpython/blob/3e04cd268ee9a57f95dc78d8974b21a6fac3f666/Lib/test/test_minidom.py#L296-L305 so I guess these should be removed or do I miss something in the testing logic? # Missing docstrings. Both the testing module and the module lack a lot of docstrings. Would it be good to fix this too, probably in a separate commit. # DOM Level 2 So the module intent is to implement DOM Level 2. but does that make sense in the light of https://dom.spec.whatwg.org/ Should minidom tries to follow the current DOM spec? ---------- nosy: +karlcow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 20:49:56 2019 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 03 Oct 2019 00:49:56 +0000 Subject: [issue38351] Modernize email example from %-formatting to f-string In-Reply-To: <1570034736.68.0.500723145519.issue38351@roundup.psfhosted.org> Message-ID: <1570063796.68.0.583659482227.issue38351@roundup.psfhosted.org> Eric V. Smith added the comment: I definitely think we should not modify any code in the stdlib just to switch to f-strings. I think the code examples in the docs would benefit from a consistent style, and since f-strings are the least verbose way to format strings, I'd endorse using them except where .format or %-formatting is the point of the example. I agree with Fred that hearing from Julien would be helpful. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 21:13:22 2019 From: report at bugs.python.org (Dima Tisnek) Date: Thu, 03 Oct 2019 01:13:22 +0000 Subject: [issue38342] ImportError: cannot import name 'MetadataPathFinder' from 'importlib.metadata' In-Reply-To: <1569968531.94.0.379845933414.issue38342@roundup.psfhosted.org> Message-ID: <1570065202.67.0.421680792214.issue38342@roundup.psfhosted.org> Change by Dima Tisnek : ---------- nosy: +Dima.Tisnek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 21:18:28 2019 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 03 Oct 2019 01:18:28 +0000 Subject: [issue38350] ./configure --with-pydebug should use -O0 rather than -Og In-Reply-To: <1570034107.68.0.232468214894.issue38350@roundup.psfhosted.org> Message-ID: <1570065508.19.0.826028467143.issue38350@roundup.psfhosted.org> Charalampos Stratakis added the comment: Do note though that if the -D_FORTIFY_SOURCE=2 hardening flag is used, the compilation will fail with an optimization level less than -Og. Haven't tried yet with -D_FORTIFY_SOURCE=1 to see if it works with -O0. ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 21:34:08 2019 From: report at bugs.python.org (Artificial) Date: Thu, 03 Oct 2019 01:34:08 +0000 Subject: [issue38357] print adding extra bytes in hex above x7F Message-ID: <1570066448.41.0.0345074372849.issue38357@roundup.psfhosted.org> New submission from Artificial : Any hex str of value above \x7F causes an extra byte to printed. ---------- files: Screenshot from 2019-10-02 20-31-50.png messages: 353796 nosy: Artificial priority: normal severity: normal status: open title: print adding extra bytes in hex above x7F type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48641/Screenshot from 2019-10-02 20-31-50.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 21:35:44 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 03 Oct 2019 01:35:44 +0000 Subject: [issue38351] Modernize email example from %-formatting to f-string In-Reply-To: <1570034736.68.0.500723145519.issue38351@roundup.psfhosted.org> Message-ID: <1570066544.09.0.167907923987.issue38351@roundup.psfhosted.org> Kyle Stanley added the comment: > I definitely think we should not modify any code in the stdlib just to switch to f-strings. Does this also apply to updating code to use f-strings in an area that's already being modified for a functional purpose? I agree that that we shouldn't update stdlib code for the sole purpose of switching to f-strings, but if a function or method is already being changed for another purpose, I don't think updating the formatting to use f-strings is an issue. This would probably have to be decided on a case-by-case basis though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 21:36:33 2019 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 03 Oct 2019 01:36:33 +0000 Subject: [issue38350] ./configure --with-pydebug should use -O0 rather than -Og In-Reply-To: <1570034107.68.0.232468214894.issue38350@roundup.psfhosted.org> Message-ID: <1570066593.14.0.746245857514.issue38350@roundup.psfhosted.org> Charalampos Stratakis added the comment: Correction, not fail, just a ton of warnings. The same is true for -D_FORTIFY_SOURCE=1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 21:37:41 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 03 Oct 2019 01:37:41 +0000 Subject: [issue38354] Fix for bug 30378 regressed SysLogHandler by making it resolve addresses at initialization instead of in `.emit()` In-Reply-To: <1570051932.55.0.313239800858.issue38354@roundup.psfhosted.org> Message-ID: <1570066661.9.0.708343242321.issue38354@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 21:37:47 2019 From: report at bugs.python.org (Artificial) Date: Thu, 03 Oct 2019 01:37:47 +0000 Subject: [issue38357] print adding extra bytes in hex above x7F In-Reply-To: <1570066448.41.0.0345074372849.issue38357@roundup.psfhosted.org> Message-ID: <1570066667.99.0.68750646925.issue38357@roundup.psfhosted.org> Artificial added the comment: python3 -c "print('\x7F')" > test.txt && xxd test.txt 00000000: 7f0a .. python3 -c "print('\x80')" > test.txt && xxd test.txt 00000000: c280 0a ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 21:40:36 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 03 Oct 2019 01:40:36 +0000 Subject: [issue38352] In typing docs, note explicit import needed for IO and Pattern/Match In-Reply-To: <1570041077.58.0.399304866649.issue38352@roundup.psfhosted.org> Message-ID: <1570066836.93.0.566849358122.issue38352@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +gvanrossum, levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 21:42:31 2019 From: report at bugs.python.org (Ammar Askar) Date: Thu, 03 Oct 2019 01:42:31 +0000 Subject: [issue38357] print adding extra bytes in hex above x7F In-Reply-To: <1570066448.41.0.0345074372849.issue38357@roundup.psfhosted.org> Message-ID: <1570066951.44.0.251089054198.issue38357@roundup.psfhosted.org> Ammar Askar added the comment: If you're trying to get raw bytes, you need to use print(b'\x80') what's happening right now is that the '\x80' is treated as a unicode code point (see https://docs.python.org/3/howto/unicode.html#the-string-type), and when Python goes to print it, it gets encoded to the raw underlying bytes. Which, in the default encoding of utf-8 requires the extra byte. >>> '\x80'.encode() b'\xc2\x80' ---------- nosy: +ammar2 resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 21:44:40 2019 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 03 Oct 2019 01:44:40 +0000 Subject: [issue38351] Modernize email example from %-formatting to f-string In-Reply-To: <1570034736.68.0.500723145519.issue38351@roundup.psfhosted.org> Message-ID: <1570067080.54.0.3826899637.issue38351@roundup.psfhosted.org> Eric V. Smith added the comment: >> I definitely think we should not modify any code in the stdlib just to switch to f-strings. > Does this also apply to updating code to use f-strings in an area that's already being modified for a functional purpose? No. As I said, not just to switch to f-strings. If other changes are also being made, discretion is advised. Just like any other cleanup. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 21:50:35 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 03 Oct 2019 01:50:35 +0000 Subject: [issue38350] ./configure --with-pydebug should use -O0 rather than -Og In-Reply-To: <1570034107.68.0.232468214894.issue38350@roundup.psfhosted.org> Message-ID: <1570067435.94.0.350801268744.issue38350@roundup.psfhosted.org> Benjamin Peterson added the comment: If -Og is breaking debugging, isn't that a compiler bug? The GCC manpage claims " -Og enables optimizations that do not interfere with debugging." ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 21:53:47 2019 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Thu, 03 Oct 2019 01:53:47 +0000 Subject: [issue38357] print adding extra bytes in hex above x7F In-Reply-To: <1570066448.41.0.0345074372849.issue38357@roundup.psfhosted.org> Message-ID: <1570067627.38.0.114305911034.issue38357@roundup.psfhosted.org> Arfrever Frehtes Taifersar Arahesis added the comment: However print() called with non-str argument would firstly call str() on it, which is most likely not what reporter wanted: >>> print(b'\x80') b'\x80' >>> str(b"\x80") "b'\\x80'" >>> print(str(b"\x80")) b'\x80' $ python -c "print(b'\x80')" > test.txt $ xxd test.txt 00000000: 6227 5c78 3830 270a b'\x80'. Proper solution is to write to files opened in binary mode, which in case of stdout and stderr means to use sys.stdout.buffer and sys.stderr.buffer: >>> sys.stdout.buffer.write(b"\x80") ?1 $ python -c "import sys; sys.stdout.buffer.write(b'\x80')" > test.txt $ xxd test.txt 00000000: 80 . ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 21:55:29 2019 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Thu, 03 Oct 2019 01:55:29 +0000 Subject: [issue38351] Modernize email example from %-formatting to f-string In-Reply-To: <1570034736.68.0.500723145519.issue38351@roundup.psfhosted.org> Message-ID: <1570067729.07.0.991230580307.issue38351@roundup.psfhosted.org> Fred L. Drake, Jr. added the comment: Definitely agree with Eric on this; code modernization is definitely on the risky side, so judicious updates are important. (Of course, not updating is also a risk, eventually. But not much of one in this case.) This issue is really about whether the docs should be updated to use the newer syntax. In general, I think we should update the docs, and we've delayed long enough for the general application of f-strings. There will be cases to be wary of, certainly. I'm thinking especially of calls to the logging methods, or anywhere else doing delayed formatting. (Not that I can think of others off the top of my head.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 22:05:25 2019 From: report at bugs.python.org (Artificial) Date: Thu, 03 Oct 2019 02:05:25 +0000 Subject: [issue38357] print adding extra bytes in hex above x7F In-Reply-To: <1570066448.41.0.0345074372849.issue38357@roundup.psfhosted.org> Message-ID: <1570068325.89.0.710341636113.issue38357@roundup.psfhosted.org> Artificial added the comment: Thanks, Arfrever Seems unnecessarily complicated for what worked in Python2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 22:22:48 2019 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 03 Oct 2019 02:22:48 +0000 Subject: [issue38350] ./configure --with-pydebug should use -O0 rather than -Og In-Reply-To: <1570034107.68.0.232468214894.issue38350@roundup.psfhosted.org> Message-ID: <1570069368.95.0.597139547812.issue38350@roundup.psfhosted.org> Charalampos Stratakis added the comment: It seems that it's still being worked on from gcc's side: https://gcc.gnu.org/bugzilla//show_bug.cgi?id=78685 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 23:02:46 2019 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Thu, 03 Oct 2019 03:02:46 +0000 Subject: [issue38333] add type signatures to library function docs In-Reply-To: <1569903700.63.0.276076850828.issue38333@roundup.psfhosted.org> Message-ID: <1570071766.26.0.828187149069.issue38333@roundup.psfhosted.org> Vedran ?a?i? added the comment: In that case, I'm pretty sure you'd never be able to document almost _any_ function signature. Python is simply not a statically typed language, and we love it because of that. Ok, go to the list of builtins, and start alphabetically. First is abs. What type does it take, and what type does it return? Again, I'd be completely ok with saying it takes an int, a float, or a complex, and returns either an int or a float. The same as the words in the docs already say. But according to Guido, that's "unacceptable", since abs can also take (and return) a datetime.timedelta, for example. I am very afraid that if we start doing this, we will lose _many_ useful features that make Python the language it is. It's really not worth it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 23:06:28 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 03 Oct 2019 03:06:28 +0000 Subject: [issue38356] test_asyncio: SubprocessThreadedWatcherTests leaks threads In-Reply-To: <1570056781.39.0.894014377654.issue38356@roundup.psfhosted.org> Message-ID: <1570071988.46.0.595629214932.issue38356@roundup.psfhosted.org> Kyle Stanley added the comment: First I'll work on adding a new method. Here's a few potential names, ordered roughly by my preferences: 1) join_threads() 2) shutdown_threads() 3) shutdown_threadpool() The first and second options are roughly equal, but I think join_threads() is a bit more specific to what this is doing. The third option is because a group of threads could be considered a "threadpool", but ThreadedChildWatcher doesn't utilize a dedicated threadpool class of any form, it just uses an internal dict named `_threads` that maps process IDs to threads. So this name might be potentially misleading. I'm also wondering whether or not this method should have a timeout parameter that defaults to None. I'm thinking we can probably leave it out for now, but I wanted to hear some other opinions on this. For now, I'll be implementing this as a regular method, but I could make it a coroutine if that's desired. Admittedly, I don't enough have knowledge of the realistic use cases for ThreadedChildWatcher to know if it would be particularly useful to have an awaitable method to join the threads. Another consideration is if we want this method to join the threads to be called in `ThreadedChildWatcher.close()`. I think it makes sense from a design perspective to join all of the threads when the close method is used. Plus, it would allow the method to be integrated with the tests better. Currently, the test uses the same `setUp()` and `tearDown()` for each of the different subprocess watchers. If it weren't called in the `close()` method, we'd have to add an `if isinstance(watcher, ThreadedChildWatcher)` conditional in `tearDown()`. So, I would prefer to have the method called from `close()`. Finally, should this method be part of the public API, or just a private method? As mentioned earlier, I'm not overly aware of the realistic use cases for ThreadedChildWatcher. As a result, I don't know if it would be especially useful for users to call this method independently, especially if this were called from `close()` as I was suggesting earlier. After we reach a consensus on the implementation details and API design for the new method, I'll work on adding an entry in the documentation (if it should be public) and updating test_subprocess.SubprocessThreadedWatcherTests to utilize it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 23:19:00 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 03 Oct 2019 03:19:00 +0000 Subject: [issue38356] test_asyncio: SubprocessThreadedWatcherTests leaks threads In-Reply-To: <1570056781.39.0.894014377654.issue38356@roundup.psfhosted.org> Message-ID: <1570072740.84.0.044932513183.issue38356@roundup.psfhosted.org> Kyle Stanley added the comment: > Another consideration is if we want this method to join the threads to be called in `ThreadedChildWatcher.close()`. An additional benefit of having the method called from `close()` is that it means we don't have to modify the tests directly. Also, ThreadedChildWatcher's implementation of `close()` does nothing at the moment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 23:35:39 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 03 Oct 2019 03:35:39 +0000 Subject: [issue38351] Modernize email example from %-formatting to f-string In-Reply-To: <1570034736.68.0.500723145519.issue38351@roundup.psfhosted.org> Message-ID: <1570073739.25.0.503609582079.issue38351@roundup.psfhosted.org> Raymond Hettinger added the comment: > (Not that I can think of others off the top of my head.) For the most part, templating examples can be switched to the .format() style but shouldn't be switched to f-strings. The former technique is still necessary if someone wants to move templates to an external file or if they need to use gettext() i18n, f-strings don't work well in the latter case. Also note, there are no plans to completely remove old-style formatting. AFAICT, it will be around forever, so people still need to see some examples of each. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 23:38:34 2019 From: report at bugs.python.org (paul rubin) Date: Thu, 03 Oct 2019 03:38:34 +0000 Subject: [issue38333] add type signatures to library function docs In-Reply-To: <1569903700.63.0.276076850828.issue38333@roundup.psfhosted.org> Message-ID: <1570073914.88.0.362848840236.issue38333@roundup.psfhosted.org> paul rubin added the comment: abs takes any value that understands the __abs__ method and returns something of the same type. In fact there is already a type protocol for it: https://mypy.readthedocs.io/en/stable/protocols.html#supportsabs-t So abs's signature would be (x : Abs[T]) -> T where T is a type parameter. I'm sure there are some examples where no good signature is possible, but lots of others are fine. Someone did a Smalltalk study long ago and found that most functions were monomorphic in practice even though Smalltalk is dynamically typed like Python. As a matter of style, Python code tends to be typed even when it doesn't have to be. Not all the time of course. I'm still getting used to types and mypy (I was a py2 holdout til quite recently, and mypy has been a more attractive reason to change than any of the other stuff) and I do keep noticing cases that don't work as I hoped, but it's still a good move in general. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 23:55:02 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 03 Oct 2019 03:55:02 +0000 Subject: [issue38356] test_asyncio: SubprocessThreadedWatcherTests leaks threads In-Reply-To: <1570056781.39.0.894014377654.issue38356@roundup.psfhosted.org> Message-ID: <1570074902.4.0.336399104449.issue38356@roundup.psfhosted.org> Change by Kyle Stanley : ---------- keywords: +patch pull_requests: +16140 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16552 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 01:03:30 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 03 Oct 2019 05:03:30 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1570079010.09.0.536921503659.issue13153@roundup.psfhosted.org> Terry J. Reedy added the comment: The revised PR appears to fix this and other issues, although the presence of astral chars in code being edited messes up tk's cursor positioning. Assuming that this cannot be changed, we could add the the ability to replace astral chars with \U escapes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 01:06:25 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 03 Oct 2019 05:06:25 +0000 Subject: [issue38351] Modernize email example from %-formatting to f-string In-Reply-To: <1570034736.68.0.500723145519.issue38351@roundup.psfhosted.org> Message-ID: <1570079185.77.0.375767337715.issue38351@roundup.psfhosted.org> Kyle Stanley added the comment: > For the most part, templating examples can be switched to the .format() style but shouldn't be switched to f-strings. Is there no specific use case for the older "%s" % sub template that .format() doesn't have? > The former technique is still necessary if someone wants to move templates to an external file Interesting, I wasn't aware of that. This seems like it might be worth a brief mention in https://docs.python.org/3.9/library/stdtypes.html#str.format. > AFAICT, it will be around forever, so people still need to see some examples of each. To allow users to see examples of each, would you suggest that we should leave the existing .format() examples as is and have more recently created examples use f-strings? I'd be okay with this, as long as there's a balance of both everywhere (particularly in the tutorial). Personally, I think that the f-string examples should be used more commonly used since they're generally more concise and readable. But, I can definitely understand the purpose of leaving the older ones around as long as they have a specific use case and are still utilized. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 01:45:58 2019 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Thu, 03 Oct 2019 05:45:58 +0000 Subject: [issue38351] Modernize email example from %-formatting to f-string In-Reply-To: <1570034736.68.0.500723145519.issue38351@roundup.psfhosted.org> Message-ID: <1570081558.91.0.640037403641.issue38351@roundup.psfhosted.org> Fred L. Drake, Jr. added the comment: I'd like to see consistent usage by default, with specific examples using the older forms as appropriate. The use cases Raymond identified are worth discussing (and the tutorial may be a good place for this), and well as mentioned in the reference docs for the '%s' % x and ''.format() operations (and string.Template(), of course). I would not like to see different syntaxes randomly applied to different examples that happen to involve formatting, but where that's not the emphasis. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 02:20:42 2019 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Thu, 03 Oct 2019 06:20:42 +0000 Subject: [issue38333] add type signatures to library function docs In-Reply-To: <1569903700.63.0.276076850828.issue38333@roundup.psfhosted.org> Message-ID: <1570083642.45.0.770722397423.issue38333@roundup.psfhosted.org> Vedran ?a?i? added the comment: Well, yes, if you're going to invent a special typeclass for every protocol, then you can document any signature. But what purpose does it serve? Abs to me seems like a hack, not something we really wanted to capture with the type system. Do you find (x : Abs[T]) -> T in any way clearer than what's currently written in the docs? Do we really want to move in that direction? And not to mention that "... returns something of the same type" is _still_ incorrect -- for example, for complex it returns float. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 02:31:28 2019 From: report at bugs.python.org (Aivar Annamaa) Date: Thu, 03 Oct 2019 06:31:28 +0000 Subject: [issue34455] Tkinter crashing when pressing Command + ^ (OSX) In-Reply-To: <1534890010.44.0.56676864532.issue34455@psf.upfronthosting.co.za> Message-ID: <1570084288.95.0.666441901404.issue34455@roundup.psfhosted.org> Aivar Annamaa added the comment: I created the ticket: https://core.tcl-lang.org/tk/tktview/5849df7852c48cb763b11a11d848a68482b0f828 ---------- nosy: +Aivar.Annamaa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 02:41:52 2019 From: report at bugs.python.org (paul rubin) Date: Thu, 03 Oct 2019 06:41:52 +0000 Subject: [issue38333] add type signatures to library function docs In-Reply-To: <1569903700.63.0.276076850828.issue38333@roundup.psfhosted.org> Message-ID: <1570084912.15.0.809646963988.issue38333@roundup.psfhosted.org> paul rubin added the comment: At first glance, having a typeclass for each protocol (at least the widely used ones) seems fine. It's inherent in Haskell and a lot of libraries are organized around a common set of typeclasses--look up "Typeclassopedia" for descriptions of them. Certainly the case of abs (which you asked about by name), the typeclass is already there in the typing module. You're right about abs(complex) returning float. Haskell's type signature for abs is "Num a => a -> a" which means the input type is the same as the output. That is a little bit peculiar since the abs of a complex number is complex, but we usually think of abs as a mathematical norm, which is conventionally a real. Anyway, "abs(x: Abs[T]) -> Any" is a better-than-nothing signature for abs, and the docs can comment a little further, and maybe someday it could even do a type-level lookup at typechecking time, i.e. have something like Haskell's "type families". I like to think it's possible to supply reasonable signatures for most functions. I just fixed a bug in something today because bs4 (beautiful soup 4) has no typeshed stub so mypy uses Any for functions like soup.find, instead of Optional[tag]. So the program worked fine as long as find kept returning a tag, but then crashed because it hit a document without a tag and my code didn't check for None. That's something more precise types would have caught at mypy time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 02:48:43 2019 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Thu, 03 Oct 2019 06:48:43 +0000 Subject: [issue38333] add type signatures to library function docs In-Reply-To: <1569903700.63.0.276076850828.issue38333@roundup.psfhosted.org> Message-ID: <1570085323.0.0.761777128097.issue38333@roundup.psfhosted.org> Vedran ?a?i? added the comment: Your arguments in my view boil down to "Haskell is a nice language" and "Static typing is useful". It still doesn't change my argument that Python is genetically neither of these. And we will cripple it greatly if we try to push it in that direction. [Your problem with bs4 is just a facet of a billion dollar mistake (treating null as an object), that's present in many statically typed languages even today. Optional is great for explaining to humans, but very hard to get right when talking to computers.] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 02:58:07 2019 From: report at bugs.python.org (paul rubin) Date: Thu, 03 Oct 2019 06:58:07 +0000 Subject: [issue38333] add type signatures to library function docs In-Reply-To: <1569903700.63.0.276076850828.issue38333@roundup.psfhosted.org> Message-ID: <1570085887.1.0.54412728298.issue38333@roundup.psfhosted.org> paul rubin added the comment: I don't think we're going to accomplish anything continuing the eternal static-vs-dynamic debate, which in Python's case has already been resolved by adding optional static typing. It's a done deal, and the issue here is just how to document it. Erlang (via the Erlang Dialyzer), Clojure, and Racket have all been down a similar road and gained some value from it. Haskell's Maybe type (its version of Option) works fine. In Python the convention of returning None for a missing value is not great, but we are stuck with it and Option[whatever] is helpful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 03:06:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Oct 2019 07:06:57 +0000 Subject: [issue38106] [2.7] Race in PyThread_release_lock on macOS - can lead to memory corruption and deadlock In-Reply-To: <1568200653.3.0.865964137512.issue38106@roundup.psfhosted.org> Message-ID: <1570086417.72.0.353329180504.issue38106@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c5abd63e94fcea10bdfa7a20842c6af3248bbd74 by Victor Stinner (Kirill Smelkov) in branch '2.7': bpo-38106: Fix race in pthread PyThread_release_lock() (GH-16047) https://github.com/python/cpython/commit/c5abd63e94fcea10bdfa7a20842c6af3248bbd74 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 03:10:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Oct 2019 07:10:00 +0000 Subject: [issue38106] [2.7] Race in PyThread_release_lock on macOS - can lead to memory corruption and deadlock In-Reply-To: <1568200653.3.0.865964137512.issue38106@roundup.psfhosted.org> Message-ID: <1570086600.73.0.478316809964.issue38106@roundup.psfhosted.org> STINNER Victor added the comment: I merged Kirill Smelkov's fix. Thanks. I close the issue. I'm surprised that we still find new bugs in this code which is supposed to be battle tested! Maybe recent Darwin changed made the bug more likely. PyPy: it's now your turn to fix it ;-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 03:11:14 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Oct 2019 07:11:14 +0000 Subject: [issue38350] ./configure --with-pydebug should use -O0 rather than -Og In-Reply-To: <1570034107.68.0.232468214894.issue38350@roundup.psfhosted.org> Message-ID: <1570086674.02.0.708342364417.issue38350@roundup.psfhosted.org> STINNER Victor added the comment: > Do note though that if the -D_FORTIFY_SOURCE=2 hardening flag is used, the compilation will fail with an optimization level less than -Og. Does it make any sense to use a debug build in production? Does it make sense to enable hardening on a debug buil?d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 03:16:24 2019 From: report at bugs.python.org (Nathaniel Smith) Date: Thu, 03 Oct 2019 07:16:24 +0000 Subject: [issue37373] Configuration of windows event loop for libraries In-Reply-To: <1561228405.39.0.674272094682.issue37373@roundup.psfhosted.org> Message-ID: <1570086984.11.0.830577712617.issue37373@roundup.psfhosted.org> Nathaniel Smith added the comment: It's also possible to implement 'select' on top of IOCP using undocumented private APIs. That's what libuv does (and how 'select' works internally). There's a bunch of information on this collected here: https://github.com/python-trio/trio/issues/52 ---------- nosy: +njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 03:50:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Oct 2019 07:50:25 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1570089025.19.0.635558580933.issue36670@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16141 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/16553 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 03:56:11 2019 From: report at bugs.python.org (Kirill Smelkov) Date: Thu, 03 Oct 2019 07:56:11 +0000 Subject: [issue38106] [2.7] Race in PyThread_release_lock on macOS - can lead to memory corruption and deadlock In-Reply-To: <1568200653.3.0.865964137512.issue38106@roundup.psfhosted.org> Message-ID: <1570089371.99.0.107614941299.issue38106@roundup.psfhosted.org> Kirill Smelkov added the comment: Victor, thanks for merging. > I'm surprised that we still find new bugs in this code which is supposed to > be battle tested! Maybe recent Darwin changed made the bug more likely. As discussed above (https://bugs.python.org/issue38106#msg351917, https://bugs.python.org/issue38106#msg351970), due to the GIL, the bug is not possible to trigger from pure-python code, and it can be hit only via using CAPI directly. I indeed started to observe the problem after moving locks and other code that implement channels in Pygolang from Python to C level (see "0.0.3" in https://pypi.org/project/pygolang/#pygolang-change-history) The bug was there since 1994 and, from my point of view, it was not discovered because locking functionality was not enough hammer-tested. The bug was also not possible to explain without taking lock lifetime into account, as, without create/destroy, just lock/unlock sequence was race free. https://bugs.python.org/issue433625 confirms that. I cannot say about whether recent macOS changes are relevant. My primary platform is Linux and I only recently started to use macOS under QEMU for testing. However from my brief study of https://github.com/apple/darwin-libpthread I believe the difference in scheduling related to pthread condition variable signalling under macOS and Linux is there already for a long time. > PyPy: it's now your turn to fix it ;-) PyPy people fixed the bug the same day it was reported: https://bitbucket.org/pypy/pypy/issues/3072 :) Kirill P.S. Mariusz, thanks also for your feedback. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 04:02:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Oct 2019 08:02:19 +0000 Subject: [issue38106] [2.7] Race in PyThread_release_lock on macOS - can lead to memory corruption and deadlock In-Reply-To: <1568200653.3.0.865964137512.issue38106@roundup.psfhosted.org> Message-ID: <1570089739.42.0.951837660945.issue38106@roundup.psfhosted.org> STINNER Victor added the comment: > PyPy people fixed the bug the same day it was reported: ... Oh ok, so the CPython commit message is already outdated :-) "PyPy has the same bug for both pypy2 and pypy3 (...)" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 04:06:54 2019 From: report at bugs.python.org (Kirill Smelkov) Date: Thu, 03 Oct 2019 08:06:54 +0000 Subject: [issue38106] [2.7] Race in PyThread_release_lock on macOS - can lead to memory corruption and deadlock In-Reply-To: <1568200653.3.0.865964137512.issue38106@roundup.psfhosted.org> Message-ID: <1570090014.13.0.501800047711.issue38106@roundup.psfhosted.org> Kirill Smelkov added the comment: :) Yes and no. PyPy did not make a new release with the fix yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 04:31:46 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 03 Oct 2019 08:31:46 +0000 Subject: [issue34455] Tkinter crashing when pressing Command + ^ (OSX) In-Reply-To: <1534890010.44.0.56676864532.issue34455@psf.upfronthosting.co.za> Message-ID: <1570091506.0.0.901027848632.issue34455@roundup.psfhosted.org> Terry J. Reedy added the comment: Aivar, thank you for opening the issue. I believe what I meant about tkinter bind calls would be to conditionallly bind '' to a function that returns 'break', thus claiming that the key combination has been handled and that tk should ignore it. The function could do nothing or it could display a message. I don't know if this would work until it were tested. And it would be a real kludgy workaround and until disabled would block the key combo from working when the tcl people did fix it. So not to be done lightly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 04:32:54 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Oct 2019 08:32:54 +0000 Subject: [issue38350] ./configure --with-pydebug should use -O0 rather than -Og In-Reply-To: <1570034107.68.0.232468214894.issue38350@roundup.psfhosted.org> Message-ID: <1570091574.84.0.455591358174.issue38350@roundup.psfhosted.org> Serhiy Storchaka added the comment: The purpose of using -Og is that it significantly speeds up tests. You can always pass CFLAGS="-O0" if you debug particular debugger issues, but in normal cases -Og looks more beneficial. It saves hours of time of common developers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 04:39:18 2019 From: report at bugs.python.org (Aivar Annamaa) Date: Thu, 03 Oct 2019 08:39:18 +0000 Subject: [issue34455] Tkinter crashing when pressing Command + ^ (OSX) In-Reply-To: <1534890010.44.0.56676864532.issue34455@psf.upfronthosting.co.za> Message-ID: <1570091958.15.0.733574698604.issue34455@roundup.psfhosted.org> Aivar Annamaa added the comment: > to conditionallly bind '' to a function that returns 'break' I tried capturing all events. The handler was called for Cmd press, but the crash occurred before the handler was called for the other key. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 04:45:37 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Oct 2019 08:45:37 +0000 Subject: [issue38348] Make python -m ast more configurable In-Reply-To: <1570029299.56.0.0303865742584.issue38348@roundup.psfhosted.org> Message-ID: <1570092337.6.0.477882387951.issue38348@roundup.psfhosted.org> Serhiy Storchaka added the comment: Why do you need this feature? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 04:53:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Oct 2019 08:53:38 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1570092818.07.0.519103079434.issue36670@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c65119d5bfded03f80a9805889391b66fa7bf551 by Victor Stinner in branch 'master': bpo-36670: Enhance regrtest WindowsLoadTracker (GH-16553) https://github.com/python/cpython/commit/c65119d5bfded03f80a9805889391b66fa7bf551 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 04:55:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Oct 2019 08:55:18 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1570092918.42.0.932548534524.issue36670@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16142 pull_request: https://github.com/python/cpython/pull/16554 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 05:03:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Oct 2019 09:03:56 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1570093436.64.0.695345745491.issue36670@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16143 pull_request: https://github.com/python/cpython/pull/16555 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 05:10:09 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Oct 2019 09:10:09 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1570093809.64.0.127343709998.issue13153@roundup.psfhosted.org> Serhiy Storchaka added the comment: >From the point of view of Tk, the astral character "?" looks like either two invisible characters "\ud83d\udcbb" or as four characters "?\x9f\x92?" (two of them are invisible). Thus this breaks editing the physical line past the astral character. We cannot do anything with this. It also breaks syntax highlighting up to 100 lines past the astral character. We can add a workaround for this, but I am not sure it is worth. The solution could be complex and slow down the common case. In any case it is a different issue. File names with astral characters now are shown correctly in most cases. Astral characters are not shown in the title of the window, perhaps it is font depending. Opening a file name with astral characters works in the command line, but it does not work via the file open dialog. This looks like a bug in Tk, we cannot workaround it (or at least the possible workaround would be ugly and partial). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 05:12:37 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Oct 2019 09:12:37 +0000 Subject: [issue38358] ASSERTION ERROR WHILE USING TENSORFLOW In-Reply-To: <1570092612.13.0.03397983919.issue38358@roundup.psfhosted.org> Message-ID: <1570093957.25.0.816873815495.issue38358@roundup.psfhosted.org> Serhiy Storchaka added the comment: This is a tracker for bugs in Python itself. Tensorflow is a third-party library. Please use an appropriate bug tracker for reporting issues with tensorflow. ---------- nosy: +serhiy.storchaka resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 05:29:12 2019 From: report at bugs.python.org (karl) Date: Thu, 03 Oct 2019 09:29:12 +0000 Subject: [issue19683] test_minidom has many empty tests In-Reply-To: <1385047059.66.0.790496754317.issue19683@psf.upfronthosting.co.za> Message-ID: <1570094952.11.0.554903241685.issue19683@roundup.psfhosted.org> karl added the comment: err? Errata on my previous comment. """ Simple implementation of the Level 1 DOM. Namespaces and other minor Level 2 features are also supported. """ https://github.com/python/cpython/blob/c65119d5bfded03f80a9805889391b66fa7bf551/Lib/xml/dom/minidom.py#L1-L3 https://www.w3.org/TR/REC-DOM-Level-1/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 05:32:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Oct 2019 09:32:53 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1570095173.74.0.125913863176.issue36670@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16144 pull_request: https://github.com/python/cpython/pull/16556 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 05:53:25 2019 From: report at bugs.python.org (Andrew Ushakov) Date: Thu, 03 Oct 2019 09:53:25 +0000 Subject: [issue38359] pyw.exe opens console window in Windows 10 Message-ID: <1570096405.52.0.325874974028.issue38359@roundup.psfhosted.org> New submission from Andrew Ushakov : pyw.exe (Python Launcher for Windows Version 3.8.121.1013) opens a console window at startup. To reproduce, run command below from the console: D:>pyw -c "import time; time.sleep(10)" By the way command: D:>pythomw -c "import time; time.sleep(10)" works as expected, silently. ---------- components: Windows messages: 353836 nosy: Andrew Ushakov, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: pyw.exe opens console window in Windows 10 type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 05:54:22 2019 From: report at bugs.python.org (karl) Date: Thu, 03 Oct 2019 09:54:22 +0000 Subject: [issue9004] datetime.utctimetuple() should not set tm_isdst flag to 0 In-Reply-To: <1276659404.06.0.425467293989.issue9004@psf.upfronthosting.co.za> Message-ID: <1570096462.61.0.798445428352.issue9004@roundup.psfhosted.org> karl added the comment: @gaurav The pull request https://github.com/python/cpython/pull/10870 has been closed in favor of https://github.com/python/cpython/pull/15773 which has already been merged. So we can probably close here. ---------- message_count: 7.0 -> 8.0 nosy: +karlcow nosy_count: 7.0 -> 8.0 pull_requests: +16145 pull_request: https://github.com/python/cpython/pull/15773 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 07:20:54 2019 From: report at bugs.python.org (Joshua Root) Date: Thu, 03 Oct 2019 11:20:54 +0000 Subject: [issue38360] single-argument form of -isysroot should be supported Message-ID: <1570101654.53.0.395218631906.issue38360@roundup.psfhosted.org> New submission from Joshua Root : The path associated with the -isysroot compiler flag can be supplied either as a separate argument or in the same argument as -isysroot itself. The places in library code that do special handling of this flag should support both forms, but currently only support the two separate arguments form. This means that the flag may not be removed when pointing to a nonexistent SDK or when a different SDK is specified in the user's CFLAGS, and at worst a ValueError is raised in compiler_fixup. ---------- components: Distutils, macOS messages: 353838 nosy: dstufft, eric.araujo, jmr, ned.deily, ronaldoussoren priority: normal pull_requests: 16146 severity: normal status: open title: single-argument form of -isysroot should be supported type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 07:38:59 2019 From: report at bugs.python.org (Vaclav Bartos) Date: Thu, 03 Oct 2019 11:38:59 +0000 Subject: [issue38361] syslog: Default "ident" in syslog.openlog() shouldn't contain slash Message-ID: <1570102738.99.0.163183464343.issue38361@roundup.psfhosted.org> New submission from Vaclav Bartos : When `syslog.openlog()` is called without parameters (or `syslog.syslog()` is called directly), the `ident` parameter should be set to "sys.argv[0] with leading path components stripped" (citation from docs). I suppose this means that when sys.argv[0] is "/some/path/to/script", the ident should be set to "script" (this is the behavior in Python 2.7) However, in Python 3.x, it gets set to "/script", i.e. the last slash is included in the string. I suppose this is not intended, it is just a "one-off" error in parsing the string. The fix is trivial, see the linked GitHub PR. To reproduce the bug: $ python3 >>> import sys >>> import syslog >>> sys.argv[0] = "/some/path/to/script" >>> syslog.syslog("TEST MESSAGE") >>> $ tail -n 1 /var/log/messages Oct 3 11:11:46 localhost /script: TEST MESSAGE ---------- components: Extension Modules messages: 353839 nosy: vaclavbartos priority: normal pull_requests: 16147 severity: normal status: open title: syslog: Default "ident" in syslog.openlog() shouldn't contain slash type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 07:44:52 2019 From: report at bugs.python.org (=?utf-8?b?0KHQstC10YLQu9C+0LzQuNGAINCR0LDQu9C10LLRgdC60Lg=?=) Date: Thu, 03 Oct 2019 11:44:52 +0000 Subject: [issue38362] platform.system() comparison problem Message-ID: <1570103092.18.0.780844249271.issue38362@roundup.psfhosted.org> New submission from ????????? ???????? : Hi, I am using platform.system(). On linux I am using python3.6. >>> platform.system() 'Linux' >>> platform.system() is 'Linux' False >>> platform.system() == 'Linux' True On Windows with python 3.7: [?10/?3/?2019 2:42 PM] >>> platform.system() 'Windows' >>> platform.system() is 'Windows' True >>> platform.system() == 'Windows' True Is this a known problem? ---------- components: Library (Lib) messages: 353840 nosy: ????????? ???????? priority: normal severity: normal status: open title: platform.system() comparison problem type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 08:10:17 2019 From: report at bugs.python.org (Stephen Tucker) Date: Thu, 03 Oct 2019 12:10:17 +0000 Subject: [issue38363] No Module named ..." and UTF-8 Byte Order Marks Message-ID: New submission from Stephen Tucker : Hi, I am running Python 2.7.10 on Windows 10. I have discovered that if a .py source text file (that is, a Module text file) starts with a UTF-8 Byte Order Mark, the module does not get "found" by the import statement. I have just spent an inordinate amount of time reaching this conclusion. I realise that 2.7.10 is probably not being supported any more, however, please let me ask the questions anyway: Could ... Either: ... the error message please be more helpful? (Like, for example, "Module begins with a Byte Order Mark") Or: ... the BOM be allowed at the start of a Module? Thanks. Stephen Tucker. ---------- messages: 353841 nosy: Stephen_Tucker priority: normal severity: normal status: open title: No Module named ..." and UTF-8 Byte Order Marks _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 08:25:49 2019 From: report at bugs.python.org (Batuhan) Date: Thu, 03 Oct 2019 12:25:49 +0000 Subject: [issue38348] Make python -m ast more configurable In-Reply-To: <1570092337.6.0.477882387951.issue38348@roundup.psfhosted.org> Message-ID: Batuhan added the comment: I was checking typed_ast and i wanted to know which parts changed and implement that parts to astor. But there was no flags for --type-comments False. Also it can be handy to have an indention option to change it for fitting tree into the terminal width. On Thu, Oct 3, 2019, 11:45 AM Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > Why do you need this feature? > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 08:44:09 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 03 Oct 2019 12:44:09 +0000 Subject: [issue38362] platform.system() comparison problem In-Reply-To: <1570103092.18.0.780844249271.issue38362@roundup.psfhosted.org> Message-ID: <1570106649.3.0.462215838462.issue38362@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Using "is" could be dependent on how the string is interned to refer to the same string during comparison for identity. Using == is more reliable and correct. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 08:51:19 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 03 Oct 2019 12:51:19 +0000 Subject: [issue38362] platform.system() comparison problem In-Reply-To: <1570103092.18.0.780844249271.issue38362@roundup.psfhosted.org> Message-ID: <1570107079.14.0.955782891773.issue38362@roundup.psfhosted.org> Steven D'Aprano added the comment: This is nothing to do with platform.system. You can see the same behaviour with any string comparison, or ints. The `is` operator is not a cute way of spelling `==`, it tests for object identity, not equality. It tests whether the two arguments are the same object. The Python interpreter caches some strings, and some ints, to save memory, so the result of ``expression is "somestring"`` will depend on the operating system, the version of Python, what happens to be in the cache, and whatever memory optimization tricks are being used by the interpreter. Never use ``is`` for testing whether two things are equal. Only use it for testing object identity, like ``obj is None``. By the way, this question about ``is`` has been asked many, many times on places like Stackoverflow. If you have any further questions about this, you should check the answers there. ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 08:52:29 2019 From: report at bugs.python.org (karl) Date: Thu, 03 Oct 2019 12:52:29 +0000 Subject: [issue1375011] http.cookies, Cookie.py: Improper handling of duplicate cookies Message-ID: <1570107149.58.0.181991050581.issue1375011@roundup.psfhosted.org> karl added the comment: Relevant spec https://tools.ietf.org/html/rfc6265 ---------- nosy: +karlcow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 08:52:18 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Thu, 03 Oct 2019 12:52:18 +0000 Subject: [issue38266] Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal In-Reply-To: <1569352841.72.0.766028949986.issue38266@roundup.psfhosted.org> Message-ID: <1570107138.9.0.937941647512.issue38266@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- keywords: +patch pull_requests: +16148 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16558 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 08:52:18 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Thu, 03 Oct 2019 12:52:18 +0000 Subject: [issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent() In-Reply-To: <1565985235.6.0.212314052144.issue37878@roundup.psfhosted.org> Message-ID: <1570107138.99.0.514294940305.issue37878@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- pull_requests: +16149 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16558 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 08:54:57 2019 From: report at bugs.python.org (Kevin Walzer) Date: Thu, 03 Oct 2019 12:54:57 +0000 Subject: [issue34455] Tkinter crashing when pressing Command + ^ (OSX) In-Reply-To: <1534890010.44.0.56676864532.issue34455@psf.upfronthosting.co.za> Message-ID: <1570107297.68.0.049737053999.issue34455@roundup.psfhosted.org> Kevin Walzer added the comment: We have committed some fixes to the keyboard code in the past year that seem to have fixed this issue. I do not see it in 8.6.10, now as a RC. I believe this bug is obsolete at this point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 09:20:11 2019 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Thu, 03 Oct 2019 13:20:11 +0000 Subject: [issue38333] add type signatures to library function docs In-Reply-To: <1569903700.63.0.276076850828.issue38333@roundup.psfhosted.org> Message-ID: <1570108811.29.0.551786544999.issue38333@roundup.psfhosted.org> Vedran ?a?i? added the comment: https://www.python.org/dev/peps/pep-0484/#non-goals I really have nothing more to say. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 09:21:58 2019 From: report at bugs.python.org (Ma Lin) Date: Thu, 03 Oct 2019 13:21:58 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1570108918.61.0.837349451.issue13153@roundup.psfhosted.org> Ma Lin added the comment: > Thus this breaks editing the physical line past the astral character. We cannot do anything with this. I tried, it's sad the experience is not very good. ---------- nosy: +Ma Lin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 09:28:44 2019 From: report at bugs.python.org (Martijn Pieters) Date: Thu, 03 Oct 2019 13:28:44 +0000 Subject: [issue38364] inspect.iscoroutinefunction / isgeneratorfunction / isasyncgenfunction can't handle partialmethod objects Message-ID: <1570109324.07.0.792957059658.issue38364@roundup.psfhosted.org> New submission from Martijn Pieters : This is a follow-up to #33261, which added general support for detecting generator / coroutine / async generator functions wrapped in partials. It appears that partialmethod objects were missed out. While a partialmethod object will produce a functools.partial() object on binding to an instance, the .func attribute of that partial is a bound method, not a function, and the current _has_code_flag implementation unwraps methods *before* it unwraps partials. Next, binding to a class produces a partialmethod._make_unbound_method.._method wrapper function. _unwrap_partial can't unwrap this, as it doesn't handle this case; it could look for the `_partialmethod` attribute and follow that to find the `.func` attribute. Test case: import inspect import functools class Foo: async def bar(self, a): return a ham = partialmethod(bar, "spam") print(inspect.iscoroutinefunction(Foo.bar) # True print(inspect.iscoroutinefunction(Foo.ham) # False instance = Foo() print(inspect.iscoroutinefunction(instance.bar) # True print(inspect.iscoroutinefunction(instance.ham) # False ---------- components: Library (Lib) messages: 353849 nosy: mjpieters priority: normal severity: normal status: open title: inspect.iscoroutinefunction / isgeneratorfunction / isasyncgenfunction can't handle partialmethod objects type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 09:38:56 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 03 Oct 2019 13:38:56 +0000 Subject: [issue38364] inspect.iscoroutinefunction / isgeneratorfunction / isasyncgenfunction can't handle partialmethod objects In-Reply-To: <1570109324.07.0.792957059658.issue38364@roundup.psfhosted.org> Message-ID: <1570109936.31.0.383849926036.issue38364@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +asvetlov, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 10:15:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Oct 2019 14:15:34 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1570112134.52.0.462047450189.issue36670@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 098e25672f1c3578855d5ded4f5147795c9ed956 by Victor Stinner in branch 'master': bpo-36670: Enhance regrtest (GH-16556) https://github.com/python/cpython/commit/098e25672f1c3578855d5ded4f5147795c9ed956 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 10:18:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Oct 2019 14:18:53 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1570112333.33.0.29995287471.issue36670@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16150 pull_request: https://github.com/python/cpython/pull/16559 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 10:20:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Oct 2019 14:20:34 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1570112434.33.0.672205405223.issue36670@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16151 pull_request: https://github.com/python/cpython/pull/16560 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 10:40:28 2019 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 03 Oct 2019 14:40:28 +0000 Subject: [issue38333] add type signatures to library function docs In-Reply-To: <1569903700.63.0.276076850828.issue38333@roundup.psfhosted.org> Message-ID: <1570113628.44.0.370738502846.issue38333@roundup.psfhosted.org> Guido van Rossum added the comment: Since this discussion went down in flames quickly, I'm closing it. Another issue can be opened once someone has a concrete design of what this should look like in the formatted docs, an example that does this for a few libraries, and a prototype of a tool that extracts signatures from typeshed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 10:40:44 2019 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 03 Oct 2019 14:40:44 +0000 Subject: [issue38333] add type signatures to library function docs In-Reply-To: <1569903700.63.0.276076850828.issue38333@roundup.psfhosted.org> Message-ID: <1570113644.71.0.136358399603.issue38333@roundup.psfhosted.org> Change by Guido van Rossum : ---------- resolution: -> postponed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 10:50:51 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 03 Oct 2019 14:50:51 +0000 Subject: [issue38359] pyw.exe opens console window in Windows 10 In-Reply-To: <1570096405.52.0.325874974028.issue38359@roundup.psfhosted.org> Message-ID: <1570114251.1.0.806496922095.issue38359@roundup.psfhosted.org> Steve Dower added the comment: I know what this is - in issue38133 I added support for the PEP 514 ExecutablePath key, but didn't add a check for WindowedExecutablePath for the pyw.exe case. I'll add it. ---------- assignee: -> steve.dower keywords: +3.8regression versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 10:56:38 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 03 Oct 2019 14:56:38 +0000 Subject: [issue38359] pyw.exe opens console window in Windows 10 In-Reply-To: <1570096405.52.0.325874974028.issue38359@roundup.psfhosted.org> Message-ID: <1570114598.01.0.4065493471.issue38359@roundup.psfhosted.org> Change by Steve Dower : ---------- nosy: +lukasz.langa priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 11:09:12 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 03 Oct 2019 15:09:12 +0000 Subject: [issue38359] pyw.exe opens console window in Windows 10 In-Reply-To: <1570096405.52.0.325874974028.issue38359@roundup.psfhosted.org> Message-ID: <1570115352.35.0.930324422878.issue38359@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +16152 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16561 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 11:26:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Oct 2019 15:26:40 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1570116400.28.0.439687875288.issue36670@roundup.psfhosted.org> STINNER Victor added the comment: New changeset de3195c937d5fca0d79cc93dbafa76c0f89ca5b8 by Victor Stinner in branch '3.8': [3.8] bpo-36670, regrtest: Fix WindowsLoadTracker() for partial line (GH-16550) (GH-16560) https://github.com/python/cpython/commit/de3195c937d5fca0d79cc93dbafa76c0f89ca5b8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 11:27:22 2019 From: report at bugs.python.org (Stephen Tucker) Date: Thu, 03 Oct 2019 15:27:22 +0000 Subject: [issue38365] Issue 38363 - False Alarm - Sorry! Message-ID: New submission from Stephen Tucker : Hi, Issue 38363 is a false alarm - I am sorry to have wasted your time. My mistake was that the file that had the BOM in it also had a space at the end of the filename. I removed the space and the module was found OK. Sorry again. Stephen Tucker. ---------- messages: 353854 nosy: Stephen_Tucker priority: normal severity: normal status: open title: Issue 38363 - False Alarm - Sorry! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 11:27:42 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 03 Oct 2019 15:27:42 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1570116462.47.0.914893743545.issue36670@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16153 pull_request: https://github.com/python/cpython/pull/16562 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 11:31:09 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 03 Oct 2019 15:31:09 +0000 Subject: [issue38355] ntpath.realpath() fails on sys.executable In-Reply-To: <1570055857.28.0.434394542652.issue38355@roundup.psfhosted.org> Message-ID: <1570116669.42.0.0651030879537.issue38355@roundup.psfhosted.org> Steve Dower added the comment: New changeset a0e3d27e4e3cb5b67e325df080fb18b70c2910cf by Steve Dower in branch 'master': bpo-38355: Fix ntpath.realpath failing on sys.executable (GH-16551) https://github.com/python/cpython/commit/a0e3d27e4e3cb5b67e325df080fb18b70c2910cf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 11:31:23 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 03 Oct 2019 15:31:23 +0000 Subject: [issue38355] ntpath.realpath() fails on sys.executable In-Reply-To: <1570055857.28.0.434394542652.issue38355@roundup.psfhosted.org> Message-ID: <1570116683.34.0.968965388608.issue38355@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16154 pull_request: https://github.com/python/cpython/pull/16563 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 11:31:24 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 03 Oct 2019 15:31:24 +0000 Subject: [issue38359] pyw.exe opens console window in Windows 10 In-Reply-To: <1570096405.52.0.325874974028.issue38359@roundup.psfhosted.org> Message-ID: <1570116684.23.0.458482173691.issue38359@roundup.psfhosted.org> Steve Dower added the comment: New changeset 353fb1ecbfd58752dabae115c4964095e1e35e5f by Steve Dower in branch 'master': bpo-38359: Ensures pyw.exe launcher reads correct registry key (GH-16561) https://github.com/python/cpython/commit/353fb1ecbfd58752dabae115c4964095e1e35e5f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 11:31:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Oct 2019 15:31:37 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1570116697.46.0.897926515603.issue36670@roundup.psfhosted.org> STINNER Victor added the comment: Thanks for the bug report. I was impacted by the bug with my French locale as well. I pushed a fix based on Lorenz Mende's work, with minor changes. I also enhanced WindowsLoadTracker to handle partial write and report parsing errors as warnings rather than exception. I pushed other changes to enhance regrtest in general. The load average is not updated every second and it's value is initialized from the arithmetic mean of the first 5 values of the Processor Queue Length. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 11:31:38 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 03 Oct 2019 15:31:38 +0000 Subject: [issue38359] pyw.exe opens console window in Windows 10 In-Reply-To: <1570096405.52.0.325874974028.issue38359@roundup.psfhosted.org> Message-ID: <1570116698.93.0.389132919631.issue38359@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16155 pull_request: https://github.com/python/cpython/pull/16564 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 11:38:49 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 03 Oct 2019 15:38:49 +0000 Subject: [issue38365] Issue 38363 - False Alarm - Sorry! In-Reply-To: Message-ID: <1570117129.23.0.0470257051156.issue38365@roundup.psfhosted.org> Steven D'Aprano added the comment: Please don't create a *second* bug report to say that your previous bug report was erroneous. Just go and close the first one. ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 11:41:03 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 03 Oct 2019 15:41:03 +0000 Subject: [issue38363] No Module named ..." and UTF-8 Byte Order Marks In-Reply-To: Message-ID: <1570117263.37.0.833183547386.issue38363@roundup.psfhosted.org> Steven D'Aprano added the comment: False alarm, see Stephen Tucker's message here https://bugs.python.org/issue38365#msg353854 File name has a trailing space which is why it wasn't found. ---------- nosy: +steven.daprano resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 11:44:56 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 03 Oct 2019 15:44:56 +0000 Subject: [issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german) In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1570117496.01.0.960185169767.issue36670@roundup.psfhosted.org> miss-islington added the comment: New changeset f9016e5fc9424d41c8e53de84f8699e78769a14a by Miss Islington (bot) in branch '3.7': [3.8] bpo-36670, regrtest: Fix WindowsLoadTracker() for partial line (GH-16550) (GH-16560) https://github.com/python/cpython/commit/f9016e5fc9424d41c8e53de84f8699e78769a14a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 11:49:59 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 03 Oct 2019 15:49:59 +0000 Subject: [issue38355] ntpath.realpath() fails on sys.executable In-Reply-To: <1570055857.28.0.434394542652.issue38355@roundup.psfhosted.org> Message-ID: <1570117799.63.0.174409735616.issue38355@roundup.psfhosted.org> miss-islington added the comment: New changeset 6067e1d2bebccc2e73dd729d25c98df7bc9e2d59 by Miss Islington (bot) in branch '3.8': bpo-38355: Fix ntpath.realpath failing on sys.executable (GH-16551) https://github.com/python/cpython/commit/6067e1d2bebccc2e73dd729d25c98df7bc9e2d59 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 11:51:16 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 03 Oct 2019 15:51:16 +0000 Subject: [issue38359] pyw.exe opens console window in Windows 10 In-Reply-To: <1570096405.52.0.325874974028.issue38359@roundup.psfhosted.org> Message-ID: <1570117876.08.0.0861101739405.issue38359@roundup.psfhosted.org> miss-islington added the comment: New changeset e74fa70bcc379de1ce956273c5386fc8a7b9c5e6 by Miss Islington (bot) in branch '3.8': bpo-38359: Ensures pyw.exe launcher reads correct registry key (GH-16561) https://github.com/python/cpython/commit/e74fa70bcc379de1ce956273c5386fc8a7b9c5e6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 12:11:43 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 03 Oct 2019 16:11:43 +0000 Subject: [issue38355] ntpath.realpath() fails on sys.executable In-Reply-To: <1570055857.28.0.434394542652.issue38355@roundup.psfhosted.org> Message-ID: <1570119103.82.0.890753840328.issue38355@roundup.psfhosted.org> Steve Dower added the comment: This is resolved as far as I'm concerned - leaving open for ?ukasz to cherrypick and close. ---------- stage: patch review -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 12:12:02 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 03 Oct 2019 16:12:02 +0000 Subject: [issue38359] pyw.exe opens console window in Windows 10 In-Reply-To: <1570096405.52.0.325874974028.issue38359@roundup.psfhosted.org> Message-ID: <1570119122.05.0.108169785157.issue38359@roundup.psfhosted.org> Steve Dower added the comment: This is resolved as far as I'm concerned - leaving open for ?ukasz to cherrypick and close. ---------- stage: patch review -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 12:19:59 2019 From: report at bugs.python.org (=?utf-8?q?Jonas_Sch=C3=A4fer?=) Date: Thu, 03 Oct 2019 16:19:59 +0000 Subject: [issue14364] Argparse incorrectly handles '--' as argument to option In-Reply-To: <1332080953.55.0.495639573781.issue14364@psf.upfronthosting.co.za> Message-ID: <1570119599.38.0.907555341763.issue14364@roundup.psfhosted.org> Jonas Sch?fer added the comment: Since I have been adversely affected by this bug ([1]), I looked at the patches. I combined issue14364.test.patch (which adds test cases for --foo=--) and dbldash.patch in my local working tree and that seems to resolve the issue (tests pass if and only if I apply dbldash.patch and my reproducer from [1]) passes too). The patches do not contain any type of metainformation, so I?m not comfortable with submitting this as a PR. I am also not at all familiar with the process of managing the changelog etc. This should serve as a confirmation that this issue can be resolved with the patches. Someone more familiar than me with the process could take up the task to get this merged. Note: As you can see in [1], this issue has already caused data loss. [1]: https://github.com/borgbackup/borg/issues/4769 ---------- nosy: +jssfr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 12:55:48 2019 From: report at bugs.python.org (Brett Cannon) Date: Thu, 03 Oct 2019 16:55:48 +0000 Subject: [issue38357] print adding extra bytes in hex above x7F In-Reply-To: <1570066448.41.0.0345074372849.issue38357@roundup.psfhosted.org> Message-ID: <1570121748.01.0.097256315748.issue38357@roundup.psfhosted.org> Brett Cannon added the comment: @Artificial please see the various blog posts and explanations about why the clear separation between bytes and text came to be and thus this change isn't "unnecessarily complicated". ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 12:57:32 2019 From: report at bugs.python.org (Brett Cannon) Date: Thu, 03 Oct 2019 16:57:32 +0000 Subject: [issue37631] EXTRA_CFLAGS get overrided by CFLAGS_NODIST In-Reply-To: <1563536952.58.0.764226132067.issue37631@roundup.psfhosted.org> Message-ID: <1570121852.9.0.573408578008.issue37631@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 13:55:56 2019 From: report at bugs.python.org (Roundup Robot) Date: Thu, 03 Oct 2019 17:55:56 +0000 Subject: [issue32758] Stack overflow when parse long expression to AST In-Reply-To: <1517682171.17.0.467229070634.issue32758@psf.upfronthosting.co.za> Message-ID: <1570125356.07.0.592113329314.issue32758@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +16156 pull_request: https://github.com/python/cpython/pull/16565 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 13:57:54 2019 From: report at bugs.python.org (Tim Peters) Date: Thu, 03 Oct 2019 17:57:54 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1570125474.42.0.560324672845.issue38006@roundup.psfhosted.org> Tim Peters added the comment: Loose ends. Telegraphic because typing is hard. 1. Docs should be changed to encourage implementing the full gc protocol for "all" containers. Spell out what can go wrong if they don't. Be upfront about that history has, at times, proved us too optimistic about that ever since weakrefs were added. 2. Surprise finalizers (SF). All weakrefs to trash objects were already cleared. So if a SF can access trash, it must be via a chain of strong refs. But in that case, they wouldn't be trash to begin with (since they're reachable from the SF, which is a S because we believed it wasn't trash). So best optimistic guess is that only this can go wrong: we promise that a finalizer will run at most once (even if the object is resurrected), but a SF neither records that it has been run nor recognizes that (if so) it's already been run. IOW, a finalizer will be run at most once when it's not a surprise, but will run every time it is a SF. 3. get_objects() exposing invalid objects. That's no good. Not due to missing tp_traverse, but that the aggregate of trash objects revealed by tp_traverses exceed the aggregate of those reclaimed by tp_clears and subsequent refcounting. Must not move invalids to older generation. Move to new internal (to delete_garbage) list instead. That list should be empty at delete_garbage's end. If not, I'd be happy to die with a fatal runtime error. Else, e.g., - add to count of trash objects that could not be collected - append them to gc.garbage, each as the sole attribute of a new (say) `_GCInvalid` container, whose repr/str only shows the address of the invalid object. So the top-level objects in gc.garbage remain valid, but the daring can access the invalid objects indirectly. At least their type pointers should be intact. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 14:01:47 2019 From: report at bugs.python.org (Roundup Robot) Date: Thu, 03 Oct 2019 18:01:47 +0000 Subject: [issue32758] Stack overflow when parse long expression to AST In-Reply-To: <1517682171.17.0.467229070634.issue32758@psf.upfronthosting.co.za> Message-ID: <1570125707.07.0.949811390614.issue32758@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +16157 pull_request: https://github.com/python/cpython/pull/16566 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 14:10:36 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 03 Oct 2019 18:10:36 +0000 Subject: [issue38266] Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal In-Reply-To: <1569352841.72.0.766028949986.issue38266@roundup.psfhosted.org> Message-ID: <1570126236.01.0.517695592249.issue38266@roundup.psfhosted.org> Ned Deily added the comment: Since this sounds like a regression being introduced by 3.8.0, should the reversion be included in 3.8.0 final or can it wait for 3.8.1? ---------- keywords: +3.8regression nosy: +lukasz.langa, ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 14:11:15 2019 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 03 Oct 2019 18:11:15 +0000 Subject: [issue7980] time.strptime not thread safe In-Reply-To: <1266835598.13.0.361031999331.issue7980@psf.upfronthosting.co.za> Message-ID: <1570126275.39.0.663563198066.issue7980@roundup.psfhosted.org> Paul Ganssle added the comment: >From what I can tell, this is a Python 2.7-only bug, and it's not a security issue, so I think we can close the issue as either "wontfix" (because we won't fix it in Python 2) or "fixed" (because it is already fixed in Python 3), depending on your perspective. ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 14:12:30 2019 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 03 Oct 2019 18:12:30 +0000 Subject: [issue26093] __qualname__ different when calling generator object w/ functions.partial In-Reply-To: <1452638028.1.0.595104762218.issue26093@psf.upfronthosting.co.za> Message-ID: <1570126350.03.0.187910448544.issue26093@roundup.psfhosted.org> Dong-hee Na added the comment: Python 3.9.0a0 (heads/bpo-31722:fc4a044a3c, Oct 4 2019, 03:10:14) [Clang 11.0.0 (clang-1100.0.33.8)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import functools >>> def f(): ... def g(): ... yield 1 ... return g ... >>> functools.partial(f())().__qualname__ == f()().__qualname__ True >>> functools.partial(f())().__qualname__ 'f..g' >>> f()().__qualname__ 'f..g' Looks like that this issue is fixed ---------- nosy: +corona10 resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 14:30:19 2019 From: report at bugs.python.org (hongweipeng) Date: Thu, 03 Oct 2019 18:30:19 +0000 Subject: [issue38337] inspect: getmembers calls properties In-Reply-To: <1569931319.11.0.161787180553.issue38337@roundup.psfhosted.org> Message-ID: <1570127419.08.0.976410524922.issue38337@roundup.psfhosted.org> hongweipeng added the comment: The results of this example are different from mine(version 3.7.4). ``` __init__ --- getmembers from instance --- Access property [('__class__', ), ... ('var', 'Hello')] --- getmembers from class --- [('__class__', ),'var', )] ``` ---------- nosy: +hongweipeng _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 14:48:46 2019 From: report at bugs.python.org (Jonas Drotleff) Date: Thu, 03 Oct 2019 18:48:46 +0000 Subject: [issue38337] inspect: getmembers calls properties In-Reply-To: <1569931319.11.0.161787180553.issue38337@roundup.psfhosted.org> Message-ID: <1570128526.43.0.183492827764.issue38337@roundup.psfhosted.org> Jonas Drotleff added the comment: > The results of this example are different from mine(version 3.7.4) I do not really see any difference. What do you mean? ---------- nosy: -Sanjay _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 14:50:59 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Thu, 03 Oct 2019 18:50:59 +0000 Subject: [issue36225] Lingering subinterpreters should be implicitly cleared on shutdown In-Reply-To: <1551964663.69.0.686712846789.issue36225@roundup.psfhosted.org> Message-ID: <1570128659.66.0.0113414519623.issue36225@roundup.psfhosted.org> Joannah Nanjekye added the comment: I remember julien wanting to check this out during a discussion we had at the sprints hence the loop in. ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 15:37:10 2019 From: report at bugs.python.org (AWhetter) Date: Thu, 03 Oct 2019 19:37:10 +0000 Subject: [issue34938] Fix mimetype.init() to account for from import In-Reply-To: <1539036789.21.0.545547206417.issue34938@psf.upfronthosting.co.za> Message-ID: <1570131430.13.0.14257265062.issue34938@roundup.psfhosted.org> Change by AWhetter : ---------- keywords: +patch pull_requests: +16158 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16567 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 15:37:12 2019 From: report at bugs.python.org (Mario Corchero) Date: Thu, 03 Oct 2019 19:37:12 +0000 Subject: [issue38346] Wrong behavior when using `assert_called_with` with mutable object In-Reply-To: <1570006369.69.0.450054962888.issue38346@roundup.psfhosted.org> Message-ID: <1570131432.92.0.908430559237.issue38346@roundup.psfhosted.org> Mario Corchero added the comment: This might be painful in certain scenarios, like when using wraps on functions that modify the arguments: ``` def func(d): return d.pop("key") >>> def func(d): ... return d.pop("key") ... >>> m = Mock(wraps=func) >>> m({"key": 1}) 1 >>> m.assert_called_with({"key": 1}) #raises ``` But I think "not fixing" this through copy is reasonable, especially when doing copy can also break assertions on objects that cannot be copied, which can happen if they implement their own __copy__ and some other situations. Additionally, copy does not fully capture "the value of the object when it was passed" for custom types. A copying mock was published under pypi in https://github.com/wimglenn/copyingmock but doesn't seem to get a lot of attention, if this was interesting by users it could be added as a new type of Mock, or maybe just a mixin that users could add to any existing mock if they wished. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 16:52:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Oct 2019 20:52:20 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1570135940.06.0.102419940344.issue38006@roundup.psfhosted.org> STINNER Victor added the comment: > 1. Docs should be changed to encourage implementing the full gc protocol for "all" containers. Spell out what can go wrong if they don't. Be upfront about that history has, at times, proved us too optimistic about that ever since weakrefs were added. Would it make any sense to add an opt-in option to emit a warning when a new type is created with Py_TPFLAGS_HAVE_GC but it doesn't implement tp_traverse? Maybe also emit a warning if it doesn't implement tp_clear? Maybe it could be a ResourceWarning emitted in development mode, when -X dev is used on the command line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 16:58:15 2019 From: report at bugs.python.org (Eddie Elizondo) Date: Thu, 03 Oct 2019 20:58:15 +0000 Subject: [issue38140] Py_tp_dictoffset / Py_tp_finalize are unsettable in stable API In-Reply-To: <1568297060.68.0.400472303762.issue38140@roundup.psfhosted.org> Message-ID: <1570136295.17.0.679814357012.issue38140@roundup.psfhosted.org> Eddie Elizondo added the comment: Woops, just realized that you already documented this, thanks! Btw, Victor already merged a fix for the windows compiler warning. This issue can be closed now ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 17:02:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Oct 2019 21:02:12 +0000 Subject: [issue38266] Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal In-Reply-To: <1569352841.72.0.766028949986.issue38266@roundup.psfhosted.org> Message-ID: <1570136532.12.0.431200883698.issue38266@roundup.psfhosted.org> STINNER Victor added the comment: > Since this sounds like a regression being introduced by 3.8.0, should the reversion be included in 3.8.0 final or can it wait for 3.8.1? IMHO PR 16558 is safe: it adds code which already existed in Python 2.7, and likely previously. For me it's a low risk of regression between rc1 and final. I set the priority to release blocker, but Lukasz is the last one to take the final decision on including the fix or not. Well, right now, I don't consider that PR 16558 is ready to be merged. ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 17:08:34 2019 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 03 Oct 2019 21:08:34 +0000 Subject: [issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop In-Reply-To: <1533549887.39.0.56676864532.issue34344@psf.upfronthosting.co.za> Message-ID: <1570136914.7.0.286310021312.issue34344@roundup.psfhosted.org> Yury Selivanov added the comment: New changeset b23a8423a923077e4f83d3f328bb7542b4c940ed by Yury Selivanov (idomic) in branch 'master': bpo-34344 Fix AbstractEventLoopPolicy.get_event_loop docstring (GH-16463) https://github.com/python/cpython/commit/b23a8423a923077e4f83d3f328bb7542b4c940ed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 17:09:03 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 03 Oct 2019 21:09:03 +0000 Subject: [issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop In-Reply-To: <1533549887.39.0.56676864532.issue34344@psf.upfronthosting.co.za> Message-ID: <1570136943.62.0.912979664572.issue34344@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16159 pull_request: https://github.com/python/cpython/pull/16568 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 17:09:10 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 03 Oct 2019 21:09:10 +0000 Subject: [issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop In-Reply-To: <1533549887.39.0.56676864532.issue34344@psf.upfronthosting.co.za> Message-ID: <1570136950.56.0.0231489820159.issue34344@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16160 pull_request: https://github.com/python/cpython/pull/16569 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 17:17:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Oct 2019 21:17:03 +0000 Subject: [issue38353] Cleanup the path configuration implementation code (getpath.c) In-Reply-To: <1570050763.22.0.787922067096.issue38353@roundup.psfhosted.org> Message-ID: <1570137423.21.0.650416398047.issue38353@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 86ec5c65fe04ece16f3aada5292cc62726062ad0 by Victor Stinner in branch 'master': bpo-38353: Fix calculate_argv0_path() for symlinks (GH-16549) https://github.com/python/cpython/commit/86ec5c65fe04ece16f3aada5292cc62726062ad0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 17:19:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Oct 2019 21:19:12 +0000 Subject: [issue38353] Cleanup the path configuration implementation code (getpath.c) In-Reply-To: <1570050763.22.0.787922067096.issue38353@roundup.psfhosted.org> Message-ID: <1570137552.46.0.218130973595.issue38353@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16161 pull_request: https://github.com/python/cpython/pull/16570 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 17:27:00 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 03 Oct 2019 21:27:00 +0000 Subject: [issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop In-Reply-To: <1533549887.39.0.56676864532.issue34344@psf.upfronthosting.co.za> Message-ID: <1570138020.25.0.814073214411.issue34344@roundup.psfhosted.org> miss-islington added the comment: New changeset 8edde5caabc611c6320fd104244abe3a409cf0b6 by Miss Islington (bot) in branch '3.8': bpo-34344 Fix AbstractEventLoopPolicy.get_event_loop docstring (GH-16463) https://github.com/python/cpython/commit/8edde5caabc611c6320fd104244abe3a409cf0b6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 17:27:38 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 03 Oct 2019 21:27:38 +0000 Subject: [issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop In-Reply-To: <1533549887.39.0.56676864532.issue34344@psf.upfronthosting.co.za> Message-ID: <1570138058.75.0.771520296468.issue34344@roundup.psfhosted.org> miss-islington added the comment: New changeset 4de3fbe27f672dcd9c24d3e99258f39b12c365a5 by Miss Islington (bot) in branch '3.7': bpo-34344 Fix AbstractEventLoopPolicy.get_event_loop docstring (GH-16463) https://github.com/python/cpython/commit/4de3fbe27f672dcd9c24d3e99258f39b12c365a5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 17:59:26 2019 From: report at bugs.python.org (jacksmait) Date: Thu, 03 Oct 2019 21:59:26 +0000 Subject: [issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package. In-Reply-To: <1515875653.34.0.467229070634.issue32545@psf.upfronthosting.co.za> Message-ID: <1570139966.7.0.465469203294.issue32545@roundup.psfhosted.org> jacksmait added the comment: if you are facing problem with printer problems then click on http://www.printertechsupportphonenumbers.com/printer-driver-support/ and get solution of windows 10 printer driver is unavailable, printer driver is unavailable and etc or free contact us at +1-866-760-2639 ---------- nosy: +jacksmait _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 18:34:54 2019 From: report at bugs.python.org (AWhetter) Date: Thu, 03 Oct 2019 22:34:54 +0000 Subject: [issue38235] Docs of logging module says argument is named "lvl". TypeError. In-Reply-To: <1568996817.83.0.32795106699.issue38235@roundup.psfhosted.org> Message-ID: <1570142094.64.0.382601182001.issue38235@roundup.psfhosted.org> Change by AWhetter : ---------- keywords: +patch pull_requests: +16162 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16571 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 18:35:15 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 03 Oct 2019 22:35:15 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1570142115.13.0.0788178125664.issue38006@roundup.psfhosted.org> Antoine Pitrou added the comment: > Would it make any sense to add an opt-in option to emit a warning when a new type is created with Py_TPFLAGS_HAVE_GC but it doesn't implement tp_traverse? Or even fatal error out? There's no reason to have Py_TPFLAGS_HAVE_GC but not implement tp_traverse, AFAIR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 18:41:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Oct 2019 22:41:55 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1570142515.57.0.762510366253.issue38006@roundup.psfhosted.org> STINNER Victor added the comment: > Or even fatal error out? There's no reason to have Py_TPFLAGS_HAVE_GC but not implement tp_traverse, AFAIR. Well... It would prefer a smooth transition. Such sanity checks which mostly concerns developers perfectly fit the -X dev mode. I mean, calling Py_FatalError() only in development mode would be acceptable, rather than blocking the usage of C extensions which are working "perfectly well" on Python 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 18:43:14 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Oct 2019 22:43:14 +0000 Subject: [issue38353] Cleanup the path configuration implementation code (getpath.c) In-Reply-To: <1570050763.22.0.787922067096.issue38353@roundup.psfhosted.org> Message-ID: <1570142594.78.0.276896692933.issue38353@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c515b573af1189fc46ddcd3323c53ed073b84848 by Victor Stinner in branch 'master': bpo-38353: Fix compiler warning in pycore_initconfig.h (GH-16570) https://github.com/python/cpython/commit/c515b573af1189fc46ddcd3323c53ed073b84848 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 18:46:03 2019 From: report at bugs.python.org (Zachary Ware) Date: Thu, 03 Oct 2019 22:46:03 +0000 Subject: [issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package. In-Reply-To: <1515875653.34.0.467229070634.issue32545@psf.upfronthosting.co.za> Message-ID: <1570142763.66.0.384200634823.issue32545@roundup.psfhosted.org> Change by Zachary Ware : ---------- Removed message: https://bugs.python.org/msg353882 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 18:48:54 2019 From: report at bugs.python.org (Zachary Ware) Date: Thu, 03 Oct 2019 22:48:54 +0000 Subject: [issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package. In-Reply-To: <1515875653.34.0.467229070634.issue32545@psf.upfronthosting.co.za> Message-ID: <1570142934.19.0.381293424566.issue32545@roundup.psfhosted.org> Change by Zachary Ware : ---------- hgrepos: -383 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 18:50:33 2019 From: report at bugs.python.org (Zachary Ware) Date: Thu, 03 Oct 2019 22:50:33 +0000 Subject: [issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package. In-Reply-To: <1515875653.34.0.467229070634.issue32545@psf.upfronthosting.co.za> Message-ID: <1570143033.48.0.38042962506.issue32545@roundup.psfhosted.org> Change by Zachary Ware : ---------- Removed message: https://bugs.python.org/msg345856 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 18:52:26 2019 From: report at bugs.python.org (Zachary Ware) Date: Thu, 03 Oct 2019 22:52:26 +0000 Subject: [issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package. In-Reply-To: <1515875653.34.0.467229070634.issue32545@psf.upfronthosting.co.za> Message-ID: <1570143146.51.0.591533216813.issue32545@roundup.psfhosted.org> Change by Zachary Ware : ---------- nosy: -Printer Setup, jacksmait, prince_parker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 18:52:36 2019 From: report at bugs.python.org (Zachary Ware) Date: Thu, 03 Oct 2019 22:52:36 +0000 Subject: [issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package. In-Reply-To: <1515875653.34.0.467229070634.issue32545@psf.upfronthosting.co.za> Message-ID: <1570143156.53.0.719895785497.issue32545@roundup.psfhosted.org> Zachary Ware added the comment: This issue seems to have become a spam magnet, so I'm clearing the nosy list to keep it out of our inboxes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 18:52:43 2019 From: report at bugs.python.org (Zachary Ware) Date: Thu, 03 Oct 2019 22:52:43 +0000 Subject: [issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package. In-Reply-To: <1515875653.34.0.467229070634.issue32545@psf.upfronthosting.co.za> Message-ID: <1570143163.26.0.149042597062.issue32545@roundup.psfhosted.org> Change by Zachary Ware : ---------- nosy: -Amin Radjabov, chipstuff, emniclap, mwr256, paul.moore, steve.dower, taleinat, terry.reedy, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 19:04:49 2019 From: report at bugs.python.org (Io Mintz) Date: Thu, 03 Oct 2019 23:04:49 +0000 Subject: [issue38366] dataclasses: generate the _hash_action table from the if-else tree Message-ID: <1570143889.18.0.0994959118678.issue38366@roundup.psfhosted.org> New submission from Io Mintz : The dataclasses._hash_action table is currently a bit hard to read. It could be generated once from the if-else tree written in https://bugs.python.org/issue32929#msg312829 instead, which would both be easier to read and easier to maintain, while still maintaining the efficiency of the current dictionary. ---------- components: Library (Lib) messages: 353887 nosy: iomintz priority: normal pull_requests: 16163 severity: normal status: open title: dataclasses: generate the _hash_action table from the if-else tree type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 19:12:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Oct 2019 23:12:27 +0000 Subject: [issue38353] Cleanup the path configuration implementation code (getpath.c) In-Reply-To: <1570050763.22.0.787922067096.issue38353@roundup.psfhosted.org> Message-ID: <1570144347.16.0.786762456783.issue38353@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16164 pull_request: https://github.com/python/cpython/pull/16572 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 19:35:27 2019 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 03 Oct 2019 23:35:27 +0000 Subject: [issue38366] dataclasses: generate the _hash_action table from the if-else tree In-Reply-To: <1570143889.18.0.0994959118678.issue38366@roundup.psfhosted.org> Message-ID: <1570145727.66.0.823375627429.issue38366@roundup.psfhosted.org> Eric V. Smith added the comment: I don't see that as an improvement, especially when the goal is to not change any functionality. But maybe I'm just used to truth tables. To me, the truth table makes it clear that each case is handled correctly. ---------- assignee: -> eric.smith nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 19:55:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Oct 2019 23:55:53 +0000 Subject: [issue38353] Cleanup the path configuration implementation code (getpath.c) In-Reply-To: <1570050763.22.0.787922067096.issue38353@roundup.psfhosted.org> Message-ID: <1570146953.57.0.721987121588.issue38353@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16165 pull_request: https://github.com/python/cpython/pull/16573 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 20:10:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Oct 2019 00:10:22 +0000 Subject: [issue38367] test_regrtest hanged on AMD64 Windows10 3.x Message-ID: <1570147821.98.0.530432590053.issue38367@roundup.psfhosted.org> New submission from STINNER Victor : https://buildbot.python.org/all/#/builders/3/builds/3617 ... 0:25:50 load avg: 0.00 running: test_regrtest (13 min 48 sec) 0:26:20 load avg: 0.00 running: test_regrtest (14 min 18 sec) 0:26:50 load avg: 0.00 running: test_regrtest (14 min 48 sec) 0:27:02 load avg: 0.00 [419/419/1] test_regrtest crashed (Exit code 1) (...) 0:27:02 load avg: 0.00 Re-running failed tests in verbose mode 0:27:02 load avg: 0.00 Re-running test_regrtest in verbose mode Timeout (0:15:00)! Thread 0x00002ee0 (most recent call first): File "D:\buildarea\3.x.bolen-windows10\build\lib\subprocess.py", line 1457 in _readerthread File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 882 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 944 in _bootstrap_inner File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 902 in _bootstrap Thread 0x00002140 (most recent call first): File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 1039 in _wait_for_tstate_lock File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 1023 in join File "D:\buildarea\3.x.bolen-windows10\build\lib\subprocess.py", line 1486 in _communicate File "D:\buildarea\3.x.bolen-windows10\build\lib\subprocess.py", line 1113 in communicate File "D:\buildarea\3.x.bolen-windows10\build\lib\subprocess.py", line 499 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_regrtest.py", line 504 in run_command File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_regrtest.py", line 529 in run_python File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_regrtest.py", line 584 in run_tests File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_regrtest.py", line 610 in test_module_autotest File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\case.py", line 616 in _callTestMethod File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\case.py", line 659 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\case.py", line 719 in __call__ File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 122 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 84 in __call__ File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 122 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 84 in __call__ File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 122 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 84 in __call__ File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\runner.py", line 176 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\test\support\__init__.py", line 2032 in _run_suite File "D:\buildarea\3.x.bolen-windows10\build\lib\test\support\__init__.py", line 2128 in run_unittest File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\runtest.py", line 209 in _test_module File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\runtest.py", line 234 in _runtest_inner2 File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\runtest.py", line 270 in _runtest_inner File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\runtest.py", line 140 in _runtest File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\runtest.py", line 193 in runtest File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\runtest_mp.py", line 67 in run_tests_worker File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\main.py", line 654 in _main File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\main.py", line 634 in main File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\main.py", line 712 in main File "D:\buildarea\3.x.bolen-windows10\build\lib\test\regrtest.py", line 43 in _main File "D:\buildarea\3.x.bolen-windows10\build\lib\test\regrtest.py", line 47 in File "D:\buildarea\3.x.bolen-windows10\build\lib\runpy.py", line 85 in _run_code File "D:\buildarea\3.x.bolen-windows10\build\lib\runpy.py", line 192 in _run_module_as_main (...) 1 re-run test: test_regrtest Total duration: 27 min 35 sec Tests result: FAILURE then SUCCESS Traceback (most recent call last): File "D:\buildarea\3.x.bolen-windows10\build\lib\test\support\__init__.py", line 1049, in temp_dir yield path File "D:\buildarea\3.x.bolen-windows10\build\lib\test\support\__init__.py", line 1101, in temp_cwd yield cwd_dir File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\main.py", line 634, in main self._main(tests, kwargs) File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\main.py", line 707, in _main sys.exit(0) SystemExit: 0 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\buildarea\3.x.bolen-windows10\build\lib\test\support\__init__.py", line 336, in _force_run return func(*args) PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'D:\\buildarea\\3.x.bolen-windows10\\build\\build\\test_python_9260\\test_python_worker_11168' ---------- components: Tests messages: 353889 nosy: vstinner priority: normal severity: normal status: open title: test_regrtest hanged on AMD64 Windows10 3.x versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 20:20:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Oct 2019 00:20:42 +0000 Subject: [issue38353] Cleanup the path configuration implementation code (getpath.c) In-Reply-To: <1570050763.22.0.787922067096.issue38353@roundup.psfhosted.org> Message-ID: <1570148442.05.0.425648053264.issue38353@roundup.psfhosted.org> STINNER Victor added the comment: On my Fedora 30, GCC doesn't complain on "typedef struct pyruntimestate _PyRuntimeState;". But clang on macOS emits a warning, saying that it's C11-only feature. So I modified the internal header files to use "struct pyruntimestate" instead, to avoid any compilation issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 20:21:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Oct 2019 00:21:10 +0000 Subject: [issue38353] Cleanup the path configuration implementation code (getpath.c) In-Reply-To: <1570050763.22.0.787922067096.issue38353@roundup.psfhosted.org> Message-ID: <1570148470.87.0.919112704148.issue38353@roundup.psfhosted.org> STINNER Victor added the comment: New changeset e982d8b64f5d358c578bfca5cdfe4524dbc74000 by Victor Stinner in branch 'master': bpo-38353: Fix compiler warning in internal headers (GH-16573) https://github.com/python/cpython/commit/e982d8b64f5d358c578bfca5cdfe4524dbc74000 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 20:22:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Oct 2019 00:22:42 +0000 Subject: [issue38353] Cleanup the path configuration implementation code (getpath.c) In-Reply-To: <1570050763.22.0.787922067096.issue38353@roundup.psfhosted.org> Message-ID: <1570148562.13.0.309688512976.issue38353@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 03a8a56faca0c1851051269e3517d70cbce830b7 by Victor Stinner in branch 'master': bpo-38353: Add subfunctions to getpath.c (GH-16572) https://github.com/python/cpython/commit/03a8a56faca0c1851051269e3517d70cbce830b7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 20:50:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Oct 2019 00:50:01 +0000 Subject: [issue38353] Cleanup the path configuration implementation code (getpath.c) In-Reply-To: <1570050763.22.0.787922067096.issue38353@roundup.psfhosted.org> Message-ID: <1570150201.12.0.521027844749.issue38353@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16166 pull_request: https://github.com/python/cpython/pull/16574 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 20:50:33 2019 From: report at bugs.python.org (AWhetter) Date: Fri, 04 Oct 2019 00:50:33 +0000 Subject: [issue37700] shutil.copyfile does not raise SpecialFileError for socket files In-Reply-To: <1564374136.89.0.594392746042.issue37700@roundup.psfhosted.org> Message-ID: <1570150233.7.0.845334329595.issue37700@roundup.psfhosted.org> Change by AWhetter : ---------- keywords: +patch pull_requests: +16167 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16575 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 21:53:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Oct 2019 01:53:32 +0000 Subject: [issue38353] Cleanup the path configuration implementation code (getpath.c) In-Reply-To: <1570050763.22.0.787922067096.issue38353@roundup.psfhosted.org> Message-ID: <1570154012.12.0.846389463558.issue38353@roundup.psfhosted.org> STINNER Victor added the comment: New changeset f0c85793d2a087974969f7eea6ca24bbd1178d53 by Victor Stinner in branch 'master': bpo-38353: Rework ismodule() in getpath.c (GH-16574) https://github.com/python/cpython/commit/f0c85793d2a087974969f7eea6ca24bbd1178d53 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 22:02:00 2019 From: report at bugs.python.org (Jim Jeon) Date: Fri, 04 Oct 2019 02:02:00 +0000 Subject: [issue38346] Wrong behavior when using `assert_called_with` with mutable object In-Reply-To: <1570006369.69.0.450054962888.issue38346@roundup.psfhosted.org> Message-ID: <1570154520.98.0.545459767686.issue38346@roundup.psfhosted.org> Jim Jeon added the comment: Thank you all for the kind answers. I didn't know copying could cause so many problems. @veky Thank you for the example. But it seems that the example will actually raise and I think it should. I am talking f.assert_called_with(b) when `b` has same values of `a` before it is mutated. I thought the function's purpose is to check values of the exact moment the function is called. @xtreak Thanks for the related issue. I didn't consider `identity comparison` situations. Definitely that could cause problems. @mariocj89 > copy does not fully capture "the value of the object when it was passed" for custom types. Thank you for the kind answer, it was really helpful to me. Now I understand why copying is so dangerous. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 22:35:35 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 04 Oct 2019 02:35:35 +0000 Subject: [issue38350] ./configure --with-pydebug should use -O0 rather than -Og In-Reply-To: <1570034107.68.0.232468214894.issue38350@roundup.psfhosted.org> Message-ID: <1570156535.93.0.432570068268.issue38350@roundup.psfhosted.org> Change by Ned Deily : ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 23:16:04 2019 From: report at bugs.python.org (hongweipeng) Date: Fri, 04 Oct 2019 03:16:04 +0000 Subject: [issue38337] inspect: getmembers calls properties In-Reply-To: <1569931319.11.0.161787180553.issue38337@roundup.psfhosted.org> Message-ID: <1570158964.2.0.923258276009.issue38337@roundup.psfhosted.org> hongweipeng added the comment: I mean why member `__class__` is expected to be `)`. I check PR16521,for __class__, it always gets `)`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 23:40:38 2019 From: report at bugs.python.org (Tim Peters) Date: Fri, 04 Oct 2019 03:40:38 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1570160438.43.0.957480685974.issue38006@roundup.psfhosted.org> Tim Peters added the comment: My understanding is that the CFFI types at issue don't even have Py_TPFLAGS_HAVE_GC. They're completely invisible to gc. As Armin says in the CFFI issue report (linked to earlier), he never got the impression from the docs that he needed to implement anything related to cyclic gc. Since Armin is extremely capable, conscientious, and reasonable, that tells me our docs are lacking. It was intended at the start that the worst that could happen if a type ignored the gc protocols was that memory may leak. That story changed radically when weakrefs with callbacks were added - but nobody knew it at the time because the weakref design gave no thought to cyclic gc. It's been driven by segfaults ever since ;-) We're doing all we can to keep non-cooperating code "working", and will continue to do so. But who knows? The next segfault may be one we can't hack around. It's fundamentally insane to expect any gc to work perfectly when it may be blind to what the object graph _is_. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 01:02:50 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Oct 2019 05:02:50 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1570165370.43.0.773212039953.issue13153@roundup.psfhosted.org> Terry J. Reedy added the comment: A week ago, I thought that the astral solution was to always replace with the \U escape. With this patch, we can and should send them to read-only text windows, and let the OS and font display it or a substitute. On Windows, at least, the emoji which beginners most often want to use get displayed. Elsewhere, we will have to check and do some follow-up patches. For using file names with astral chars results, on Windows, in six large boxes, and when the file is saved, it is saved in a new file with the boxes, not the original file. Such file names are not added to the recent files list, or maybe list boxes cannot handle them. Code is another issue. Astral chars in files could be replaced when read. Unfortunately, I believe some are legal identifier chars. On the clipboard, on Windows, astral chars become sequences of 6 surrogates. >>> r.clipboard_clear() >>> r.clipboard_append('?') >>> r.clipboard_get() '\udced\udca0\udcbd\udced\udcba\udc80' Perhaps we should try to intercept paste and replace such sequences with the \U escape. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 01:50:36 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Oct 2019 05:50:36 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1570168236.69.0.242533073381.issue13153@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you for your example Terry. There was one dubious place which I did not change because I did not know how to trigger the execution of it. Now the clipboard is fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 02:39:44 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 04 Oct 2019 06:39:44 +0000 Subject: [issue38366] dataclasses: generate the _hash_action table from the if-else tree In-Reply-To: <1570143889.18.0.0994959118678.issue38366@roundup.psfhosted.org> Message-ID: <1570171184.63.0.040148741343.issue38366@roundup.psfhosted.org> Raymond Hettinger added the comment: I concur with Eric. The original code is preferable. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 02:40:32 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 04 Oct 2019 06:40:32 +0000 Subject: [issue38235] Docs of logging module says argument is named "lvl". TypeError. In-Reply-To: <1568996817.83.0.32795106699.issue38235@roundup.psfhosted.org> Message-ID: <1570171232.36.0.0921803457276.issue38235@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: rhettinger -> vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 02:49:31 2019 From: report at bugs.python.org (Jonas Drotleff) Date: Fri, 04 Oct 2019 06:49:31 +0000 Subject: [issue38337] inspect: getmembers calls properties In-Reply-To: <1569931319.11.0.161787180553.issue38337@roundup.psfhosted.org> Message-ID: <1570171771.67.0.0518759124881.issue38337@roundup.psfhosted.org> Jonas Drotleff added the comment: Oh, yes I see what you mean. That's my fault, it seems like I copied the wrong line. Sorry. But the important piece is the 'var' attribute. Sorry for the confusion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 03:42:28 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Oct 2019 07:42:28 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1570174948.44.0.481490988073.issue13153@roundup.psfhosted.org> Terry J. Reedy added the comment: What do you mean by fixed? After deleting and remaking a pr_16545 branch, I see the same result for clipboard_get. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 03:55:19 2019 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 04 Oct 2019 07:55:19 +0000 Subject: [issue38235] Docs of logging module says argument is named "lvl". TypeError. In-Reply-To: <1568996817.83.0.32795106699.issue38235@roundup.psfhosted.org> Message-ID: <1570175719.46.0.265645187671.issue38235@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 3142c667b50254daaa28f22c79bdda177136bd03 by Vinay Sajip (Ashley Whetter) in branch 'master': bpo-38235: Correct some arguments names in logging documentation (GH-16571) https://github.com/python/cpython/commit/3142c667b50254daaa28f22c79bdda177136bd03 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 04:00:07 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Oct 2019 08:00:07 +0000 Subject: [issue38235] Docs of logging module says argument is named "lvl". TypeError. In-Reply-To: <1568996817.83.0.32795106699.issue38235@roundup.psfhosted.org> Message-ID: <1570176007.43.0.973683982715.issue38235@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16168 pull_request: https://github.com/python/cpython/pull/16576 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 04:00:21 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Oct 2019 08:00:21 +0000 Subject: [issue38235] Docs of logging module says argument is named "lvl". TypeError. In-Reply-To: <1568996817.83.0.32795106699.issue38235@roundup.psfhosted.org> Message-ID: <1570176021.28.0.415220179102.issue38235@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16169 pull_request: https://github.com/python/cpython/pull/16577 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 04:08:55 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Oct 2019 08:08:55 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1570176535.2.0.499987015581.issue13153@roundup.psfhosted.org> Serhiy Storchaka added the comment: What is the result of new tests? python.bat -m test -v -uall test_tk -m test_clipboard* ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 04:14:04 2019 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 04 Oct 2019 08:14:04 +0000 Subject: [issue38235] Docs of logging module says argument is named "lvl". TypeError. In-Reply-To: <1568996817.83.0.32795106699.issue38235@roundup.psfhosted.org> Message-ID: <1570176844.18.0.771397643736.issue38235@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 3af2733a8265a2685b2c0466a58a66e544a81c64 by Vinay Sajip (Miss Islington (bot)) in branch '3.8': bpo-38235: Correct some arguments names in logging documentation (GH-16571) (GH-16576) https://github.com/python/cpython/commit/3af2733a8265a2685b2c0466a58a66e544a81c64 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 04:14:31 2019 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 04 Oct 2019 08:14:31 +0000 Subject: [issue38235] Docs of logging module says argument is named "lvl". TypeError. In-Reply-To: <1568996817.83.0.32795106699.issue38235@roundup.psfhosted.org> Message-ID: <1570176871.39.0.164527643491.issue38235@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 4f82a53c5d34df00bf2d563c2417f5e2638d1004 by Vinay Sajip (Miss Islington (bot)) in branch '3.7': bpo-38235: Correct some arguments names in logging documentation (GH-16571) (GH-16577) https://github.com/python/cpython/commit/4f82a53c5d34df00bf2d563c2417f5e2638d1004 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 04:15:04 2019 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 04 Oct 2019 08:15:04 +0000 Subject: [issue38235] Docs of logging module says argument is named "lvl". TypeError. In-Reply-To: <1568996817.83.0.32795106699.issue38235@roundup.psfhosted.org> Message-ID: <1570176904.2.0.462157104658.issue38235@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 04:36:01 2019 From: report at bugs.python.org (Doug O'Riordan) Date: Fri, 04 Oct 2019 08:36:01 +0000 Subject: [issue38368] Crash when subclassing ctypes.Union Message-ID: <1570178161.94.0.1951756088.issue38368@roundup.psfhosted.org> New submission from Doug O'Riordan : Ran into Segfaults while trying to use pysnmp with 3.8.0rc1. The code is running fine on 3.8.0b04. $ python3.8 Python 3.8.0rc1 (default, Oct 2 2019, 14:15:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import ctypes >>> class in6_addr_U(ctypes.Union): ... _fields_ = [ ... ('__u6_addr8', ctypes.c_uint8 * 16), ... ('__u6_addr16', ctypes.c_uint16 * 8), ... ('__u6_addr32', ctypes.c_uint32 * 4), ... ] ... Segmentation fault $ docker run -it python:3.8.0rc1-slim Python 3.8.0rc1 (default, Oct 2 2019, 23:38:42) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import ctypes >>> class in6_addr_U(ctypes.Union): ... _fields_ = [ ... ('__u6_addr8', ctypes.c_uint8 * 16), ... ('__u6_addr16', ctypes.c_uint16 * 8), ... ('__u6_addr32', ctypes.c_uint32 * 4), ... ] ... $ The code is from here: https://github.com/etingof/pysnmp/blob/master/pysnmp/carrier/sockmsg.py#L47-L52 ---------- components: ctypes messages: 353906 nosy: oriordan priority: normal severity: normal status: open title: Crash when subclassing ctypes.Union type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 04:40:20 2019 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 04 Oct 2019 08:40:20 +0000 Subject: [issue38354] Fix for bug 30378 regressed SysLogHandler by making it resolve addresses at initialization instead of in `.emit()` In-Reply-To: <1570051932.55.0.313239800858.issue38354@roundup.psfhosted.org> Message-ID: <1570178420.22.0.603813885681.issue38354@roundup.psfhosted.org> Vinay Sajip added the comment: This could perhaps be handled by just swallowing errors in the constructor (as is done for Unix sockets, for example) and trying to connect in emit() if there is no connection. Not sure I want to go down the caching route - it complicates things for what is a rare use case, plus raises the question of allowing configurable timeouts for the cache, etc. This seems a rare use case, so I have things that have a higher priority on my list of things to do, but I'll certainly review a patch to address this. ---------- versions: -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 04:53:26 2019 From: report at bugs.python.org (Arminius) Date: Fri, 04 Oct 2019 08:53:26 +0000 Subject: [issue35212] Expressions with format specifiers in f-strings give wrong code position in AST In-Reply-To: <1541939640.9.0.788709270274.issue35212@psf.upfronthosting.co.za> Message-ID: <1570179206.67.0.660570991885.issue35212@roundup.psfhosted.org> Arminius added the comment: There is another instance of incorrectly reported offsets in f-strings, in this case affecting multi-line strings. Example: ( f'aaa{foo}bbb' f'ccc{bar}ddd' f'eee{baz}fff' ) Relevant part of the syntax tree: JoinedStr( lineno=2, col_offset=4, values=[ Str(lineno=2, col_offset=4, s='aaa'), FormattedValue( lineno=2, col_offset=4, value=Name(lineno=2, col_offset=10, id='foo', ctx=Load()), conversion=-1, format_spec=None, ), Str(lineno=2, col_offset=4, s='bbbccc'), FormattedValue( lineno=2, col_offset=4, value=Name(lineno=2, col_offset=5, id='bar', ctx=Load()), conversion=-1, format_spec=None, ), Str(lineno=2, col_offset=4, s='dddcccaaaaaaaaaaaaaa'), FormattedValue( lineno=2, col_offset=4, value=Name(lineno=2, col_offset=5, id='baz', ctx=Load()), conversion=-1, format_spec=None, ), Str(lineno=2, col_offset=4, s='ddd'), ], ), The reported code position for "foo" is correct (2,10), but not for "bar" (2,5) and "baz" (2,5). Could you give an estimate as to whether this issue will be looked at any time soon? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 04:55:46 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 04 Oct 2019 08:55:46 +0000 Subject: [issue38368] Crash when subclassing ctypes.Union In-Reply-To: <1570178161.94.0.1951756088.issue38368@roundup.psfhosted.org> Message-ID: <1570179346.49.0.00476232707067.issue38368@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I am adding 3.8 regression since the report says 3.8.0b4 works and segfaults with 3.8.0RC1. ---------- keywords: +3.8regression nosy: +lukasz.langa, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 05:00:35 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Oct 2019 09:00:35 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1570179635.54.0.187240981669.issue13153@roundup.psfhosted.org> Terry J. Reedy added the comment: After remembering to recompile (sorry), the test passes and clipgoard_get returns the rocket. Very nice, thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 05:18:54 2019 From: report at bugs.python.org (Paul Moore) Date: Fri, 04 Oct 2019 09:18:54 +0000 Subject: [issue38369] Python 3.7.4 venv command does not install pip Message-ID: <1570180734.57.0.0824297518984.issue38369@roundup.psfhosted.org> New submission from Paul Moore : The venv module with Python 3.4 on Windows doesn't install pip - even though the --without-pip flag is not specified. This appears to be a regression since pip is installed when using 3.7: >C:\Utils\PythonVersions\Python-3.7.3\python.exe -m venv ve-373 >dir .\ve-373\Scripts\pip.exe Directory: C:\Work\Scratch\vv\ve-373\Scripts Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- 04/10/2019 10:08 102765 pip.exe >py -m venv ve-374 >dir .\ve-374\Scripts\pip.exe dir : Cannot find path 'C:\Work\Scratch\vv\ve-374\Scripts\pip.exe' because it does not exist. At line:1 char:1 + dir .\ve-374\Scripts\pip.exe + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (C:\Work\Scratch...Scripts\pip.exe:String) [Get-ChildItem], ItemNotFoundException + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand >py -V Python 3.7.4 ---------- assignee: steve.dower components: Library (Lib) messages: 353911 nosy: paul.moore, steve.dower priority: normal severity: normal status: open title: Python 3.7.4 venv command does not install pip type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 05:37:27 2019 From: report at bugs.python.org (Paul Moore) Date: Fri, 04 Oct 2019 09:37:27 +0000 Subject: [issue38369] Python 3.7.4 venv command does not install pip In-Reply-To: <1570180734.57.0.0824297518984.issue38369@roundup.psfhosted.org> Message-ID: <1570181847.97.0.421572324708.issue38369@roundup.psfhosted.org> Paul Moore added the comment: This appears to be somehow caused by running Python 3.7.4 from an active virtualenv (which I'd forgotten I had active when I did the test). Regardless, I'd have expected that the command would either correctly create a venv containing pip, or fail to create the venv at all. Creating an incomplete venv is extremely confusing for the user, if nothing else. It looks like this is *not* a regression - it's been like this since 3.6.8 at least. Actually, the created venv looks pretty broken to me - it has the *parent* environment in `sys.path`, but does not have its *own* environment there: >.\ve-368a\Scripts\python.exe Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.path ['', 'C:\\Work\\Scratch\\vv\\ve-368a\\Scripts\\python36.zip', 'C:\\Users\\UK03306\\.virtualenvs\\f1980c81dac32d4\\DLLs', 'C:\\Users\\UK03306\\.virtualenvs\\f1980c81dac32d4\\lib', 'C:\\Users\\UK03306\\.virtualenvs\\f1980c81dac32d4\\Scripts', 'C:\\Utils\\PythonVersions\\Python-3.6.8\\Lib', 'C:\\Utils\\PythonVersions\\Python-3.6.8\\DLLs', 'C:\\Users\\UK03306\\.virtualenvs\\f1980c81dac32d4', 'C:\\Users\\UK03306\\.virtualenvs\\f1980c81dac32d4\\lib\\site-packages'] Note the lack of ve-368a directories, and the presence of a lot of directories from .virtualenvs (the parent environment). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 05:48:36 2019 From: report at bugs.python.org (Paul Moore) Date: Fri, 04 Oct 2019 09:48:36 +0000 Subject: [issue38369] Python 3.7.4 venv command does not install pip In-Reply-To: <1570180734.57.0.0824297518984.issue38369@roundup.psfhosted.org> Message-ID: <1570182516.86.0.98494159581.issue38369@roundup.psfhosted.org> Paul Moore added the comment: Further update - this appears to also happen on Ubuntu (at least the version available through the Windows Linux subsystem), so it's not a Windows-specific issue. ---------- assignee: steve.dower -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 05:50:51 2019 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 04 Oct 2019 09:50:51 +0000 Subject: [issue37025] Misleading error message "Python failed to load the default activation context" In-Reply-To: <1558646019.4.0.18611977167.issue37025@roundup.psfhosted.org> Message-ID: <1570182651.52.0.791822940635.issue37025@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +16170 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16579 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 05:53:36 2019 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 04 Oct 2019 09:53:36 +0000 Subject: [issue37025] Misleading error message "Python failed to load the default activation context" In-Reply-To: <1558646019.4.0.18611977167.issue37025@roundup.psfhosted.org> Message-ID: <1570182816.59.0.912302008444.issue37025@roundup.psfhosted.org> Zackery Spytz added the comment: Thank you for the report. I've created a pull request to fix this issue. ---------- nosy: +ZackerySpytz versions: +Python 2.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 06:02:24 2019 From: report at bugs.python.org (Paul Moore) Date: Fri, 04 Oct 2019 10:02:24 +0000 Subject: [issue38369] Python 3.7.4 venv command does not install pip In-Reply-To: <1570180734.57.0.0824297518984.issue38369@roundup.psfhosted.org> Message-ID: <1570183344.99.0.612739970388.issue38369@roundup.psfhosted.org> Paul Moore added the comment: Sigh. Never mind, this appears to be because virtualenv uses its own hacked copy of site.py which is missing a lot of the venv support code. I'll report this over on virtualenv. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 06:09:55 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Oct 2019 10:09:55 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1570183795.12.0.262973008261.issue13153@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 06cb94bc8419b9a24df6b0d724fcd8e40c6971d6 by Serhiy Storchaka in branch 'master': bpo-13153: Use OS native encoding for converting between Python and Tcl. (GH-16545) https://github.com/python/cpython/commit/06cb94bc8419b9a24df6b0d724fcd8e40c6971d6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 06:10:07 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Oct 2019 10:10:07 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1570183807.25.0.418966458365.issue13153@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16171 pull_request: https://github.com/python/cpython/pull/16580 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 06:10:14 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Oct 2019 10:10:14 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1570183814.76.0.437396486861.issue13153@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16172 pull_request: https://github.com/python/cpython/pull/16581 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 06:24:29 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 04 Oct 2019 10:24:29 +0000 Subject: [issue38352] In typing docs, note explicit import needed for IO and Pattern/Match In-Reply-To: <1570041077.58.0.399304866649.issue38352@roundup.psfhosted.org> Message-ID: <1570184669.1.0.663951521838.issue38352@roundup.psfhosted.org> Ivan Levkivskyi added the comment: > So, my request is: In the sections for the IO/TextIO/BinaryIO and Pattern/Match classes, include text warning the user that these types are not imported when you do `from typing import *`. I don't think this should really be a warning, probably just a note, but otherwise I totally agree. Would you like to make a PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 06:28:56 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Oct 2019 10:28:56 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1570184936.89.0.877572405889.issue13153@roundup.psfhosted.org> miss-islington added the comment: New changeset 6c3fbbc177f5e1867ab09a315dbf58554a80accd by Miss Islington (bot) in branch '3.7': bpo-13153: Use OS native encoding for converting between Python and Tcl. (GH-16545) https://github.com/python/cpython/commit/6c3fbbc177f5e1867ab09a315dbf58554a80accd ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 06:28:59 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Oct 2019 10:28:59 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1570184939.51.0.904795581251.issue13153@roundup.psfhosted.org> miss-islington added the comment: New changeset dc191245d8f63f5ab41afff0468b7463a07e7b00 by Miss Islington (bot) in branch '3.8': bpo-13153: Use OS native encoding for converting between Python and Tcl. (GH-16545) https://github.com/python/cpython/commit/dc191245d8f63f5ab41afff0468b7463a07e7b00 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 07:24:32 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 04 Oct 2019 11:24:32 +0000 Subject: [issue38366] dataclasses: generate the _hash_action table from the if-else tree In-Reply-To: <1570143889.18.0.0994959118678.issue38366@roundup.psfhosted.org> Message-ID: <1570188272.13.0.192125557261.issue38366@roundup.psfhosted.org> Eric V. Smith added the comment: Thank you for your contribution, @iomintz, but I'm not going to accept this change. I don't think it improves the clarity of the code. And I realize this is wholly a subjective decision, and others may disagree. But to me, looking at the table it's clear that each case is handled correctly, while looking through the code I'd need to reason about it for each case. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 07:27:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Oct 2019 11:27:18 +0000 Subject: [issue36632] test_multiprocessing_forkserver: test_rapid_restart() leaked a dangling process on AMD64 FreeBSD 10-STABLE Non-Debug 3.x In-Reply-To: <1555326100.12.0.0433329524894.issue36632@roundup.psfhosted.org> Message-ID: <1570188438.99.0.0395702582792.issue36632@roundup.psfhosted.org> STINNER Victor added the comment: Warning on AMD64 Debian root 3.x: https://buildbot.python.org/all/#/builders/27/builds/3853 test_enable_logging (test.test_multiprocessing_spawn.WithProcessesTestLogging) ... ok test_level (test.test_multiprocessing_spawn.WithProcessesTestLogging) ... ok test_rapid_restart (test.test_multiprocessing_spawn.WithProcessesTestManagerRestart) ... ok Warning -- Dangling processes: {} test_access (test.test_multiprocessing_spawn.WithProcessesTestPicklingConnections) ... ok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 07:35:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Oct 2019 11:35:53 +0000 Subject: [issue38266] Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal In-Reply-To: <1569352841.72.0.766028949986.issue38266@roundup.psfhosted.org> Message-ID: <1570188953.57.0.194953970317.issue38266@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8855e47d09d4db1206c65b24efc8ad0df585ac46 by Victor Stinner (Joannah Nanjekye) in branch 'master': bpo-38266: Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal (GH-16558) https://github.com/python/cpython/commit/8855e47d09d4db1206c65b24efc8ad0df585ac46 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 07:35:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Oct 2019 11:35:53 +0000 Subject: [issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent() In-Reply-To: <1565985235.6.0.212314052144.issue37878@roundup.psfhosted.org> Message-ID: <1570188953.71.0.0348530717838.issue37878@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8855e47d09d4db1206c65b24efc8ad0df585ac46 by Victor Stinner (Joannah Nanjekye) in branch 'master': bpo-38266: Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal (GH-16558) https://github.com/python/cpython/commit/8855e47d09d4db1206c65b24efc8ad0df585ac46 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 07:40:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Oct 2019 11:40:02 +0000 Subject: [issue38266] Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal In-Reply-To: <1569352841.72.0.766028949986.issue38266@roundup.psfhosted.org> Message-ID: <1570189202.58.0.868453646459.issue38266@roundup.psfhosted.org> STINNER Victor added the comment: > Since this sounds like a regression being introduced by 3.8.0, should the reversion be included in 3.8.0 final or can it wait for 3.8.1? Oh, in fact, the change was only made in the master branch: after the 3.8 branch was created. The 3.8 branch still contains PyThreadState_DeleteCurrent() ;-) There is no regression in 3.8, only in master, and the regression in master has been fixed. ---------- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 07:44:01 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Oct 2019 11:44:01 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1570189441.52.0.0990611998718.issue13153@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 07:45:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Oct 2019 11:45:51 +0000 Subject: [issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent() In-Reply-To: <1565985235.6.0.212314052144.issue37878@roundup.psfhosted.org> Message-ID: <1570189551.04.0.546330647651.issue37878@roundup.psfhosted.org> STINNER Victor added the comment: > bpo-38266: Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal (GH-16558) Oh, I didn't notice something in the review: the revert moved PyThreadState_DeleteCurrent() definition from Include/pystate.h to Include/cpython/pystate.h. Previously, it was defined in Include/pystate.h, see the commit removing it: https://github.com/python/cpython/commit/2bc43cdc015eda4f1a651bb2b308a17a83c38e14 Joannah: can you please move the definition back to Include/pystate.h, at the same place it was before the removal, please? The revert excluded PyThreadState_DeleteCurrent() from the stable API (Py_LIMITED_API). ---------- versions: -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 07:46:09 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Oct 2019 11:46:09 +0000 Subject: [issue22742] IDLE shows traceback when printing non-BMP character In-Reply-To: <1414426704.85.0.168243800807.issue22742@psf.upfronthosting.co.za> Message-ID: <1570189569.66.0.260272789275.issue22742@roundup.psfhosted.org> Serhiy Storchaka added the comment: Fixed by PR 16545 (see issue13153). ---------- nosy: +serhiy.storchaka resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 07:46:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Oct 2019 11:46:39 +0000 Subject: [issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent() In-Reply-To: <1565985235.6.0.212314052144.issue37878@roundup.psfhosted.org> Message-ID: <1570189599.28.0.603130324837.issue37878@roundup.psfhosted.org> STINNER Victor added the comment: To be clear: this issue only impacts Python 3.8. The function was only removed from the master branch. It was still in the 3.8 branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 07:47:21 2019 From: report at bugs.python.org (plugin nieulq) Date: Fri, 04 Oct 2019 11:47:21 +0000 Subject: [issue38370] An array as attribute of an object is shared between instances Message-ID: <1570189641.68.0.415571181009.issue38370@roundup.psfhosted.org> New submission from plugin nieulq : I am using this version on Windows : Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]. When an attribute of an object is an array, the array is shared between instances as shown in my example. When executed, the output generated by the script is: Value1 Value2 Value3 Value4 -------------------------------- Value1 Value2 Value3 Value4 It should be : Value1 Value2 -------------------------------- Value3 Value4 ---------- components: Windows messages: 353928 nosy: paul.moore, plugin nieulq, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: An array as attribute of an object is shared between instances type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 07:50:09 2019 From: report at bugs.python.org (plugin nieulq) Date: Fri, 04 Oct 2019 11:50:09 +0000 Subject: [issue38370] An array as attribute of an object is shared between instances In-Reply-To: <1570189641.68.0.415571181009.issue38370@roundup.psfhosted.org> Message-ID: <1570189809.01.0.687444337933.issue38370@roundup.psfhosted.org> plugin nieulq added the comment: I am using this version on Windows : Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]. When an attribute of an object is an array, the array is shared between instances as shown in my example. class AClass(object): def __init__(self, val=[]): self.contents = val def add_content(self, newcontent): self.contents.append(newcontent) return self def print(self): for val in self.contents: print(str(val)) if __name__ == '__main__': sc = AClass() sc = sc.add_content("Value1").add_content("Value2") sb = AClass() sb = sb.add_content("Value3").add_content("Value4") sc.print() print("--------------------------------") sb.print() When executed, the output generated by the script is: Value1 Value2 Value3 Value4 -------------------------------- Value1 Value2 Value3 Value4 It should be : Value1 Value2 -------------------------------- Value3 Value4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 07:56:58 2019 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 04 Oct 2019 11:56:58 +0000 Subject: [issue38370] An array as attribute of an object is shared between instances In-Reply-To: <1570189641.68.0.415571181009.issue38370@roundup.psfhosted.org> Message-ID: <1570190218.42.0.715938873473.issue38370@roundup.psfhosted.org> Mark Dickinson added the comment: This is a common gotcha. Take a look at: https://docs.python.org/3/faq/programming.html#why-are-default-values-shared-between-objects ---------- nosy: +mark.dickinson resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 07:59:57 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Oct 2019 11:59:57 +0000 Subject: [issue22742] IDLE shows traceback when printing non-BMP character In-Reply-To: <1414426704.85.0.168243800807.issue22742@psf.upfronthosting.co.za> Message-ID: <1570190397.59.0.363957471919.issue22742@roundup.psfhosted.org> Serhiy Storchaka added the comment: It was fixed for all valid Unicode characters, you can still get an error when print a surrogate character to the stderr on Linux: >>> import sys >>> print('\ud800', file=sys.stderr) Traceback (most recent call last): File "", line 1, in print('\ud800', file=sys.stderr) UnicodeEncodeError: 'utf-8' codec can't encode character '\ud800' in position 0: surrogates not allowed In the Python REPL you get an escaped sequence. >>> import sys >>> print('\ud800', file=sys.stderr) \ud800 ---------- resolution: fixed -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 08:00:21 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Oct 2019 12:00:21 +0000 Subject: [issue36698] Shell restart when error message contains non-BMP characters In-Reply-To: <1555953357.75.0.808052597637.issue36698@roundup.psfhosted.org> Message-ID: <1570190420.99.0.258940205621.issue36698@roundup.psfhosted.org> Serhiy Storchaka added the comment: Mostly fixed by PR 16545 (see issue13153). The original example is now passed. >>> raise Exception('\U0001f603') Traceback (most recent call last): File "", line 1, in raise Exception('\U0001f603') Exception: ? >>> But you can still cause a restart of the shell by using surrogate characters: >>> raise Exception('\ud800') Traceback (most recent call last): File "", line 1, in raise Exception('\ud800') Traceback (most recent call last): File "", line 1, in raise Exception('\ud800') ================================ RESTART: Shell ================================ >>> ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 08:03:40 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Oct 2019 12:03:40 +0000 Subject: [issue21084] IDLE can't deal with characters above the range (U+0000-U+FFFF) In-Reply-To: <1396008065.84.0.00802001667749.issue21084@psf.upfronthosting.co.za> Message-ID: <1570190620.49.0.215064150717.issue21084@roundup.psfhosted.org> Serhiy Storchaka added the comment: Fixed by PR 16545 (see issue13153). ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 08:07:50 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Oct 2019 12:07:50 +0000 Subject: [issue30019] IDLE freezes when opening a file with astral characters In-Reply-To: <1491596146.33.0.970912299828.issue30019@psf.upfronthosting.co.za> Message-ID: <1570190870.65.0.0291057980917.issue30019@roundup.psfhosted.org> Serhiy Storchaka added the comment: This looks like a duplicate of issue21084. Fixed by PR 16545 (see issue13153). It is virtually Eryk's workaround, but at the Tkinter level. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 08:08:41 2019 From: report at bugs.python.org (plugin nieulq) Date: Fri, 04 Oct 2019 12:08:41 +0000 Subject: [issue38370] An array as attribute of an object is shared between instances In-Reply-To: <1570189641.68.0.415571181009.issue38370@roundup.psfhosted.org> Message-ID: <1570190921.24.0.652525795485.issue38370@roundup.psfhosted.org> plugin nieulq added the comment: Ah ... Ok. My bad. Thank you for pointing this out to me, Mark. This is definitely a strange behavior. ---------- nosy: -mark.dickinson resolution: not a bug -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 08:13:03 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Fri, 04 Oct 2019 12:13:03 +0000 Subject: [issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent() In-Reply-To: <1565985235.6.0.212314052144.issue37878@roundup.psfhosted.org> Message-ID: <1570191183.22.0.375626418982.issue37878@roundup.psfhosted.org> Joannah Nanjekye added the comment: > Oh, I didn't notice something in the review: the revert moved >PyThreadState_DeleteCurrent() definition from Include/pystate.h to >Include/cpython/pystate.h. Previously, it was defined in > Include/pystate.h, see the commit removing it: I made this change as it was requested by Eric snow in issue38266. "when we un-revert we should be sure to move PyThreadState_DeleteCurrent() from Include/pystate.h to Include/cpython/pystate.h." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 08:26:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Oct 2019 12:26:06 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1570191966.66.0.463726577597.issue13153@roundup.psfhosted.org> STINNER Victor added the comment: > bpo-13153: Use OS native encoding for converting between Python and Tcl. (GH-16545) WOW. That's huge. The issue with non-BMP characters has been fixed? Finally? The issue was haunting the bug tracker for at least 8 years!!! ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 08:30:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Oct 2019 12:30:38 +0000 Subject: [issue38353] Cleanup the path configuration implementation code (getpath.c) In-Reply-To: <1570050763.22.0.787922067096.issue38353@roundup.psfhosted.org> Message-ID: <1570192238.08.0.260670829054.issue38353@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16173 pull_request: https://github.com/python/cpython/pull/16582 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 08:34:51 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 04 Oct 2019 12:34:51 +0000 Subject: [issue38227] Setting a signal handler gets multiprocessing.Pool stuck In-Reply-To: <1568929295.79.0.555392640133.issue38227@roundup.psfhosted.org> Message-ID: <1570192491.68.0.998101165482.issue38227@roundup.psfhosted.org> Antoine Pitrou added the comment: Several things here: - you can perform critical cleanup with the atexit module; using a signal handler for that is extremely low-level and error-prone - you can also try to switch to the "forkserver" method of multiprocessing, perhaps that will fix your issue ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 08:43:51 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 04 Oct 2019 12:43:51 +0000 Subject: [issue38284] signal.sigwait* do not intercept certain signals In-Reply-To: <1569496743.5.0.75731685223.issue38284@roundup.psfhosted.org> Message-ID: <1570193031.64.0.105866218895.issue38284@roundup.psfhosted.org> Antoine Pitrou added the comment: Python just exposes thin wrappers around the underlying libc calls, so you have to understand how those work. On Linux, the sigwaitinfo() man page says: NOTES In normal usage, the calling program blocks the signals in set via a prior call to sigprocmask(2) (so that the default disposition for these signals does not occur if they become pending between successive calls to sigwaitinfo() or sig? timedwait()) and does not establish handlers for these sig? nals. So you need to block the given signal with pthread_sigmask() before waiting on it. For example: >>> import signal >>> signal.pthread_sigmask(signal.SIG_BLOCK, [signal.SIGHUP]) set() >>> signal.sigwait([signal.SIGHUP]) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 08:44:55 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 04 Oct 2019 12:44:55 +0000 Subject: [issue38284] signal.sigwait* do not intercept certain signals In-Reply-To: <1569496743.5.0.75731685223.issue38284@roundup.psfhosted.org> Message-ID: <1570193095.04.0.626268709775.issue38284@roundup.psfhosted.org> Antoine Pitrou added the comment: Closing as not a Python bug. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 08:48:23 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 04 Oct 2019 12:48:23 +0000 Subject: [issue38249] Optimize out Py_UNREACHABLE in the release mode In-Reply-To: <1569145626.92.0.408422678201.issue38249@roundup.psfhosted.org> Message-ID: <1570193303.27.0.656208925366.issue38249@roundup.psfhosted.org> Antoine Pitrou added the comment: I agree with Serhiy. If you hit a rare situation that you don't want to handle, use Py_FatalError(), not Py_UNREACHABLE(). Py_UNREACHABLE() is for situations which are *logically* impossible, not just uncommon. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 08:53:06 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 04 Oct 2019 12:53:06 +0000 Subject: [issue38167] O_DIRECT read fails with 4K mmap buffer In-Reply-To: <1568417320.49.0.42295605579.issue38167@roundup.psfhosted.org> Message-ID: <1570193586.01.0.882535143135.issue38167@roundup.psfhosted.org> Antoine Pitrou added the comment: I agree with Josh. If you want to use O_DIRECT, use an unbuffered file object and be sure to issue reads of the right size. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 08:55:41 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 04 Oct 2019 12:55:41 +0000 Subject: [issue38167] O_DIRECT read fails with 4K mmap buffer In-Reply-To: <1568417320.49.0.42295605579.issue38167@roundup.psfhosted.org> Message-ID: <1570193741.7.0.0828144215231.issue38167@roundup.psfhosted.org> Antoine Pitrou added the comment: Also I'm curious: why are you using O_DIRECT, and furthermore, why are you using it to read into mmap'ed memory? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 08:56:47 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 04 Oct 2019 12:56:47 +0000 Subject: [issue38266] Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal In-Reply-To: <1569352841.72.0.766028949986.issue38266@roundup.psfhosted.org> Message-ID: <1570193807.02.0.141855637474.issue38266@roundup.psfhosted.org> Change by Ned Deily : ---------- keywords: -3.8regression versions: -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 09:00:08 2019 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Fri, 04 Oct 2019 13:00:08 +0000 Subject: [issue38346] Wrong behavior when using `assert_called_with` with mutable object In-Reply-To: <1570006369.69.0.450054962888.issue38346@roundup.psfhosted.org> Message-ID: <1570194008.92.0.0481192798278.issue38346@roundup.psfhosted.org> Vedran ?a?i? added the comment: > when `b` has same values of `a` before it is mutated. There might be no such object. Or it might exist, but you still wouldn't want it. Consider the case when a is a coroutine that has just started (a=coro()). You call f with a, and then advance a to the next yielding point. Is f called with a? You say no. Ok. But imagine you call coro again, and call that b (b=coro()). Is f called with b? Do you really want to say yes to that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 09:22:43 2019 From: report at bugs.python.org (Tal Einat) Date: Fri, 04 Oct 2019 13:22:43 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1570195363.15.0.830681132573.issue13153@roundup.psfhosted.org> Tal Einat added the comment: Indeed, Serhiy, you've done an amazing job with this change and it will greatly benefit many people. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 09:26:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Oct 2019 13:26:02 +0000 Subject: [issue38353] Cleanup the path configuration implementation code (getpath.c) In-Reply-To: <1570050763.22.0.787922067096.issue38353@roundup.psfhosted.org> Message-ID: <1570195562.77.0.294362630148.issue38353@roundup.psfhosted.org> STINNER Victor added the comment: New changeset abd7cd856ba326bd7574135c7d034e98492ab695 by Victor Stinner in branch 'master': bpo-38353: getpath.c uses dynamically allocated strings (GH-16582) https://github.com/python/cpython/commit/abd7cd856ba326bd7574135c7d034e98492ab695 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 10:53:50 2019 From: report at bugs.python.org (=?utf-8?q?Ionel_Cristian_M=C4=83rie=C8=99?=) Date: Fri, 04 Oct 2019 14:53:50 +0000 Subject: [issue38227] Setting a signal handler gets multiprocessing.Pool stuck In-Reply-To: <1568929295.79.0.555392640133.issue38227@roundup.psfhosted.org> Message-ID: <1570200830.33.0.657316228323.issue38227@roundup.psfhosted.org> Ionel Cristian M?rie? added the comment: atexit proved time and time again to be unreliable, not really an option. Not all programs shutdown nicely enough for atexit. Should I tell users "use forkserver on 3.8 because broken stuff"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 11:09:07 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Oct 2019 15:09:07 +0000 Subject: [issue36698] Shell restart when error message contains non-BMP characters In-Reply-To: <1555953357.75.0.808052597637.issue36698@roundup.psfhosted.org> Message-ID: <1570201746.99.0.624904196614.issue36698@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +16174 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16583 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 11:33:41 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Oct 2019 15:33:41 +0000 Subject: [issue38371] Tkinter: deprecate the split() method Message-ID: <1570203221.73.0.664458057352.issue38371@roundup.psfhosted.org> New submission from Serhiy Storchaka : The tkapp.split() method has weird behavior. It splits a string recursively, so the type of items and the depth of nesting depends on spaces in string values. For example: >>> import tkinter >>> root = tkinter.Tcl() >>> root.tk.split('Hi') 'Hi' >>> root.tk.split('Hello "Good bye"') ('Hello', ('Good', 'bye')) It may work as you meant in some cases (if items at the same level either all have spaces or all do not have spaces), but return unexpected result for untested cases. It is more robust to use the tkapp.splitlist() method, which split exactly one level and always returns a tuple of strings. It can be used recursively if you need nested lists. >>> root.tk.splitlist('Hi') ('Hi',) >>> root.tk.splitlist('Hello "Good bye"') ('Hello', 'Good bye') >>> [root.tk.splitlist(x) for x in root.tk.splitlist('Hello "Good bye"')] [('Hello',), ('Good', 'bye')] ---------- components: Tkinter messages: 353948 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Tkinter: deprecate the split() method versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 11:45:22 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Oct 2019 15:45:22 +0000 Subject: [issue38371] Tkinter: deprecate the split() method In-Reply-To: <1570203221.73.0.664458057352.issue38371@roundup.psfhosted.org> Message-ID: <1570203922.22.0.9350011877.issue38371@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +16175 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16584 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 12:01:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Oct 2019 16:01:16 +0000 Subject: [issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent() In-Reply-To: <1565985235.6.0.212314052144.issue37878@roundup.psfhosted.org> Message-ID: <1570204876.83.0.932706029342.issue37878@roundup.psfhosted.org> STINNER Victor added the comment: > "when we un-revert we should be sure to move PyThreadState_DeleteCurrent() from Include/pystate.h to Include/cpython/pystate.h." Ah, I didn't see this comment. If Eric endorses this change, I'm fine with it :-) I close the issue. If someone wants to modify PyThreadState_DeleteCurrent() to automatically call PyThreadState_Clear(), please open a new issue for that. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 12:01:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Oct 2019 16:01:29 +0000 Subject: [issue38353] Cleanup the path configuration implementation code (getpath.c) In-Reply-To: <1570050763.22.0.787922067096.issue38353@roundup.psfhosted.org> Message-ID: <1570204889.01.0.710380251659.issue38353@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16176 pull_request: https://github.com/python/cpython/pull/16585 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 12:02:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Oct 2019 16:02:21 +0000 Subject: [issue38249] Optimize out Py_UNREACHABLE in the release mode In-Reply-To: <1569145626.92.0.408422678201.issue38249@roundup.psfhosted.org> Message-ID: <1570204941.9.0.497106055483.issue38249@roundup.psfhosted.org> STINNER Victor added the comment: > Py_UNREACHABLE() is for situations which are *logically* impossible, not just uncommon. I suggest to clarify/enhance Py_UNREACHABLE() documentation to make it more explicit in that case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 12:04:57 2019 From: report at bugs.python.org (AWhetter) Date: Fri, 04 Oct 2019 16:04:57 +0000 Subject: [issue38235] Docs of logging module says argument is named "lvl". TypeError. In-Reply-To: <1568996817.83.0.32795106699.issue38235@roundup.psfhosted.org> Message-ID: <1570205097.96.0.718508583621.issue38235@roundup.psfhosted.org> Change by AWhetter : ---------- pull_requests: +16177 pull_request: https://github.com/python/cpython/pull/16586 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 12:25:47 2019 From: report at bugs.python.org (Paul) Date: Fri, 04 Oct 2019 16:25:47 +0000 Subject: [issue38167] O_DIRECT read fails with 4K mmap buffer In-Reply-To: <1568417320.49.0.42295605579.issue38167@roundup.psfhosted.org> Message-ID: <1570206347.21.0.566924645914.issue38167@roundup.psfhosted.org> Paul added the comment: > I agree with Josh. If you want to use O_DIRECT, use an unbuffered file object and be sure to issue reads of the right size. I do not believe an unbuffered file uses O_DIRECT. This is why I use os.open(fpath, os.O_DIRECT). > Also I'm curious: why are you using O_DIRECT, and furthermore, why are you using it to read into mmap'ed memory? I am testing a storage device and must use O_DIRECT to avoid the kernel's cache. I am using mmap because it was the simplest way to get a page-aligned memory buffer, which is required for direct IO. I believe that this is a bug regardless of the use of mmap, especially considering that this worked in Python 2. I believe the fix I have sent out for review addresses it adequately. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 12:27:17 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 04 Oct 2019 16:27:17 +0000 Subject: [issue37025] Misleading error message "Python failed to load the default activation context" In-Reply-To: <1558646019.4.0.18611977167.issue37025@roundup.psfhosted.org> Message-ID: <1570206437.35.0.707325664908.issue37025@roundup.psfhosted.org> Steve Dower added the comment: This doesn't apply since Python 3.5, as the HAVE_SXS preprocessor variable is not defined. We should just delete this code entirely in 3.9, and patch the message in 2.7. ---------- versions: -Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 12:39:41 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 04 Oct 2019 16:39:41 +0000 Subject: [issue38249] Optimize out Py_UNREACHABLE in the release mode In-Reply-To: <1569145626.92.0.408422678201.issue38249@roundup.psfhosted.org> Message-ID: <1570207181.12.0.67924654032.issue38249@roundup.psfhosted.org> Barry A. Warsaw added the comment: +1 Serhiy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 12:54:45 2019 From: report at bugs.python.org (=?utf-8?b?0JHQtdCw0YLRgNC40YEg0JHQvtC90LXQstCw?=) Date: Fri, 04 Oct 2019 16:54:45 +0000 Subject: [issue38372] Undefined behavior when changing dict while iterating it Message-ID: <1570208085.28.0.0436589933875.issue38372@roundup.psfhosted.org> New submission from ??????? ?????? : When changing a dict while iterating through it by removing one key and inserting other which is calculated based on the old one, the dict is changed unexpectedly. The following function: ``` def test(d: dict): for i in d: d[i+1] = d.pop(i) ``` when called with input dict `{1: 'test'}` transforms the dict to: - `{6: 'test'}` in Python3.7.4; - `{8: 'test'}` in Python3.5.3 and Python2.7. If I change the function to add 2 to the key ( `d[i+2] = d.pop(i)` ) and use the same input `{1: 'test'}` the dict is changed to: - `{11: 'test'}` in Python3.7; - `{9: 'test'}` in Python3.5. Similar thing happens with strings: ``` def test(d: dict): for i in d: d[i+'x'] = d.pop(i) ``` When called with input dict `{'a': 'test'}` it transforms it to: - `{'axxxxx': 'test'}` in Python3.7.4; - `{'axx': 'test'}` in Python3.5.3. ---------- components: Library (Lib) messages: 353954 nosy: ??????? ?????? priority: normal severity: normal status: open title: Undefined behavior when changing dict while iterating it type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 12:54:52 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 04 Oct 2019 16:54:52 +0000 Subject: [issue38368] Crash when subclassing ctypes.Union In-Reply-To: <1570178161.94.0.1951756088.issue38368@roundup.psfhosted.org> Message-ID: <1570208092.39.0.209811460415.issue38368@roundup.psfhosted.org> Steve Dower added the comment: Also crashes on Windows (x64 and x86), and on 3.7.5rc1, so this is likely in our code. ---------- nosy: +ned.deily, steve.dower priority: normal -> release blocker stage: -> test needed versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 12:57:51 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 04 Oct 2019 16:57:51 +0000 Subject: [issue38368] Crash when subclassing ctypes.Union In-Reply-To: <1570178161.94.0.1951756088.issue38368@roundup.psfhosted.org> Message-ID: <1570208271.01.0.985395555845.issue38368@roundup.psfhosted.org> Steve Dower added the comment: I get this assertion in a debug build: Assertion failed: actual_type_index <= MAX_ELEMENTS, file c:\projects\cpython\modules\_ctypes\stgdict.c, line 718 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 13:05:50 2019 From: report at bugs.python.org (AWhetter) Date: Fri, 04 Oct 2019 17:05:50 +0000 Subject: [issue16974] when "python -c command" does a traceback, it open the file "" In-Reply-To: <1358286006.48.0.232332339533.issue16974@psf.upfronthosting.co.za> Message-ID: <1570208750.07.0.585902826142.issue16974@roundup.psfhosted.org> AWhetter added the comment: If we were to add a new attribute to indicate whether a file is real or not, there would need to be a way for users to indicate whether a file is real or not to functions such as `compile()` (there's lots more!) that take a filename. Without enforcing this being set and introducing backward incompatible changes, it would need a default value. To be backwards compatible we could default to True and the existing behaviour persists. It's also worth mentioning that there's a few places (there might be more!) where Python already assumes that a file in angle brackets is not a real file: * https://github.com/python/cpython/blob/abd7cd856ba326bd7574135c7d034e98492ab695/Lib/bdb.py#L45 * https://github.com/python/cpython/blob/abd7cd856ba326bd7574135c7d034e98492ab695/Lib/pdb.py#L694 * https://github.com/python/cpython/blob/abd7cd856ba326bd7574135c7d034e98492ab695/Lib/pickle.py#L324 Nothing major though and easily changeable so it's definitely possible but it would be a lot of work to make sure that everything is setting the new attribute properly. Is there a preference on what the name of this attribute should be? Maybe `__is_real_file__`. It's clear but long. ---------- nosy: +AWhetter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 13:07:01 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 04 Oct 2019 17:07:01 +0000 Subject: [issue38368] Crash when subclassing ctypes.Union In-Reply-To: <1570178161.94.0.1951756088.issue38368@roundup.psfhosted.org> Message-ID: <1570208821.43.0.726010768079.issue38368@roundup.psfhosted.org> Steve Dower added the comment: Increasing MAX_ELEMENTS fixes it, but I'm not sure what other impacts there are from doing that. +Vinay who added the array handling that's hitting the limit. ---------- nosy: +vinay.sajip versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 13:08:46 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 04 Oct 2019 17:08:46 +0000 Subject: [issue38368] Crash when subclassing ctypes.Union In-Reply-To: <1570178161.94.0.1951756088.issue38368@roundup.psfhosted.org> Message-ID: <1570208926.22.0.745708691166.issue38368@roundup.psfhosted.org> Steve Dower added the comment: Given this limit can easily be hit by user code, I'd like to see it turned into a proper check with an exception (or a dynamic array) rather than just an assertion. We should not segfault here. while (length > 0) { actual_types[actual_type_index++] = &edict->ffi_type_pointer; assert(actual_type_index <= MAX_ELEMENTS); length--; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 13:10:57 2019 From: report at bugs.python.org (Beatris Boneva) Date: Fri, 04 Oct 2019 17:10:57 +0000 Subject: [issue38372] Undefined behavior when changing dict while iterating it In-Reply-To: <1570208085.28.0.0436589933875.issue38372@roundup.psfhosted.org> Message-ID: <1570209057.41.0.932775372547.issue38372@roundup.psfhosted.org> Beatris Boneva added the comment: Now I see it is duplicate of https://bugs.python.org/issue19332. Closing it. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 13:51:10 2019 From: report at bugs.python.org (Tim Peters) Date: Fri, 04 Oct 2019 17:51:10 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1570211470.07.0.0299885544467.issue38006@roundup.psfhosted.org> Tim Peters added the comment: BTW, the phrase "missing tp_traverse" is misleading. If an object with a NULL tp_traverse appears in a gc generation, gc will blow up the next time that generation is collected. That's always been so - gc doesn't check whether tp_traverse is NULL, it just calls it. It's tp_clear that it checks, because that one is optional. I don't recall any problem we've had with extensions implementing the gc protocol incorrectly or incompletely. It's this issue's problem: containers not participating in gc _at all_. If we had a traditional mark-sweep collector, that would be massively catastrophic. Miss a pointer and you can conclude a live object is actually trash, and tear it down while it's still in use. Our problem is the opposite: miss a pointer and we can conclude a trash object is actually live. At the start, the worst that _could_ do is leak memory. It's the later introduction of time-to-die finalizers (weakref callbacks at first) that created the opportunity for segfaults: the only 100% clearly safe way to run finalizers in cyclic trash is to force them to run _before_ anything at all is torn down by force (tp_clear). But to run them in advance, we have to know the relevant objects _are_ trash. Which we can't always know if containers don't always participate. While Neil & I haven't thought of ways that can go wrong now beyond that a "surprise finalizer" may get run any number of times, that doesn't mean far worse things can't happen - just that they'll surprise us when they do :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 13:54:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Oct 2019 17:54:00 +0000 Subject: [issue38353] Cleanup the path configuration implementation code (getpath.c) In-Reply-To: <1570050763.22.0.787922067096.issue38353@roundup.psfhosted.org> Message-ID: <1570211640.93.0.0564142050289.issue38353@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c02b41b1fb115c87693530ea6a480b2e15460424 by Victor Stinner in branch 'master': bpo-38353: getpath.c: allocates strings on the heap (GH-16585) https://github.com/python/cpython/commit/c02b41b1fb115c87693530ea6a480b2e15460424 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 13:55:38 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Oct 2019 17:55:38 +0000 Subject: [issue22742] IDLE shows traceback when printing non-BMP character In-Reply-To: <1414426704.85.0.168243800807.issue22742@psf.upfronthosting.co.za> Message-ID: <1570211738.79.0.664655820922.issue22742@roundup.psfhosted.org> Terry J. Reedy added the comment: Printing the unquoted escape representation rather than a replacement char is a bit strange and not what I expect from the python docs. I could see it as a bug. In any case, on Windows, it is the Python REPL that raises, but only for sys.stdout. >>> import sys >>> print('\ud800', file=sys.stderr) \ud800 >>> print('\ud800', file=sys.stdout) Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'utf-8' codec can't encode character '\ud800' in position 0: surrogates not allowed whereas on Windows the surrogate is displayed as a box with diagonal lines ([X] compressed in one char) in both cases. When copied and pasted into FireFox, the pasted surrogate shows as a square box containing mini D 8 0 0 chars. >>> print('\ud800', file=sys.stdout) ? >>> print('\ud800', file=sys.stderr) ? I consider putting the undisplayable codepoint, rather than a replacement character, into the editor buffer (however tcl encodes it) so that IDLE can retrieve it without loss of information the proper thing for tk to do. IDLE can then potentially identify the character to the user. === An oddity though. With >>> import tkinter as tk >>> r = tk.Tk() >>> t = tk.Text(r) >>> t.pack() >>> t.insert('insert', 'a\ud800b') the box is an empty square, not crossed. But when I copy-paste 'a?b' into the font sample (Serhiy, making this editable was a great idea), it is crossed for every font I tried, even for Courier, which is what is being used in text t. ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 13:56:00 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Oct 2019 17:56:00 +0000 Subject: [issue38328] Speed up the creation time of constant list literals. In-Reply-To: <1569862645.36.0.924344090693.issue38328@roundup.psfhosted.org> Message-ID: <1570211760.62.0.315810100386.issue38328@roundup.psfhosted.org> Serhiy Storchaka added the comment: Great! I withdrew the original proposition in issue33325 because the part of the optimization was not so good as I expected. But this part is good. $ ./python -m timeit "[$(seq -s, 10)]" 5000000 loops, best of 5: 75.5 nsec per loop $ ./python -m timeit "[*($(seq -s, 10))]" 5000000 loops, best of 5: 57.2 nsec per loop Would you consider to optimize also creating a set of constants? $ ./python -m timeit "{$(seq -s, 10)}" 2000000 loops, best of 5: 186 nsec per loop $ ./python -m timeit -s "a = frozenset(($(seq -s, 10)))" "{*a}" 2000000 loops, best of 5: 116 nsec per loop ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 14:17:07 2019 From: report at bugs.python.org (Brandt Bucher) Date: Fri, 04 Oct 2019 18:17:07 +0000 Subject: [issue38328] Speed up the creation time of constant list literals. In-Reply-To: <1569862645.36.0.924344090693.issue38328@roundup.psfhosted.org> Message-ID: <1570213027.25.0.908161465771.issue38328@roundup.psfhosted.org> Brandt Bucher added the comment: Yes, I was thinking about that (and BUILD_CONST_KEY_MAP as well). I'll open another PR with those as soon as this one is in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 14:18:00 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 04 Oct 2019 18:18:00 +0000 Subject: [issue34938] Fix mimetype.init() to account for from import In-Reply-To: <1539036789.21.0.545547206417.issue34938@psf.upfronthosting.co.za> Message-ID: <1570213080.26.0.8871571263.issue34938@roundup.psfhosted.org> Steve Dower added the comment: Adding email team here, since you were pinged on the PR. PR 16567 doesn't fix the `inited` member, which is considerably more difficult to do, unfortunately, but it does mean that it's out of sync with the values you hold. Arguably this is a better state to be in though. Unfortunately, the "internal" data structures referred to in the docs[1] are all documented public API, which means we can't just ignore this issue :( We ought to at least update the docs to mention that `inited` won't be updated if you've `from ... import`ed it (which would normally be obvious, except that now some other values _will_ be updated). Also, the `init` docs say that it will only be completely rebuilt when `files` is `None` (and specifically calls out passing an empty list as a way to avoid this happening). I'm pretty sure we don't respect this now. All up, I think we have more work to do here to get the behaviour right. Alternatively, we can make changes in 3.9 to specify better usage (such as explicitly discouraging direct use of the dictionaries and adding more helper functions if necessary). [1]: https://docs.python.org/3/library/mimetypes.html#mimetypes.init ---------- nosy: +barry, maxking, r.david.murray, steve.dower versions: +Python 3.9 -Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 14:25:27 2019 From: report at bugs.python.org (Brandt Bucher) Date: Fri, 04 Oct 2019 18:25:27 +0000 Subject: [issue34938] Fix mimetype.init() to account for from import In-Reply-To: <1539036789.21.0.545547206417.issue34938@psf.upfronthosting.co.za> Message-ID: <1570213527.7.0.0483766961831.issue34938@roundup.psfhosted.org> Change by Brandt Bucher : ---------- nosy: +brandtbucher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 14:26:45 2019 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 04 Oct 2019 18:26:45 +0000 Subject: [issue38368] Crash when subclassing ctypes.Union In-Reply-To: <1570178161.94.0.1951756088.issue38368@roundup.psfhosted.org> Message-ID: <1570213605.14.0.155837269204.issue38368@roundup.psfhosted.org> Vinay Sajip added the comment: > We should not segfault here. Agreed, MAX_ELEMENTS was set to be an upper bound which shouldn't be hit. I'll investigate with OP's example data and see where the bug is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 14:28:33 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Oct 2019 18:28:33 +0000 Subject: [issue36698] Shell restart when error message contains non-BMP characters In-Reply-To: <1555953357.75.0.808052597637.issue36698@roundup.psfhosted.org> Message-ID: <1570213713.32.0.781669416695.issue36698@roundup.psfhosted.org> Terry J. Reedy added the comment: As with #22742, the problem, without PR 16583, only occurs with *nix. On Windows, the traceback ends with "Exception: ?" and a prompt is printed. ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 14:30:23 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 04 Oct 2019 18:30:23 +0000 Subject: [issue38348] Make python -m ast more configurable In-Reply-To: <1570029299.56.0.0303865742584.issue38348@roundup.psfhosted.org> Message-ID: <1570213823.68.0.762192621797.issue38348@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 14:50:19 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Oct 2019 18:50:19 +0000 Subject: [issue21084] IDLE can't deal with characters above the range (U+0000-U+FFFF) In-Reply-To: <1396008065.84.0.00802001667749.issue21084@psf.upfronthosting.co.za> Message-ID: <1570215019.35.0.418829716893.issue21084@roundup.psfhosted.org> Terry J. Reedy added the comment: As noted on #13153, files with astral chars can now be read without an exception, but the presence of astral chars messes up editing text that follows at least on the same line by misplacing the cursor. I will open a new issue about replacing such with \U escapes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 14:52:14 2019 From: report at bugs.python.org (Ali Rizvi-Santiago) Date: Fri, 04 Oct 2019 18:52:14 +0000 Subject: [issue35173] Re-use already existing functionality to allow Python 2.7.x (both embedded and standalone) to locate the module path according to the shared library In-Reply-To: <1569459597.01.0.435639543665.issue35173@roundup.psfhosted.org> Message-ID: Ali Rizvi-Santiago added the comment: Sure. It was for Python2 anyways. -Ali On Wed, Sep 25, 2019 at 8:00 PM STINNER Victor wrote: > > STINNER Victor added the comment: > > Modules/getpath.c and PC/getpathp.c have been deeply reworked with the > implementation of the PEP 587 in Python 3.8. Parameters which are already > set (ex: Py_SetProgramName() or using the new PyConfig API) are no longer > overriden. I added some tests on the "path configuration". > > The most reliable way to configure the path configuration is now to use > the new initialization API using PyConfig. > https://docs.python.org/dev/c-api/init_config.html > > ---------- > nosy: +vstinner > resolution: -> fixed > stage: -> resolved > status: open -> closed > versions: +Python 3.8, Python 3.9 -Python 2.7 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 16:41:49 2019 From: report at bugs.python.org (Ashley Whetter) Date: Fri, 04 Oct 2019 20:41:49 +0000 Subject: [issue33714] module can set an exception in tp_clear In-Reply-To: <1527769305.39.0.682650639539.issue33714@psf.upfronthosting.co.za> Message-ID: <1570221709.51.0.649293827496.issue33714@roundup.psfhosted.org> Ashley Whetter added the comment: I've attached a reproduction case. Here's the setup.py that I used: ``` from distutils.core import Extension, setup extension = Extension("breaky", ["breaky.c"]) setup( name="tp_clear", version="0.1.0", ext_modules=[extension], ) ``` which I built and ran with: ``` python setup.py build_ext --inplace python -c "import breaky, gc; a = breaky.Breaky(); a = 1" ``` ---------- nosy: +AWhetter Added file: https://bugs.python.org/file48642/breaky.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 16:43:30 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Oct 2019 20:43:30 +0000 Subject: [issue38348] Make python -m ast more configurable In-Reply-To: <1570029299.56.0.0303865742584.issue38348@roundup.psfhosted.org> Message-ID: <1570221810.48.0.597675649618.issue38348@roundup.psfhosted.org> Serhiy Storchaka added the comment: Sorry, I do not understand you. typed_ast does not have such features as multiline dump() and CLI. What relation is this have with the --type-comments flag? As for fitting tree into the terminal width, the current indentation is 3 spaces. Changing it to 2 spaces will not save much horisontal space, and 1-space indentation is not particularly readable. I do not want to complicate this tiny feature. If you want more control on the output, you can write a small Python script which calls ast.dump() programmatically. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 16:57:03 2019 From: report at bugs.python.org (Brandt Bucher) Date: Fri, 04 Oct 2019 20:57:03 +0000 Subject: [issue38328] Speed up the creation time of constant list literals. In-Reply-To: <1569862645.36.0.924344090693.issue38328@roundup.psfhosted.org> Message-ID: <1570222623.67.0.716088555942.issue38328@roundup.psfhosted.org> Brandt Bucher added the comment: ...unless you'd prefer that I add them to this PR. But I think it's a better idea to add and review them separately. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 16:58:02 2019 From: report at bugs.python.org (Adam Stewart) Date: Fri, 04 Oct 2019 20:58:02 +0000 Subject: [issue26510] [argparse] Add required argument to add_subparsers In-Reply-To: <1457445361.5.0.530669445668.issue26510@psf.upfronthosting.co.za> Message-ID: <1570222682.36.0.933925936981.issue26510@roundup.psfhosted.org> Change by Adam Stewart : ---------- pull_requests: +16178 pull_request: https://github.com/python/cpython/pull/16588 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 18:03:38 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Oct 2019 22:03:38 +0000 Subject: [issue38328] Speed up the creation time of constant list literals. In-Reply-To: <1569862645.36.0.924344090693.issue38328@roundup.psfhosted.org> Message-ID: <1570226618.94.0.692457078052.issue38328@roundup.psfhosted.org> Serhiy Storchaka added the comment: Okay, but first I want to solve an issue with list overallocation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 18:18:26 2019 From: report at bugs.python.org (Wenzel Jakob) Date: Fri, 04 Oct 2019 22:18:26 +0000 Subject: [issue38266] Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal In-Reply-To: <1569352841.72.0.766028949986.issue38266@roundup.psfhosted.org> Message-ID: <1570227506.19.0.852009018242.issue38266@roundup.psfhosted.org> Wenzel Jakob added the comment: This is great -- thank you for handling this so quickly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 18:43:43 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Oct 2019 22:43:43 +0000 Subject: [issue38373] List overallocation strategy Message-ID: <1570229023.08.0.986734049649.issue38373@roundup.psfhosted.org> New submission from Serhiy Storchaka : Currently list uses the following formula for allocating an array for items (if size != 0): allocated = size + (size >> 3) + (3 if size < 9 else 6) If add items by 1 the growth pattern is: 0, 4, 8, 16, 25, 35, 46, 58, 72, 88, ... I think this strategy can be improved. 1. There is no much sense in allocating the space for 25 items. The standard Python allocator returns addresses aligned to 16 bytes on 64-bit platform. It will allocate a space for 26 items. It is more efficient if the starting address is a multiple of some power of two, and perhaps larger than the pointer size. So it may be better to allocate a multiple of two or four items. Few first sizes are multiple of four, so this is good multiplier. I suggest to use the following expression: allocated = (size + (size >> 3) + 6) & ~3 It adds bits AND, but removes conditional value. 2. It is common enough case if the list is created from a sequence of a known size and do not adds items anymore. Or if it is created by concatenating of few sequences. In such cases the list can overallocate a space which will never be used. For example: >>> import sys >>> sys.getsizeof([1, 2, 3]) 80 >>> sys.getsizeof([*(1, 2, 3)]) 104 List display allocates a space for exactly 3 items. But a list created from a tuple allocates a space for 6 items. Other example. Let extend a list by 10 items at a time. size allocated 10 17 20 28 30 39 40 51 50 51 60 73 70 73 80 96 90 96 100 118 We need to reallocate an array after first four steps. 17 is too small for 20, 28 is too small for 30, 39 is too small for 40. So overallocating does not help, it just spends a space. My idea, that if we adds several items at a time and need to reallocate an array, we check if the overallocated size is enough for adding the same amount of items next time. If it is not enough, we do not overallocate. The final algorithm is: allocated = (size + (size >> 3) + 6) & ~3 if size - old_size > allocated - size: allocated = (size + 3) & ~3 It will save a space if extend a list by many items few times. ---------- components: Interpreter Core messages: 353976 nosy: rhettinger, serhiy.storchaka, tim.peters priority: normal severity: normal status: open title: List overallocation strategy type: resource usage versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 18:55:09 2019 From: report at bugs.python.org (Brandt Bucher) Date: Fri, 04 Oct 2019 22:55:09 +0000 Subject: [issue38373] List overallocation strategy In-Reply-To: <1570229023.08.0.986734049649.issue38373@roundup.psfhosted.org> Message-ID: <1570229709.29.0.852665449103.issue38373@roundup.psfhosted.org> Change by Brandt Bucher : ---------- nosy: +brandtbucher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 18:55:21 2019 From: report at bugs.python.org (Martijn Pieters) Date: Fri, 04 Oct 2019 22:55:21 +0000 Subject: [issue38374] Remove weakref.ReferenceError entry from documentation Message-ID: <1570229721.54.0.2203597595.issue38374@roundup.psfhosted.org> New submission from Martijn Pieters : The weakref documentation still mentions weakref.ReferenceError: https://docs.python.org/3/library/weakref.html#weakref.ReferenceError But this alias for the built-in ReferenceError exception was removed in the 3.0 development cycle (https://github.com/python/cpython/commit/2633c69fae7e413b2b64b01d8c0c901ae649a225#diff-b7975e9ef5a6be5f64e9bb391de03057), the last version where `weakref.ReferenceError` still exists is Python 2.7. Please remove it, it's just confusing now. ---------- assignee: docs at python components: Documentation messages: 353977 nosy: docs at python, mjpieters priority: normal severity: normal status: open title: Remove weakref.ReferenceError entry from documentation versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 19:08:21 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 04 Oct 2019 23:08:21 +0000 Subject: [issue38373] List overallocation strategy In-Reply-To: <1570229023.08.0.986734049649.issue38373@roundup.psfhosted.org> Message-ID: <1570230501.37.0.54198702565.issue38373@roundup.psfhosted.org> Raymond Hettinger added the comment: We should definitely revisit the over-allocation strategy. I last worked on the existing strategy back in 2004. Since then, the weighting of the speed/space trade-off considerations have changed. We need to keep the amortized O(1) append() behavior, but possibly we would benefit from more over-allocation and fewer resizes. Also, we should look at the interaction with the small object allocator to see if its design is causing realloc() to frequently have to move data rather than extending in place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 19:17:52 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Oct 2019 23:17:52 +0000 Subject: [issue38373] List overallocation strategy In-Reply-To: <1570229023.08.0.986734049649.issue38373@roundup.psfhosted.org> Message-ID: <1570231072.71.0.86719155235.issue38373@roundup.psfhosted.org> Serhiy Storchaka added the comment: Here is some data. step is the number of items added at a time, the first row is the size, the second row is the currently allocated size, the third row is the proposed allocated size. for step in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10): sizes0 = range(step, step*31, step) sizes1 = [] sizes2 = [] old_size = allocated1 = allocated2 = 0 for size in sizes0: if size > allocated1: allocated1 = size + (size >> 3) + (3 if size < 9 else 6) sizes1.append(allocated1) if size > allocated2: allocated2 = (size + (size >> 3) + 6) & ~3 if size - old_size > allocated2 - size: allocated2 = (size + 3) & ~3 sizes2.append(allocated2) old_size = size print('\nstep =', step) print(' '.join(f'{x:3}' for x in sizes0)) print(' '.join(f'{x:3}' for x in sizes1)) print(' '.join(f'{x:3}' for x in sizes2)) step = 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 4 4 4 4 8 8 8 8 16 16 16 16 16 16 16 16 25 25 25 25 25 25 25 25 25 35 35 35 35 35 4 4 4 4 8 8 8 8 16 16 16 16 16 16 16 16 24 24 24 24 24 24 24 24 32 32 32 32 32 32 step = 2 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 5 5 9 9 17 17 17 17 26 26 26 26 26 37 37 37 37 37 48 48 48 48 48 48 62 62 62 62 62 62 8 8 8 8 16 16 16 16 24 24 24 24 32 32 32 32 44 44 44 44 44 44 56 56 56 56 56 56 68 68 step = 3 3 6 9 12 15 18 21 24 27 30 33 36 39 42 45 48 51 54 57 60 63 66 69 72 75 78 81 84 87 90 6 6 16 16 16 26 26 26 36 36 36 36 49 49 49 49 63 63 63 63 63 80 80 80 80 80 97 97 97 97 8 8 16 16 16 24 24 24 36 36 36 36 48 48 48 48 60 60 60 60 76 76 76 76 76 92 92 92 92 92 step = 4 4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120 7 12 12 24 24 24 37 37 37 51 51 51 64 64 64 64 82 82 82 82 100 100 100 100 100 123 123 123 123 123 8 8 16 16 28 28 28 40 40 40 52 52 52 68 68 68 68 84 84 84 84 104 104 104 104 104 124 124 124 124 step = 5 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 115 120 125 130 135 140 145 150 8 17 17 28 28 39 39 51 51 51 67 67 67 84 84 84 101 101 101 101 124 124 124 124 146 146 146 146 146 174 8 16 16 28 28 36 36 48 48 60 60 60 76 76 76 96 96 96 96 116 116 116 116 140 140 140 140 140 168 168 step = 6 6 12 18 24 30 36 42 48 54 60 66 72 78 84 90 96 102 108 114 120 126 132 138 144 150 156 162 168 174 180 9 19 19 33 33 46 46 60 60 60 80 80 80 100 100 100 120 120 120 120 147 147 147 147 174 174 174 174 174 208 12 12 24 24 36 36 52 52 64 64 80 80 80 100 100 100 120 120 120 120 144 144 144 144 172 172 172 172 200 200 step = 7 7 14 21 28 35 42 49 56 63 70 77 84 91 98 105 112 119 126 133 140 147 154 161 168 175 182 189 196 203 210 10 21 21 37 37 53 53 69 69 84 84 84 108 108 108 132 132 132 155 155 155 155 187 187 187 187 218 218 218 218 8 16 28 28 44 44 60 60 76 76 92 92 92 116 116 116 136 136 136 160 160 160 184 184 184 184 216 216 216 216 step = 8 8 16 24 32 40 48 56 64 72 80 88 96 104 112 120 128 136 144 152 160 168 176 184 192 200 208 216 224 232 240 12 24 24 42 42 60 60 78 78 96 96 96 123 123 123 150 150 150 177 177 177 177 213 213 213 213 249 249 249 249 8 24 24 40 40 60 60 76 76 96 96 96 120 120 120 148 148 148 176 176 176 176 212 212 212 212 248 248 248 248 step = 9 9 18 27 36 45 54 63 72 81 90 99 108 117 126 135 144 153 162 171 180 189 198 207 216 225 234 243 252 261 270 16 26 36 36 56 56 76 76 97 97 117 117 117 147 147 147 178 178 178 208 208 208 208 249 249 249 249 289 289 289 12 20 36 36 56 56 76 76 96 96 116 116 136 136 136 168 168 168 196 196 196 228 228 228 228 268 268 268 268 308 step = 10 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 17 28 39 51 51 73 73 96 96 118 118 141 141 141 174 174 174 208 208 208 242 242 242 242 287 287 287 287 332 332 12 20 32 40 60 60 84 84 104 104 128 128 152 152 152 184 184 184 216 216 216 252 252 252 252 296 296 296 296 340 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 19:43:22 2019 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 04 Oct 2019 23:43:22 +0000 Subject: [issue38368] Crash when subclassing ctypes.Union In-Reply-To: <1570178161.94.0.1951756088.issue38368@roundup.psfhosted.org> Message-ID: <1570232602.86.0.578042023447.issue38368@roundup.psfhosted.org> Change by Vinay Sajip : ---------- keywords: +patch pull_requests: +16179 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/16589 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 20:00:27 2019 From: report at bugs.python.org (Ashley Whetter) Date: Sat, 05 Oct 2019 00:00:27 +0000 Subject: [issue33714] module can set an exception in tp_clear In-Reply-To: <1527769305.39.0.682650639539.issue33714@psf.upfronthosting.co.za> Message-ID: <1570233627.28.0.854774362137.issue33714@roundup.psfhosted.org> Ashley Whetter added the comment: I've just realised that this issue was specific to tp_clear on a module and not on objects. tp_clear on modules has already been fixed in https://bugs.python.org/issue33622. I think this is closable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 20:29:40 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 05 Oct 2019 00:29:40 +0000 Subject: [issue38341] Add SMTPNotSupportedError in the exports of smtplib In-Reply-To: <1569963046.98.0.477841717728.issue38341@roundup.psfhosted.org> Message-ID: <1570235380.04.0.156078552872.issue38341@roundup.psfhosted.org> Abhilash Raj added the comment: It seems that SMTPNotSupportedError is publicly documented, it should be a part of __all__. ---------- nosy: +maxking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 20:31:02 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 05 Oct 2019 00:31:02 +0000 Subject: [issue38341] Add SMTPNotSupportedError in the exports of smtplib In-Reply-To: <1569963046.98.0.477841717728.issue38341@roundup.psfhosted.org> Message-ID: <1570235462.01.0.361995511597.issue38341@roundup.psfhosted.org> Abhilash Raj added the comment: New changeset 3faf826e5879536d2272f1a51c58965a16827f81 by Abhilash Raj (nde) in branch 'master': bpo-38341: Add SMTPNotSupportedError in the exports of smtplib (#16525) https://github.com/python/cpython/commit/3faf826e5879536d2272f1a51c58965a16827f81 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 20:31:19 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 05 Oct 2019 00:31:19 +0000 Subject: [issue38341] Add SMTPNotSupportedError in the exports of smtplib In-Reply-To: <1569963046.98.0.477841717728.issue38341@roundup.psfhosted.org> Message-ID: <1570235479.01.0.690333754313.issue38341@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16180 pull_request: https://github.com/python/cpython/pull/16590 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 21:18:00 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 05 Oct 2019 01:18:00 +0000 Subject: [issue38232] empty local-part in addr_spec displayed incorrectly In-Reply-To: <1568990050.48.0.808924350002.issue38232@roundup.psfhosted.org> Message-ID: <1570238280.35.0.656906236806.issue38232@roundup.psfhosted.org> Abhilash Raj added the comment: It is actually parsed correctly and serialized back when you try to convert it to a string representation: from email.parser import BytesFeedParser import email.policy def main(): eml_string = 'From: Nobody <""@example.org>' parser = BytesFeedParser(policy = email.policy.default) parser.feed(eml_string.encode()) msg = parser.close() print(msg.get('From').addresses[0].addr_spec) print(repr(msg.get('From')._parse_tree)) print(msg.as_string()) Running this gives me: @example.org AddressList([Address([Mailbox([NameAddr([DisplayName([Atom([ValueTerminal('Nobody'), CFWSList([WhiteSpaceTerminal(' ')])])]), AngleAddr([ValueTerminal('<'), AddrSpec([LocalPart([QuotedString([BareQuotedString([ValueTerminal('')])])]), ValueTerminal('@'), Domain([DotAtom([DotAtomText([ValueTerminal('example'), ValueTerminal('.'), ValueTerminal('org')])])])]), ValueTerminal('>')])])])])]) From: Nobody <""@example.org> Notice the : AddrSpec([LocalPart([QuotedString([BareQuotedString([ValueTerminal('')])])]) print() converts the addr-spec into a string, which omits the quotes. This is true for any non-none string too: hello at example.org AddressList([Address([Mailbox([NameAddr([DisplayName([Atom([ValueTerminal('Nobody'), CFWSList([WhiteSpaceTerminal(' ')])])]), AngleAddr([ValueTerminal('<'), AddrSpec([LocalPart([QuotedString([BareQuotedString([ValueTerminal('hello')])])]), ValueTerminal('@'), Domain([DotAtom([DotAtomText([ValueTerminal('example'), ValueTerminal('.'), ValueTerminal('org')])])])]), ValueTerminal('>')])])])])]) From: Nobody <"hello"@example.org> If you prefer the string representation of the header's parsed value, you can try: print(msg.get('From').fold(policy=email.policy.default)) Which prints: From: Nobody <""@example.org> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 22:07:41 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Sat, 05 Oct 2019 02:07:41 +0000 Subject: [issue38167] O_DIRECT read fails with 4K mmap buffer In-Reply-To: <1568417320.49.0.42295605579.issue38167@roundup.psfhosted.org> Message-ID: <1570241261.29.0.0638980409879.issue38167@roundup.psfhosted.org> Josh Rosenberg added the comment: > I do not believe an unbuffered file uses O_DIRECT. This is why I use os.open(fpath, os.O_DIRECT). Problem is you follow it with: fo = os.fdopen(fd, 'rb+') which introduces a Python level of buffering around the kernel unbuffered file descriptor. You'd need to pass buffering=0 to make os.fdopen avoid returning a buffered file object, making it: fo = os.fdopen(fd, 'rb+', buffering=0) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 22:50:54 2019 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 05 Oct 2019 02:50:54 +0000 Subject: [issue38308] Add optional weighting to statistics.harmonic_mean() In-Reply-To: <1569695295.83.0.838130885601.issue38308@roundup.psfhosted.org> Message-ID: <1570243854.77.0.571190393326.issue38308@roundup.psfhosted.org> Dong-hee Na added the comment: @rhettinger If you are okay, Can I process with this issue with your guide? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 23:24:43 2019 From: report at bugs.python.org (Tim Peters) Date: Sat, 05 Oct 2019 03:24:43 +0000 Subject: [issue38373] List overallocation strategy In-Reply-To: <1570229023.08.0.986734049649.issue38373@roundup.psfhosted.org> Message-ID: <1570245883.54.0.886767259366.issue38373@roundup.psfhosted.org> Tim Peters added the comment: WRT pymalloc, it will always copy on growing resize in this context. A pymalloc pool is dedicated to blocks of the same size class, so if the size class increases (they're 16 bytes apart now), the data must be copied to a different pool (dedicated to blocks of the larger size class). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 23:43:23 2019 From: report at bugs.python.org (Samuel Marks) Date: Sat, 05 Oct 2019 03:43:23 +0000 Subject: [issue22240] argparse support for "python -m module" in help In-Reply-To: <1408564751.42.0.897410433728.issue22240@psf.upfronthosting.co.za> Message-ID: <1570247003.46.0.220957585643.issue22240@roundup.psfhosted.org> Samuel Marks added the comment: Until this is accepted, I've modified my codebase: ``` from argparse import ArgumentParser ArgumentParser( prog=None if globals().get('__spec__') is None else 'python -m {}'.format(__spec__.name.partition('.')[0]) ) ``` ---------- nosy: +samuelmarks _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 00:01:50 2019 From: report at bugs.python.org (Paul) Date: Sat, 05 Oct 2019 04:01:50 +0000 Subject: [issue38167] O_DIRECT read fails with 4K mmap buffer In-Reply-To: <1568417320.49.0.42295605579.issue38167@roundup.psfhosted.org> Message-ID: <1570248110.82.0.448551480219.issue38167@roundup.psfhosted.org> Paul added the comment: > Problem is you follow it with: > > fo = os.fdopen(fd, 'rb+') > which introduces a Python level of buffering around the kernel unbuffered file descriptor. You'd need to pass buffering=0 to make os.fdopen avoid returning a buffered file object, making it: > fo = os.fdopen(fd, 'rb+', buffering=0) You are absolutely right! This fixed the issue. So... is this not a bug, then? Should I discard my patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 00:05:03 2019 From: report at bugs.python.org (Samuel Marks) Date: Sat, 05 Oct 2019 04:05:03 +0000 Subject: [issue22240] argparse support for "python -m module" in help In-Reply-To: <1408564751.42.0.897410433728.issue22240@psf.upfronthosting.co.za> Message-ID: <1570248303.76.0.527936524934.issue22240@roundup.psfhosted.org> Samuel Marks added the comment: See https://bugs.python.org/msg353987 for manual test ---------- Added file: https://bugs.python.org/file48643/prog-module-name-handler.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 00:43:16 2019 From: report at bugs.python.org (Batuhan) Date: Sat, 05 Oct 2019 04:43:16 +0000 Subject: [issue38348] Make python -m ast more configurable In-Reply-To: <1570029299.56.0.0303865742584.issue38348@roundup.psfhosted.org> Message-ID: <1570250596.25.0.160159494372.issue38348@roundup.psfhosted.org> Batuhan added the comment: > I do not want to complicate this tiny feature. Making more configurable isn't making it complicated. It is just improving users control over it by indentation and parsing option. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 01:14:21 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 05 Oct 2019 05:14:21 +0000 Subject: [issue38373] List overallocation strategy In-Reply-To: <1570229023.08.0.986734049649.issue38373@roundup.psfhosted.org> Message-ID: <1570252461.76.0.933268757289.issue38373@roundup.psfhosted.org> Raymond Hettinger added the comment: > WRT pymalloc, it will always copy on growing resize in this context That sounds like an excellent reason NOT to use pymalloc ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 01:16:48 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 05 Oct 2019 05:16:48 +0000 Subject: [issue38308] Add optional weighting to statistics.harmonic_mean() In-Reply-To: <1569695295.83.0.838130885601.issue38308@roundup.psfhosted.org> Message-ID: <1570252608.82.0.48222765669.issue38308@roundup.psfhosted.org> Raymond Hettinger added the comment: > Can I process with this issue with your guide? Thank you, but this is one I would like to do myself. I've already done work on it and would like to wrap it up (also, it's more complicated than it seems because the supporting functions are a bit awkward to use in this context). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 01:32:19 2019 From: report at bugs.python.org (Tim Peters) Date: Sat, 05 Oct 2019 05:32:19 +0000 Subject: [issue38373] List overallocation strategy In-Reply-To: <1570229023.08.0.986734049649.issue38373@roundup.psfhosted.org> Message-ID: <1570253539.93.0.621590103007.issue38373@roundup.psfhosted.org> Tim Peters added the comment: Don't know. Define "the problem" ;-) As soon as the allocation is over 512 bytes (64 pointers), it's punted to the system malloc family. Before then, do a relative handful of relatively small memcpy's really matter? pymalloc is faster than system mallocs, and probably uses space more efficiently. There are no pure wins here :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 01:52:51 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Oct 2019 05:52:51 +0000 Subject: [issue38316] docs: Code object's "co_stacksize" field is described with mistake In-Reply-To: <1569789294.48.0.284805020981.issue38316@roundup.psfhosted.org> Message-ID: <1570254771.04.0.651373431069.issue38316@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 02:04:24 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Oct 2019 06:04:24 +0000 Subject: [issue38324] [Windows] test_locale and test__locale failures on Windows In-Reply-To: <1569849277.36.0.00648751871696.issue38324@roundup.psfhosted.org> Message-ID: <1570255464.42.0.0896609467688.issue38324@roundup.psfhosted.org> Terry J. Reedy added the comment: I started a report on failures on my machine a few days ago, but never finished editing. I am pasting in what I wrote so far. The same 4 tests fail today with a rebuild 12 hours ago. --- I ran the test suite on my 64-bit Win10 machine with fresh debug 32 builds in freshly updated repository. 3.9 - tests failed for _locale, locale, and winconsoleio and import 3.8 - tests failed for _locale, locale, and winconsoleio 3.7 - tests failed for _locale, locale, and winconsoleio ===================================================================================== f:\dev\3x>python -m test -j0 -ugui Running Debug|Win32 interpreter... == CPython 3.9.0a0 (heads/master:c5a7e0ce19, Sep 28 2019, 13:58:57) [MSC v.1900 32 bit (Intel)] == Windows-10-10.0.18362-SP0 little-endian == cwd: F:\dev\3x\build\test_python_12736 == CPU count: 12 == encodings: locale=cp1252, FS=utf-8 Run tests in parallel using 14 child processes ____________________________________________________________________________________ Failure 1. test test__locale failed -- Traceback (most recent call last): File "F:\dev\3x\lib\test\test__locale.py", line 133, in test_lc_numeric_localeconv if self.numeric_tester('localeconv', formatting[lc], lc, loc): File "F:\dev\3x\lib\test\test__locale.py", line 97, in numeric_tester self.assertEqual(calc_value, known_value, AssertionError: ',' != '\u066b' - , + \u066b : , != \u066b (localeconv for decimal_point; set to ps_AF, using ps_AF) ___________________________________________________________________________ Failure 2: test_importlib failed -- running: test_concurrent_futures (1 min 6 sec) Failed to import test module: test.test_importlib.import_.test_fromlist Traceback (most recent call last): File "F:\dev\3x\lib\unittest\loader.py", line 436, in _find_test_path module = self._get_module_from_name(name) File "F:\dev\3x\lib\unittest\loader.py", line 377, in _get_module_from_name __import__(name) ValueError: source code string cannot contain null bytes test test_importlib crashed -- Traceback (most recent call last): File "F:\dev\3x\lib\test\libregrtest\runtest.py", line 270, in _runtest_inner refleak = _runtest_inner2(ns, test_name) File "F:\dev\3x\lib\test\libregrtest\runtest.py", line 234, in _runtest_inner2 test_runner() File "F:\dev\3x\lib\test\libregrtest\runtest.py", line 208, in _test_module raise Exception("errors while loading tests") Exception: errors while loading tests _____________________________________________________________________________________ Failure 3. test test_locale failed -- Traceback (most recent call last): File "F:\dev\3x\lib\test\test_locale.py", line 567, in test_getsetlocale_issue1813 locale.setlocale(locale.LC_CTYPE, loc) File "F:\dev\3x\lib\locale.py", line 608, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting _____________________________________________________________________________________ Failure 4. test_winconsoleio ERROR: test_input (test.test_winconsoleio.WindowsConsoleIOTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "F:\dev\3x\lib\test\test_winconsoleio.py", line 148, in test_input self.assertStdinRoundTrip('\U00100000\U0010ffff\U0010fffd') File "F:\dev\3x\lib\test\test_winconsoleio.py", line 135, in assertStdinRoundTrip actual = input() OSError: [WinError 87] The parameter is incorrect ====================================================================== ERROR: test_partial_reads (test.test_winconsoleio.WindowsConsoleIOTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "F:\dev\3x\lib\test\test_winconsoleio.py", line 161, in test_partial_reads b = stdin.read(read_count) OSError: [WinError 87] The parameter is incorrect ====================================================================== ERROR: test_partial_surrogate_reads (test.test_winconsoleio.WindowsConsoleIOTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "F:\dev\3x\lib\test\test_winconsoleio.py", line 178, in test_partial_surrogate_reads b = stdin.read(read_count) OSError: [WinError 87] The parameter is incorrect ______________________________________________________________________________________ 5. Non-failure tracebacks displayed passing test_concurrent_futures Cancelling an overlapped future failed future: <_OverlappedFuture pending overlapped= cb=[BaseProactorEventLoop._loop_self_reading()]> Traceback (most recent call last): File "F:\dev\3x\lib\asyncio\windows_events.py", line 66, in _cancel_overlapped self._ov.cancel() OSError: [WinError 6] The handle is invalid Cancelling an overlapped future failed future: <_OverlappedFuture pending overlapped= cb=[BaseProactorEventLoop._loop_self_reading()]> Traceback (most recent call last): File "F:\dev\3x\lib\asyncio\windows_events.py", line 66, in _cancel_overlapped self._ov.cancel() OSError: [WinError 6] The handle is invalid Error on reading from the event loop self pipe loop: Traceback (most recent call last): File "F:\dev\3x\lib\asyncio\windows_events.py", line 453, in finish_recv return ov.getresult() OSError: [WinError 995] The I/O operation has been aborted because of either a thread exit or an application request During handling of the above exception, another exception occurred: Traceback (most recent call last): File "F:\dev\3x\lib\asyncio\proactor_events.py", line 768, in _loop_self_reading f.result() # may raise File "F:\dev\3x\lib\asyncio\windows_events.py", line 808, in _poll value = callback(transferred, key, ov) File "F:\dev\3x\lib\asyncio\windows_events.py", line 457, in finish_recv raise ConnectionResetError(*exc.args) ConnectionResetError: [WinError 995] The I/O operation has been aborted because of either a thread exit or an application request F:\dev\3x\lib\asyncio\base_events.py:673: ResourceWarning: unclosed event loop _warn(f"unclosed event loop {self!r}", ResourceWarning, source=self) ResourceWarning: Enable tracemalloc to get the object allocation traceback ========================================================================================= 3.8 CPython 3.8.0b4+ (heads/3.8:36c6fa9680, Sep 28 2019, 14:00:28) [MSC v.1900 32 bit (Intel)] test_locale, locale, and winconsoleio failed as before, test_import ok. 3.7 CPython 3.7.4+ (heads/3.7:80dd66ac27, Sep 28 2019, 14:01:04) test_locale, locale, and winconsoleio failed as before test_compileall, tools also failed temporarily due to local issues with ntpath.*.pyc and scripts/reindent.py, which I fixed. ======================================================================================== Looking at some of the other failures. 3. def test_getsetlocale_issue1813(self): # Issue #1813: setting and getting the locale under a Turkish locale https://bugs.python.org/issue1813 (closed 2011, 2012) >>> locale.setlocale(locale.LC_CTYPE, 'tr_TR') 'tr_TR' >>> loc = locale.getlocale(locale.LC_CTYPE) >>> loc ('tr_TR', 'ISO8859-9') >>> locale.setlocale(locale.LC_CTYPE, loc) Traceback (most recent call last): File "", line 1, in locale.setlocale(locale.LC_CTYPE, loc) File "C:\Programs\Python38\lib\locale.py", line 608, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting Some change made this fail again, after being fixed on my local machine, even if it continues to work on buildbots. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 02:23:39 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Oct 2019 06:23:39 +0000 Subject: [issue38331] Exec not recognizing global variables inside function In-Reply-To: <1569875978.41.0.850227388561.issue38331@roundup.psfhosted.org> Message-ID: <1570256619.96.0.83896826246.issue38331@roundup.psfhosted.org> Terry J. Reedy added the comment: Ronald is correct, and for the reason given. Python functions are lexically scoped, not dynamically scoped, and you are expecting the latter. The exec global and local namespaces are used to resolve identifier in the code you pass. Your first example passes 'func' and that is resolved to the *pre-compiled* function object which uses is lexicographical globals. It does not contain the func-local 'var'. You second example contains a def statement to be compiled in the exec namespaces. Please post to python-list if you want further discussion. ---------- nosy: +terry.reedy resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 02:44:43 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Oct 2019 06:44:43 +0000 Subject: [issue38345] Add end lines to pyclbr objects Message-ID: <1570257883.59.0.504869825391.issue38345@roundup.psfhosted.org> New submission from Terry J. Reedy : I am closing this for now because there is no information upon which to proceed, and because you closed your PR (without explanation). The nested dicts returned by pyclbr already constitute a tree of nesting relationships between the functions and classes defined in a module. IDLE, for instance, uses this for its module browser. (The obsolete name 'pyclbr' comes from when it only returned, I believe, a dict of top-level classes.) ---------- nosy: +terry.reedy resolution: -> postponed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 03:20:01 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Oct 2019 07:20:01 +0000 Subject: [issue38349] Email example using imaginary library installation error. In-Reply-To: <1570032603.68.0.429442517445.issue38349@roundup.psfhosted.org> Message-ID: <1570260001.52.0.952140751848.issue38349@roundup.psfhosted.org> Terry J. Reedy added the comment: The rest of the overly long title was "The install shows that it only supports python 2.x but is listed under python 3.6+ docs." The lines in question are from the 2nd to last example. # An imaginary module that would make this work and be safe. from imaginary import magic_html_parser The comment plus the names 'imaginary' and 'magic_html_parser' should make it pretty clear that 'imaginary' is meant to be an imaginary, hypothetical module with an imaginary, hypothetical method, not an actual module named 'imaginary' with an actual 'magic_html_parser' method. jackotonye, do you have a concrete suggestion? I am tempted to close this, but will wait for suggestion and let the email people see this. Also, when responding by email, please remove the quoted previous post and it is redundant on the web page. ---------- nosy: +barry, maxking, r.david.murray, terry.reedy title: Email example using imaginary library installation error. The install shows that it only supports python 2.x but is listed under python 3.6+ docs. -> Email example using imaginary library installation error. versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 04:09:38 2019 From: report at bugs.python.org (SilentGhost) Date: Sat, 05 Oct 2019 08:09:38 +0000 Subject: [issue38349] Email example using imaginary library installation error. In-Reply-To: <1570032603.68.0.429442517445.issue38349@roundup.psfhosted.org> Message-ID: <1570262978.27.0.110210532946.issue38349@roundup.psfhosted.org> SilentGhost added the comment: One fairly naive solution would be to define a magic_html_parser directly in the example and move explanatory comment there. In order not to break the code it could return an empty string. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 04:22:34 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 Oct 2019 08:22:34 +0000 Subject: [issue33714] module can set an exception in tp_clear In-Reply-To: <1527769305.39.0.682650639539.issue33714@psf.upfronthosting.co.za> Message-ID: <1570263754.9.0.95003805912.issue33714@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +16181 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16592 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 04:58:13 2019 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 05 Oct 2019 08:58:13 +0000 Subject: [issue38308] Add optional weighting to statistics.harmonic_mean() In-Reply-To: <1569695295.83.0.838130885601.issue38308@roundup.psfhosted.org> Message-ID: <1570265893.91.0.352083511089.issue38308@roundup.psfhosted.org> Dong-hee Na added the comment: Oh.. Thank you for letting me know ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 05:57:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 05 Oct 2019 09:57:50 +0000 Subject: [issue38266] Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal In-Reply-To: <1569352841.72.0.766028949986.issue38266@roundup.psfhosted.org> Message-ID: <1570269470.85.0.36322125948.issue38266@roundup.psfhosted.org> STINNER Victor added the comment: > This is great -- thank you for handling this so quickly. Thanks for testing the master branch and reporting regressions quickly as well ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 06:43:35 2019 From: report at bugs.python.org (hai shi) Date: Sat, 05 Oct 2019 10:43:35 +0000 Subject: [issue14364] Argparse incorrectly handles '--' as argument to option In-Reply-To: <1332080953.55.0.495639573781.issue14364@psf.upfronthosting.co.za> Message-ID: <1570272215.5.0.458255108897.issue14364@roundup.psfhosted.org> hai shi added the comment: Hi, Jonas. Thanks for your report. Let us wait core team's discuss;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 07:38:34 2019 From: report at bugs.python.org (Mario Corchero) Date: Sat, 05 Oct 2019 11:38:34 +0000 Subject: [issue38346] Wrong behavior when using `assert_called_with` with mutable object In-Reply-To: <1570006369.69.0.450054962888.issue38346@roundup.psfhosted.org> Message-ID: <1570275514.92.0.746149907259.issue38346@roundup.psfhosted.org> Mario Corchero added the comment: Thanks! We can look at adding a copying mock if we see people needing it, but yeah, adding copy by default would be quite complex if we don't want to break existing users. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 07:56:36 2019 From: report at bugs.python.org (Massimo) Date: Sat, 05 Oct 2019 11:56:36 +0000 Subject: [issue38375] Enum lookup fails for callable values Message-ID: <1570276596.73.0.237929240562.issue38375@roundup.psfhosted.org> New submission from Massimo : ``` from enum import Enum class T(Enum): TEST = 1 print(T["TEST"]) class S(Enum): TEST = lambda a: a print(S["TEST"]) ``` fails with `KeyError: 'TEST'` on the last line. ---------- components: Interpreter Core messages: 354003 nosy: typish priority: normal severity: normal status: open title: Enum lookup fails for callable values type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 08:01:00 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 05 Oct 2019 12:01:00 +0000 Subject: [issue38375] Enum lookup fails for callable values In-Reply-To: <1570276596.73.0.237929240562.issue38375@roundup.psfhosted.org> Message-ID: <1570276860.16.0.29007046906.issue38375@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 08:16:13 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 Oct 2019 12:16:13 +0000 Subject: [issue38335] simplify overlaps function in ipaddress.py In-Reply-To: <1569930223.76.0.865877463422.issue38335@roundup.psfhosted.org> Message-ID: <1570277773.98.0.0249119503699.issue38335@roundup.psfhosted.org> Serhiy Storchaka added the comment: What is the benefit of your version? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 08:25:55 2019 From: report at bugs.python.org (Sanjay) Date: Sat, 05 Oct 2019 12:25:55 +0000 Subject: [issue38335] simplify overlaps function in ipaddress.py In-Reply-To: <1569930223.76.0.865877463422.issue38335@roundup.psfhosted.org> Message-ID: <1570278355.21.0.518525591835.issue38335@roundup.psfhosted.org> Sanjay added the comment: the version in the patch is less code a or b or c or d becomes a or d the version in PR is using the subnet_of, supernet_of function because overlap means either a is subnet_of or supernet_of b. So was trying to consolidate the implementation of overlap from 2 to 1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 08:43:51 2019 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 05 Oct 2019 12:43:51 +0000 Subject: [issue38376] ./configure --with-assertions generates a broken build Message-ID: <1570279431.23.0.578903771856.issue38376@roundup.psfhosted.org> New submission from Vinay Sajip : Following ./configure --prefix=$HOME/.local --with-assertions and then running make leads to an error: $ make gcc -pthread -c -Wno-unused-result -Wsign-compare -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -I./Include/internal -I. -I./Include -DPy_BUILD_CORE -o Objects/codeobject.o Objects/codeobject.c gcc -pthread -c -Wno-unused-result -Wsign-compare -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -I./Include/internal -I. -I./Include -DPy_BUILD_CORE -o Objects/complexobject.o Objects/complexobject.c gcc -pthread -c -Wno-unused-result -Wsign-compare -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -I./Include/internal -I. -I./Include -DPy_BUILD_CORE -o Objects/descrobject.o Objects/descrobject.c In file included from ./Include/object.h:746:0, from ./Include/pytime.h:6, from ./Include/Python.h:85, from Objects/descrobject.c:3: ./Include/object.h:111:38: error: expected ?)? before ?*? token #define _PyObject_CAST(op) ((PyObject*)(op)) ^ ./Include/cpython/object.h:337:36: note: in definition of macro ?PyType_HasFeature? #define PyType_HasFeature(t,f) (((t)->tp_flags & (f)) != 0) ^ ./Include/unicodeobject.h:115:18: note: in expansion of macro ?PyType_FastSubclass? PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_UNICODE_SUBCLASS) ^ ./Include/object.h:122:34: note: in expansion of macro ?_PyObject_CAST? #define Py_TYPE(ob) (_PyObject_CAST(ob)->ob_type) ^ ./Include/unicodeobject.h:115:38: note: in expansion of macro ?Py_TYPE? PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_UNICODE_SUBCLASS) ^ ./Include/unicodeobject.h:1042:56: note: in expansion of macro ?PyUnicode_Check? #define _PyUnicode_CheckConsistency(op, check_content) PyUnicode_Check(op) ^ ./Include/internal/pycore_object.h:14:17: note: in expansion of macro ?_PyUnicode_CheckConsistency? PyAPI_FUNC(int) _PyUnicode_CheckConsistency(PyObject *op, int check_content); ^ ./Include/object.h:111:40: error: expected ?)? before ?(? token #define _PyObject_CAST(op) ((PyObject*)(op)) ^ ./Include/cpython/object.h:337:36: note: in definition of macro ?PyType_HasFeature? #define PyType_HasFeature(t,f) (((t)->tp_flags & (f)) != 0) ^ ./Include/unicodeobject.h:115:18: note: in expansion of macro ?PyType_FastSubclass? PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_UNICODE_SUBCLASS) ^ ./Include/object.h:122:34: note: in expansion of macro ?_PyObject_CAST? #define Py_TYPE(ob) (_PyObject_CAST(ob)->ob_type) ^ ./Include/unicodeobject.h:115:38: note: in expansion of macro ?Py_TYPE? PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_UNICODE_SUBCLASS) ^ ./Include/unicodeobject.h:1042:56: note: in expansion of macro ?PyUnicode_Check? #define _PyUnicode_CheckConsistency(op, check_content) PyUnicode_Check(op) ^ ./Include/internal/pycore_object.h:14:17: note: in expansion of macro ?_PyUnicode_CheckConsistency? PyAPI_FUNC(int) _PyUnicode_CheckConsistency(PyObject *op, int check_content); ^ ./Include/object.h:122:52: error: expected ?)? before ?->? token #define Py_TYPE(ob) (_PyObject_CAST(ob)->ob_type) ^ ./Include/cpython/object.h:337:36: note: in definition of macro ?PyType_HasFeature? #define PyType_HasFeature(t,f) (((t)->tp_flags & (f)) != 0) ^ ./Include/unicodeobject.h:115:18: note: in expansion of macro ?PyType_FastSubclass? PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_UNICODE_SUBCLASS) ^ ./Include/unicodeobject.h:115:38: note: in expansion of macro ?Py_TYPE? PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_UNICODE_SUBCLASS) ^ ./Include/unicodeobject.h:1042:56: note: in expansion of macro ?PyUnicode_Check? #define _PyUnicode_CheckConsistency(op, check_content) PyUnicode_Check(op) ^ ./Include/internal/pycore_object.h:14:17: note: in expansion of macro ?_PyUnicode_CheckConsistency? PyAPI_FUNC(int) _PyUnicode_CheckConsistency(PyObject *op, int check_content); ^ ./Include/cpython/object.h:337:38: error: expected ?)? before ?->? token #define PyType_HasFeature(t,f) (((t)->tp_flags & (f)) != 0) ^ ./Include/object.h:351:35: note: in expansion of macro ?PyType_HasFeature? #define PyType_FastSubclass(t,f) PyType_HasFeature(t,f) ^ ./Include/unicodeobject.h:115:18: note: in expansion of macro ?PyType_FastSubclass? PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_UNICODE_SUBCLASS) ^ ./Include/unicodeobject.h:1042:56: note: in expansion of macro ?PyUnicode_Check? #define _PyUnicode_CheckConsistency(op, check_content) PyUnicode_Check(op) ^ ./Include/internal/pycore_object.h:14:17: note: in expansion of macro ?_PyUnicode_CheckConsistency? PyAPI_FUNC(int) _PyUnicode_CheckConsistency(PyObject *op, int check_content); ^ ./Include/cpython/object.h:337:56: error: expected ?)? before ?!=? token #define PyType_HasFeature(t,f) (((t)->tp_flags & (f)) != 0) ^ ./Include/object.h:351:35: note: in expansion of macro ?PyType_HasFeature? #define PyType_FastSubclass(t,f) PyType_HasFeature(t,f) ^ ./Include/unicodeobject.h:115:18: note: in expansion of macro ?PyType_FastSubclass? PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_UNICODE_SUBCLASS) ^ ./Include/unicodeobject.h:1042:56: note: in expansion of macro ?PyUnicode_Check? #define _PyUnicode_CheckConsistency(op, check_content) PyUnicode_Check(op) ^ ./Include/internal/pycore_object.h:14:17: note: in expansion of macro ?_PyUnicode_CheckConsistency? PyAPI_FUNC(int) _PyUnicode_CheckConsistency(PyObject *op, int check_content); ^ Makefile:1711: recipe for target 'Objects/descrobject.o' failed make: *** [Objects/descrobject.o] Error 1 BTW, this happens even if Py_DEBUG=true is defined. System where the failure occurred: Ubuntu 16.04, 64-bit. ---------- components: Build messages: 354006 nosy: vinay.sajip priority: normal severity: normal status: open title: ./configure --with-assertions generates a broken build type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 08:47:02 2019 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 05 Oct 2019 12:47:02 +0000 Subject: [issue38376] ./configure --with-assertions generates a broken build In-Reply-To: <1570279431.23.0.578903771856.issue38376@roundup.psfhosted.org> Message-ID: <1570279622.41.0.326754793973.issue38376@roundup.psfhosted.org> Vinay Sajip added the comment: BTW it also seems to fail when just Py_DEBUG is specified (no --with-assertions). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 09:36:58 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 05 Oct 2019 13:36:58 +0000 Subject: [issue38375] Enum lookup fails for callable values In-Reply-To: <1570276596.73.0.237929240562.issue38375@roundup.psfhosted.org> Message-ID: <1570282618.83.0.839171762738.issue38375@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: https://docs.python.org/3/library/enum.html#allowed-members-and-attributes-of-enumerations > The rules for what is allowed are as follows: names that start and end with a single underscore are reserved by enum and cannot be used; all other attributes defined within an enumeration will become members of this enumeration, with the exception of special methods (__str__(), __add__(), etc.), descriptors (methods are also descriptors), and variable names listed in _ignore_. Looking at the code _member_names has the list of member names internally that stores the members. I guess with a callable assigned to TEST it becomes a method and is not added as a member as per the above doc to skip descriptor as method. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 09:40:25 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 05 Oct 2019 13:40:25 +0000 Subject: [issue38375] Enum lookup fails for callable values In-Reply-To: <1570276596.73.0.237929240562.issue38375@roundup.psfhosted.org> Message-ID: <1570282825.62.0.0663685129771.issue38375@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Some relevant threads * https://stackoverflow.com/questions/40338652/how-to-define-enum-values-that-are-functions * https://mail.python.org/pipermail/python-ideas/2017-April/045428.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 09:47:18 2019 From: report at bugs.python.org (Matej Cepl) Date: Sat, 05 Oct 2019 13:47:18 +0000 Subject: [issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm Message-ID: <1570283238.14.0.402660591178.issue38377@roundup.psfhosted.org> New submission from Matej Cepl : ====================================================================== ERROR: test_get_event_loop_new_process (test.test_asyncio.test_events.TestCGetEventLoop) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/test/test_asyncio/test_events.py", line 2647, in test_get_event_loop_new_process self.loop.run_until_complete(main()), File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/asyncio/base_events.py", line 608, in run_until_complete return future.result() File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/test/test_asyncio/test_events.py", line 2640, in main pool = concurrent.futures.ProcessPoolExecutor() File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/concurrent/futures/process.py", line 555, in __init__ self._call_queue = _SafeQueue( File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/concurrent/futures/process.py", line 165, in __init__ super().__init__(max_size, ctx=ctx) File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/multiprocessing/queues.py", line 42, in __init__ self._rlock = ctx.Lock() File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/multiprocessing/context.py", line 68, in Lock return Lock(ctx=self.get_context()) File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/multiprocessing/synchronize.py", line 162, in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/multiprocessing/synchronize.py", line 57, in __init__ sl = self._semlock = _multiprocessing.SemLock( OSError: [Errno 38] Function not implemented ====================================================================== ERROR: test_get_event_loop_new_process (test.test_asyncio.test_events.TestPyGetEventLoop) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/test/test_asyncio/test_events.py", line 2647, in test_get_event_loop_new_process self.loop.run_until_complete(main()), File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/asyncio/base_events.py", line 608, in run_until_complete return future.result() File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/test/test_asyncio/test_events.py", line 2640, in main pool = concurrent.futures.ProcessPoolExecutor() File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/concurrent/futures/process.py", line 555, in __init__ self._call_queue = _SafeQueue( File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/concurrent/futures/process.py", line 165, in __init__ super().__init__(max_size, ctx=ctx) File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/multiprocessing/queues.py", line 42, in __init__ self._rlock = ctx.Lock() File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/multiprocessing/context.py", line 68, in Lock return Lock(ctx=self.get_context()) File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/multiprocessing/synchronize.py", line 162, in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/multiprocessing/synchronize.py", line 57, in __init__ sl = self._semlock = _multiprocessing.SemLock( OSError: [Errno 38] Function not implemented ---------------------------------------------------------------------- The problem is that in the OpenBuildService (the build system of SUSE distributions) /dev/shm is limited to: abuild at milic:~/rpmbuild/BUILD/Python-3.8.0rc1> ls -ld /dev/shm drwxr-xr-x 1 root root 0 Oct 5 13:23 /dev/shm abuild at milic:~/rpmbuild/BUILD/Python-3.8.0rc1> Provided PR will skip test if /dev/shm doesn?t exist or it doesn?t sufficient permissions. ---------- components: asyncio messages: 354010 nosy: asvetlov, mcepl, yselivanov priority: normal severity: normal status: open title: test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 09:48:15 2019 From: report at bugs.python.org (Matej Cepl) Date: Sat, 05 Oct 2019 13:48:15 +0000 Subject: [issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm In-Reply-To: <1570283238.14.0.402660591178.issue38377@roundup.psfhosted.org> Message-ID: <1570283295.86.0.335235616498.issue38377@roundup.psfhosted.org> Change by Matej Cepl : ---------- keywords: +patch pull_requests: +16182 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16593 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 10:06:35 2019 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 05 Oct 2019 14:06:35 +0000 Subject: [issue38376] ./configure --with-assertions generates a broken build In-Reply-To: <1570279431.23.0.578903771856.issue38376@roundup.psfhosted.org> Message-ID: <1570284395.77.0.166268323523.issue38376@roundup.psfhosted.org> Vinay Sajip added the comment: Adding Thomas and Victor based on git blame on some of the source lines concerned. ---------- nosy: +twouters, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 11:04:03 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 Oct 2019 15:04:03 +0000 Subject: [issue38378] os.sendfile() has improperly named parameter Message-ID: <1570287843.24.0.0727618245068.issue38378@roundup.psfhosted.org> New submission from Serhiy Storchaka : os.sendfile() has a keyword-or-positional parameter named "in". Since it is a keyword in Python, it is not possible to pass it as a keyword argument. You can only pass it as a positional argument or using a var-keyword argument (unlikely anybody uses the latter). The preceding parameter, "out", also can not be passed by keyword because of this. It is weird, but usually does not cause a problem. You cannot use a keyword argument, period. But it prevents os.sendfile() from converting to Argument Clinic, because Argument Clinic does not allow using Python keywords as parameter names (I already created a patch for conversion, but in needs to solve this issue first). There are two ways to solve this issue. 1. Rename parameter "in" (and maybe "out" for consistency). "out_fd" and "in_fd" look good names (they are use in Linux manpage). 2. Make "out" and "in" positional-only parameters. ---------- components: Extension Modules messages: 354012 nosy: serhiy.storchaka priority: normal severity: normal status: open title: os.sendfile() has improperly named parameter type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 11:11:16 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 05 Oct 2019 15:11:16 +0000 Subject: [issue38378] os.sendfile() has improperly named parameter In-Reply-To: <1570287843.24.0.0727618245068.issue38378@roundup.psfhosted.org> Message-ID: <1570288276.4.0.413334551841.issue38378@roundup.psfhosted.org> Zackery Spytz added the comment: See also bpo-15078. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 11:15:24 2019 From: report at bugs.python.org (Thomas Wouters) Date: Sat, 05 Oct 2019 15:15:24 +0000 Subject: [issue38376] ./configure --with-assertions generates a broken build In-Reply-To: <1570279431.23.0.578903771856.issue38376@roundup.psfhosted.org> Message-ID: <1570288524.89.0.838145872255.issue38376@roundup.psfhosted.org> Change by Thomas Wouters : ---------- keywords: +patch pull_requests: +16183 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16594 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 11:16:13 2019 From: report at bugs.python.org (Thomas Wouters) Date: Sat, 05 Oct 2019 15:16:13 +0000 Subject: [issue38376] ./configure --with-assertions generates a broken build In-Reply-To: <1570279431.23.0.578903771856.issue38376@roundup.psfhosted.org> Message-ID: <1570288573.09.0.957200771425.issue38376@roundup.psfhosted.org> Thomas Wouters added the comment: The problem is _PyUnicode_CheckConsistency switched from being only defined when Py_DEBUG is set, to being defined unconditionally. That was a good change, but it made the API-compatibility hack of #defining _PyUnicode_CheckConsistency in Include/unicodeobject.h do the wrong thing. PR #16594. ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 11:46:08 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 05 Oct 2019 15:46:08 +0000 Subject: [issue38349] Email example using imaginary library installation error. In-Reply-To: <1570032603.68.0.429442517445.issue38349@roundup.psfhosted.org> Message-ID: <1570290368.06.0.493577730632.issue38349@roundup.psfhosted.org> Abhilash Raj added the comment: The function of this imaginary method is described below: # The magic_html_parser has to rewrite the href="cid:...." attributes to # point to the filenames in partfiles. It also has to do a safety-sanitize # of the html. It could be written using html.parser. This implementation is going to be non-trivial (more than just a wrapper around html.parser) I think, and I would like to not make the example related to email even longer due to that implementation. And I agree with Terry, the comment should make it pretty clear, there aren't any dependencies in the examples outside of standard library. Any other synonym that we'd choose could end up being a package in pypi someday :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 11:48:06 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 05 Oct 2019 15:48:06 +0000 Subject: [issue38349] Email example using imaginary library installation error. In-Reply-To: <1570032603.68.0.429442517445.issue38349@roundup.psfhosted.org> Message-ID: <1570290486.43.0.695592581472.issue38349@roundup.psfhosted.org> Abhilash Raj added the comment: The comment should make it clear that it is an made up imaginary module. The no dependencies outside of standard library is not written, I guess? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 12:07:49 2019 From: report at bugs.python.org (jackotonye) Date: Sat, 05 Oct 2019 16:07:49 +0000 Subject: [issue38349] Email example using imaginary library installation error. In-Reply-To: <1570290486.43.0.695592581472.issue38349@roundup.psfhosted.org> Message-ID: <749E708A-2F88-4EDC-A9E4-1BCE60091EE0@gmail.com> jackotonye added the comment: I?m fine with closing the issue. Seems trivial now after reading the comments but noting that most developers take examples as running code and spend less time going over the comments and a dependency that had similar names makes it even harder to make the point. If the comment was at the usage rather than at import it would be more obvious that it needs to be a custom implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 12:15:18 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 05 Oct 2019 16:15:18 +0000 Subject: [issue38349] Email example using imaginary library installation error. In-Reply-To: <1570032603.68.0.429442517445.issue38349@roundup.psfhosted.org> Message-ID: <1570292118.64.0.914875201531.issue38349@roundup.psfhosted.org> Abhilash Raj added the comment: We could move that comment to the top near the import, I am totally fine with that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 12:19:21 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 05 Oct 2019 16:19:21 +0000 Subject: [issue38332] invalid content-transfer-encoding in encoded-word causes KeyError In-Reply-To: <1569877053.41.0.568400002445.issue38332@roundup.psfhosted.org> Message-ID: <1570292361.19.0.867487396675.issue38332@roundup.psfhosted.org> Abhilash Raj added the comment: New changeset 65dcc8a8dc41d3453fd6b987073a5f1b30c5c0fd by Abhilash Raj (Andrei Troie) in branch 'master': bpo-38332: Catch KeyError from unknown cte in encoded-word. (GH-16503) https://github.com/python/cpython/commit/65dcc8a8dc41d3453fd6b987073a5f1b30c5c0fd ---------- nosy: +maxking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 12:19:39 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 05 Oct 2019 16:19:39 +0000 Subject: [issue38332] invalid content-transfer-encoding in encoded-word causes KeyError In-Reply-To: <1569877053.41.0.568400002445.issue38332@roundup.psfhosted.org> Message-ID: <1570292379.84.0.0274977624281.issue38332@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16184 pull_request: https://github.com/python/cpython/pull/16596 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 12:19:45 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 05 Oct 2019 16:19:45 +0000 Subject: [issue38332] invalid content-transfer-encoding in encoded-word causes KeyError In-Reply-To: <1569877053.41.0.568400002445.issue38332@roundup.psfhosted.org> Message-ID: <1570292385.47.0.0114547588782.issue38332@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16185 pull_request: https://github.com/python/cpython/pull/16597 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 13:31:26 2019 From: report at bugs.python.org (Tim Peters) Date: Sat, 05 Oct 2019 17:31:26 +0000 Subject: [issue38379] finalizer resurrection in gc Message-ID: <1570296686.13.0.00730737596554.issue38379@roundup.psfhosted.org> New submission from Tim Peters : While people are thinking about gc, zleak.py shows a small bug, and a possible opportunity for improvement, in the way gc treats finalizers that resurrect objects. The bug: the stats keep claiming gc is collecting an enormous number of objects, but in fact it's not collecting any. Objects in the unreachable set shouldn't add to the "collected" count unless they _are_ collected. Output: resurrecting collect 2000002 gen 2 stats {'collections': 2, 'collected': 2000002, 'uncollectable': 0} resurrecting collect 4000004 gen 2 stats {'collections': 3, 'collected': 6000006, 'uncollectable': 0} resurrecting collect 6000006 gen 2 stats {'collections': 4, 'collected': 12000012, 'uncollectable': 0} resurrecting collect 8000008 gen 2 stats {'collections': 5, 'collected': 20000020, 'uncollectable': 0} resurrecting collect 10000010 gen 2 stats {'collections': 6, 'collected': 30000030, 'uncollectable': 0} ... Memory use grows without bound, and collections take ever longer. The opportunity: if any finalizer resurrects anything, gc gives up. But the process of computing whether anything was resurrected also determines which initially-trash objects are reachable from the risen dead. Offhand I don't see why we couldn't proceed collecting what remains trash. Then zleak.py would reclaim everything instead of nothing. Sketch: rather than just set a flag, check_garbage() could move now-reachable objects to the old generation (and, for each one moved, decrement the count of collected objects). Then delete_garbage() could proceed on what remains in the unreachable list. ---------- components: Interpreter Core files: zleak.py messages: 354020 nosy: nascheme, pitrou, tim.peters priority: normal severity: normal stage: needs patch status: open title: finalizer resurrection in gc type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file48644/zleak.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 13:44:59 2019 From: report at bugs.python.org (Ben Harper) Date: Sat, 05 Oct 2019 17:44:59 +0000 Subject: [issue36356] Failure to build with address sanitizer In-Reply-To: <1552967277.69.0.646647509224.issue36356@roundup.psfhosted.org> Message-ID: <1570297499.08.0.992266548864.issue36356@roundup.psfhosted.org> Change by Ben Harper : ---------- pull_requests: +16186 pull_request: https://github.com/python/cpython/pull/16598 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 14:28:18 2019 From: report at bugs.python.org (Eryk Sun) Date: Sat, 05 Oct 2019 18:28:18 +0000 Subject: [issue38324] [Windows] test_locale and test__locale failures on Windows In-Reply-To: <1569849277.36.0.00648751871696.issue38324@roundup.psfhosted.org> Message-ID: <1570300098.52.0.314074342888.issue38324@roundup.psfhosted.org> Eryk Sun added the comment: Terry, the test_winconsoleio problem is issue 38325. Test cases with surrogate pairs that are known to fail in recent builds of Windows 10 have to be split out. For the "ps_AF" locale failure that you noted, in my case with Windows 10 18362, I have to first modify the tests in Lib/test/test__locale.py to set LC_CTYPE before setting LC_NUMERIC. Otherwise the lconv result in C has the wrong encoding, and PyUnicode_DecodeLocale fails. After making this change, I can reproduce the noted failure. The "ps_AF" (Pashto, Afghanistan) case will have to be skipped in Windows because the system NLS data does not agree with the assumed Arabic decimal and thousands separator, U+066B and U+066C, but instead uses "," and ".". This can be verified directly via WINAPI GetLocaleInfoEx: >>> n = kernel32.GetLocaleInfoEx('ps-AF', LOCALE_SSCRIPTS, buf, len(buf)) >>> buf.value 'Arab;' >>> n = kernel32.GetLocaleInfoEx('ps-AF', LOCALE_SDECIMAL, buf, len(buf)) >>> buf.value ',' >>> n = kernel32.GetLocaleInfoEx('ps-AF', LOCALE_STHOUSAND, buf, len(buf)) >>> buf.value '.' In case this was a quirk in the NLS data for languages that use a Perso-Arabic script, such as Pashto, I also checked Saudi Arabia ("ar-SA"), which uses a standard Arabic script, but the result was the same. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 15:34:39 2019 From: report at bugs.python.org (Antonio Gutierrez) Date: Sat, 05 Oct 2019 19:34:39 +0000 Subject: [issue36161] Use thread-safe functions instead of unsafe ones (crypt, ttyname) In-Reply-To: <1551475826.18.0.295115684796.issue36161@roundup.psfhosted.org> Message-ID: <1570304079.57.0.733360072364.issue36161@roundup.psfhosted.org> Change by Antonio Gutierrez : ---------- pull_requests: +16187 pull_request: https://github.com/python/cpython/pull/16599 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 17:25:52 2019 From: report at bugs.python.org (Ned Deily) Date: Sat, 05 Oct 2019 21:25:52 +0000 Subject: [issue38295] test_relative_path of test_py_compile fails on macOS 10.15 Catalina In-Reply-To: <1569605043.98.0.657218273343.issue38295@roundup.psfhosted.org> Message-ID: <1570310752.59.0.230523880811.issue38295@roundup.psfhosted.org> Ned Deily added the comment: Also the similar single test in 2.7.x fails on 10.15 (pre-release): ====================================================================== ERROR: test_relative_path (test.test_py_compile.PyCompileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/test/test_py_compile.py", line 45, in test_relative_path os.path.relpath(self.pyc_path)) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/py_compile.py", line 123, in compile with open(cfile, 'wb') as fc: IOError: [Errno 2] No such file or directory: '../../../../../../../var/folders/n6/q3475zjd38bc3q197d77wjc80000gn/T/tmpLPxkJN/_test.pyc' ---------- title: macOS Catalina test failures -> test_relative_path of test_py_compile fails on macOS 10.15 Catalina versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 18:12:20 2019 From: report at bugs.python.org (Big Stone) Date: Sat, 05 Oct 2019 22:12:20 +0000 Subject: [issue38380] Update SQLite to 3.30 in Windows and macOS installer builds Message-ID: <1570313540.41.0.0224198940573.issue38380@roundup.psfhosted.org> New submission from Big Stone : there is a security fix in sqlite-3.30 https://nvd.nist.gov/vuln/detail/CVE-2019-16168#VulnChangeHistorySection https://www.sqlite.org/releaselog/3_30_0.html ---------- messages: 354023 nosy: Big Stone priority: normal severity: normal status: open title: Update SQLite to 3.30 in Windows and macOS installer builds _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 18:23:55 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 05 Oct 2019 22:23:55 +0000 Subject: [issue38381] Possible wordcode optimization for STORE/LOAD pairs Message-ID: <1570314235.55.0.575306260981.issue38381@roundup.psfhosted.org> New submission from Raymond Hettinger : In the show code below, the STORE_FAST x is FOLLOWED by LOAD_FAST x. This is a common word code pairing. Perhaps a new combined opcode would help: case TARGET(LOAD_AND_STORE_FAST): { PyObject *value = GETLOCAL(oparg); if (value == NULL) { format_exc_check_arg(tstate, PyExc_UnboundLocalError, UNBOUNDLOCAL_ERROR_MSG, PyTuple_GetItem(co->co_varnames, oparg)); goto error; } Py_INCREF(value); SETLOCAL(oparg, value); FAST_DISPATCH(); } The combined opcode saves one one trip around the eval-loop and it saves unnecessary stack manipulations (a PUSH() immediately followed by a POP()). The code generation would likely need to be a compiler or AST step because it crosses basic block boundaries. Care would need to be taken to not adversely affect tracing the code in a debugger. Note in the following code, the "x" is never used after the STORE/LOAD pair. In theory, the two opcodes could be dropped entirely; however, would affect a call to "locals()". -------- Code disassembly ------ >>> def f(s): for x in g: yield x**2 >>> dis(f) 2 0 LOAD_GLOBAL 0 (g) 2 GET_ITER >> 4 FOR_ITER 14 (to 20) 6 STORE_FAST 1 (x) 3 8 LOAD_FAST 1 (x) 10 LOAD_CONST 1 (2) 12 BINARY_POWER 14 YIELD_VALUE 16 POP_TOP 18 JUMP_ABSOLUTE 4 >> 20 LOAD_CONST 0 (None) 22 RETURN_VALUE ---------- components: Interpreter Core messages: 354024 nosy: rhettinger priority: normal severity: normal status: open title: Possible wordcode optimization for STORE/LOAD pairs type: performance versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 18:35:11 2019 From: report at bugs.python.org (Ned Deily) Date: Sat, 05 Oct 2019 22:35:11 +0000 Subject: [issue38380] Update SQLite to 3.30 in Windows and macOS installer builds In-Reply-To: <1570313540.41.0.0224198940573.issue38380@roundup.psfhosted.org> Message-ID: <1570314911.9.0.370346092261.issue38380@roundup.psfhosted.org> Ned Deily added the comment: I verified it is exploitable via the sqlite3 module by adapting the test case from the SQLite ticket (https://www.sqlite.org/src/info/e4598ecbdd18bd82). But since it requires the exploiter to be able to specify raw SQL statements, it doesn't sound like it needs to be treated as a Python security issue. We should plan to to update to the latest SQLite but it doesn't need to be a release blocker. ---------- components: +Build, Windows, macOS nosy: +ned.deily, paul.moore, ronaldoussoren, steve.dower, tim.golden, zach.ware stage: -> needs patch versions: +Python 2.7, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 18:51:55 2019 From: report at bugs.python.org (Martijn Pieters) Date: Sat, 05 Oct 2019 22:51:55 +0000 Subject: [issue38364] inspect.iscoroutinefunction / isgeneratorfunction / isasyncgenfunction can't handle partialmethod objects In-Reply-To: <1570109324.07.0.792957059658.issue38364@roundup.psfhosted.org> Message-ID: <1570315915.9.0.744620287446.issue38364@roundup.psfhosted.org> Change by Martijn Pieters : ---------- keywords: +patch pull_requests: +16188 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16600 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 19:59:00 2019 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 05 Oct 2019 23:59:00 +0000 Subject: [issue18578] Rename and document test.bytecode_helper as test.support.bytecode_helper In-Reply-To: <1375014946.89.0.0130176350727.issue18578@psf.upfronthosting.co.za> Message-ID: <1570319940.44.0.425703665577.issue18578@roundup.psfhosted.org> Nick Coghlan added the comment: Just noting for the record that the reason a new warning wasn't needed here is because there is already a general "No compatibility guarantees" warning for the entire test package: https://docs.python.org/3/library/test.html Thanks for getting this resolved! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 20:07:28 2019 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 06 Oct 2019 00:07:28 +0000 Subject: [issue22257] PEP 432 (PEP 587): Redesign the interpreter startup sequence In-Reply-To: <1408789351.84.0.0171822343712.issue22257@psf.upfronthosting.co.za> Message-ID: <1570320448.6.0.120486908371.issue22257@roundup.psfhosted.org> Nick Coghlan added the comment: Agreed. I've also added PEP 587 to the issue title to make the connection to that PEP more obvious. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed title: PEP 432: Redesign the interpreter startup sequence -> PEP 432 (PEP 587): Redesign the interpreter startup sequence _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 21:46:18 2019 From: report at bugs.python.org (Warren Weckesser) Date: Sun, 06 Oct 2019 01:46:18 +0000 Subject: [issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0 Message-ID: <1570326378.93.0.0728676630318.issue38382@roundup.psfhosted.org> New submission from Warren Weckesser : The function statistics.harmonic_mean is supposed to raise a StatisticsError if any element in the input is negative. It fails to do so if the negative element is preceded by a zero. When there is a zero before the negative element, the function returns 0: >>> from statistics import harmonic_mean >>> harmonic_mean([0, -1, 3]) 0 If the zero occurs after the negative value, the StatisticsError exception is correctly raised: >>> harmonic_mean([-1, 0, 3]) Traceback (most recent call last): File "", line 1, in File "/Users/warren/repos/git/forks/cpython/Lib/statistics.py", line 406, in harmonic_mean T, total, count = _sum(1/x for x in _fail_neg(data, errmsg)) File "/Users/warren/repos/git/forks/cpython/Lib/statistics.py", line 164, in _sum for typ, values in groupby(data, type): File "/Users/warren/repos/git/forks/cpython/Lib/statistics.py", line 406, in T, total, count = _sum(1/x for x in _fail_neg(data, errmsg)) File "/Users/warren/repos/git/forks/cpython/Lib/statistics.py", line 289, in _fail_neg raise StatisticsError(errmsg) statistics.StatisticsError: harmonic mean does not support negative values >>> The problem is in this code in the function harmonic_mean: try: T, total, count = _sum(1/x for x in _fail_neg(data, errmsg)) except ZeroDivisionError: return 0 When the zero occurs before the negative value, the ZeroDivisionError is raised before the negative value has been seen by the generator _fail_neg, and the function returns 0. ---------- components: Library (Lib) messages: 354028 nosy: WarrenWeckesser priority: normal severity: normal status: open title: statistics.harmonic_mean fails to raise error with negative input that follows a 0 type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 22:20:15 2019 From: report at bugs.python.org (Caleb Hattingh) Date: Sun, 06 Oct 2019 02:20:15 +0000 Subject: [issue37736] asyncio.wait_for is still confusing In-Reply-To: <1564651501.71.0.316479365632.issue37736@roundup.psfhosted.org> Message-ID: <1570328415.07.0.111293787972.issue37736@roundup.psfhosted.org> Caleb Hattingh added the comment: > asyncio.wait_for is still confusing Perhaps the confusion can be fixed with improvements to the docs? To me, these specific docs seem pretty clear now, but I might not be a good judge of that. > However, we still have the case where a misbehaving Task can cause wait_for to hang indefinitely. The key word here is "misbehaving". Cooperative concurrency does require cooperation. There are many ways in which coroutines can misbehave, the popular one being calling blocking functions when they shouldn't. I would be very uncomfortable with my coroutine being killable (e.g. by wait_for) by some other means besides CancelledError (which I can intercept and manage cleanup). The contract is: if my coroutine has a CancelledError raised, I take that to mean that I need to clean up whatever resources need cleanup, in a timely manner and then exit. If my coro refuses to exit, it is my coroutine that is wrong, not wait_for being unable to kill the coroutine. I definitely agree with Yury that the previous behaviour, the one where wait_for could raise TimeoutError *before* the inner coro has exited, was buggy and needed to be fixed. ---------- nosy: +cjrh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 22:40:20 2019 From: report at bugs.python.org (Warren Weckesser) Date: Sun, 06 Oct 2019 02:40:20 +0000 Subject: [issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0 In-Reply-To: <1570326378.93.0.0728676630318.issue38382@roundup.psfhosted.org> Message-ID: <1570329620.36.0.696849357019.issue38382@roundup.psfhosted.org> Warren Weckesser added the comment: The premature return on ZeroDivisionError also causes an inconsistency in how types are handled. For example, >>> harmonic_mean([1, 0, "foo"]) 0 We get an error as expected if "foo" occurs before 0: >>> harmonic_mean([1, "foo", 0]) Traceback (most recent call last): File "", line 1, in File "/Users/warren/repos/git/forks/cpython/Lib/statistics.py", line 406, in harmonic_mean T, total, count = _sum(1/x for x in _fail_neg(data, errmsg)) File "/Users/warren/repos/git/forks/cpython/Lib/statistics.py", line 166, in _sum for n,d in map(_exact_ratio, values): File "/Users/warren/repos/git/forks/cpython/Lib/statistics.py", line 406, in T, total, count = _sum(1/x for x in _fail_neg(data, errmsg)) File "/Users/warren/repos/git/forks/cpython/Lib/statistics.py", line 288, in _fail_neg if x < 0: TypeError: '<' not supported between instances of 'str' and 'int' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 23:12:28 2019 From: report at bugs.python.org (Warren Weckesser) Date: Sun, 06 Oct 2019 03:12:28 +0000 Subject: [issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0 In-Reply-To: <1570326378.93.0.0728676630318.issue38382@roundup.psfhosted.org> Message-ID: <1570331548.74.0.550779792525.issue38382@roundup.psfhosted.org> Change by Warren Weckesser : ---------- keywords: +patch pull_requests: +16189 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16601 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 02:21:50 2019 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 06 Oct 2019 06:21:50 +0000 Subject: [issue38210] Intersection of dict view with iterator returns empty set In-Reply-To: <1568790606.98.0.898790756289.issue38210@roundup.psfhosted.org> Message-ID: <1570342910.77.0.554401568996.issue38210@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +16190 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16602 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 03:01:27 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 06 Oct 2019 07:01:27 +0000 Subject: [issue38381] Possible wordcode optimization for STORE/LOAD pairs In-Reply-To: <1570314235.55.0.575306260981.issue38381@roundup.psfhosted.org> Message-ID: <1570345287.28.0.647854050328.issue38381@roundup.psfhosted.org> Serhiy Storchaka added the comment: I thought about this. But STORE_FAST x is followed by LOAD_FAST x just by accident. If you change the expression (1+x**2 or f(x**2)) they no longer be neighbors. I am not sure this pattern is common enough. There are more common pairs. Also, note that LOAD_FAST belong to the different line of code. It should be preserved for debugging purpose. Otherwise you could not set a breakpoint on the first line of the loop body. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 05:21:20 2019 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 06 Oct 2019 09:21:20 +0000 Subject: [issue38210] Intersection of dict view with iterator returns empty set In-Reply-To: <1568790606.98.0.898790756289.issue38210@roundup.psfhosted.org> Message-ID: <1570353680.74.0.232756040179.issue38210@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 06:51:34 2019 From: report at bugs.python.org (hai shi) Date: Sun, 06 Oct 2019 10:51:34 +0000 Subject: [issue38383] undefined behavior in tailmatch() of bytes_methods.c Message-ID: <1570359094.2.0.728788628974.issue38383@roundup.psfhosted.org> New submission from hai shi : `if (start + slen > len)` would cause undefined behavior? such as: start=PY_SSIZE_T_MAX, slen=1 REFS: [1] https://github.com/python/cpython/blob/master/Objects/bytes_methods.c#L746 ---------- components: Interpreter Core messages: 354032 nosy: shihai1991 priority: normal severity: normal status: open title: undefined behavior in tailmatch() of bytes_methods.c type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 06:53:12 2019 From: report at bugs.python.org (hai shi) Date: Sun, 06 Oct 2019 10:53:12 +0000 Subject: [issue38383] undefined behavior in tailmatch() of bytes_methods.c In-Reply-To: <1570359094.2.0.728788628974.issue38383@roundup.psfhosted.org> Message-ID: <1570359192.67.0.0671974819738.issue38383@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +16191 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16603 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 07:28:39 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 06 Oct 2019 11:28:39 +0000 Subject: [issue38210] Intersection of dict view with iterator returns empty set In-Reply-To: <1568790606.98.0.898790756289.issue38210@roundup.psfhosted.org> Message-ID: <1570361319.2.0.973613132755.issue38210@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset c38e725d17537b20ff090b1b5ec7db1820ff9b63 by Serhiy Storchaka (Dong-hee Na) in branch 'master': bpo-38210: Fix intersection operation with dict view and iterator. (GH-16602) https://github.com/python/cpython/commit/c38e725d17537b20ff090b1b5ec7db1820ff9b63 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 07:29:41 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 06 Oct 2019 11:29:41 +0000 Subject: [issue38210] Intersection of dict view with iterator returns empty set In-Reply-To: <1568790606.98.0.898790756289.issue38210@roundup.psfhosted.org> Message-ID: <1570361381.78.0.13113493602.issue38210@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you Dong-hee for your fix! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 08:17:22 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 06 Oct 2019 12:17:22 +0000 Subject: [issue38383] undefined behavior in tailmatch() of bytes_methods.c In-Reply-To: <1570359094.2.0.728788628974.issue38383@roundup.psfhosted.org> Message-ID: <1570364242.07.0.073288765594.issue38383@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 24ddd9c2d6ab61cbce7e68d6de36d4df9bd2c3fb by Serhiy Storchaka (Hai Shi) in branch 'master': bpo-38383: Fix possible integer overflow in startswith() of bytes and bytearray. (GH-16603) https://github.com/python/cpython/commit/24ddd9c2d6ab61cbce7e68d6de36d4df9bd2c3fb ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 08:18:51 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 06 Oct 2019 12:18:51 +0000 Subject: [issue38383] undefined behavior in tailmatch() of bytes_methods.c In-Reply-To: <1570359094.2.0.728788628974.issue38383@roundup.psfhosted.org> Message-ID: <1570364331.36.0.722681867902.issue38383@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16192 pull_request: https://github.com/python/cpython/pull/16604 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 08:18:58 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 06 Oct 2019 12:18:58 +0000 Subject: [issue38383] undefined behavior in tailmatch() of bytes_methods.c In-Reply-To: <1570359094.2.0.728788628974.issue38383@roundup.psfhosted.org> Message-ID: <1570364338.62.0.253727395805.issue38383@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16193 pull_request: https://github.com/python/cpython/pull/16605 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 08:20:04 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 06 Oct 2019 12:20:04 +0000 Subject: [issue38383] undefined behavior in tailmatch() of bytes_methods.c In-Reply-To: <1570359094.2.0.728788628974.issue38383@roundup.psfhosted.org> Message-ID: <1570364404.67.0.417306849365.issue38383@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 08:36:47 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 06 Oct 2019 12:36:47 +0000 Subject: [issue38383] undefined behavior in tailmatch() of bytes_methods.c In-Reply-To: <1570359094.2.0.728788628974.issue38383@roundup.psfhosted.org> Message-ID: <1570365407.65.0.127135680743.issue38383@roundup.psfhosted.org> miss-islington added the comment: New changeset b40442ba88fec5e64ab1802ce37df0afec59fa53 by Miss Islington (bot) in branch '3.7': bpo-38383: Fix possible integer overflow in startswith() of bytes and bytearray. (GH-16603) https://github.com/python/cpython/commit/b40442ba88fec5e64ab1802ce37df0afec59fa53 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 08:37:22 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 06 Oct 2019 12:37:22 +0000 Subject: [issue38383] undefined behavior in tailmatch() of bytes_methods.c In-Reply-To: <1570359094.2.0.728788628974.issue38383@roundup.psfhosted.org> Message-ID: <1570365442.94.0.324120483073.issue38383@roundup.psfhosted.org> miss-islington added the comment: New changeset ce3c913909746aa1d782ed8bca5076a656422931 by Miss Islington (bot) in branch '3.8': bpo-38383: Fix possible integer overflow in startswith() of bytes and bytearray. (GH-16603) https://github.com/python/cpython/commit/ce3c913909746aa1d782ed8bca5076a656422931 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 09:39:09 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 06 Oct 2019 13:39:09 +0000 Subject: [issue38384] An assertion failure in test_pickle Message-ID: <1570369149.47.0.841206648458.issue38384@roundup.psfhosted.org> New submission from Zackery Spytz : When running test_pickle, I sometimes see an assertion failure. ./python -m test test_pickle 0:00:00 load avg: 1.04 Run tests sequentially 0:00:00 load avg: 1.04 [1/1] test_pickle python: Objects/typeobject.c:3151: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. Fatal Python error: Aborted Current thread 0x00007f8158632140 (most recent call first): File "/home/lubuntu2/cpython/Lib/test/pickletester.py", line 3400 in test_unpickling_buffering_readline File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 617 in _callTestMethod File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 663 in run File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 725 in __call__ File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/home/lubuntu2/cpython/Lib/test/support/testresult.py", line 162 in run File "/home/lubuntu2/cpython/Lib/test/support/__init__.py", line 2032 in _run_suite File "/home/lubuntu2/cpython/Lib/test/support/__init__.py", line 2128 in run_unittest File "/home/lubuntu2/cpython/Lib/test/test_pickle.py", line 525 in test_main File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 234 in _runtest_inner2 File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 270 in _runtest_inner File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 153 in _runtest File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 193 in runtest File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 417 in run_tests_sequential File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 515 in run_tests File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 687 in _main File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 634 in main File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 712 in main File "/home/lubuntu2/cpython/Lib/test/__main__.py", line 2 in File "/home/lubuntu2/cpython/Lib/runpy.py", line 85 in _run_code File "/home/lubuntu2/cpython/Lib/runpy.py", line 192 in _run_module_as_main Aborted (core dumped) In _Unpickler_SetInputStream(), _PyObject_LookupAttrId() is called three times in a row without any error handling. If an exception occurs during the first or second call, _PyObject_LookupAttrId() will be called with a live exception. ---------- components: Extension Modules messages: 354038 nosy: ZackerySpytz priority: normal severity: normal status: open title: An assertion failure in test_pickle type: crash versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 09:41:58 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 06 Oct 2019 13:41:58 +0000 Subject: [issue38384] An assertion failure in test_pickle In-Reply-To: <1570369149.47.0.841206648458.issue38384@roundup.psfhosted.org> Message-ID: <1570369318.59.0.34577548961.issue38384@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +16194 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16606 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 11:39:36 2019 From: report at bugs.python.org (Mauricio Villegas) Date: Sun, 06 Oct 2019 15:39:36 +0000 Subject: [issue35005] argparse should accept json and yaml argument types In-Reply-To: <1539735338.04.0.788709270274.issue35005@psf.upfronthosting.co.za> Message-ID: <1570376376.15.0.819437258286.issue35005@roundup.psfhosted.org> Mauricio Villegas added the comment: FYI there is a new python package that extends argparse with the enhancements proposed here and more. https://pypi.org/project/jsonargparse/ ---------- nosy: +mauvilsa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 12:34:54 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 06 Oct 2019 16:34:54 +0000 Subject: [issue38384] An assertion failure in test_pickle In-Reply-To: <1570369149.47.0.841206648458.issue38384@roundup.psfhosted.org> Message-ID: <1570379694.61.0.390188065548.issue38384@roundup.psfhosted.org> Serhiy Storchaka added the comment: I do not understand how you got an assertion failure. Did you interrupt tests with Ctrl-C? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 14:33:41 2019 From: report at bugs.python.org (Tim Peters) Date: Sun, 06 Oct 2019 18:33:41 +0000 Subject: [issue38379] finalizer resurrection in gc In-Reply-To: <1570296686.13.0.00730737596554.issue38379@roundup.psfhosted.org> Message-ID: <1570386821.26.0.936975116344.issue38379@roundup.psfhosted.org> Tim Peters added the comment: Just noting that check_garbage() currently only determines which trash objects are now directly reachable from outside. To be usable for the intended purpose, it would need to go on to compute which trash objects are reachable from those too. Maybe a new function static void deduce_unreachable(PyGC_Head *base, PyGC_Head *unreachable) that packaged the steps through move_unreachable(). The main function would use that on `young`, and check_garbage() on `unreachable` to find the _still_ unreachable objects. I don't care about the expense. Outside of zleak.py, the number of unreachable objects is usually small, so it's usually cheap to make another pass over just them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 14:33:52 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 06 Oct 2019 18:33:52 +0000 Subject: [issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0 In-Reply-To: <1570326378.93.0.0728676630318.issue38382@roundup.psfhosted.org> Message-ID: <1570386832.8.0.6083295823.issue38382@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger, steven.daprano versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 15:06:06 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 06 Oct 2019 19:06:06 +0000 Subject: [issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0 In-Reply-To: <1570326378.93.0.0728676630318.issue38382@roundup.psfhosted.org> Message-ID: <1570388766.52.0.229148224466.issue38382@roundup.psfhosted.org> Raymond Hettinger added the comment: Normally early-out behaviors are allowed to skip any checks for subsequent inputs (for example, the any() and all() builtins stop consuming inputs one a final value is found). However, that reasoning might not apply to a zero input for harmonic_mean(). Technically, the definition of harmonic mean doesn't allow for a zero input value at all (accordingly, MS Excel gives an error for a zero input). Presumably, the reason that Python's harmonic_mean() returns zero is so that the function degrades gracefully as one of the inputs gets closer to zero. Options at this point: * Just document that there is an early-out for zero. * Stick with the strategy of treating zero as if it were just a very, very small positive input. The would imply that all of the inputs should be considered and that TypeErrors or StatisticErrors should be raised for later data points (though I'm unclear what this world view implies when the inputs have both a zero and a positive infinity). * Treat a zero input as an error. This matches the usual specification of harmonic mean being defined only for non-negative real inputs. ---------- nosy: +mark.dickinson, tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 15:10:16 2019 From: report at bugs.python.org (Eric O. LEBIGOT) Date: Sun, 06 Oct 2019 19:10:16 +0000 Subject: [issue38385] statistics: incorrect documentation Message-ID: <1570389016.13.0.165369947537.issue38385@roundup.psfhosted.org> New submission from Eric O. LEBIGOT : The documentation for the statistics package indicates that many of its functions (like median()) accept iterators. They seem to actually accept something more convenient, namely iterables. Thus, iterator could probably be usefully replaced by iterable on many of the functions (when applicable, which I would expect is everywhere). ---------- assignee: docs at python components: Documentation messages: 354043 nosy: docs at python, lebigot priority: normal severity: normal status: open title: statistics: incorrect documentation versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 15:20:19 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 06 Oct 2019 19:20:19 +0000 Subject: [issue38385] statistics: incorrect documentation In-Reply-To: <1570389016.13.0.165369947537.issue38385@roundup.psfhosted.org> Message-ID: <1570389619.13.0.628082346797.issue38385@roundup.psfhosted.org> Raymond Hettinger added the comment: This is a reasonable suggestion (all iterators are iterable, but not all iterables are iterators). I'll work on it shortly (in conjunction with some other minor doc fixups). ---------- assignee: docs at python -> rhettinger nosy: +rhettinger, steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 15:37:20 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 06 Oct 2019 19:37:20 +0000 Subject: [issue38210] Intersection of dict view with iterator returns empty set In-Reply-To: <1568790606.98.0.898790756289.issue38210@roundup.psfhosted.org> Message-ID: <1570390640.05.0.0195993924988.issue38210@roundup.psfhosted.org> Raymond Hettinger added the comment: Please add a test for this regression. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 15:49:27 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sun, 06 Oct 2019 19:49:27 +0000 Subject: [issue21360] mailbox.Maildir should ignore files named with a leading dot In-Reply-To: <1398550003.67.0.360972625113.issue21360@psf.upfronthosting.co.za> Message-ID: <1570391367.47.0.688945700593.issue21360@roundup.psfhosted.org> Abhilash Raj added the comment: David: How do you propose we move forward on this? Should we provide a switch to keep the original behaviour (which is off by default) so if there is someone depending on this bug, they could still continue to do it with relatively small change? It is a change of behaviour, so probably isn't going to be back ported if it gets merged in 3.9 window. ---------- nosy: +maxking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 15:51:25 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 06 Oct 2019 19:51:25 +0000 Subject: [issue38210] Intersection of dict view with iterator returns empty set In-Reply-To: <1568790606.98.0.898790756289.issue38210@roundup.psfhosted.org> Message-ID: <1570391485.77.0.963362726575.issue38210@roundup.psfhosted.org> Serhiy Storchaka added the comment: It was added. Do you mean any special? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 16:54:47 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 06 Oct 2019 20:54:47 +0000 Subject: [issue35005] argparse should accept json and yaml argument types In-Reply-To: <1539735338.04.0.788709270274.issue35005@psf.upfronthosting.co.za> Message-ID: <1570395287.57.0.199354236021.issue35005@roundup.psfhosted.org> Raymond Hettinger added the comment: I am going to decline this feature request on the principle of keeping our modules loosely coupled and orthogonal to one another. As paul.j3 pointed out, the "type" option seems to work best with simple conversions like "int". As pointed-out by another respondent, FileType hasn't aged well and it may have been a mistake to include it all. Likewise other converters like DateTime have been previously discussed and rejected. There is a gray area between where argument parsing stops and application logic begins. Since this is a standard library module, we should draw the line at simple converters/validators like "int", leaving anything more complex for downstream logic. That will afford users greater flexibility and control than supported by the add_argument() API which intentionally only handles common cases. [Braden Groom] > I agree with Paul. This is probably simple enough for applications > to implement. It also doesn't make sense to add either of these > if the precedent was set by rejecting DateTime previously. I concur as well. [Mauricio Villegas] > FYI there is a new python package that extends argparse > with the enhancements proposed here and more. Thank you for the link. It will likely prove to be a valuable resource for people finding this issue in the future. The referenced project shows the value of external projects being able to go in directions that are well beyond the scope of our standard library module: "Not exclusively intended for parsing command line arguments. The main focus is parsing yaml or jsonnet configuration files and not necessarily from a command line tool." ---------- assignee: bob.ippolito -> rhettinger resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 17:22:36 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 06 Oct 2019 21:22:36 +0000 Subject: [issue14364] Argparse incorrectly handles '--' as argument to option In-Reply-To: <1332080953.55.0.495639573781.issue14364@psf.upfronthosting.co.za> Message-ID: <1570396956.36.0.159045593867.issue14364@roundup.psfhosted.org> Raymond Hettinger added the comment: Paul and David, is the current PR complete in your opinion? Are there known cases where the PR would break existing, working code? Also there needs to be doc entry that is clear on both new and old strategy for distinguishing options from arguments when a dash or dashdash is present. The PR's Misc/NEWS entry, "Fix behavior of argparse when '--' as argument to option", is insufficient. ---------- assignee: -> rhettinger versions: +Python 3.8, Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 17:31:16 2019 From: report at bugs.python.org (Warren Weckesser) Date: Sun, 06 Oct 2019 21:31:16 +0000 Subject: [issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0 In-Reply-To: <1570326378.93.0.0728676630318.issue38382@roundup.psfhosted.org> Message-ID: <1570397476.34.0.15631730776.issue38382@roundup.psfhosted.org> Warren Weckesser added the comment: I find it hard to accept the first option. It seems to let a detail of the current implementation take precedence over API design. I don't see why we would want an API in which harmonic_mean([1, 0, -1]) returns 0 but harmonic_mean([-1, 0, 1]) raises an error. The harmonic mean should be invariant to permutations of the input (well, at least to within normal floating point precision when the input is floating point). I wouldn't expect such a radical change in behavior based on how I ordered my input to harmonic_mean. The second option appears to be the API that was intended when the function was implemented. Returning 0 when one or more inputs are 0 (and the rest are positive numbers) is justified by taking a limit. Just like we *define* the sinc function (https://en.wikipedia.org/wiki/Sinc_function) to be 1 at x=0 and sin(x)/x when x != 0 (because the limit as x approaches 0 of sin(x)/x is 1), we can define the value of the harmonic mean with zeros in the input as the limiting value as one (or more) positive values goes to 0. That limit is 0. (Also note that, in the case where just one input is 0, the expression for the harmonic mean can be manipulated into a form that gives 0 without requiring a limit. E.g. for three values, 1/(1/x0 + 1/x1 + 1/x2) = x0*x1*x2/(x1*x2 + x0*x2 + x0*x1). If just one of those values is 0, the denominator is nonzero, so the result is simply 0.) There is a nice analogy from electrical circuit theory. Given, say, three resistances R1, R2 and R3 wired in parallel, the total resistance R is R = 1/(1/R1 + 1/R2 + 1/R3) = harmonic_mean([R1, R2, R3])/3 (https://en.wikipedia.org/wiki/Series_and_parallel_circuits#Resistance_units_2). Intuitively, we know that if any of those resistances is 0 (i.e. there is a short circuit), the total resistance is also 0. The resistance analogy also gives the correct interpretation for the case where the input includes both 0 and +inf. An infinite resistance is an open circuit (i.e. no connection), so putting that in parallel with a short circuit still results in a total resistance of 0. The third option, in which any zero in the input is treated as an error, is a change in behavior. Given the justification for returning 0, and given that currently a call such as harmonic_mean([1, 0, 2]) *does* return 0, making that an error seems like an undesirable change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 18:29:52 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 06 Oct 2019 22:29:52 +0000 Subject: [issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0 In-Reply-To: <1570326378.93.0.0728676630318.issue38382@roundup.psfhosted.org> Message-ID: <1570400992.58.0.993041590681.issue38382@roundup.psfhosted.org> Raymond Hettinger added the comment: The resistor example is persuasive :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 19:03:41 2019 From: report at bugs.python.org (yangzongwu) Date: Sun, 06 Oct 2019 23:03:41 +0000 Subject: [issue38386] ModuleNotFoundError: No module named '_ctypes' Message-ID: <1570403021.12.0.499983378492.issue38386@roundup.psfhosted.org> New submission from yangzongwu : I have try the following, but it is no useful sudo apt install libffi-dev but when i import _ctypes under python,it is OK yzw at yzw-virtual-machine:~/Desktop/Test$ python3 Python 3.6.8 (default, Aug 20 2019, 17:12:48) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import _ctypes >>> logs: yzw at yzw-virtual-machine:~/Desktop/Test$ buildozer android clean # Ensure build layout No buildozer.spec found in the current directory. Abandon. yzw at yzw-virtual-machine:~/Desktop/Test$ yzw at yzw-virtual-machine:~/Desktop/Test$ buildozer android clean # Ensure build layout No buildozer.spec found in the current directory. Abandon. yzw at yzw-virtual-machine:~/Desktop/Test$ buildozer init File buildozer.spec created, ready to customize! yzw at yzw-virtual-machine:~/Desktop/Test$ buildozer -v android debug # Check configuration tokens # Ensure build layout # Create directory /home/yzw/Desktop/Test/bin # Check configuration tokens # Preparing build # Check requirements for android # Run 'dpkg --version' # Cwd None Debian 'dpkg' package management program version 1.19.0.5 (amd64). This is free software; see the GNU General Public License version 2 or later for copying conditions. There is NO warranty. # Search for Git (git) # -> found at /usr/bin/git # Search for Cython (cython) # -> found at /home/yzw/.local/bin/cython # Search for Java compiler (javac) # -> found at /usr/lib/jvm/java-8-openjdk-amd64/bin/javac # Search for Java keytool (keytool) # -> found at /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/keytool # Install platform # Run '/usr/bin/python3 -m pip install -q --user \'appdirs\' \'colorama>=0.3.3\' \'jinja2\' \'six\' \'enum34; python_version<"3.4"\' \'sh>=1.10; sys_platform!="nt"\' \'pep517\' \'pytoml\' \'virtualenv\'' # Cwd None # Apache ANT found at /home/yzw/.buildozer/android/platform/apache-ant-1.9.4 # Android SDK found at /home/yzw/.buildozer/android/platform/android-sdk # Android NDK found at /home/yzw/.buildozer/android/platform/android-ndk-r17c # Check application requirements # Check garden requirements # Compile platform # Run '/usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/yzw/Desktop/Test/.buildozer/android/platform/build" --ndk-api=21' # Cwd /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Will compile for the following archs: armeabi-v7a [INFO]: Found Android API target in $ANDROIDAPI: 27 [INFO]: Available Android APIs are (27) [INFO]: Requested API target 27 is available, continuing. [INFO]: Found NDK dir in $ANDROIDNDK: /home/yzw/.buildozer/android/platform/android-ndk-r17c [INFO]: Found NDK version 17c [INFO]: Getting NDK API version (i.e. minimum supported API) from user argument [INFO]: Found virtualenv at /home/yzw/.local/bin/virtualenv [INFO]: ccache is missing, the build will not be optimized in the future. [INFO]: Found the following toolchain versions: ['4.9'] [INFO]: Picking the latest gcc toolchain, here 4.9 [INFO]: No existing dists meet the given requirements! [INFO]: No dist exists that meets your requirements, so one will be built. [INFO]: Found a single valid recipe set: ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'setuptools', 'six', 'pyjnius', 'android', 'kivy'] [INFO]: The selected bootstrap is sdl2 [INFO]: # Creating dist with sdl2 bootstrap [INFO]: Dist will have name myapp and requirements (python3, kivy) [INFO]: Dist contains the following requirements as recipes: ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'setuptools', 'six', 'pyjnius', 'android', 'kivy'] [INFO]: Dist will also contain modules () installed from pip [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3 [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Recipe build order is ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'setuptools', 'six', 'pyjnius', 'android', 'kivy'] [INFO]: # Downloading recipes [INFO]: Downloading hostpython3 [INFO]: -> running mkdir -p /home/yzw/Desktop/Te...(and 57 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/hostpython3 [INFO]: -> running basename https://www.python.or...(and 35 more) [INFO]: hostpython3 download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Downloading libffi [INFO]: -> running mkdir -p /home/yzw/Desktop/Te...(and 52 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/libffi [INFO]: -> running basename https://github.com/li...(and 33 more) [INFO]: libffi download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Downloading openssl [INFO]: -> running mkdir -p /home/yzw/Desktop/Te...(and 53 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/openssl [INFO]: -> running basename https://www.openssl.o...(and 30 more) [INFO]: openssl download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Downloading sdl2_image [INFO]: -> running mkdir -p /home/yzw/Desktop/Te...(and 56 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/sdl2_image [INFO]: -> running basename https://www.libsdl.o...(and 53 more) [INFO]: sdl2_image download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Downloading sdl2_mixer [INFO]: -> running mkdir -p /home/yzw/Desktop/Te...(and 56 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/sdl2_mixer [INFO]: -> running basename https://www.libsdl.o...(and 53 more) [INFO]: sdl2_mixer download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Downloading sdl2_ttf [INFO]: -> running mkdir -p /home/yzw/Desktop/Te...(and 54 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/sdl2_ttf [INFO]: -> running basename https://www.libsdl.or...(and 49 more) [INFO]: sdl2_ttf download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Downloading sqlite3 [INFO]: -> running mkdir -p /home/yzw/Desktop/Te...(and 53 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/sqlite3 [INFO]: -> running basename https://www.sqlite.or...(and 38 more) [INFO]: sqlite3 download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Downloading python3 [INFO]: -> running mkdir -p /home/yzw/Desktop/Te...(and 53 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/python3 [INFO]: -> running basename https://www.python.or...(and 35 more) [INFO]: python3 download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Downloading sdl2 [INFO]: -> running mkdir -p /home/yzw/Desktop/Tes...(and 49 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/sdl2 [INFO]: -> running basename https://www.libsdl.or...(and 27 more) [INFO]: sdl2 download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Downloading setuptools [INFO]: -> running mkdir -p /home/yzw/Desktop/Te...(and 56 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/setuptools [INFO]: -> running basename https://pypi.python....(and 54 more) [INFO]: setuptools download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Downloading six [INFO]: -> running mkdir -p /home/yzw/Desktop/Tes...(and 48 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/six [INFO]: -> running basename https://pypi.python.o...(and 42 more) [INFO]: six download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Downloading pyjnius [INFO]: -> running mkdir -p /home/yzw/Desktop/Te...(and 53 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/pyjnius [INFO]: -> running basename https://github.com/ki...(and 30 more) [INFO]: pyjnius download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Downloading android [INFO]: Skipping android download as no URL is set [INFO]: Downloading kivy [INFO]: -> running mkdir -p /home/yzw/Desktop/Tes...(and 49 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/kivy [INFO]: -> running basename https://github.com/ki...(and 26 more) [INFO]: kivy download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: # Building all recipes for arch armeabi-v7a [INFO]: # Unpacking recipes [INFO]: Unpacking hostpython3 for armeabi-v7a [INFO]: -> running basename https://www.python.or...(and 35 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop [INFO]: hostpython3 is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Unpacking libffi for armeabi-v7a [INFO]: -> running basename https://github.com/li...(and 33 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/libffi/armeabi-v7a__ndk_target_21 [INFO]: libffi is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Unpacking openssl for armeabi-v7a [INFO]: -> running basename https://www.openssl.o...(and 30 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/openssl/armeabi-v7a__ndk_target_21 [INFO]: openssl is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Unpacking sdl2_image for armeabi-v7a [INFO]: -> running basename https://www.libsdl.o...(and 53 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni [INFO]: sdl2_image is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Unpacking sdl2_mixer for armeabi-v7a [INFO]: -> running basename https://www.libsdl.o...(and 53 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni [INFO]: sdl2_mixer is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Unpacking sdl2_ttf for armeabi-v7a [INFO]: -> running basename https://www.libsdl.or...(and 49 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni [INFO]: sdl2_ttf is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Unpacking sqlite3 for armeabi-v7a [INFO]: -> running basename https://www.sqlite.or...(and 38 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/sqlite3/armeabi-v7a__ndk_target_21 [INFO]: sqlite3 is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Unpacking python3 for armeabi-v7a [INFO]: -> running basename https://www.python.or...(and 35 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/python3-libffi-openssl-sqlite3/armeabi-v7a__ndk_target_21 [INFO]: python3 is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Unpacking sdl2 for armeabi-v7a [INFO]: -> running basename https://www.libsdl.or...(and 27 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni [INFO]: sdl2 is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Unpacking setuptools for armeabi-v7a [INFO]: -> running basename https://pypi.python....(and 54 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21 [INFO]: setuptools is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Unpacking six for armeabi-v7a [INFO]: -> running basename https://pypi.python.o...(and 42 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/six-python3/armeabi-v7a__ndk_target_21 [INFO]: six is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Unpacking pyjnius for armeabi-v7a [INFO]: -> running basename https://github.com/ki...(and 30 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/pyjnius-python3-sdl2/armeabi-v7a__ndk_target_21 [INFO]: pyjnius is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: -> running rm -rf /home/yzw/Desktop/Test...(and 109 more) [INFO]: -> running cp -a /home/yzw/Desktop/Test/...(and 215 more) [INFO]: Unpacking kivy for armeabi-v7a [INFO]: -> running basename https://github.com/ki...(and 26 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/kivy-python3/armeabi-v7a__ndk_target_21 [INFO]: kivy is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: # Prebuilding recipes [INFO]: Prebuilding hostpython3 for armeabi-v7a [INFO]: hostpython3 has no prebuild_armeabi_v7a, skipping [INFO]: Prebuilding libffi for armeabi-v7a [INFO]: libffi has no prebuild_armeabi_v7a, skipping [INFO]: Applying patches for libffi[armeabi-v7a] [INFO]: libffi already patched, skipping [INFO]: Prebuilding openssl for armeabi-v7a [INFO]: openssl has no prebuild_armeabi_v7a, skipping [INFO]: Prebuilding sdl2_image for armeabi-v7a [INFO]: sdl2_image has no prebuild_armeabi_v7a, skipping [INFO]: Applying patches for sdl2_image[armeabi-v7a] [INFO]: sdl2_image already patched, skipping [INFO]: Prebuilding sdl2_mixer for armeabi-v7a [INFO]: sdl2_mixer has no prebuild_armeabi_v7a, skipping [INFO]: Applying patches for sdl2_mixer[armeabi-v7a] [INFO]: sdl2_mixer already patched, skipping [INFO]: Prebuilding sdl2_ttf for armeabi-v7a [INFO]: sdl2_ttf has no prebuild_armeabi_v7a, skipping [INFO]: Prebuilding sqlite3 for armeabi-v7a [INFO]: sqlite3 has no prebuild_armeabi_v7a, skipping [INFO]: Prebuilding python3 for armeabi-v7a [INFO]: python3 has no prebuild_armeabi_v7a, skipping [INFO]: Applying patches for python3[armeabi-v7a] [INFO]: python3 already patched, skipping [INFO]: Prebuilding sdl2 for armeabi-v7a [INFO]: sdl2 has no prebuild_armeabi_v7a, skipping [INFO]: Prebuilding setuptools for armeabi-v7a [INFO]: setuptools has no prebuild_armeabi_v7a, skipping [INFO]: Prebuilding six for armeabi-v7a [INFO]: six has no prebuild_armeabi_v7a, skipping [INFO]: Prebuilding pyjnius for armeabi-v7a [INFO]: pyjnius has no prebuild_armeabi_v7a, skipping [INFO]: Applying patches for pyjnius[armeabi-v7a] [INFO]: pyjnius already patched, skipping [INFO]: Prebuilding android for armeabi-v7a [INFO]: android has no prebuild_armeabi_v7a, skipping [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/android-python3-sdl2/armeabi-v7a__ndk_target_21/android [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Prebuilding kivy for armeabi-v7a [INFO]: kivy has no prebuild_armeabi_v7a, skipping [INFO]: # Building recipes [INFO]: Building hostpython3 for armeabi-v7a [INFO]: Skipping hostpython3 (3.7.1) build, as it has already been completed [INFO]: Building libffi for armeabi-v7a [INFO]: libffi said it is already built, skipping [INFO]: Building openssl for armeabi-v7a [INFO]: openssl said it is already built, skipping [INFO]: Building sdl2_image for armeabi-v7a [INFO]: Building sdl2_mixer for armeabi-v7a [INFO]: Building sdl2_ttf for armeabi-v7a [INFO]: Building sqlite3 for armeabi-v7a [INFO]: sqlite3 said it is already built, skipping [INFO]: Building python3 for armeabi-v7a [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/python3-libffi-openssl-sqlite3/armeabi-v7a__ndk_target_21/python3/android-build [WARNING]: Doing some hacky stuff to link properly [INFO]: -> running cp /home/yzw/.buildozer/andro...(and 83 more) [INFO]: -> running cp /home/yzw/.buildozer/andro...(and 81 more) [WARNING]: lld not found, linking without it. Consider installing lld if linker errors occur. [INFO]: Activating flags for sqlite3 [INFO]: Activating flags for libffi [INFO]: Activating flags for openssl [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Building sdl2 for armeabi-v7a [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni [INFO]: -> running ndk-build V=1 [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Building setuptools for armeabi-v7a [INFO]: setuptools apparently isn't already in site-packages [INFO]: Installing setuptools into site-packages [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools [INFO]: -> running python setup.py install -O2 -...(and 106 more) Exception in thread background thread for pid 57350: Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/lib/python3.6/threading.py", line 864, in run self._target(*self._args, **self._kwargs) File "/home/yzw/.local/lib/python3.6/site-packages/sh.py", line 1540, in wrap fn(*args, **kwargs) File "/home/yzw/.local/lib/python3.6/site-packages/sh.py", line 2459, in background_thread handle_exit_code(exit_code) File "/home/yzw/.local/lib/python3.6/site-packages/sh.py", line 2157, in fn return self.command.handle_command_exit_code(exit_code) File "/home/yzw/.local/lib/python3.6/site-packages/sh.py", line 815, in handle_command_exit_code raise exc sh.ErrorReturnCode_1: RAN: /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/native-build/python setup.py install -O2 --root=/home/yzw/Desktop/Test/.buildozer/android/platform/build/build/python-installs/myapp --install-lib=. STDOUT: Traceback (most recent call last): File "setup.py", line 11, in import setuptools File "/home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/__init__.py", line 20, in from setuptools.dist import Distribution, Feature File "/home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/dist.py", line 36, in from setuptools import windows_support File "/home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/windows_support.py", line 2, in import ctypes File "/home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/Lib/ctypes/__init__.py", line 7, in from _ctypes import Union, Structure, Array ModuleNotFoundError: No module named '_ctypes' STDERR: Traceback (most recent call last): File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1192, in main() File "/home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main ToolchainCL() File "/home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 668, in __init__ getattr(self, args.subparser_name.replace('-', '_'))(args) File "/home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 153, in wrapper_func build_dist_from_args(ctx, dist, args) File "/home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 206, in build_dist_from_args args, "ignore_setup_py", False File "/home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 577, in build_recipes recipe.build_arch(arch) File "/home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 844, in build_arch self.install_python_package(arch) File "/home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 863, in install_python_package _env=hpenv, *self.setup_extra_args) File "/home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 180, in shprint for line in output: File "/home/yzw/.local/lib/python3.6/site-packages/sh.py", line 863, in next self.wait() File "/home/yzw/.local/lib/python3.6/site-packages/sh.py", line 792, in wait self.handle_command_exit_code(exit_code) File "/home/yzw/.local/lib/python3.6/site-packages/sh.py", line 815, in handle_command_exit_code raise exc sh.ErrorReturnCode_1: RAN: /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/native-build/python setup.py install -O2 --root=/home/yzw/Desktop/Test/.buildozer/android/platform/build/build/python-installs/myapp --install-lib=. STDOUT: Traceback (most recent call last): File "setup.py", line 11, in import setuptools File "/home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/__init__.py", line 20, in from setuptools.dist import Distribution, Feature File "/home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/dist.py", line 36, in from setuptools import windows_support File "/home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/windows_support.py", line 2, in import ctypes File "/home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/Lib/ctypes/__init__.py", line 7, in from _ctypes import Union, Structure, Array ModuleNotFoundError: No module named '_ctypes' STDERR: # Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/yzw/Desktop/Test/.buildozer/android/platform/build" --ndk-api=21 # # Buildozer failed to execute the last command # The error might be hidden in the log above this error # Please read the full log, and search for it before # raising an issue with buildozer itself. # In case of a bug report, please add a full log with log_level = 2 ---------- components: Build messages: 354052 nosy: yangzongwu priority: normal severity: normal status: open title: ModuleNotFoundError: No module named '_ctypes' type: compile error versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 19:43:50 2019 From: report at bugs.python.org (Brad Solomon) Date: Sun, 06 Oct 2019 23:43:50 +0000 Subject: [issue38387] Document PyDoc_STRVAR Message-ID: <1570405430.86.0.169338229908.issue38387@roundup.psfhosted.org> New submission from Brad Solomon : The C-API reference would benefit from a short mention of PyDoc_STRVAR usage, since it is used so frequently within Modules/. ---------- assignee: docs at python components: Documentation messages: 354053 nosy: bsolomon1124, docs at python priority: normal pull_requests: 16195 severity: normal status: open title: Document PyDoc_STRVAR type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 19:51:13 2019 From: report at bugs.python.org (Dima Tisnek) Date: Sun, 06 Oct 2019 23:51:13 +0000 Subject: [issue38388] Pickle protocol v 5 needs to be documented Message-ID: <1570405873.92.0.178526679084.issue38388@roundup.psfhosted.org> New submission from Dima Tisnek : Python 3.8 brings new pickle protocol, version 5. It's not documented. ``` (venv) ? ~/m/proj> python Python 3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import pickle >>> pickle.HIGHEST_PROTOCOL 4 >>> ^D (venv) ? ~/m/proj> python3.8 Python 3.8.0rc1 (v3.8.0rc1:34214de6ab, Oct 1 2019, 12:56:49) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import pickle >>> pickle.HIGHEST_PROTOCOL 5 >>> ^D ``` Yet there's no mention of "protocol version 5" at: https://github.com/python/cpython/blob/master/Doc/library/pickle.rst https://docs.python.org/3.9/library/pickle.html#data-stream-format https://docs.python.org/3.8/library/pickle.html#data-stream-format ---------- assignee: docs at python components: Documentation messages: 354054 nosy: Dima.Tisnek, docs at python priority: normal severity: normal status: open title: Pickle protocol v 5 needs to be documented versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 19:56:22 2019 From: report at bugs.python.org (Ned Deily) Date: Sun, 06 Oct 2019 23:56:22 +0000 Subject: [issue38386] ModuleNotFoundError: No module named '_ctypes' In-Reply-To: <1570403021.12.0.499983378492.issue38386@roundup.psfhosted.org> Message-ID: <1570406182.98.0.0980799601725.issue38386@roundup.psfhosted.org> Ned Deily added the comment: Sorry, you appear to be using a third-party packaging system that provides Python for Android platforms. It's not something we provide or support. You should ask your question of that project (python-for-android perhaps?) or on a forum like StackOverflow. Good luck! ---------- nosy: +ned.deily resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 20:22:37 2019 From: report at bugs.python.org (Tim Peters) Date: Mon, 07 Oct 2019 00:22:37 +0000 Subject: [issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0 In-Reply-To: <1570326378.93.0.0728676630318.issue38382@roundup.psfhosted.org> Message-ID: <1570407757.53.0.0213078586289.issue38382@roundup.psfhosted.org> Tim Peters added the comment: I don't have a problem with the current behavior (early out on zero, even if later arguments are senseless). So: > * Just document that there is an early-out for zero. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 20:26:31 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 07 Oct 2019 00:26:31 +0000 Subject: [issue38386] ModuleNotFoundError: No module named '_ctypes' In-Reply-To: <1570403021.12.0.499983378492.issue38386@roundup.psfhosted.org> Message-ID: <1570407991.7.0.262149170855.issue38386@roundup.psfhosted.org> Steven D'Aprano added the comment: I agree with Ned closing this issue, but just glancing at the logs, it looks to me like buildozer has shadowed your Python's ctypes with a broken ctypes in /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/Lib If that's the case, this is definitely not a Python bug and should be reported to buildozer. But one thing you should check first: run ``which python3`` and make sure that the Python you are running (which has ctypes installed) is the same as the /usr/bin/python3 that buildozer is running. Or run ``/usr/bin/python3 -c "import ctypes"`` and see what happens. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 20:42:25 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 07 Oct 2019 00:42:25 +0000 Subject: [issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0 In-Reply-To: <1570326378.93.0.0728676630318.issue38382@roundup.psfhosted.org> Message-ID: <1570408945.86.0.254324340399.issue38382@roundup.psfhosted.org> Raymond Hettinger added the comment: > I don't have a problem with the current behavior (early out on zero, > even if later arguments are senseless). So: > > > * Just document that there is an early-out for zero. That make the most sense to me as well (even though the OP thinks otherwise). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 21:41:18 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 07 Oct 2019 01:41:18 +0000 Subject: [issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0 In-Reply-To: <1570326378.93.0.0728676630318.issue38382@roundup.psfhosted.org> Message-ID: <1570412478.93.0.113956276178.issue38382@roundup.psfhosted.org> Steven D'Aprano added the comment: Thanks Warren, the resistance example is excellent, would you like to write up a PR to add it to the docs? In the original design, I prohibited negative numbers because that seems to be what everyone says you should do, but as far as I can tell it is mathematically well defined so long as the sum of positive values doesn't equal the sum of negative values. And in that case, we could return a NAN. I don't know that there's any physical meaning to the harmonic mean of negative values (circuits with negative resistances?), but I'm almost tempted to make this "consenting adults" and remove the restriction altogether. That would simplify the implementation and remove any arguments about early-out on zero. I acknowledge Warren's point about permutations of data, but that applies to anything with an early-out. I don't think that's quite persuasive enough to justify losing the early exit on zero. Warren, if you feel really strongly about this, feel free to try to change my mind. But for now, I think that documenting that zero triggers an early-out is the right solution. By the way, I've just noticed that harmonic_mean([INF, INF]) raises. Should it return INF instead? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 22:08:55 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 07 Oct 2019 02:08:55 +0000 Subject: [issue26510] [argparse] Add required argument to add_subparsers In-Reply-To: <1457445361.5.0.530669445668.issue26510@psf.upfronthosting.co.za> Message-ID: <1570414135.04.0.998053447857.issue26510@roundup.psfhosted.org> miss-islington added the comment: New changeset 9e71917e0290972f65711f75510078f799cf0b59 by Miss Islington (bot) (Adam J. Stewart) in branch 'master': bpo-26510: Add versionchanged for required arg of add_subparsers (GH-16588) https://github.com/python/cpython/commit/9e71917e0290972f65711f75510078f799cf0b59 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 22:09:17 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 07 Oct 2019 02:09:17 +0000 Subject: [issue26510] [argparse] Add required argument to add_subparsers In-Reply-To: <1457445361.5.0.530669445668.issue26510@psf.upfronthosting.co.za> Message-ID: <1570414157.83.0.390395565314.issue26510@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16196 pull_request: https://github.com/python/cpython/pull/16608 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 22:09:26 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 07 Oct 2019 02:09:26 +0000 Subject: [issue26510] [argparse] Add required argument to add_subparsers In-Reply-To: <1457445361.5.0.530669445668.issue26510@psf.upfronthosting.co.za> Message-ID: <1570414166.52.0.242530319055.issue26510@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16197 pull_request: https://github.com/python/cpython/pull/16609 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 22:14:53 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 07 Oct 2019 02:14:53 +0000 Subject: [issue26510] [argparse] Add required argument to add_subparsers In-Reply-To: <1457445361.5.0.530669445668.issue26510@psf.upfronthosting.co.za> Message-ID: <1570414493.26.0.92758606156.issue26510@roundup.psfhosted.org> miss-islington added the comment: New changeset 50b8d579421e621130806e62d6108f5f83d4be7f by Miss Islington (bot) in branch '3.7': bpo-26510: Add versionchanged for required arg of add_subparsers (GH-16588) https://github.com/python/cpython/commit/50b8d579421e621130806e62d6108f5f83d4be7f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 22:15:47 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 07 Oct 2019 02:15:47 +0000 Subject: [issue26510] [argparse] Add required argument to add_subparsers In-Reply-To: <1457445361.5.0.530669445668.issue26510@psf.upfronthosting.co.za> Message-ID: <1570414547.8.0.555380066044.issue26510@roundup.psfhosted.org> miss-islington added the comment: New changeset f19b4d7474973236e63d3d8260bfb8072acfff9d by Miss Islington (bot) in branch '3.8': bpo-26510: Add versionchanged for required arg of add_subparsers (GH-16588) https://github.com/python/cpython/commit/f19b4d7474973236e63d3d8260bfb8072acfff9d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 00:29:16 2019 From: report at bugs.python.org (Tamirys Pino) Date: Mon, 07 Oct 2019 04:29:16 +0000 Subject: [issue38389] Bug on sorted with count key Message-ID: <1570422556.48.0.0127805381731.issue38389@roundup.psfhosted.org> New submission from Tamirys Pino : >>> data=[2, 3, 2, 4, 5, 12, 2, 3, 3, 3, 12, 5] >>> data [2, 3, 2, 4, 5, 12, 2, 3, 3, 3, 12, 5] >>> sorted(data) [2, 2, 2, 3, 3, 3, 3, 4, 5, 5, 12, 12] >>> sorted(data, key=data.count) [4, 5, 12, 12, 5, 2, 2, 2, 3, 3, 3, 3] [4, 5, 12, 12, 5, 2, 2, 2, 3, 3, 3, 3] should be [4, 5, 5, 12, 12, 2, 2, 2, 3, 3, 3, 3] ---------- messages: 354063 nosy: Tamirys Pino priority: normal severity: normal status: open title: Bug on sorted with count key type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 00:32:59 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 07 Oct 2019 04:32:59 +0000 Subject: [issue38389] Bug on sorted with count key In-Reply-To: <1570422556.48.0.0127805381731.issue38389@roundup.psfhosted.org> Message-ID: <1570422779.7.0.313568488573.issue38389@roundup.psfhosted.org> Benjamin Peterson added the comment: 5 and 12 both appear twice in the list, so as far as the key function is concerned, they're equal. ---------- nosy: +benjamin.peterson resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 03:25:36 2019 From: report at bugs.python.org (Warren Weckesser) Date: Mon, 07 Oct 2019 07:25:36 +0000 Subject: [issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0 In-Reply-To: <1570326378.93.0.0728676630318.issue38382@roundup.psfhosted.org> Message-ID: <1570433136.38.0.469668233183.issue38382@roundup.psfhosted.org> Warren Weckesser added the comment: I really don't like the current inconsistent behavior. I can't help but see it as a bug, and I am surprised that folks think it is OK that harmonic_mean([0, "foo"]) returns 0. This is the *statistics* module, and the first line of https://docs.python.org/3/library/statistics.html says "This module provides functions for calculating mathematical statistics of numeric (Real-valued) data". I understand the desire to maintain the performance benefit of the early exit, but I would rather disallow values that are zero than accept the nonsensical result of harmonic_mean([0, "foo"]) and the inconsistency between that and the result of harmonic_mean(["foo", 0]). I spend most of my time working on numerical-ish code, so my world view might be different than that of y'all. Here's a new proposal. To continue to accept zero values, and disallow negative values consistently (as the function is documented to do), *and* preserve the early exit, I propose that the try/except statement in harmonic_mean in master be changed to try: T, total, count = _sum(1/x for x in _fail_neg(data, errmsg)) except ZeroDivisionError: if any(x < 0 for x in data): raise StatisticsError(errmsg) from None return 0 The change adds just the two lines in the except block. This doesn't change the "happy path" that is followed when all the values are strictly greater than 0. The cost of the additional check for any negative values in the input only occurs in the (presumably uncommon) case where an input value is 0. (This means, however, that any values before the first 0 are checked twice.) > In the original design, I prohibited negative numbers because that seems to be what everyone says you should do, but as far as I can tell it is mathematically well defined so long as the sum of positive values doesn't equal the sum of negative values. And in that case, we could return a NAN. Allowing negative values introduces some mathematical issues. Most importantly, the limit of the harmonic mean as two or more values approach zero (in the multivariable limit sense) no longer exists. Even in the simple case of computing the harmonic mean H(x, y) of two values, the limit of H(x, y) as (x, y) -> (0, 0) does not exist. H(x, y) is one of those funky functions where there are different paths to the origin in the second and fourth quadrants that lead to different values of the limit. Of course, practicality beats purity, so the harmonic mean could simply be defined to be 0 whenever any one of the inputs is 0. Then the only issue is the one you mentioned: the handling of the case where the denominator of the harmonic mean formula is zero. In that case, the code would return NAN as you suggested, or raise an exception. Overall, I don't think handling negative values is very important, and I'm not sure such a change to the function is worthwhile. On the other hand, I think it would be better than the current behavior. > By the way, I've just noticed that harmonic_mean([INF, INF]) raises. Should it return INF instead? Yes, I expect INF in that case. Currently it only raises when all the inputs are INF. Include one finite value, and there is no error: In [67]: harmonic_mean([math.inf, math.inf, 5]) Out[67]: 15.0 The exception could be fixed by checking if total is zero before computing n/total (currently computed in the return statement of the function). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 04:54:41 2019 From: report at bugs.python.org (hai shi) Date: Mon, 07 Oct 2019 08:54:41 +0000 Subject: [issue14364] Argparse incorrectly handles '--' as argument to option In-Reply-To: <1332080953.55.0.495639573781.issue14364@psf.upfronthosting.co.za> Message-ID: <1570438481.6.0.060166702542.issue14364@roundup.psfhosted.org> hai shi added the comment: > The PR's Misc/NEWS entry, "Fix behavior of argparse when '--' as argument to option", is insufficient. Thanks for your comment, Raymond. I would continue update the desc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 05:10:21 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Oct 2019 09:10:21 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1451686739.56.0.219134772531.issue25988@psf.upfronthosting.co.za> Message-ID: <1570439421.65.0.100599777936.issue25988@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset ef092fe9905f61ca27889092ca1248a11aa74498 by Serhiy Storchaka in branch 'master': bpo-25988: Do not expose abstract collection classes in the collections module. (GH-10596) https://github.com/python/cpython/commit/ef092fe9905f61ca27889092ca1248a11aa74498 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 05:14:51 2019 From: report at bugs.python.org (hai shi) Date: Mon, 07 Oct 2019 09:14:51 +0000 Subject: [issue38390] Got an compile warning in dictobject.c Message-ID: <1570439691.81.0.591764842739.issue38390@roundup.psfhosted.org> New submission from hai shi : The warning detail: Objects/dictobject.c: In function ?_PyDictView_Intersect?: Objects/dictobject.c:4189:15: warning: unused variable ?tmp? [-Wunused-variable] PyObject *tmp; ^ ---------- components: Build messages: 354068 nosy: shihai1991 priority: normal severity: normal status: open title: Got an compile warning in dictobject.c type: compile error versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 05:15:59 2019 From: report at bugs.python.org (hai shi) Date: Mon, 07 Oct 2019 09:15:59 +0000 Subject: [issue38390] Got a compile warning in dictobject.c In-Reply-To: <1570439691.81.0.591764842739.issue38390@roundup.psfhosted.org> Message-ID: <1570439759.87.0.797134504569.issue38390@roundup.psfhosted.org> Change by hai shi : ---------- title: Got an compile warning in dictobject.c -> Got a compile warning in dictobject.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 05:16:38 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Oct 2019 09:16:38 +0000 Subject: [issue38215] Do not import modules in star-import when __all__ is not defined. In-Reply-To: <1568822213.45.0.69943350833.issue38215@roundup.psfhosted.org> Message-ID: <1570439798.74.0.927048250804.issue38215@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 05:17:05 2019 From: report at bugs.python.org (hai shi) Date: Mon, 07 Oct 2019 09:17:05 +0000 Subject: [issue38390] Got a compile warning in dictobject.c In-Reply-To: <1570439691.81.0.591764842739.issue38390@roundup.psfhosted.org> Message-ID: <1570439825.61.0.970439098079.issue38390@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +16198 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16610 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 05:36:21 2019 From: report at bugs.python.org (=?utf-8?q?Lo=C3=AFc_Etienne?=) Date: Mon, 07 Oct 2019 09:36:21 +0000 Subject: [issue38391] Typo in tutorial code (does not compile) Message-ID: <1570440981.11.0.0420917562712.issue38391@roundup.psfhosted.org> New submission from Lo?c Etienne : https://docs.python.org/3.7/extending/newtypes_tutorial.html Is: PY_DECREF(m); Should be: Py_DECREF(m); ---------- components: Demos and Tools messages: 354069 nosy: Lo?c Etienne priority: normal severity: normal status: open title: Typo in tutorial code (does not compile) versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 06:05:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 10:05:29 +0000 Subject: [issue38210] Intersection of dict view with iterator returns empty set In-Reply-To: <1568790606.98.0.898790756289.issue38210@roundup.psfhosted.org> Message-ID: <1570442729.5.0.667011761711.issue38210@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16199 pull_request: https://github.com/python/cpython/pull/16611 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 06:14:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 10:14:01 +0000 Subject: [issue36389] Add gc.enable_object_debugger(): detect corrupted Python objects in the GC In-Reply-To: <1553166161.96.0.697085261419.issue36389@roundup.psfhosted.org> Message-ID: <1570443241.29.0.603236906832.issue36389@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16200 pull_request: https://github.com/python/cpython/pull/16612 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 06:14:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 10:14:01 +0000 Subject: [issue38376] ./configure --with-assertions generates a broken build In-Reply-To: <1570279431.23.0.578903771856.issue38376@roundup.psfhosted.org> Message-ID: <1570443241.43.0.350894484691.issue38376@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16201 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16612 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 06:14:55 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Oct 2019 10:14:55 +0000 Subject: [issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call In-Reply-To: <1480885774.84.0.670239959771.issue28869@psf.upfronthosting.co.za> Message-ID: <1570443295.32.0.723207676877.issue28869@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +16202 pull_request: https://github.com/python/cpython/pull/16613 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 06:15:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 10:15:22 +0000 Subject: [issue38376] ./configure --with-assertions generates a broken build In-Reply-To: <1570279431.23.0.578903771856.issue38376@roundup.psfhosted.org> Message-ID: <1570443322.78.0.624434474757.issue38376@roundup.psfhosted.org> STINNER Victor added the comment: My intent in bpo-36389 was to also provide _PyObject_CheckConsistency() in release mode to help debugging GC crash, especially in visit_decref(). I wrote PR 16612 to fix my implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 06:18:35 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Oct 2019 10:18:35 +0000 Subject: [issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call In-Reply-To: <1480885774.84.0.670239959771.issue28869@psf.upfronthosting.co.za> Message-ID: <1570443515.49.0.686434781206.issue28869@roundup.psfhosted.org> Serhiy Storchaka added the comment: There is a simpler way to fix this issue. Instead of hacking __new__, the inheritance registry can be set up in ABCMeta.__init__. There are no reasons of making this in __new__. ---------- versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 06:20:31 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Oct 2019 10:20:31 +0000 Subject: [issue38390] Got a compile warning in dictobject.c In-Reply-To: <1570439691.81.0.591764842739.issue38390@roundup.psfhosted.org> Message-ID: <1570443631.21.0.129375554669.issue38390@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 06:21:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 10:21:20 +0000 Subject: [issue38353] Cleanup the path configuration implementation code (getpath.c) In-Reply-To: <1570050763.22.0.787922067096.issue38353@roundup.psfhosted.org> Message-ID: <1570443680.09.0.8477910249.issue38353@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16203 pull_request: https://github.com/python/cpython/pull/16614 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 06:22:42 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Oct 2019 10:22:42 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1451686739.56.0.219134772531.issue25988@psf.upfronthosting.co.za> Message-ID: <1570443762.82.0.214802904716.issue25988@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 06:28:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 10:28:19 +0000 Subject: [issue38210] Intersection of dict view with iterator returns empty set In-Reply-To: <1568790606.98.0.898790756289.issue38210@roundup.psfhosted.org> Message-ID: <1570444099.4.0.165218898717.issue38210@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d97f1ce6dba6c4aa5614adc06ad2e0948709845c by Victor Stinner in branch 'master': bpo-38210: Fix compiler warning in dictobject.c (GH-16611) https://github.com/python/cpython/commit/d97f1ce6dba6c4aa5614adc06ad2e0948709845c ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 06:29:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 10:29:26 +0000 Subject: [issue36389] Add gc.enable_object_debugger(): detect corrupted Python objects in the GC In-Reply-To: <1553166161.96.0.697085261419.issue36389@roundup.psfhosted.org> Message-ID: <1570444166.7.0.908163938998.issue36389@roundup.psfhosted.org> STINNER Victor added the comment: Update: I added an assertion which should help to detect some kind of bugs in debug mode: commit d91d4de31745fc1ed4c7e6c208917827c9c472b6 Author: Victor Stinner Date: Mon Sep 9 17:44:59 2019 +0200 bpo-38070: visit_decref() calls _PyObject_IsFreed() (GH-15782) In debug mode, visit_decref() now calls _PyObject_IsFreed() to ensure that the object is not freed. If it's freed, the program fails with an assertion error and Python dumps informations about the freed object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 06:48:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 10:48:58 +0000 Subject: [issue38392] Ensure that objects entering the GC are valid Message-ID: <1570445338.58.0.651902608854.issue38392@roundup.psfhosted.org> New submission from STINNER Victor : A bug in Python/hamt.c was only discovered 4 months after the code was added to Python: * https://mail.python.org/pipermail/python-dev/2018-June/153857.html * https://bugs.python.org/issue33803 The problem was that an object was tracked by the GC, whereas calling its traverse method crashed Python... depending when the traverse method is called exactly. Pseudo-code: PyObject_GC_Track(); ... obj2 = PyObject_GC_NewVar(...); ... The problem is that PyObject_GC_NewVar() can trigger a GC collection which uses the partially initialized object, and then we get a cryptic crash in the GC (usually seen in visit_decref()). I propose to make PyObject_GC_Track() stricter: validate that the object seems to be "valid" or "fully initialized". From the GC point of view, it means that calling tp_traverse must not crash. Attached PR is a concrete implementation. This issue is a follow-up of my previously failed attempt bpo-36389 "Add gc.enable_object_debugger(): detect corrupted Python objects in the GC". While bpo-36389 attempts to discoverd corrupted objects once a GC collection is triggered, this issue is restricted to objects entering the GC. First problem: my PR breaks Modules/pyexpat.c whereas the code is not strictly a bug: in Python 3.8, it's ok to put a partially initialized object into the GC if no GC collection can be triggered before the object is fully initialized. In Modules/pyexpat.c case, the code looks safe from that point of view. It means that such change is a backward incompatible change. IMHO it's a good step forward, since it is likely to discovered hidden bugs. ---------- components: Interpreter Core messages: 354074 nosy: vstinner priority: normal severity: normal status: open title: Ensure that objects entering the GC are valid versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 06:54:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 10:54:28 +0000 Subject: [issue38392] Ensure that objects entering the GC are valid In-Reply-To: <1570445338.58.0.651902608854.issue38392@roundup.psfhosted.org> Message-ID: <1570445668.54.0.261064782393.issue38392@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +16204 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16615 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 06:55:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 10:55:45 +0000 Subject: [issue38392] Ensure that objects entering the GC are valid In-Reply-To: <1570445338.58.0.651902608854.issue38392@roundup.psfhosted.org> Message-ID: <1570445745.22.0.942154058501.issue38392@roundup.psfhosted.org> STINNER Victor added the comment: Pablo, Tim, Neal: what do you think of this idea? ---------- nosy: +nnorwitz, pablogsal, tim.peters stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 06:56:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 10:56:20 +0000 Subject: [issue36389] Add gc.enable_object_debugger(): detect corrupted Python objects in the GC In-Reply-To: <1553166161.96.0.697085261419.issue36389@roundup.psfhosted.org> Message-ID: <1570445780.68.0.599167411867.issue36389@roundup.psfhosted.org> STINNER Victor added the comment: I created bpo-38392 "Ensure that objects entering the GC are valid". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 06:57:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 10:57:02 +0000 Subject: [issue38353] Cleanup the path configuration implementation code (getpath.c) In-Reply-To: <1570050763.22.0.787922067096.issue38353@roundup.psfhosted.org> Message-ID: <1570445821.99.0.58482677778.issue38353@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b96145a6b5d89599ebccd2111d93f5670ddae840 by Victor Stinner in branch 'master': bpo-38353: Simplify calculate_pybuilddir() (GH-16614) https://github.com/python/cpython/commit/b96145a6b5d89599ebccd2111d93f5670ddae840 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 07:02:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 11:02:41 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1570446161.63.0.349206528839.issue37531@roundup.psfhosted.org> STINNER Victor added the comment: Oh, regrtest main process was killed by faulthandler watchdog: it was blocked in _get_result() for longer than 1 minute. Extract of _get_result(): use_faulthandler = (self.ns.timeout is not None) timeout = PROGRESS_UPDATE while True: if use_faulthandler: faulthandler.dump_traceback_later(timeout * 2.0, exit=True) # wait for a thread try: return self.output.get(timeout=timeout) except queue.Empty: pass # display progress running = get_running(self.workers) if running and not self.ns.pgo: self.log('running: %s' % ', '.join(running)) self.ns.timeout is supposed to be 1500. I don't understand why regrtest got a timeout of 60 seconds? https://buildbot.python.org/all/#/builders/168/builds/1583 LD_LIBRARY_PATH=/usr/home/buildbot/python/3.x.koobs-freebsd-current/build ./python ./Tools/scripts/run_tests.py -j 1 -u all -W --slowest --fail-env-changed --timeout=1500 -j2 -j4 == CPython 3.9.0a0 (heads/master:ed8efd8e2c, Oct 7 2019, 21:38:27) [Clang 8.0.1 (tags/RELEASE_801/final 366581)] == FreeBSD-13.0-CURRENT-amd64-64bit-ELF little-endian == cwd: /usr/home/buildbot/python/3.x.koobs-freebsd-current/build/build/test_python_67537 == CPU count: 4 == encodings: locale=UTF-8, FS=utf-8 Using random seed 1307598 0:00:00 load avg: 3.41 Run tests in parallel using 4 child processes (...) 0:00:11 load avg: 3.55 [ 12/419] test_extcall passed 0:00:13 load avg: 3.55 [ 13/419] test_pydoc passed 0:00:14 load avg: 3.55 [ 14/419] test_devpoll skipped test_devpoll skipped -- test works only on Solaris OS family 0:00:15 load avg: 3.55 [ 15/419] test_class passed 0:00:17 load avg: 3.50 [ 16/419] test_ntpath passed Timeout (0:01:00)! Thread 0x0000000802d30c00 (most recent call first): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/selectors.py", line 415 in select File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/subprocess.py", line 1964 in _communicate File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/subprocess.py", line 1113 in communicate File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest_mp.py", line 199 in _run_process File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest_mp.py", line 228 in _runtest File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest_mp.py", line 265 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", line 944 in _bootstrap_inner File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", line 902 in _bootstrap Thread 0x0000000802d2fd00 (most recent call first): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/selectors.py", line 415 in select File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/subprocess.py", line 1964 in _communicate File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/subprocess.py", line 1113 in communicate File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest_mp.py", line 199 in _run_process File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest_mp.py", line 228 in _runtest File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest_mp.py", line 265 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", line 944 in _bootstrap_inner File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", line 902 in _bootstrap Thread 0x0000000802d2f800 (most recent call first): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/selectors.py", line 415 in select File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/subprocess.py", line 1964 in _communicate File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/subprocess.py", line 1113 in communicate File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest_mp.py", line 199 in _run_process File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest_mp.py", line 228 in _runtest File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest_mp.py", line 265 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", line 944 in _bootstrap_inner File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", line 902 in _bootstrap Thread 0x0000000802d30200 (most recent call first): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/selectors.py", line 415 in select File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/subprocess.py", line 1964 in _communicate File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/subprocess.py", line 1113 in communicate File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest_mp.py", line 199 in _run_process File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest_mp.py", line 228 in _runtest File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest_mp.py", line 265 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", line 944 in _bootstrap_inner File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", line 902 in _bootstrap Thread 0x0000000800acc000 (most recent call first): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", line 307 in wait File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/queue.py", line 179 in get File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest_mp.py", line 362 in _get_result File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest_mp.py", line 413 in run_tests File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest_mp.py", line 434 in run_tests_multiprocess File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/main.py", line 513 in run_tests File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/main.py", line 687 in _main File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/main.py", line 634 in main File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/main.py", line 712 in main File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/__main__.py", line 2 in File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/runpy.py", line 85 in _run_code File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/runpy.py", line 192 in _run_module_as_main *** Error code 1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 07:04:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 11:04:35 +0000 Subject: [issue38323] test_ayncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x In-Reply-To: <1569848255.08.0.155489980043.issue38323@roundup.psfhosted.org> Message-ID: <1570446275.3.0.434598582171.issue38323@roundup.psfhosted.org> STINNER Victor added the comment: Fail on x86 Gentoo Refleaks 3.x: https://buildbot.python.org/all/#/builders/1/builds/737 (...) Loop <_UnixSelectorEventLoop running=False closed=True debug=False> that handles pid 8654 is closed .Timeout (3:15:00)! Thread 0xb7b92700 (most recent call first): File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/selectors.py", line 468 in select File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/asyncio/base_events.py", line 1837 in _run_once File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/asyncio/base_events.py", line 589 in run_forever File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/asyncio/base_events.py", line 621 in run_until_complete File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/test_asyncio/test_subprocess.py", line 484 in test_close_kill_running File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/case.py", line 616 in _callTestMethod File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/case.py", line 659 in run File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/case.py", line 719 in __call__ File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/support/testresult.py", line 162 in run File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/support/__init__.py", line 2032 in _run_suite File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/support/__init__.py", line 2128 in run_unittest File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest.py", line 209 in _test_module File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/refleak.py", line 87 in dash_R File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest.py", line 232 in _runtest_inner2 File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest.py", line 270 in _runtest_inner File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest.py", line 153 in _runtest File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest.py", line 193 in runtest File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest_mp.py", line 67 in run_tests_worker File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/main.py", line 654 in _main File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/main.py", line 634 in main File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/main.py", line 712 in main File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/regrtest.py", line 43 in _main File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/regrtest.py", line 47 in File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/runpy.py", line 85 in _run_code File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/runpy.py", line 192 in _run_module_as_main == Tests result: FAILURE == 410 tests OK. 10 slowest tests: - test_concurrent_futures: 23 min 2 sec - test_multiprocessing_spawn: 22 min 6 sec - test_multiprocessing_forkserver: 15 min 51 sec - test_multiprocessing_fork: 10 min 15 sec - test_regrtest: 10 min 10 sec - test_gdb: 8 min 26 sec - test_lib2to3: 7 min 31 sec - test_pickle: 7 min - test_io: 6 min 50 sec - test_subprocess: 6 min 37 sec 1 test failed: test_asyncio 8 tests skipped: test_devpoll test_kqueue test_msilib test_startfile test_winconsoleio test_winreg test_winsound test_zipfile64 4:25:59 load avg: 1.55 4:25:59 load avg: 1.55 Re-running failed tests in verbose mode 4:25:59 load avg: 1.55 Re-running test_asyncio in verbose mode (...) test_close_kill_running (test.test_asyncio.test_subprocess.SubprocessMultiLoopWatcherTests) ... Timeout (3:15:00)! Thread 0xb7c51700 (most recent call first): File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/selectors.py", line 468 in select File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/asyncio/base_events.py", line 1837 in _run_once File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/asyncio/base_events.py", line 589 in run_forever File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/asyncio/base_events.py", line 621 in run_until_complete File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/test_asyncio/test_subprocess.py", line 484 in test_close_kill_running File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/case.py", line 616 in _callTestMethod File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/case.py", line 659 in run File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/case.py", line 719 in __call__ File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/runner.py", line 176 in run File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/support/__init__.py", line 2032 in _run_suite File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/support/__init__.py", line 2128 in run_unittest File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest.py", line 209 in _test_module File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/refleak.py", line 87 in dash_R File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest.py", line 232 in _runtest_inner2 File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest.py", line 270 in _runtest_inner File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest.py", line 153 in _runtest File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest.py", line 193 in runtest File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/main.py", line 318 in rerun_failed_tests File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/main.py", line 691 in _main File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/main.py", line 634 in main File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/main.py", line 712 in main File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/test/__main__.py", line 2 in File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/runpy.py", line 85 in _run_code File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.refleak/build/Lib/runpy.py", line 192 in _run_module_as_main make: *** [Makefile:1163: buildbottest] Error 1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 07:09:08 2019 From: report at bugs.python.org (Krishna Oza) Date: Mon, 07 Oct 2019 11:09:08 +0000 Subject: [issue38391] Typo in tutorial code (does not compile) In-Reply-To: <1570440981.11.0.0420917562712.issue38391@roundup.psfhosted.org> Message-ID: <1570446548.98.0.862800676733.issue38391@roundup.psfhosted.org> Change by Krishna Oza : ---------- keywords: +patch pull_requests: +16205 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16616 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 07:21:36 2019 From: report at bugs.python.org (Thomas Wouters) Date: Mon, 07 Oct 2019 11:21:36 +0000 Subject: [issue38392] Ensure that objects entering the GC are valid In-Reply-To: <1570445338.58.0.651902608854.issue38392@roundup.psfhosted.org> Message-ID: <1570447296.89.0.606155747918.issue38392@roundup.psfhosted.org> Thomas Wouters added the comment: I'm pretty sure you meant nascheme, not nnorwitz. ---------- nosy: +nascheme, twouters -nnorwitz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 07:35:15 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Oct 2019 11:35:15 +0000 Subject: [issue38392] Ensure that objects entering the GC are valid In-Reply-To: <1570445338.58.0.651902608854.issue38392@roundup.psfhosted.org> Message-ID: <1570448115.29.0.148318211025.issue38392@roundup.psfhosted.org> Serhiy Storchaka added the comment: It could be possible to do this in backward compatible way. PyObject_GC_Track() could add the object to the list of new objects (all objects are already linked in bi-linked list, so it would need to just move the object to the specified list), and PyObject_GC_NewVar() could check all new objects and clear the list of new objects (just move the head). I am not sure it is worth to do such complication. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 07:42:08 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Oct 2019 11:42:08 +0000 Subject: [issue38392] Ensure that objects entering the GC are valid In-Reply-To: <1570445338.58.0.651902608854.issue38392@roundup.psfhosted.org> Message-ID: <1570448528.2.0.416187203627.issue38392@roundup.psfhosted.org> Serhiy Storchaka added the comment: >From documentation: .. c:function:: void PyObject_GC_Track(PyObject *op) Adds the object *op* to the set of container objects tracked by the collector. The collector can run at unexpected times so objects must be valid while being tracked. This should be called once all the fields followed by the :c:member:`~PyTypeObject.tp_traverse` handler become valid, usually near the end of the constructor. So there was a bug in Modules/pyexpat.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 07:57:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 11:57:20 +0000 Subject: [issue38392] Ensure that objects entering the GC are valid In-Reply-To: <1570445338.58.0.651902608854.issue38392@roundup.psfhosted.org> Message-ID: <1570449440.96.0.389160059094.issue38392@roundup.psfhosted.org> STINNER Victor added the comment: > I'm pretty sure you meant nascheme, not nnorwitz. Oops, right :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 07:57:53 2019 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 07 Oct 2019 11:57:53 +0000 Subject: [issue38391] Typo in tutorial code (does not compile) In-Reply-To: <1570440981.11.0.0420917562712.issue38391@roundup.psfhosted.org> Message-ID: <1570449473.89.0.701089964586.issue38391@roundup.psfhosted.org> Xiang Zhang added the comment: New changeset 038503e08ac5b10601b95d5adc2c2cab7be10163 by Xiang Zhang (Krishna Oza) in branch 'master': bpo-38391: Fixing a typo for Py_DECREF (GH-16616) https://github.com/python/cpython/commit/038503e08ac5b10601b95d5adc2c2cab7be10163 ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 07:58:09 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 07 Oct 2019 11:58:09 +0000 Subject: [issue38391] Typo in tutorial code (does not compile) In-Reply-To: <1570440981.11.0.0420917562712.issue38391@roundup.psfhosted.org> Message-ID: <1570449489.38.0.133326904574.issue38391@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16206 pull_request: https://github.com/python/cpython/pull/16618 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 07:58:15 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 07 Oct 2019 11:58:15 +0000 Subject: [issue38391] Typo in tutorial code (does not compile) In-Reply-To: <1570440981.11.0.0420917562712.issue38391@roundup.psfhosted.org> Message-ID: <1570449495.79.0.00883093935011.issue38391@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16207 pull_request: https://github.com/python/cpython/pull/16619 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 08:04:12 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 07 Oct 2019 12:04:12 +0000 Subject: [issue38391] Typo in tutorial code (does not compile) In-Reply-To: <1570440981.11.0.0420917562712.issue38391@roundup.psfhosted.org> Message-ID: <1570449852.4.0.926150882278.issue38391@roundup.psfhosted.org> miss-islington added the comment: New changeset 77b4a659b60536caf11c547332d30677f3e8f02e by Miss Islington (bot) in branch '3.7': bpo-38391: Fixing a typo for Py_DECREF (GH-16616) https://github.com/python/cpython/commit/77b4a659b60536caf11c547332d30677f3e8f02e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 08:05:12 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 07 Oct 2019 12:05:12 +0000 Subject: [issue38391] Typo in tutorial code (does not compile) In-Reply-To: <1570440981.11.0.0420917562712.issue38391@roundup.psfhosted.org> Message-ID: <1570449912.49.0.0396620237618.issue38391@roundup.psfhosted.org> miss-islington added the comment: New changeset 985ec986e864b670687b900a4d6ca977b4e9694d by Miss Islington (bot) in branch '3.8': bpo-38391: Fixing a typo for Py_DECREF (GH-16616) https://github.com/python/cpython/commit/985ec986e864b670687b900a4d6ca977b4e9694d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 08:06:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 12:06:07 +0000 Subject: [issue38392] Ensure that objects entering the GC are valid In-Reply-To: <1570445338.58.0.651902608854.issue38392@roundup.psfhosted.org> Message-ID: <1570449967.12.0.263946945781.issue38392@roundup.psfhosted.org> STINNER Victor added the comment: > It could be possible to do this in backward compatible way. PyObject_GC_Track() could add the object to the list of new objects (all objects are already linked in bi-linked list, so it would need to just move the object to the specified list), and PyObject_GC_NewVar() could check all new objects and clear the list of new objects (just move the head). That's different than what I'm proposing here. Checking "later" is more on the bpo-36389 side: my bpo-36389 PR modified PyObject_GC_NewVar() to check that young object are valid. Moreover, my bpo-36389 PR required threshold: checking all young objects at each PyObject_GC_NewVar() simply killed performance which made the whole approach unusable in practice. Because of the threshold, my implementation failed to detect the hamt.c bug bpo-33803: the partially initialized was already fully initialized when my "object debugger" ran. PR 16615 detects immediately the hamt.c bug bpo-33803. I designed bpo-36389 to attempt to detect when an object is corrupted after its creation, corrupted by code running "later". We had a customer with a bug in OpenStack Nova. Nova crashed in visit_decref() but I failed to debug the issue. It motivated me to modify the debug ABI in Python 3.8, so later it will become possible to switch from release to debug mode to attempt to debug a program using additional checks added by the debug build. Here my intent is to ensure that objects entering the GC are valid to help to keep the GC list consistent and valid. But it doesn't prevent an object from being corrupted after its creation. We should try to find a different approach for that (maybe revisit bpo-36389). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 08:11:05 2019 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 07 Oct 2019 12:11:05 +0000 Subject: [issue38391] Typo in tutorial code (does not compile) In-Reply-To: <1570440981.11.0.0420917562712.issue38391@roundup.psfhosted.org> Message-ID: <1570450265.75.0.397714416111.issue38391@roundup.psfhosted.org> Change by Xiang Zhang : ---------- assignee: -> docs at python components: +Documentation -Demos and Tools nosy: +docs at python resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 08:13:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 12:13:12 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1570450392.69.0.067136924725.issue37531@roundup.psfhosted.org> STINNER Victor added the comment: > I don't understand why regrtest got a timeout of 60 seconds? Oh, that comes from "timeout = PROGRESS_UPDATE" with "PROGRESS_UPDATE = 30.0". But it means that the main process was stuck for longer than 60 seconds!? The main process is supposed to write an update "running: ..." every 30 seconds. This buildbot is very slow. Maybe 30 and 60 seconds limits are too low? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 08:25:18 2019 From: report at bugs.python.org (Mark Shannon) Date: Mon, 07 Oct 2019 12:25:18 +0000 Subject: [issue26219] implement per-opcode cache in ceval In-Reply-To: <1453918500.26.0.0886095278127.issue26219@psf.upfronthosting.co.za> Message-ID: <1570451118.04.0.185026669888.issue26219@roundup.psfhosted.org> Mark Shannon added the comment: "What's new in Python 3.8" says that this change speeds up the LOAD_GLOBAL opcode by 40%. That seems meaningless as a program cannot have LOAD_GLOBAL in isolation so any test would have other bytecodes as well. What's the evidence for the claimed speedup? What's the speedup on the benchmark suite? ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 08:28:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 12:28:07 +0000 Subject: [issue26219] implement per-opcode cache in ceval In-Reply-To: <1453918500.26.0.0886095278127.issue26219@psf.upfronthosting.co.za> Message-ID: <1570451287.0.0.918003641485.issue26219@roundup.psfhosted.org> STINNER Victor added the comment: > What's the evidence for the claimed speedup? > What's the speedup on the benchmark suite? https://github.com/python/cpython/pull/12884#issuecomment-485091040 points to: https://github.com/methane/sandbox/tree/master/2019/opcache_load_global#opcache-for-load_global == Microbenchmark == $ master/python -m perf timeit -s 'def foo(): int; str; bytes; float; int; str; bytes; float' -- 'foo()' ..................... Mean +- std dev: 213 ns +- 5 ns $ opcache/python -m perf timeit -s 'def foo(): int; str; bytes; float; int; str; bytes; float' -- 'foo()' ..................... Mean +- std dev: 120 ns +- 2 ns == pyperformance == $ ./cpython/python -m perf compare_to master.json opcache_load_global.json -G --min-speed=2 Slower (2): - pickle: 19.1 us +- 0.2 us -> 19.7 us +- 0.8 us: 1.03x slower (+3%) - unpickle_list: 8.66 us +- 0.04 us -> 8.85 us +- 0.06 us: 1.02x slower (+2%) Faster (23): - scimark_lu: 424 ms +- 22 ms -> 384 ms +- 4 ms: 1.10x faster (-9%) - regex_compile: 359 ms +- 4 ms -> 330 ms +- 1 ms: 1.09x faster (-8%) - django_template: 250 ms +- 3 ms -> 231 ms +- 2 ms: 1.08x faster (-8%) - unpickle_pure_python: 802 us +- 12 us -> 754 us +- 9 us: 1.06x faster (-6%) - pickle_pure_python: 1.04 ms +- 0.01 ms -> 991 us +- 15 us: 1.05x faster (-5%) - hexiom: 20.8 ms +- 0.2 ms -> 19.8 ms +- 0.1 ms: 1.05x faster (-5%) - logging_simple: 18.4 us +- 0.2 us -> 17.6 us +- 0.2 us: 1.05x faster (-4%) - sympy_expand: 774 ms +- 5 ms -> 741 ms +- 3 ms: 1.04x faster (-4%) - json_dumps: 28.1 ms +- 0.2 ms -> 27.0 ms +- 0.2 ms: 1.04x faster (-4%) - logging_format: 20.4 us +- 0.2 us -> 19.6 us +- 0.3 us: 1.04x faster (-4%) - richards: 147 ms +- 2 ms -> 141 ms +- 1 ms: 1.04x faster (-4%) - meteor_contest: 189 ms +- 1 ms -> 182 ms +- 1 ms: 1.04x faster (-4%) - xml_etree_iterparse: 226 ms +- 2 ms -> 217 ms +- 2 ms: 1.04x faster (-4%) - sympy_str: 358 ms +- 3 ms -> 345 ms +- 4 ms: 1.04x faster (-4%) - sqlalchemy_imperative: 44.0 ms +- 1.2 ms -> 42.4 ms +- 1.2 ms: 1.04x faster (-4%) - sympy_sum: 167 ms +- 1 ms -> 161 ms +- 1 ms: 1.04x faster (-4%) - nqueens: 217 ms +- 1 ms -> 211 ms +- 1 ms: 1.03x faster (-3%) - fannkuch: 1.09 sec +- 0.01 sec -> 1.07 sec +- 0.00 sec: 1.03x faster (-3%) - raytrace: 1.11 sec +- 0.02 sec -> 1.08 sec +- 0.01 sec: 1.03x faster (-3%) - dulwich_log: 122 ms +- 1 ms -> 119 ms +- 1 ms: 1.03x faster (-3%) - logging_silent: 419 ns +- 5 ns -> 410 ns +- 5 ns: 1.02x faster (-2%) - sympy_integrate: 33.5 ms +- 0.1 ms -> 32.8 ms +- 0.2 ms: 1.02x faster (-2%) - pathlib: 40.8 ms +- 0.4 ms -> 40.0 ms +- 0.5 ms: 1.02x faster (-2%) Benchmark hidden because not significant (32): (...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 08:41:00 2019 From: report at bugs.python.org (Mark Shannon) Date: Mon, 07 Oct 2019 12:41:00 +0000 Subject: [issue26219] implement per-opcode cache in ceval In-Reply-To: <1453918500.26.0.0886095278127.issue26219@psf.upfronthosting.co.za> Message-ID: <1570452060.66.0.886326993478.issue26219@roundup.psfhosted.org> Mark Shannon added the comment: Given that def foo(): int; str; bytes; float; int; str; bytes; float can be trivially be rewritten as def foo(): pass I think that benchmark is meaningless. I really don't think we should be making claims like "40% speedup" for such contrived examples. It looks like the speedup is real, but only about 2% speedup overall. The "what's new" should reflect that, IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 09:12:36 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 07 Oct 2019 13:12:36 +0000 Subject: [issue37324] collections: remove deprecated aliases to ABC classes In-Reply-To: <1560803912.16.0.0813723259969.issue37324@roundup.psfhosted.org> Message-ID: <1570453956.49.0.0597133205545.issue37324@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I think this can be closed since https://bugs.python.org/issue25988 has the PR merged. ---------- nosy: +serhiy.storchaka, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 09:14:45 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 07 Oct 2019 13:14:45 +0000 Subject: [issue36953] Remove collections ABCs? In-Reply-To: <1558140764.46.0.049733618419.issue36953@roundup.psfhosted.org> Message-ID: <1570454085.16.0.0517423511793.issue36953@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: The removal was done in https://bugs.python.org/issue25988 . Given that the version in warning message was updated I guess this can be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 09:20:44 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Oct 2019 13:20:44 +0000 Subject: [issue37324] collections: remove deprecated aliases to ABC classes In-Reply-To: <1560803912.16.0.0813723259969.issue37324@roundup.psfhosted.org> Message-ID: <1570454444.09.0.596948676476.issue37324@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> collections.abc.Indexable _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 09:21:47 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Oct 2019 13:21:47 +0000 Subject: [issue36953] Remove collections ABCs? In-Reply-To: <1558140764.46.0.049733618419.issue36953@roundup.psfhosted.org> Message-ID: <1570454507.87.0.98593679987.issue36953@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 09:24:31 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Mon, 07 Oct 2019 13:24:31 +0000 Subject: [issue36953] Remove collections ABCs? In-Reply-To: <1558140764.46.0.049733618419.issue36953@roundup.psfhosted.org> Message-ID: <1570454671.63.0.875492061985.issue36953@roundup.psfhosted.org> Chih-Hsuan Yen added the comment: Lib/collections/__init__.py on branch 3.7 still states: > Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working I think it should also be updated (hopefully before 3.7.5?) as the actual removal turns out to be in 3.9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 09:27:24 2019 From: report at bugs.python.org (pmp-p) Date: Mon, 07 Oct 2019 13:27:24 +0000 Subject: [issue38393] building modules from 3.8.0rc1 fails in a venv when system 3.8 is present Message-ID: <1570454844.33.0.763324170679.issue38393@roundup.psfhosted.org> New submission from pmp-p : when trying to build rc1 from a b4 venv to prepare a python host for cross compilation on ubuntu xenial flavour x64 i got : cd /tmp python3.7 -m venv testenv cd testenv/ . bin/activate (testenv) /tmp/testenv $ tar xf /tmp/Python-3.8.0rc1.tar.xz && cd Python-3.8.0rc1 CC=clang ./configure --prefix=/tmp/python3.host --with-system-ffi --disable-ipv6 --without-ensurepip --with-c-locale-coercion --disable-shared && make ./python -E ./setup.py build step will fail for the reason i suspect is srcdir is taken from system python3.8 if installed ( /usr/local in that case ) $ ./python -E Python 3.8.0rc1 (default, Oct 7 2019, 15:16:07) [Clang 6.0.0 (tags/RELEASE_600/final)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sysconfig >>> sysconfig.get_config_var('srcdir') '/usr/local/lib/python3.8/config-3.8-x86_64-linux-gnu' >>> ---------- messages: 354095 nosy: pmpp, vstinner priority: normal severity: normal status: open title: building modules from 3.8.0rc1 fails in a venv when system 3.8 is present type: compile error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 09:40:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 13:40:51 +0000 Subject: [issue38393] building modules from 3.8.0rc1 fails in a venv when system 3.8 is present In-Reply-To: <1570454844.33.0.763324170679.issue38393@roundup.psfhosted.org> Message-ID: <1570455651.67.0.930942074982.issue38393@roundup.psfhosted.org> STINNER Victor added the comment: It's not a Python 3.8 regression. Python 3.7 has the same behavior. cd $HOME python3.7 -m venv testenv cd testenv/ . bin/activate wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0rc1.tar.xz tar -xf Python-3.8.0rc1.tar.xz && cd Python-3.8.0rc1 CC=clang ./configure --prefix=/tmp/python3.host --with-system-ffi --disable-ipv6 --without-ensurepip --with-c-locale-coercion --disable-shared && make Python 3.8 error: """ $ make ./python -E -S -m sysconfig --generate-posix-vars ;\ if test $? -ne 0 ; then \ echo "generate-posix-vars failed" ; \ rm -f ./pybuilddir.txt ; \ exit 1 ; \ fi Could not find platform independent libraries Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] Python path configuration: PYTHONHOME = (not set) PYTHONPATH = (not set) program name = './python' isolated = 0 environment = 0 user site = 1 import site = 0 sys._base_executable = '/home/vstinner/testenv/Python-3.8.0rc1/python' sys.base_prefix = '/tmp/python3.host' sys.base_exec_prefix = '/tmp/python3.host' sys.executable = '/home/vstinner/testenv/Python-3.8.0rc1/python' sys.prefix = '/tmp/python3.host' sys.exec_prefix = '/tmp/python3.host' sys.path = [ '/tmp/python3.host/lib/python38.zip', '/tmp/python3.host/lib/python3.8', '/tmp/python3.host/lib/lib-dynload', ] Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding Python runtime state: core initialized ModuleNotFoundError: No module named 'encodings' Current thread 0x00007ff6a75f6740 (most recent call first): generate-posix-vars failed make: *** [Makefile:592: pybuilddir.txt] Error 1 """ cd .. wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tar.xz tar -xf Python-3.7.4.tar.xz cd Python-3.7.4/ CC=clang ./configure --prefix=/tmp/python3.host --with-system-ffi --disable-ipv6 --without-ensurepip --with-c-locale-coercion --disable-shared Python 3.7 error: """ $ make ./python -E -S -m sysconfig --generate-posix-vars ;\ if test $? -ne 0 ; then \ echo "generate-posix-vars failed" ; \ rm -f ./pybuilddir.txt ; \ exit 1 ; \ fi Could not find platform independent libraries Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] Fatal Python error: initfsencoding: Unable to get the locale encoding ModuleNotFoundError: No module named 'encodings' Current thread 0x00007f5a77f5a740 (most recent call first): /bin/sh : ligne 5 : 19592 Aborted (core dumped)./python -E -S -m sysconfig --generate-posix-vars generate-posix-vars failed make: *** [Makefile:606: pybuilddir.txt] Error 1 """ ---------- components: +Build _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 09:41:40 2019 From: report at bugs.python.org (pmp-p) Date: Mon, 07 Oct 2019 13:41:40 +0000 Subject: [issue38393] building modules from 3.8.0rc1 fails in a venv when system 3.8 is present In-Reply-To: <1570454844.33.0.763324170679.issue38393@roundup.psfhosted.org> Message-ID: <1570455700.45.0.477736315602.issue38393@roundup.psfhosted.org> Change by pmp-p : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 10:01:54 2019 From: report at bugs.python.org (Florian Krause) Date: Mon, 07 Oct 2019 14:01:54 +0000 Subject: [issue38394] time.get_clock_info reports "adjustable=False" for implementation="CLOCK_MONOTONIC" Message-ID: <1570456914.26.0.677053488358.issue38394@roundup.psfhosted.org> New submission from Florian Krause : clock_gettime(CLOCK_MONOTONIC) is adjustable via NTP, as described here: https://linux.die.net/man/2/clock_gettime (and also mentioned in PEP 418). Yet, time.get_clock_info reports it as "adjustable=False" (this even seems to be hardcoded for all clocks on Linux). ---------- components: Library (Lib) messages: 354097 nosy: Florian Krause priority: normal severity: normal status: open title: time.get_clock_info reports "adjustable=False" for implementation="CLOCK_MONOTONIC" type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 10:04:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 14:04:56 +0000 Subject: [issue38393] building modules from 3.8.0rc1 fails in a venv when system 3.8 is present In-Reply-To: <1570454844.33.0.763324170679.issue38393@roundup.psfhosted.org> Message-ID: <1570457096.9.0.122987841003.issue38393@roundup.psfhosted.org> STINNER Victor added the comment: The problem is that Python looks for pyvenv.cfg in the program directory or in its parent directory. For example: /tmp/testenv/Python-3.8.0rc1/python looks for /tmp/testenv/Python-3.8.0rc1/pyvenv.cfg (doesn't exist) and /tmp/testenv/Python-3.8.0rc1/pyvenv.cfg (exists). On my system, pyvenv.cfg contains: --- home = /usr/bin include-system-site-packages = false version = 3.7.4 --- We should add an option to ignore pyvenv.cfg, or modify an existing option like -I to ignore pyvenv.cfg. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 10:11:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 14:11:43 +0000 Subject: [issue38394] time.get_clock_info reports "adjustable=False" for implementation="CLOCK_MONOTONIC" In-Reply-To: <1570456914.26.0.677053488358.issue38394@roundup.psfhosted.org> Message-ID: <1570457503.63.0.240215694287.issue38394@roundup.psfhosted.org> STINNER Victor added the comment: Well, that's more a documentation issue than a bug. "adjustable=False" in the context of Python means that the clock cannot jump a day forward or one day backwards. For example, on my Fedora 30, I cannot set CLOCK_MONOTONIC clock as root: $ sudo python3 >>> import time >>> time.clock_settime(time.CLOCK_MONOTONIC, time.clock_gettime(time.CLOCK_MONOTONIC)) OSError: [Errno 22] Invalid argument In the Linux kernel, NTP adjusts CLOCK_MONOTONIC so it really measures time in *seconds*, rather something faster or slower than one second :-) Python time.monotonic() documentation clearly states that it uses the unit of one second: https://docs.python.org/dev/library/time.html#time.monotonic "Return the value (in fractional seconds) of a monotonic clock, i.e. a clock that cannot go backwards. (...)" CLOCK_MONOTONIC_RAW must not be used for time.monotonic() because it doesn't use an unit of 1 second. Feel free to propose a documentation enhancement :-) https://docs.python.org/dev/library/time.html#time.get_clock_info ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 10:21:55 2019 From: report at bugs.python.org (Maarten ter Huurne) Date: Mon, 07 Oct 2019 14:21:55 +0000 Subject: [issue21970] Broken code for handling file://host in urllib.request.FileHandler.file_open In-Reply-To: <1405216161.05.0.3363234179.issue21970@psf.upfronthosting.co.za> Message-ID: <1570458115.82.0.10636396093.issue21970@roundup.psfhosted.org> Maarten ter Huurne added the comment: Another problem with the current code is that when passed a URL with a host name that is not empty or "localhost", but is one of the alternative names for localhost returned by get_names(), file_open() returns None implicitly instead of opening the file. I think this issue would be fixed by the proposed patch. So it would be good if the patch could be reviewed and adopted. ---------- nosy: +mthuurne versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 10:34:58 2019 From: report at bugs.python.org (Maarten ter Huurne) Date: Mon, 07 Oct 2019 14:34:58 +0000 Subject: [issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used In-Reply-To: <1359599707.26.0.771342463799.issue17088@psf.upfronthosting.co.za> Message-ID: <1570458898.85.0.309576548191.issue17088@roundup.psfhosted.org> Maarten ter Huurne added the comment: Can I please get a review of the pull request? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 10:49:09 2019 From: report at bugs.python.org (Sam Gross) Date: Mon, 07 Oct 2019 14:49:09 +0000 Subject: [issue38395] proxy_contains (weakref.proxy) can access an object with 0 refcount Message-ID: <1570459749.44.0.879317891234.issue38395@roundup.psfhosted.org> New submission from Sam Gross : The implementation of weakref.proxy's methods call back into the Python API using a "borrowed reference" of the weakly referenced object (acquired via PyWeakref_GET_OBJECT). This API call may delete the last reference to the object (either directly or via GC), leaving a dangling pointer, which can be subsequently dereferenced. Tested with Python 3.8.0b4 (debug build) The following code crashes with a debug build of Python 3.8.0b4 on Linux. import weakref obj = None class MyObj: def __iter__(self): global obj del obj return NotImplemented obj = MyObj() p = weakref.proxy(obj) print(5 in p) This particular test case does not crash with a release build (on Linux). The implementation of `in` on a proxy object calls proxy_contains: return PySequence_Contains(PyWeakref_GET_OBJECT(proxy), value); https://github.com/python/cpython/blob/v3.8.0b4/Objects/weakrefobject.c#L556 This eventually calls _PySequence_IterSearch. The call to PyObject_GetIter can call arbitrary code, which can lead to seq (the proxy's referent) being deleted. The subsequent call to type_error dereferences a dead object. it = PyObject_GetIter(seq); if (it == NULL) { type_error("argument of type '%.200s' is not iterable", seq); return -1; } https://github.com/python/cpython/blob/v3.8.0b4/Objects/abstract.c#L2003-L2007 I believe some functions, like proxy_length, may be immune to this problem because they do not access the borrowed referent after calling into user code. However, this is hard to verify from reading the code and may be fragile -- small changes to PyObject_Length/Size, for example, might . See also https://bugs.python.org/issue16602 ---------- components: Interpreter Core messages: 354102 nosy: colesbury priority: normal severity: normal status: open title: proxy_contains (weakref.proxy) can access an object with 0 refcount type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 10:56:08 2019 From: report at bugs.python.org (Sascha Silbe) Date: Mon, 07 Oct 2019 14:56:08 +0000 Subject: [issue34271] Please support logging of SSL master secret by env variable SSLKEYLOGFILE In-Reply-To: <1532867889.16.0.56676864532.issue34271@psf.upfronthosting.co.za> Message-ID: <1570460168.63.0.399578745851.issue34271@roundup.psfhosted.org> Change by Sascha Silbe : ---------- nosy: +sascha_silbe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 11:55:56 2019 From: report at bugs.python.org (Batuhan) Date: Mon, 07 Oct 2019 15:55:56 +0000 Subject: [issue38396] ast.literal_eval doesn't give information about node except the type of it Message-ID: <1570463756.86.0.131436803473.issue38396@roundup.psfhosted.org> New submission from Batuhan : def _convert_num(node): if isinstance(node, Constant): if type(node.value) in (int, float, complex): return node.value > raise ValueError('malformed node or string: ' + repr(node)) E ValueError: malformed node or string: <_ast.Name object at 0x7f0e7ebab320> When a malformed node passes into literal_eval, it raises ValueError with repr of node (which is just a memory address and type). I think using dump(node) at there is a better option, like node = <_ast.Name object at 0x7fa8279847d0> def _convert_num(node): if isinstance(node, Constant): if type(node.value) in (int, float, complex): return node.value > raise ValueError('malformed node or string: ' + dump(node)) E ValueError: malformed node or string: Name(id='a', ctx=Load()) ---------- components: Library (Lib) messages: 354103 nosy: BTaskaya priority: normal severity: normal status: open title: ast.literal_eval doesn't give information about node except the type of it versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:02:35 2019 From: report at bugs.python.org (Batuhan) Date: Mon, 07 Oct 2019 16:02:35 +0000 Subject: [issue38396] ast.literal_eval doesn't give information about node except the type of it In-Reply-To: <1570463756.86.0.131436803473.issue38396@roundup.psfhosted.org> Message-ID: <1570464155.92.0.276411231825.issue38396@roundup.psfhosted.org> Change by Batuhan : ---------- keywords: +patch pull_requests: +16208 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16620 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:03:10 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 07 Oct 2019 16:03:10 +0000 Subject: [issue38396] ast.literal_eval doesn't give information about node except the type of it In-Reply-To: <1570463756.86.0.131436803473.issue38396@roundup.psfhosted.org> Message-ID: <1570464190.6.0.0745658231706.issue38396@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:06:40 2019 From: report at bugs.python.org (retnikt) Date: Mon, 07 Oct 2019 16:06:40 +0000 Subject: [issue38397] __init_subclass__ causes TypeError when used with more standard library metaclasses (such as EnumMeta) Message-ID: <1570464400.89.0.0085195281122.issue38397@roundup.psfhosted.org> New submission from retnikt : Essentially the same as https://bugs.python.org/issue29581 (more detail is there), but for the additional meta-classes enum.EnumMeta and probably typing.NamedTupleMeta (discussion needed - is there a use-case for this?) The __new__ method on these metaclasses should include **kwargs at the end of the method definition and pass them on to the super call in order to allow the special method __init_subclass__ to be defined with custom parameters on classes using the metaclass. (also, perhaps the issue for typing should be reported separately on github python/typing instead) ---------- components: Library (Lib) messages: 354104 nosy: retnikt priority: normal severity: normal status: open title: __init_subclass__ causes TypeError when used with more standard library metaclasses (such as EnumMeta) versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:09:58 2019 From: report at bugs.python.org (PyScripter) Date: Mon, 07 Oct 2019 16:09:58 +0000 Subject: [issue38398] PyUnicode functions are not exported by python 2 in Ubuntu Message-ID: <1570464598.55.0.274340335252.issue38398@roundup.psfhosted.org> New submission from PyScripter : As per title PyUnicode functions, such as PyUnicode_FromWideChar, are not exported on Ubuntu and possibly other Linux systems. This is a show stopper for embedded Python. To confirm: >>> import ctypes >>> hasattr(ctypes.pythonapi, "PyUnicode_FromWideChar") It should return True, but it returns False. ? I have tested with the default Ubuntu python 2.7.15 and with compiled python 2.7.16. Note that the problem does not exist in python3 and also python 2.7 and 3.x in Windows. So it is only python 2.7 in Ubuntu. ---------- components: Library (Lib) messages: 354105 nosy: pyscripter priority: normal severity: normal status: open title: PyUnicode functions are not exported by python 2 in Ubuntu type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:14:17 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 07 Oct 2019 16:14:17 +0000 Subject: [issue38398] PyUnicode functions are not exported by python 2 in Ubuntu In-Reply-To: <1570464598.55.0.274340335252.issue38398@roundup.psfhosted.org> Message-ID: <1570464857.5.0.237923157764.issue38398@roundup.psfhosted.org> Zachary Ware added the comment: Given that 2.7 is reaching end-of-life in a single-digit number of months, I doubt anything will be changed here. I'll leave it up to Benjamin to make that determination, though. ---------- nosy: +benjamin.peterson, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:20:01 2019 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 07 Oct 2019 16:20:01 +0000 Subject: [issue36356] Failure to build with address sanitizer In-Reply-To: <1552967277.69.0.646647509224.issue36356@roundup.psfhosted.org> Message-ID: <1570465201.45.0.645657797843.issue36356@roundup.psfhosted.org> Yury Selivanov added the comment: New changeset 321def805abc5b7c92c7e90ca90cb2434fdab855 by Yury Selivanov (Ben Harper) in branch 'master': bpo-36356: Fix memory leak in _asynciomodule.c (GH-16598) https://github.com/python/cpython/commit/321def805abc5b7c92c7e90ca90cb2434fdab855 ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:20:12 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 07 Oct 2019 16:20:12 +0000 Subject: [issue36356] Failure to build with address sanitizer In-Reply-To: <1552967277.69.0.646647509224.issue36356@roundup.psfhosted.org> Message-ID: <1570465212.79.0.509223700103.issue36356@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16209 pull_request: https://github.com/python/cpython/pull/16622 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:20:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 16:20:43 +0000 Subject: [issue38398] PyUnicode functions are not exported by python 2 in Ubuntu In-Reply-To: <1570464598.55.0.274340335252.issue38398@roundup.psfhosted.org> Message-ID: <1570465243.4.0.225402087012.issue38398@roundup.psfhosted.org> STINNER Victor added the comment: > hasattr(ctypes.pythonapi, "PyUnicode_FromWideChar") Python 2 has a surprising ABI. The function names depending on the Unicode implementation: PyUnicodeUCS2_FromWideChar on Windows, PyUnicodeUCS4_FromWideChar on other platforms. Enjoy the ugly https://github.com/python/cpython/blob/2.7/Include/unicodeobject.h And say hello to the new compact Unicode strings, PEP 393, implemented in Python 3.3, which unified that! https://www.python.org/dev/peps/pep-0393/ ---------- nosy: +vstinner resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:24:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 16:24:26 +0000 Subject: [issue38376] ./configure --with-assertions generates a broken build In-Reply-To: <1570279431.23.0.578903771856.issue38376@roundup.psfhosted.org> Message-ID: <1570465466.27.0.819591822491.issue38376@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16210 pull_request: https://github.com/python/cpython/pull/16623 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:29:07 2019 From: report at bugs.python.org (PyScripter) Date: Mon, 07 Oct 2019 16:29:07 +0000 Subject: [issue38398] PyUnicode functions are not exported by python 2 in Ubuntu In-Reply-To: <1570464598.55.0.274340335252.issue38398@roundup.psfhosted.org> Message-ID: <1570465747.29.0.374906822242.issue38398@roundup.psfhosted.org> PyScripter added the comment: To Victor: Neither of PyUnicodeUCS2_FromWideChar or PyUnicodeUCS4_FromWideChar is exported. >>> import ctypes >>> hasattr(ctypes.pythonapi, "PyUnicode_FromWideChar") >>> hasattr(ctypes.pythonapi, "PyUnicodeUSC4_FromWideChar") >>> hasattr(ctypes.pythonapi, "PyUnicodeUSC2_FromWideChar") all return false on Ubuntu. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:29:26 2019 From: report at bugs.python.org (retnikt) Date: Mon, 07 Oct 2019 16:29:26 +0000 Subject: [issue38397] __init_subclass__ causes TypeError when used with more standard library metaclasses (such as EnumMeta) In-Reply-To: <1570464400.89.0.0085195281122.issue38397@roundup.psfhosted.org> Message-ID: <1570465766.34.0.401559715747.issue38397@roundup.psfhosted.org> retnikt added the comment: I can (and will) submit a PR for this, by the way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:31:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 16:31:32 +0000 Subject: [issue38398] PyUnicode functions are not exported by python 2 in Ubuntu In-Reply-To: <1570464598.55.0.274340335252.issue38398@roundup.psfhosted.org> Message-ID: <1570465892.15.0.320187666123.issue38398@roundup.psfhosted.org> STINNER Victor added the comment: ctypes.pythonapi is kind of magic. I'm not sure if hasattr() is supposed to work on it. But that works for me: $ python2 Python 2.7.16 (default, Apr 30 2019, 15:54:43) >>> import ctypes >>> ctypes.pythonapi.PyUnicodeUCS4_FromWideChar <_FuncPtr object at 0x7f1b9c155ef0> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:32:13 2019 From: report at bugs.python.org (PyScripter) Date: Mon, 07 Oct 2019 16:32:13 +0000 Subject: [issue38398] PyUnicode functions are not exported by python 2 in Ubuntu In-Reply-To: <1570464598.55.0.274340335252.issue38398@roundup.psfhosted.org> Message-ID: <1570465933.78.0.184508007621.issue38398@roundup.psfhosted.org> PyScripter added the comment: I meant PyUnicodeUCS4_FromWideChar PyUnicodeUCS2_FromWideChar. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:33:03 2019 From: report at bugs.python.org (PyScripter) Date: Mon, 07 Oct 2019 16:33:03 +0000 Subject: [issue38398] PyUnicode functions are not exported by python 2 in Ubuntu In-Reply-To: <1570464598.55.0.274340335252.issue38398@roundup.psfhosted.org> Message-ID: <1570465983.62.0.867325300134.issue38398@roundup.psfhosted.org> PyScripter added the comment: Is this on Ubuntu? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:33:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 16:33:43 +0000 Subject: [issue38398] PyUnicode functions are not exported by python 2 in Ubuntu In-Reply-To: <1570464598.55.0.274340335252.issue38398@roundup.psfhosted.org> Message-ID: <1570466023.61.0.309533615332.issue38398@roundup.psfhosted.org> STINNER Victor added the comment: > Is this on Ubuntu? No, only Fedora. If the issue is specific to Ubuntu, report it to the Ubuntu bug tracker. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:36:31 2019 From: report at bugs.python.org (PyScripter) Date: Mon, 07 Oct 2019 16:36:31 +0000 Subject: [issue38398] PyUnicode functions are not exported by python 2 in Ubuntu In-Reply-To: <1570464598.55.0.274340335252.issue38398@roundup.psfhosted.org> Message-ID: <1570466191.0.0.22134720563.issue38398@roundup.psfhosted.org> PyScripter added the comment: >>> sys.version '2.7.16 (default, Oct 7 2019, 17:16:30) \n[GCC 7.4.0]' >>> ctypes.pythonapi.PyUnicodeUCS4_FromWideChar Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/ctypes/__init__.py", line 379, in __getattr__ func = self.__getitem__(name) File "/usr/local/lib/python2.7/ctypes/__init__.py", line 384, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: python2.7: undefined symbol: PyUnicodeUCS4_FromWideChar >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:38:04 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 07 Oct 2019 16:38:04 +0000 Subject: [issue36356] Failure to build with address sanitizer In-Reply-To: <1552967277.69.0.646647509224.issue36356@roundup.psfhosted.org> Message-ID: <1570466283.99.0.0956640256543.issue36356@roundup.psfhosted.org> miss-islington added the comment: New changeset 13915a3100608f011b29da2f3716c990f523b631 by Miss Islington (bot) in branch '3.8': bpo-36356: Fix memory leak in _asynciomodule.c (GH-16598) https://github.com/python/cpython/commit/13915a3100608f011b29da2f3716c990f523b631 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:42:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 16:42:03 +0000 Subject: [issue36389] Add gc.enable_object_debugger(): detect corrupted Python objects in the GC In-Reply-To: <1553166161.96.0.697085261419.issue36389@roundup.psfhosted.org> Message-ID: <1570466523.86.0.0600958193708.issue36389@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 6876257eaabdb30f27ebcbd7d2557278ce2e5705 by Victor Stinner in branch 'master': bpo-36389: _PyObject_CheckConsistency() available in release mode (GH-16612) https://github.com/python/cpython/commit/6876257eaabdb30f27ebcbd7d2557278ce2e5705 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:42:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 16:42:03 +0000 Subject: [issue38376] ./configure --with-assertions generates a broken build In-Reply-To: <1570279431.23.0.578903771856.issue38376@roundup.psfhosted.org> Message-ID: <1570466523.93.0.689182025332.issue38376@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 6876257eaabdb30f27ebcbd7d2557278ce2e5705 by Victor Stinner in branch 'master': bpo-36389: _PyObject_CheckConsistency() available in release mode (GH-16612) https://github.com/python/cpython/commit/6876257eaabdb30f27ebcbd7d2557278ce2e5705 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:46:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 16:46:05 +0000 Subject: [issue36356] Failure to build with address sanitizer In-Reply-To: <1552967277.69.0.646647509224.issue36356@roundup.psfhosted.org> Message-ID: <1570466765.17.0.827150251294.issue36356@roundup.psfhosted.org> STINNER Victor added the comment: Can we close this issue, or is there a remaining known bug? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:51:31 2019 From: report at bugs.python.org (AwesomeCronk) Date: Mon, 07 Oct 2019 16:51:31 +0000 Subject: [issue38399] Error message persists when reimporting library Message-ID: <1570467091.43.0.986668758934.issue38399@roundup.psfhosted.org> New submission from AwesomeCronk : I am working on a hexdump library in Python 3.7.4. Whenever an issue is triggered, the error message shows up. I can usually edit and correct the file(library), but when I reimport the library and rerun the function, it throws the same error on the same line number, even if the line was removed or commented out. ---------- components: Interpreter Core files: pythonerror.png messages: 354120 nosy: AwesomeCronk priority: normal severity: normal status: open title: Error message persists when reimporting library type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48645/pythonerror.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:58:59 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 07 Oct 2019 16:58:59 +0000 Subject: [issue38399] Error message persists when reimporting library In-Reply-To: <1570467091.43.0.986668758934.issue38399@roundup.psfhosted.org> Message-ID: <1570467539.06.0.149428216975.issue38399@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I think this is due to str bytes concatenation error on line number 19. Editing and reimporting doesn't give you new code in repl. Try the changes in new repl after changing it in file. Python will just use unchanged code and will use line number 19 in traceback to show error which is different as file was edited. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 13:14:46 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 07 Oct 2019 17:14:46 +0000 Subject: [issue26219] implement per-opcode cache in ceval In-Reply-To: <1453918500.26.0.0886095278127.issue26219@psf.upfronthosting.co.za> Message-ID: <1570468486.03.0.313843402226.issue26219@roundup.psfhosted.org> Brett Cannon added the comment: I personally think it would be fine to change the wording to say "measurable speed-up" and not attribute a specific number. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 13:23:48 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 07 Oct 2019 17:23:48 +0000 Subject: [issue36356] Failure to build with address sanitizer In-Reply-To: <1552967277.69.0.646647509224.issue36356@roundup.psfhosted.org> Message-ID: <1570469028.87.0.688021246887.issue36356@roundup.psfhosted.org> Ned Deily added the comment: FWIW, the assertion error on macOS reported above in msg338774 does not seem to occur anymore with current HEAD of master and with recent system clang (Apple clang version 11.0.0 (clang-1100.0.33.8)) on macOS 10.14.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 13:54:19 2019 From: report at bugs.python.org (Ethan Furman) Date: Mon, 07 Oct 2019 17:54:19 +0000 Subject: [issue38375] Enum lookup fails for callable values In-Reply-To: <1570276596.73.0.237929240562.issue38375@roundup.psfhosted.org> Message-ID: <1570470859.31.0.86869722416.issue38375@roundup.psfhosted.org> Ethan Furman added the comment: This is the intended, and documented, behavior. ---------- assignee: -> ethan.furman resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 13:58:48 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 07 Oct 2019 17:58:48 +0000 Subject: [issue38379] finalizer resurrection in gc In-Reply-To: <1570296686.13.0.00730737596554.issue38379@roundup.psfhosted.org> Message-ID: <1570471128.54.0.21884254002.issue38379@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 14:04:19 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 07 Oct 2019 18:04:19 +0000 Subject: [issue38388] Pickle protocol v 5 needs to be documented In-Reply-To: <1570405873.92.0.178526679084.issue38388@roundup.psfhosted.org> Message-ID: <1570471459.35.0.593129144568.issue38388@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 14:40:51 2019 From: report at bugs.python.org (Isaac Turner) Date: Mon, 07 Oct 2019 18:40:51 +0000 Subject: [issue37591] test_concurrent_future failed In-Reply-To: <1563106770.47.0.449024295444.issue37591@roundup.psfhosted.org> Message-ID: <1570473651.66.0.87731087606.issue37591@roundup.psfhosted.org> Isaac Turner added the comment: I'm seeing the same error on Ubuntu LTS 16.04.6 on an ARM64 platform. $ make && make test ... 0:09:18 load avg: 2.09 [ 78/416] test_complex 0:09:20 load avg: 2.08 [ 79/416] test_concurrent_futures Traceback: Thread 0x0000007f6ffff1f0 (most recent call first): File "/home/minit/Python-3.7.4/Lib/threading.py", line 296 in wait File "/home/minit/Python-3.7.4/Lib/multiprocessing/queues.py", line 224 in _feed File "/home/minit/Python-3.7.4/Lib/threading.py", line 870 in run File "/home/minit/Python-3.7.4/Lib/threading.py", line 926 in _bootstrap_inner File "/home/minit/Python-3.7.4/Lib/threading.py", line 890 in _bootstrap Thread 0x0000007f93fff1f0 (most recent call first): File "/home/minit/Python-3.7.4/Lib/selectors.py", line 415 in select File "/home/minit/Python-3.7.4/Lib/multiprocessing/connection.py", line 920 in wait File "/home/minit/Python-3.7.4/Lib/concurrent/futures/process.py", line 361 in _queue_management_worker File "/home/minit/Python-3.7.4/Lib/threading.py", line 870 in run File "/home/minit/Python-3.7.4/Lib/threading.py", line 926 in _bootstrap_inner File "/home/minit/Python-3.7.4/Lib/threading.py", line 890 in _bootstrap Current thread 0x0000007fa6296000 (most recent call first): File "/home/minit/Python-3.7.4/Lib/test/test_concurrent_futures.py", line 917 in _fail_on_deadlock File "/home/minit/Python-3.7.4/Lib/test/test_concurrent_futures.py", line 978 in test_crash File "/home/minit/Python-3.7.4/Lib/unittest/case.py", line 628 in run File "/home/minit/Python-3.7.4/Lib/unittest/case.py", line 676 in __call__ File "/home/minit/Python-3.7.4/Lib/unittest/suite.py", line 122 in run File "/home/minit/Python-3.7.4/Lib/unittest/suite.py", line 84 in __call__ File "/home/minit/Python-3.7.4/Lib/unittest/suite.py", line 122 in run File "/home/minit/Python-3.7.4/Lib/unittest/suite.py", line 84 in __call__ File "/home/minit/Python-3.7.4/Lib/unittest/suite.py", line 122 in run File "/home/minit/Python-3.7.4/Lib/unittest/suite.py", line 84 in __call__ File "/home/minit/Python-3.7.4/Lib/test/support/testresult.py", line 162 in run File "/home/minit/Python-3.7.4/Lib/test/support/__init__.py", line 1915 in _run_suite File "/home/minit/Python-3.7.4/Lib/test/support/__init__.py", line 2011 in run_unittest File "/home/minit/Python-3.7.4/Lib/test/test_concurrent_futures.py", line 1245 in test_main File "/home/minit/Python-3.7.4/Lib/test/support/__init__.py", line 2143 in decorator File "/home/minit/Python-3.7.4/Lib/test/libregrtest/runtest.py", line 228 in _runtest_inner2 File "/home/minit/Python-3.7.4/Lib/test/libregrtest/runtest.py", line 264 in _runtest_inner File "/home/minit/Python-3.7.4/Lib/test/libregrtest/runtest.py", line 149 in _runtest File "/home/minit/Python-3.7.4/Lib/test/libregrtest/runtest.py", line 187 in runtest File "/home/minit/Python-3.7.4/Lib/test/libregrtest/main.py", line 390 in run_tests_sequential File "/home/minit/Python-3.7.4/Lib/test/libregrtest/main.py", line 488 in run_tests File "/home/minit/Python-3.7.4/Lib/test/libregrtest/main.py", line 642 in _main File "/home/minit/Python-3.7.4/Lib/test/libregrtest/main.py", line 588 in main File "/home/minit/Python-3.7.4/Lib/test/libregrtest/main.py", line 663 in main File "/home/minit/Python-3.7.4/Lib/test/regrtest.py", line 46 in _main File "/home/minit/Python-3.7.4/Lib/test/regrtest.py", line 50 in File "/home/minit/Python-3.7.4/Lib/runpy.py", line 85 in _run_code File "/home/minit/Python-3.7.4/Lib/runpy.py", line 193 in _run_module_as_main test test_concurrent_futures failed ---------- nosy: +Isaac Turner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 14:47:52 2019 From: report at bugs.python.org (Adam Williamson) Date: Mon, 07 Oct 2019 18:47:52 +0000 Subject: [issue37951] Disallow fork in a subinterpreter broke subprocesses in mod_wsgi daemon mode In-Reply-To: <1566808952.7.0.710040972846.issue37951@roundup.psfhosted.org> Message-ID: <1570474072.5.0.443371081638.issue37951@roundup.psfhosted.org> Adam Williamson added the comment: Well, now our (Fedora QA's) automated testing of FreeIPA is showing what looks like a problem with preexec_fn (rather than fork) being disallowed: https://bugzilla.redhat.com/show_bug.cgi?id=1759290 Login to the FreeIPA webUI is failing, and at the time it fails we see this error message on the server end: [Mon Oct 07 09:22:19.521604 2019] [wsgi:error] [pid 32989:tid 139746234119936] [remote 10.0.2.102:56054] ipa: DEBUG: args=['/usr/bin/kinit', 'admin', '-c', '/run/ipa/ccaches/kinit_32989', '-E'] [Mon Oct 07 09:22:19.521996 2019] [wsgi:error] [pid 32989:tid 139746234119936] [remote 10.0.2.102:56054] ipa: DEBUG: Process execution failed [Mon Oct 07 09:22:19.522189 2019] [wsgi:error] [pid 32989:tid 139746234119936] [remote 10.0.2.102:56054] ipa: INFO: 401 Unauthorized: preexec_fn not supported within subinterpreters ---------- nosy: +adamwill status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 14:59:24 2019 From: report at bugs.python.org (Massimo) Date: Mon, 07 Oct 2019 18:59:24 +0000 Subject: [issue38375] Enum lookup fails for callable values In-Reply-To: <1570276596.73.0.237929240562.issue38375@roundup.psfhosted.org> Message-ID: <1570474764.18.0.20037910271.issue38375@roundup.psfhosted.org> Massimo added the comment: Where is this documented? Sorry, I couldn't find it. In any case, I'd say this behaviour is quite unexpected, and unless technical reasons are overwhelming, would be nice to change it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 15:07:31 2019 From: report at bugs.python.org (Daniel Debrunner) Date: Mon, 07 Oct 2019 19:07:31 +0000 Subject: [issue36697] inspect.getclosurevars returns wrong globals dict In-Reply-To: <1555922969.45.0.450842121898.issue36697@roundup.psfhosted.org> Message-ID: <1570475251.34.0.527321620539.issue36697@roundup.psfhosted.org> Daniel Debrunner added the comment: Another case: model="Hello" class M(object): def __init__(self): pass def __call__(self): print(self.model) cvs = inspect.getclosurevars(M.__call__) ClosureVars(nonlocals={}, globals={'model': 'Hello'}, builtins={'print': }, unbound=set()) Of course self.model does not refer to the global model M()() AttributeError: 'M' object has no attribute 'model' ---------- nosy: +Daniel Debrunner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 15:12:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 19:12:19 +0000 Subject: [issue38376] ./configure --with-assertions generates a broken build In-Reply-To: <1570279431.23.0.578903771856.issue38376@roundup.psfhosted.org> Message-ID: <1570475539.22.0.401305549717.issue38376@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 435b2eeb7bc5b8ec264e900b38bcb3d76552d777 by Victor Stinner in branch '3.8': bpo-38376: Fix _PyUnicode_CheckConsistency() definition (GH-16623) https://github.com/python/cpython/commit/435b2eeb7bc5b8ec264e900b38bcb3d76552d777 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 15:15:15 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 07 Oct 2019 19:15:15 +0000 Subject: [issue37951] Disallow fork in a subinterpreter broke subprocesses in mod_wsgi daemon mode In-Reply-To: <1566808952.7.0.710040972846.issue37951@roundup.psfhosted.org> Message-ID: <1570475715.42.0.836443658221.issue37951@roundup.psfhosted.org> Gregory P. Smith added the comment: preexec_fn is fundamentally unsupportable. what code is using it, there should be a way not to rely on that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 15:21:19 2019 From: report at bugs.python.org (Adam Williamson) Date: Mon, 07 Oct 2019 19:21:19 +0000 Subject: [issue37951] Disallow fork in a subinterpreter broke subprocesses in mod_wsgi daemon mode In-Reply-To: <1566808952.7.0.710040972846.issue37951@roundup.psfhosted.org> Message-ID: <1570476079.24.0.764543844725.issue37951@roundup.psfhosted.org> Adam Williamson added the comment: It's this function: https://github.com/freeipa/freeipa/blob/master/ipalib/install/kinit.py#L66 The function `run` is imported from `ipapython.ipautil`, it's defined here: https://github.com/freeipa/freeipa/blob/master/ipapython/ipautil.py#L391 all of this is being run inside a WSGI. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 15:34:50 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 07 Oct 2019 19:34:50 +0000 Subject: [issue38396] ast.literal_eval doesn't give information about node except the type of it In-Reply-To: <1570463756.86.0.131436803473.issue38396@roundup.psfhosted.org> Message-ID: <1570476890.88.0.759531475652.issue38396@roundup.psfhosted.org> Ivan Levkivskyi added the comment: The downside however is that exception messages can become very long. So I am not sure we should change this. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 15:47:55 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Oct 2019 19:47:55 +0000 Subject: [issue38396] ast.literal_eval doesn't give information about node except the type of it In-Reply-To: <1570463756.86.0.131436803473.issue38396@roundup.psfhosted.org> Message-ID: <1570477675.67.0.212235447471.issue38396@roundup.psfhosted.org> Serhiy Storchaka added the comment: I have same doubts. See also issue32888. ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Improve exception message in ast.literal_eval _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 15:50:44 2019 From: report at bugs.python.org (Eric Meyer) Date: Mon, 07 Oct 2019 19:50:44 +0000 Subject: [issue32879] Race condition in multiprocessing Queue In-Reply-To: <1519091702.0.0.467229070634.issue32879@psf.upfronthosting.co.za> Message-ID: <1570477844.92.0.159873146509.issue32879@roundup.psfhosted.org> Eric Meyer added the comment: multiprocessing.SimpleQueue is another workaround to this issue. I agree the docs should be clearer about this. Additionally, it would be helpful if there was a way to optionally put an item on a multiprocessing.Queue and block until the item has been written to the pipe (or block until it is safe to mutate,garbage collect,etc the item in the calling thread). ---------- nosy: +highvelcty _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 15:55:39 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 07 Oct 2019 19:55:39 +0000 Subject: [issue37951] Disallow fork in a subinterpreter broke subprocesses in mod_wsgi daemon mode In-Reply-To: <1566808952.7.0.710040972846.issue37951@roundup.psfhosted.org> Message-ID: <1570478139.04.0.280222280586.issue37951@roundup.psfhosted.org> Christian Heimes added the comment: I'll address the issue in FreeIPA. The ipautil.run() function is a helper around subprocess.Popen. The function always installs a preexec_fn in case it needs to change umask or drop priviliges. The WSGI server does not need these features. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 15:57:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 19:57:16 +0000 Subject: [issue36389] Add gc.enable_object_debugger(): detect corrupted Python objects in the GC In-Reply-To: <1553166161.96.0.697085261419.issue36389@roundup.psfhosted.org> Message-ID: <1570478236.66.0.861295044188.issue36389@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16211 pull_request: https://github.com/python/cpython/pull/16624 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 16:01:21 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 07 Oct 2019 20:01:21 +0000 Subject: [issue37951] Disallow fork in a subinterpreter broke subprocesses in mod_wsgi daemon mode In-Reply-To: <1566808952.7.0.710040972846.issue37951@roundup.psfhosted.org> Message-ID: <1570478481.38.0.231052632613.issue37951@roundup.psfhosted.org> Christian Heimes added the comment: https://github.com/freeipa/freeipa/pull/3769 should address the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 16:28:18 2019 From: report at bugs.python.org (Emmanuel Arias) Date: Mon, 07 Oct 2019 20:28:18 +0000 Subject: [issue36953] Remove collections ABCs? In-Reply-To: <1558140764.46.0.049733618419.issue36953@roundup.psfhosted.org> Message-ID: <1570480098.06.0.456892792409.issue36953@roundup.psfhosted.org> Emmanuel Arias added the comment: Now was remove from 3.7 https://github.com/python/cpython/commit/ef092fe9905f61ca27889092ca1248a11aa74498 This issue should be closed, isn't? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 16:31:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 20:31:46 +0000 Subject: [issue36389] Add gc.enable_object_debugger(): detect corrupted Python objects in the GC In-Reply-To: <1553166161.96.0.697085261419.issue36389@roundup.psfhosted.org> Message-ID: <1570480306.37.0.972100614483.issue36389@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 60ec6efd96d95476fe5e38c491491add04f026e5 by Victor Stinner in branch 'master': bpo-36389: Fix _PyBytesWriter in release mode (GH-16624) https://github.com/python/cpython/commit/60ec6efd96d95476fe5e38c491491add04f026e5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 16:34:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 20:34:50 +0000 Subject: [issue38376] ./configure --with-assertions generates a broken build In-Reply-To: <1570279431.23.0.578903771856.issue38376@roundup.psfhosted.org> Message-ID: <1570480490.43.0.135607332403.issue38376@roundup.psfhosted.org> STINNER Victor added the comment: I pushed one more fix in https://bugs.python.org/issue36389#msg354138 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 16:39:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 20:39:08 +0000 Subject: [issue38376] ./configure --with-assertions generates a broken build In-Reply-To: <1570279431.23.0.578903771856.issue38376@roundup.psfhosted.org> Message-ID: <1570480748.61.0.765475661192.issue38376@roundup.psfhosted.org> STINNER Victor added the comment: After pushing some fixes to 3.8 and master branches, I tested the following commands in 3.7, 3.8 and master branches: make distclean ./configure --prefix=$HOME/.local --with-assertions make ./python -m test -j0 test_bytes test_gc test_capi These commands now work in the 3 branches. I close the issue. Thanks Vinay Sajip for the bug report! Thanks T. Wouters for previous fixes. @T. Wouters: I took the liberty of closing your PR 16594 in favor of my PR 16623. I may backport PR 16612 enhancements to 3.8 later, but not jus before a 3.8.0 final release to no stress our release manager ;-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 16:54:41 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Oct 2019 20:54:41 +0000 Subject: [issue38294] Documentation on 3.6->3.7 re.escape no longer escaping "/" or ":" should be obvious In-Reply-To: <1569603997.59.0.0237297108404.issue38294@roundup.psfhosted.org> Message-ID: <1570481681.81.0.87939079294.issue38294@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 15ae75d660befe643ed42eb2707a557cea97256c by Serhiy Storchaka (Ricardo B?nffy) in branch 'master': bpo-38294: Add list of no-longer-escaped chars to re.escape documentation. (GH-16442) https://github.com/python/cpython/commit/15ae75d660befe643ed42eb2707a557cea97256c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 17:00:58 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 07 Oct 2019 21:00:58 +0000 Subject: [issue38294] Documentation on 3.6->3.7 re.escape no longer escaping "/" or ":" should be obvious In-Reply-To: <1569603997.59.0.0237297108404.issue38294@roundup.psfhosted.org> Message-ID: <1570482058.38.0.250284399986.issue38294@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16212 pull_request: https://github.com/python/cpython/pull/16626 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 17:07:23 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 07 Oct 2019 21:07:23 +0000 Subject: [issue38344] activate.bat else needs to be on the same line as the if In-Reply-To: <1569997823.02.0.0977203709428.issue38344@roundup.psfhosted.org> Message-ID: <1570482443.24.0.731238074995.issue38344@roundup.psfhosted.org> Steve Dower added the comment: New changeset e310af9e2941c2fbb7370e003276cc37eb230f16 by Steve Dower (James Abel) in branch 'master': bpo-38344: Fix syntax in activate.bat (GH-16533) https://github.com/python/cpython/commit/e310af9e2941c2fbb7370e003276cc37eb230f16 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 17:07:36 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 07 Oct 2019 21:07:36 +0000 Subject: [issue38344] activate.bat else needs to be on the same line as the if In-Reply-To: <1569997823.02.0.0977203709428.issue38344@roundup.psfhosted.org> Message-ID: <1570482456.16.0.608306041213.issue38344@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16213 pull_request: https://github.com/python/cpython/pull/16627 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 17:07:49 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 07 Oct 2019 21:07:49 +0000 Subject: [issue38294] Documentation on 3.6->3.7 re.escape no longer escaping "/" or ":" should be obvious In-Reply-To: <1569603997.59.0.0237297108404.issue38294@roundup.psfhosted.org> Message-ID: <1570482469.47.0.824690976522.issue38294@roundup.psfhosted.org> miss-islington added the comment: New changeset b731fc521cf78e53268e35777d836ca80e7ab305 by Miss Islington (bot) in branch '3.8': bpo-38294: Add list of no-longer-escaped chars to re.escape documentation. (GH-16442) https://github.com/python/cpython/commit/b731fc521cf78e53268e35777d836ca80e7ab305 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 17:08:36 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 07 Oct 2019 21:08:36 +0000 Subject: [issue38344] activate.bat else needs to be on the same line as the if In-Reply-To: <1569997823.02.0.0977203709428.issue38344@roundup.psfhosted.org> Message-ID: <1570482516.92.0.687860646132.issue38344@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16214 pull_request: https://github.com/python/cpython/pull/16628 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 17:10:14 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 07 Oct 2019 21:10:14 +0000 Subject: [issue38344] activate.bat else needs to be on the same line as the if In-Reply-To: <1569997823.02.0.0977203709428.issue38344@roundup.psfhosted.org> Message-ID: <1570482614.96.0.0898615528729.issue38344@roundup.psfhosted.org> Steve Dower added the comment: I've merged the fix so that it can be cherry-picked for the upcoming releases. I'd still like to see the tests enhanced to be able to detect error output in the scripts, but those don't need to necessarily make it into the upcoming releases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 17:18:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 21:18:36 +0000 Subject: [issue36389] Add gc.enable_object_debugger(): detect corrupted Python objects in the GC In-Reply-To: <1553166161.96.0.697085261419.issue36389@roundup.psfhosted.org> Message-ID: <1570483116.22.0.339997869857.issue36389@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16215 pull_request: https://github.com/python/cpython/pull/16629 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 17:25:09 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 07 Oct 2019 21:25:09 +0000 Subject: [issue38344] activate.bat else needs to be on the same line as the if In-Reply-To: <1569997823.02.0.0977203709428.issue38344@roundup.psfhosted.org> Message-ID: <1570483509.8.0.514230920735.issue38344@roundup.psfhosted.org> miss-islington added the comment: New changeset bfb5f9a66cc348c9cf25c857ad9910479e587517 by Miss Islington (bot) in branch '3.7': bpo-38344: Fix syntax in activate.bat (GH-16533) https://github.com/python/cpython/commit/bfb5f9a66cc348c9cf25c857ad9910479e587517 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 17:27:00 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 07 Oct 2019 21:27:00 +0000 Subject: [issue38344] activate.bat else needs to be on the same line as the if In-Reply-To: <1569997823.02.0.0977203709428.issue38344@roundup.psfhosted.org> Message-ID: <1570483620.43.0.517958930077.issue38344@roundup.psfhosted.org> miss-islington added the comment: New changeset 4880e5a1b66d9175fcc402cb0288bc1898356831 by Miss Islington (bot) in branch '3.8': bpo-38344: Fix syntax in activate.bat (GH-16533) https://github.com/python/cpython/commit/4880e5a1b66d9175fcc402cb0288bc1898356831 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 17:44:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 21:44:08 +0000 Subject: [issue36389] Add gc.enable_object_debugger(): detect corrupted Python objects in the GC In-Reply-To: <1553166161.96.0.697085261419.issue36389@roundup.psfhosted.org> Message-ID: <1570484648.33.0.0788344647986.issue36389@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 7775349895088a7ae68cecf0c74cf817f15e2c74 by Victor Stinner in branch 'master': bpo-36389: Add newline to _PyObject_AssertFailed() (GH-16629) https://github.com/python/cpython/commit/7775349895088a7ae68cecf0c74cf817f15e2c74 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 18:09:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 22:09:34 +0000 Subject: [issue38392] Ensure that objects entering the GC are valid In-Reply-To: <1570445338.58.0.651902608854.issue38392@roundup.psfhosted.org> Message-ID: <1570486174.42.0.56993669901.issue38392@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 1b1845569539db5c1a6948a5d32daea381f1e35f by Victor Stinner in branch 'master': bpo-38392: PyObject_GC_Track() validates object in debug mode (GH-16615) https://github.com/python/cpython/commit/1b1845569539db5c1a6948a5d32daea381f1e35f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 18:26:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 22:26:18 +0000 Subject: [issue38392] Ensure that objects entering the GC are valid In-Reply-To: <1570445338.58.0.651902608854.issue38392@roundup.psfhosted.org> Message-ID: <1570487178.54.0.341230502255.issue38392@roundup.psfhosted.org> STINNER Victor added the comment: Ok, I pushed a change. Let's see how third party projects like it :-) We still have time to revert it if it causes too many damage. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 18:49:49 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 07 Oct 2019 22:49:49 +0000 Subject: [issue38399] Error message persists when reimporting library In-Reply-To: <1570467091.43.0.986668758934.issue38399@roundup.psfhosted.org> Message-ID: <1570488589.31.0.557810266872.issue38399@roundup.psfhosted.org> Steven D'Aprano added the comment: Importing the second and subsequent times reloads the module from the system cache. Instead, you can: - run ``del sys.modules['hexdump']`` and then ``import hexdump``; - call ``importlib.reload(hexdump)``; or - restart the REPL. Remember that reloading the module won't redefine any existing classes or instances you created from the old module, they will continue to reference the old module code until they are destroyed and recreated. So the last option (restarting the REPL) is usually the most effective. But with care, reload(hexdump) should do the trick. ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 19:01:37 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 07 Oct 2019 23:01:37 +0000 Subject: [issue38400] Python segfaults when configured with --with-pydebug --with-trace-refs Message-ID: <1570489297.7.0.2347429078.issue38400@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : configure --with-pydebug --with-trace-refs && make Modules/gcmodule.c:378: visit_decref: Assertion "!_PyObject_IsFreed(op)" failed Fatal Python error: _PyObject_AssertFailed Python runtime state: preinitialized Current thread 0x00007f6e2863e740 (most recent call first): /bin/sh: line 5: 28078 Aborted (core dumped) ./python -E -S -m sysconfig --generate-posix-vars generate-posix-vars failed make: * [Makefile:592: pybuilddir.txt] Error 1 ---------- components: Interpreter Core messages: 354151 nosy: pablogsal, vstinner priority: normal severity: normal status: open title: Python segfaults when configured with --with-pydebug --with-trace-refs versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 19:01:53 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 07 Oct 2019 23:01:53 +0000 Subject: [issue38400] Python segfaults when configured with --with-pydebug --with-trace-refs In-Reply-To: <1570489297.7.0.2347429078.issue38400@roundup.psfhosted.org> Message-ID: <1570489313.83.0.707786642982.issue38400@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: This is a regression introduced by: commit 6876257eaabdb30f27ebcbd7d2557278ce2e5705 Author: Victor Stinner Date: Mon Oct 7 18:42:01 2019 +0200 bpo-36389: _PyObject_CheckConsistency() available in release mode (GH-16612) bpo-36389, bpo-38376: The _PyObject_CheckConsistency() function is now also available in release mode. For example, it can be used to debug a crash in the visit_decref() function of the GC. Modify the following functions to also work in release mode: * _PyDict_CheckConsistency() * _PyObject_CheckConsistency() * _PyType_CheckConsistency() * _PyUnicode_CheckConsistency() Other changes: * _PyMem_IsPtrFreed(ptr) now also returns 1 if ptr is NULL (equals to 0). * _PyBytesWriter_CheckConsistency() now returns 1 and is only used with assert(). * Reorder _PyObject_Dump() to write safe fields first, and only attempt to render repr() at the end. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 19:21:09 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 07 Oct 2019 23:21:09 +0000 Subject: [issue38400] Python segfaults when configured with --with-pydebug --with-trace-refs In-Reply-To: <1570489297.7.0.2347429078.issue38400@roundup.psfhosted.org> Message-ID: <1570490469.36.0.444603800523.issue38400@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +16216 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16630 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 19:43:17 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 07 Oct 2019 23:43:17 +0000 Subject: [issue38400] Python segfaults when configured with --with-pydebug --with-trace-refs In-Reply-To: <1570489297.7.0.2347429078.issue38400@roundup.psfhosted.org> Message-ID: <1570491797.87.0.598328349212.issue38400@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 36e33c360ed7716a2b5ab2b53210da81f8ce1295 by Pablo Galindo in branch 'master': bpo-38400 Don't check for NULL linked list pointers in _PyObject_IsFreed (GH-16630) https://github.com/python/cpython/commit/36e33c360ed7716a2b5ab2b53210da81f8ce1295 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 19:43:22 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 07 Oct 2019 23:43:22 +0000 Subject: [issue38400] Python segfaults when configured with --with-pydebug --with-trace-refs In-Reply-To: <1570489297.7.0.2347429078.issue38400@roundup.psfhosted.org> Message-ID: <1570491802.41.0.640735094957.issue38400@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 19:53:15 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 23:53:15 +0000 Subject: [issue38070] visit_decref(): add an assertion to check that the object is not freed In-Reply-To: <1568037936.88.0.10373402622.issue38070@roundup.psfhosted.org> Message-ID: <1570492395.58.0.112366417858.issue38070@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16217 pull_request: https://github.com/python/cpython/pull/16631 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 20:23:44 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 08 Oct 2019 00:23:44 +0000 Subject: [issue38395] proxy_contains (weakref.proxy) can access an object with 0 refcount In-Reply-To: <1570459749.44.0.879317891234.issue38395@roundup.psfhosted.org> Message-ID: <1570494224.12.0.98432232832.issue38395@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +16218 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16632 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 20:24:53 2019 From: report at bugs.python.org (John Parejko) Date: Tue, 08 Oct 2019 00:24:53 +0000 Subject: [issue38401] Make dataclass attribute docstrings accessible Message-ID: <1570494293.05.0.934356434949.issue38401@roundup.psfhosted.org> New submission from John Parejko : Dataclasses provide a very straightforward way to specify structured data. One can trivally document a dataclass's attributes via triple-quoted attribute docstrings per PEP 257. However, those docstrings are not accessible to pydoc, so they are lost to users of the dataclass. For example, the attribute docstrings in the below dataclass should be available when looking at `help(SpectralData)`, but that help command does not show the docstrings. ``` @dataclasses.dataclass class SpectralData: """Class to hold data and metadata from a fiber spectrograph.""" wavelength: astropy.units.Quantity """The wavelength array produced by the instrument.""" spectrum: np.ndarray """The flux array in instrumental units.""" duration: float """The duration of the exposure in seconds.""" ``` ---------- assignee: docs at python components: Documentation messages: 354154 nosy: John Parejko2, docs at python priority: normal severity: normal status: open title: Make dataclass attribute docstrings accessible type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 20:26:53 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 08 Oct 2019 00:26:53 +0000 Subject: [issue38395] proxy_contains (weakref.proxy) can access an object with 0 refcount In-Reply-To: <1570459749.44.0.879317891234.issue38395@roundup.psfhosted.org> Message-ID: <1570494413.9.0.931882924401.issue38395@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- versions: +Python 3.7, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 20:33:14 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2019 00:33:14 +0000 Subject: [issue27542] Segfault in gcmodule.c:360 visit_decref In-Reply-To: <1468755086.8.0.27245311458.issue27542@psf.upfronthosting.co.za> Message-ID: <1570494794.96.0.246947296025.issue27542@roundup.psfhosted.org> STINNER Victor added the comment: Julien: I'm working on enhancement of debug traces on visit_decref(). Are you still able to reproduce the crash in 2019? I failed to reproduce the bug in a virtual environment with: * Python 2.7.14 * pip 8.1.2 * cffi 1.7.0 $ virtualenv -p python2 venv Running virtualenv with interpreter /usr/bin/python2 New python executable in /home/haypo/venv/bin/python2 Also creating executable in /home/haypo/venv/bin/python Installing setuptools, pkg_resources, pip, wheel...done. $ venv/bin/python -m pip install pip==8.1.2 DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support Collecting pip==8.1.2 Using cached https://files.pythonhosted.org/packages/9c/32/004ce0852e0a127f07f358b715015763273799bd798956fa930814b60f39/pip-8.1.2-py2.py3-none-any.whl Installing collected packages: pip Found existing installation: pip 19.2.3 Uninstalling pip-19.2.3: Successfully uninstalled pip-19.2.3 Successfully installed pip-8.1.2 $ venv/bin/python -m pip install cffi==1.7.0 Collecting cffi==1.7.0 Using cached https://files.pythonhosted.org/packages/46/26/2413bf923b1de47d9e9cf48f248dec1a16027a7773452315f34746253c35/cffi-1.7.0-cp27-cp27mu-manylinux1_x86_64.whl Collecting pycparser (from cffi==1.7.0) Installing collected packages: pycparser, cffi Successfully installed cffi-1.7.0 pycparser-2.19 You are using pip version 8.1.2, however version 19.2.3 is available. You should consider upgrading via the 'pip install --upgrade pip' command. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 20:35:11 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Tue, 08 Oct 2019 00:35:11 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1570494911.2.0.776761129182.issue37531@roundup.psfhosted.org> Change by Kubilay Kocak : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 20:35:20 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 08 Oct 2019 00:35:20 +0000 Subject: [issue38395] proxy_contains (weakref.proxy) can access an object with 0 refcount In-Reply-To: <1570459749.44.0.879317891234.issue38395@roundup.psfhosted.org> Message-ID: <1570494920.61.0.567927260015.issue38395@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- versions: +Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 20:36:12 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 08 Oct 2019 00:36:12 +0000 Subject: [issue38395] proxy_contains (weakref.proxy) can access an object with 0 refcount In-Reply-To: <1570459749.44.0.879317891234.issue38395@roundup.psfhosted.org> Message-ID: <1570494972.87.0.0455789715201.issue38395@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +benjamin.peterson, lukasz.langa, ned.deily priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 20:37:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2019 00:37:42 +0000 Subject: [issue38070] visit_decref(): add an assertion to check that the object is not freed In-Reply-To: <1568037936.88.0.10373402622.issue38070@roundup.psfhosted.org> Message-ID: <1570495062.54.0.716202594374.issue38070@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 4d5f94b8cd20f804c7868c5395a15aa6032f874c by Victor Stinner in branch 'master': bpo-38070: Enhance visit_decref() debug trace (GH-16631) https://github.com/python/cpython/commit/4d5f94b8cd20f804c7868c5395a15aa6032f874c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 20:38:56 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 08 Oct 2019 00:38:56 +0000 Subject: [issue38395] proxy_contains (weakref.proxy) can access an object with 0 refcount In-Reply-To: <1570459749.44.0.879317891234.issue38395@roundup.psfhosted.org> Message-ID: <1570495136.46.0.540085270118.issue38395@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I'm marking this as release blocker for the 3.8 incoming release so we don't forget about fixing this. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 20:42:49 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 08 Oct 2019 00:42:49 +0000 Subject: [issue38388] Pickle protocol v 5 needs to be documented In-Reply-To: <1570405873.92.0.178526679084.issue38388@roundup.psfhosted.org> Message-ID: <1570495369.88.0.480998011115.issue38388@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 21:42:35 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 08 Oct 2019 01:42:35 +0000 Subject: [issue37664] Update bundled pip and setuptools In-Reply-To: <1563918687.03.0.591223674737.issue37664@roundup.psfhosted.org> Message-ID: <1570498955.14.0.869057122699.issue37664@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- pull_requests: +16219 pull_request: https://github.com/python/cpython/pull/16633 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 21:54:08 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 08 Oct 2019 01:54:08 +0000 Subject: [issue37664] Update bundled pip and setuptools In-Reply-To: <1563918687.03.0.591223674737.issue37664@roundup.psfhosted.org> Message-ID: <1570499648.76.0.748793935956.issue37664@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset e7e58fe03175adc660c192e724b91ae7ccba9cb6 by Benjamin Peterson in branch '2.7': [2.7] bpo-37664: Update ensurepip bundled wheels, again (GH-16633) https://github.com/python/cpython/commit/e7e58fe03175adc660c192e724b91ae7ccba9cb6 ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 22:00:05 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 08 Oct 2019 02:00:05 +0000 Subject: [issue36274] http.client cannot send non-ASCII request lines In-Reply-To: <1552422803.93.0.420596825145.issue36274@roundup.psfhosted.org> Message-ID: <1570500005.19.0.149889623864.issue36274@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset f5b1abbb3b0083381925dcd5898ae6d019224826 by Benjamin Peterson (Jason R. Coombs) in branch '2.7': [2.7] bpo-38216, bpo-36274: Allow subclasses to separately override validation and encoding behavior (GH-16476) https://github.com/python/cpython/commit/f5b1abbb3b0083381925dcd5898ae6d019224826 ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 22:00:05 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 08 Oct 2019 02:00:05 +0000 Subject: [issue38216] Fix for issue30458 (HTTP Header Injection) prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1570500005.03.0.19896145954.issue38216@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset f5b1abbb3b0083381925dcd5898ae6d019224826 by Benjamin Peterson (Jason R. Coombs) in branch '2.7': [2.7] bpo-38216, bpo-36274: Allow subclasses to separately override validation and encoding behavior (GH-16476) https://github.com/python/cpython/commit/f5b1abbb3b0083381925dcd5898ae6d019224826 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 22:05:29 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 08 Oct 2019 02:05:29 +0000 Subject: [issue38395] proxy_contains (weakref.proxy) can access an object with 0 refcount In-Reply-To: <1570459749.44.0.879317891234.issue38395@roundup.psfhosted.org> Message-ID: <1570500329.85.0.321840069257.issue38395@roundup.psfhosted.org> Benjamin Peterson added the comment: Note I'm going to ignore this for the purposes of 2.7.17 because it doesn't look like a new regression. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 23:38:40 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 08 Oct 2019 03:38:40 +0000 Subject: [issue31589] Links for French documentation PDF is broken: LaTeX issue with non-ASCII characters? In-Reply-To: <1506416349.22.0.925737411431.issue31589@psf.upfronthosting.co.za> Message-ID: <1570505920.17.0.0171154459807.issue31589@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16220 pull_request: https://github.com/python/cpython/pull/16636 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 23:38:40 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 08 Oct 2019 03:38:40 +0000 Subject: [issue32200] Full docs build of 3.6 and 3.7 failing since 2017-10-15 In-Reply-To: <1512228356.9.0.213398074469.issue32200@psf.upfronthosting.co.za> Message-ID: <1570505920.3.0.598009074707.issue32200@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16221 pull_request: https://github.com/python/cpython/pull/16636 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 23:39:40 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 08 Oct 2019 03:39:40 +0000 Subject: [issue35036] logger failure in suspicious.py In-Reply-To: <1540105005.86.0.788709270274.issue35036@psf.upfronthosting.co.za> Message-ID: <1570505980.85.0.76069526547.issue35036@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16222 pull_request: https://github.com/python/cpython/pull/16637 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 23:41:04 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 08 Oct 2019 03:41:04 +0000 Subject: [issue38401] Make dataclass attribute docstrings accessible In-Reply-To: <1570494293.05.0.934356434949.issue38401@roundup.psfhosted.org> Message-ID: <1570506064.51.0.815366155639.issue38401@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 23:42:55 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 08 Oct 2019 03:42:55 +0000 Subject: [issue31589] Links for French documentation PDF is broken: LaTeX issue with non-ASCII characters? In-Reply-To: <1506416349.22.0.925737411431.issue31589@psf.upfronthosting.co.za> Message-ID: <1570506175.3.0.369945825776.issue31589@roundup.psfhosted.org> miss-islington added the comment: New changeset d9b321692b6770c0fe7cb7ba05f9bd5c6082a880 by Miss Islington (bot) in branch '2.7': bpo-31589 : Build PDF using xelatex for better UTF8 support. (GH-3940) https://github.com/python/cpython/commit/d9b321692b6770c0fe7cb7ba05f9bd5c6082a880 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 23:42:55 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 08 Oct 2019 03:42:55 +0000 Subject: [issue32200] Full docs build of 3.6 and 3.7 failing since 2017-10-15 In-Reply-To: <1512228356.9.0.213398074469.issue32200@psf.upfronthosting.co.za> Message-ID: <1570506175.43.0.618521516389.issue32200@roundup.psfhosted.org> miss-islington added the comment: New changeset d9b321692b6770c0fe7cb7ba05f9bd5c6082a880 by Miss Islington (bot) in branch '2.7': bpo-31589 : Build PDF using xelatex for better UTF8 support. (GH-3940) https://github.com/python/cpython/commit/d9b321692b6770c0fe7cb7ba05f9bd5c6082a880 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 23:43:56 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 08 Oct 2019 03:43:56 +0000 Subject: [issue35036] logger failure in suspicious.py In-Reply-To: <1540105005.86.0.788709270274.issue35036@psf.upfronthosting.co.za> Message-ID: <1570506236.28.0.732395464328.issue35036@roundup.psfhosted.org> miss-islington added the comment: New changeset e78d79c15cc53bdf8161d41c627cbfb551d8ee96 by Miss Islington (bot) in branch '2.7': bpo-35036: Remove empty log line in the suspicious.py tool (GH-10024) https://github.com/python/cpython/commit/e78d79c15cc53bdf8161d41c627cbfb551d8ee96 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 23:46:48 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 08 Oct 2019 03:46: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: <1570506408.46.0.378884869679.issue31036@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- pull_requests: +16223 pull_request: https://github.com/python/cpython/pull/16638 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 23:57:08 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 08 Oct 2019 03:57:08 +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: <1570507028.73.0.212365018335.issue31036@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 0bd59d655280ad4c4aff2d327789815b89caee18 by Benjamin Peterson in branch '2.7': [2.7] bpo-31036: Allow sphinx and blurb to be found automatically (GH-16638) https://github.com/python/cpython/commit/0bd59d655280ad4c4aff2d327789815b89caee18 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 00:01:58 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 08 Oct 2019 04:01:58 +0000 Subject: [issue38402] crypt: check error from library call Message-ID: <1570507318.72.0.325157356882.issue38402@roundup.psfhosted.org> New submission from Benjamin Peterson : (split off from #36161) The crypt module currently doesn't check for errors from crypt or crypt_r. It should. ---------- messages: 354166 nosy: benjamin.peterson priority: normal severity: normal status: open title: crypt: check error from library call versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 00:02:41 2019 From: report at bugs.python.org (Antonio Gutierrez) Date: Tue, 08 Oct 2019 04:02:41 +0000 Subject: [issue38402] crypt: check error from library call In-Reply-To: <1570507318.72.0.325157356882.issue38402@roundup.psfhosted.org> Message-ID: <1570507361.49.0.073340342777.issue38402@roundup.psfhosted.org> Change by Antonio Gutierrez : ---------- keywords: +patch pull_requests: +16224 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16599 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 00:21:41 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 08 Oct 2019 04:21:41 +0000 Subject: [issue38403] nuspec iconUrl field is deprecated Message-ID: <1570508501.54.0.80221217734.issue38403@roundup.psfhosted.org> New submission from Steve Dower : The iconUrl field has to be replaced with an icon field, and we need to include the file in the package now. Details at https://docs.microsoft.com/en-us/nuget/reference/nuspec#icon ---------- assignee: steve.dower components: Windows messages: 354167 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: nuspec iconUrl field is deprecated type: behavior versions: Python 2.7, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 00:22:22 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 08 Oct 2019 04:22:22 +0000 Subject: [issue38402] crypt: check error from library call In-Reply-To: <1570507318.72.0.325157356882.issue38402@roundup.psfhosted.org> Message-ID: <1570508542.16.0.363685603243.issue38402@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 0d3fe8ae4961bf551e7d5e42559e2ede1a08fd7c by Benjamin Peterson (Antonio Gutierrez) in branch 'master': closes bpo-38402: Check error of primitive crypt/crypt_r. (GH-16599) https://github.com/python/cpython/commit/0d3fe8ae4961bf551e7d5e42559e2ede1a08fd7c ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 00:44:33 2019 From: report at bugs.python.org (Poker Online Jakarta) Date: Tue, 08 Oct 2019 04:44:33 +0000 Subject: [issue38404] Poker Online Message-ID: <1570509873.23.0.248422964885.issue38404@roundup.psfhosted.org> New submission from Poker Online Jakarta : poker online [url=https://www.jakartapoker.net/]poker online[/url] ---------- components: Argument Clinic messages: 354169 nosy: larry, pokeronlinejakarta priority: normal severity: normal status: open title: Poker Online type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 00:46:00 2019 From: report at bugs.python.org (Poker Online Jakarta) Date: Tue, 08 Oct 2019 04:46:00 +0000 Subject: [issue38404] Poker Online In-Reply-To: <1570509873.23.0.248422964885.issue38404@roundup.psfhosted.org> Message-ID: <1570509960.93.0.565237354328.issue38404@roundup.psfhosted.org> Poker Online Jakarta added the comment: Situs https://www.jakartapoker.net/ adalah situs judi poker online terpercaya dan terbaik di Indonesia ---------- Added file: https://bugs.python.org/file48646/2.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 01:11:41 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 08 Oct 2019 05:11:41 +0000 Subject: [issue38404] Poker Online In-Reply-To: <1570509873.23.0.248422964885.issue38404@roundup.psfhosted.org> Message-ID: <1570511501.84.0.0597178267211.issue38404@roundup.psfhosted.org> Change by Ned Deily : Removed file: https://bugs.python.org/file48646/2.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 01:12:02 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 08 Oct 2019 05:12:02 +0000 Subject: [issue38404] Poker Online In-Reply-To: <1570509873.23.0.248422964885.issue38404@roundup.psfhosted.org> Message-ID: <1570511522.62.0.351381803838.issue38404@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg354170 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 01:12:13 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 08 Oct 2019 05:12:13 +0000 Subject: [issue38404] Poker Online Message-ID: <1570511533.31.0.727110168001.issue38404@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg354169 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 01:13:17 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 08 Oct 2019 05:13:17 +0000 Subject: [issue38404] spam Message-ID: <1570511597.15.0.6957757108.issue38404@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: -larry, pokeronlinejakarta resolution: -> rejected stage: -> resolved status: open -> closed title: Poker Online -> spam type: crash -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 02:46:40 2019 From: report at bugs.python.org (Dima Tisnek) Date: Tue, 08 Oct 2019 06:46:40 +0000 Subject: [issue38388] Pickle protocol v 5 needs to be documented In-Reply-To: <1570405873.92.0.178526679084.issue38388@roundup.psfhosted.org> Message-ID: <1570517200.2.0.408209358896.issue38388@roundup.psfhosted.org> Change by Dima Tisnek : ---------- keywords: +patch pull_requests: +16225 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16639 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 03:06:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2019 07:06:54 +0000 Subject: [issue38400] Python segfaults when configured with --with-pydebug --with-trace-refs In-Reply-To: <1570489297.7.0.2347429078.issue38400@roundup.psfhosted.org> Message-ID: <1570518414.44.0.696061621389.issue38400@roundup.psfhosted.org> STINNER Victor added the comment: Notes for myself. the visit_decref() has been updated to display repr() of the parent object, rather than display the "freed" object. Before: --- Modules/gcmodule.c:378: visit_decref: Assertion "!_PyObject_IsFreed(op)" failed Fatal Python error: _PyObject_AssertFailed Python runtime state: preinitialized Current thread 0x00007f6e2863e740 (most recent call first): --- After: --- Modules/gcmodule.c:378: visit_decref: Assertion "!_PyObject_IsFreed(op)" failed Enable tracemalloc to get the memory block allocation traceback object address : 0x7fe2d1a52b40 object refcount : 1 object type : 0x740be0 object type name: dict object repr : {'__repr__': , '__hash__': , '__call__': , '__lt__': , '__le__': , '__eq__': , '__ne__': , '__gt__': , '__ge__': , '__init__': , '__new__': , '__callback__': , '__doc__': None} Fatal Python error: _PyObject_AssertFailed Python runtime state: preinitialized Current thread 0x00007fe2dea35740 (most recent call first): --- The problem was that the None object was seen as "freed" because _ob_prev=_ob_next=NULL. This object doesn't seem to be part of the list of all objects, sys.getobjects(). I fixed Py_None, but then I got the same assertion error on a different (moduledef) object. I gave up, and Pablo and me fixed _PyObject_IsFreed() instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 03:09:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2019 07:09:47 +0000 Subject: [issue33803] contextvars: hamt_alloc() must initialize h_root and h_count fields In-Reply-To: <1528415094.5.0.592728768989.issue33803@psf.upfronthosting.co.za> Message-ID: <1570518587.37.0.14508720594.issue33803@roundup.psfhosted.org> STINNER Victor added the comment: Notes for myself. In bpo-38392, I modified PyObject_GC_Track() in debug mode to detect this bug. For example, this bug can be reproduced with this change: --- diff --git a/Python/hamt.c b/Python/hamt.c index 28b4e1ef6c..d7dd555d15 100644 --- a/Python/hamt.c +++ b/Python/hamt.c @@ -2478,8 +2478,6 @@ hamt_alloc(void) if (o == NULL) { return NULL; } - o->h_count = 0; - o->h_root = NULL; o->h_weakreflist = NULL; PyObject_GC_Track(o); return o; --- Python now detects the bug in debug mode: --- $ ./python -m test -v test_context (...) test_context_copy_1 (test.test_context.ContextTest) ... Modules/gcmodule.c:1931: visit_validate: Assertion failed: PyObject_GC_Track() object is not valid Enable tracemalloc to get the memory block allocation traceback object address : 0x7f2b17408d70 object refcount : 1 object type : 0x76bc20 object type name: hamt object repr : Fatal Python error: _PyObject_AssertFailed Python runtime state: initialized Current thread 0x00007f2b25590740 (most recent call first): File "/home/vstinner/python/master/Lib/test/test_context.py", line 322 in test_context_copy_1 File "/home/vstinner/python/master/Lib/unittest/case.py", line 616 in _callTestMethod File "/home/vstinner/python/master/Lib/unittest/case.py", line 659 in run (...) File "/home/vstinner/python/master/Lib/runpy.py", line 192 in _run_module_as_main Aborted (core dumped) --- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 03:10:02 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2019 07:10:02 +0000 Subject: [issue38392] Ensure that objects entering the GC are valid In-Reply-To: <1570445338.58.0.651902608854.issue38392@roundup.psfhosted.org> Message-ID: <1570518602.07.0.328230113207.issue38392@roundup.psfhosted.org> Serhiy Storchaka added the comment: I am sure this will break third-party projects. But I thing that we should not revert this change, as it completely matches the documentation. It is good that it was applied so early at development cycle. Stefan, could you please test Cython and lxml with this? ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 03:54:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2019 07:54:13 +0000 Subject: [issue27542] Segfault in gcmodule.c:360 visit_decref In-Reply-To: <1468755086.8.0.27245311458.issue27542@psf.upfronthosting.co.za> Message-ID: <1570521253.21.0.956232301429.issue27542@roundup.psfhosted.org> STINNER Victor added the comment: > Julien: I'm working on enhancement of debug traces on visit_decref(). Are you still able to reproduce the crash in 2019? I asked him on IRC. No, he cannot reproduce the bug anymore. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 04:06:51 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 08 Oct 2019 08:06:51 +0000 Subject: [issue27542] Segfault in gcmodule.c:360 visit_decref In-Reply-To: <1468755086.8.0.27245311458.issue27542@psf.upfronthosting.co.za> Message-ID: <1570522011.88.0.152823947502.issue27542@roundup.psfhosted.org> Julien Palard added the comment: I tried again with the same version of pip and cffi on cpython 2.7.16 (no 13, I have no VM atm to compile a 2.7.13) but no segfault this time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 04:18:02 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2019 08:18:02 +0000 Subject: [issue38405] Nested subclasses of typing.NamedTuple are not pickleable Message-ID: <1570522682.37.0.234893155024.issue38405@roundup.psfhosted.org> New submission from Serhiy Storchaka : Example: >>> from typing import NamedTuple >>> import pickle >>> class A: ... class B(NamedTuple): ... x: int ... >>> pickle.dumps(A.B) Traceback (most recent call last): File "", line 1, in _pickle.PicklingError: Can't pickle : attribute lookup B on __main__ failed ---------- components: Library (Lib) messages: 354176 nosy: gvanrossum, levkivskyi, serhiy.storchaka priority: normal severity: normal status: open title: Nested subclasses of typing.NamedTuple are not pickleable type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 04:20:34 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2019 08:20:34 +0000 Subject: [issue38405] Nested subclasses of typing.NamedTuple are not pickleable In-Reply-To: <1570522682.37.0.234893155024.issue38405@roundup.psfhosted.org> Message-ID: <1570522834.29.0.736279203066.issue38405@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +16226 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16641 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 04:36:22 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2019 08:36:22 +0000 Subject: [issue38406] Missed some public names in help(typing) Message-ID: <1570523782.74.0.0305216426842.issue38406@roundup.psfhosted.org> New submission from Serhiy Storchaka : Special forms NoReturn, Final, Literal and class ForwardRef are not shown in the help() output. ---------- components: Library (Lib) messages: 354177 nosy: gvanrossum, levkivskyi, serhiy.storchaka priority: normal severity: normal status: open title: Missed some public names in help(typing) versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 04:44:08 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2019 08:44:08 +0000 Subject: [issue38406] Missed some public names in help(typing) In-Reply-To: <1570523782.74.0.0305216426842.issue38406@roundup.psfhosted.org> Message-ID: <1570524248.53.0.525564883885.issue38406@roundup.psfhosted.org> Serhiy Storchaka added the comment: Sorry, I looked at wrong Python version. ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 04:59:44 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2019 08:59:44 +0000 Subject: [issue38407] Add docstrings for typing.SupportsXXX classes Message-ID: <1570525184.08.0.803412577085.issue38407@roundup.psfhosted.org> New submission from Serhiy Storchaka : typing.SupportsXXX classes do not have docstrings and help() shows the docstring of the parent class instead, which is wrong ("Base class for protocol classes..."). ---------- components: Library (Lib) messages: 354179 nosy: gvanrossum, levkivskyi, serhiy.storchaka priority: normal severity: normal status: open title: Add docstrings for typing.SupportsXXX classes versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 05:01:56 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2019 09:01:56 +0000 Subject: [issue38407] Add docstrings for typing.SupportsXXX classes In-Reply-To: <1570525184.08.0.803412577085.issue38407@roundup.psfhosted.org> Message-ID: <1570525316.11.0.70862216919.issue38407@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +16227 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16644 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 05:19:31 2019 From: report at bugs.python.org (hongweipeng) Date: Tue, 08 Oct 2019 09:19:31 +0000 Subject: [issue26103] Contradiction in definition of "data descriptor" between (dotted lookup behavior/datamodel documentation) and (inspect lib/descriptor how-to) In-Reply-To: <1452718612.1.0.925403449689.issue26103@psf.upfronthosting.co.za> Message-ID: <1570526371.13.0.0515719894316.issue26103@roundup.psfhosted.org> Change by hongweipeng : ---------- pull_requests: +16228 pull_request: https://github.com/python/cpython/pull/16645 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 05:51:03 2019 From: report at bugs.python.org (James Allsopp) Date: Tue, 08 Oct 2019 09:51:03 +0000 Subject: [issue38408] urlparse gives no method to build a url with a port Message-ID: <1570528263.82.0.631134670905.issue38408@roundup.psfhosted.org> New submission from James Allsopp : Hi, I like to build my Url's using url unparse, e.g. site_to_test = urllib.parse.urlunparse((scheme, host, page, '', '', '')) r = requests.get(site_to_test) However, we reach a lot of sites through SSH tunnels, as our network is heavily locked down, and need to specify a port. Unfortunately, we can parse a url with a port, and get site_to_test.port = '9097' we can't run it the other way, e.g. this fails. site_to_test = urllib.parse.urlunparse((scheme, host, page, '', '', '',port=9097)) This should be easy to fix and there's a use case for it. Thanks ---------- components: Library (Lib) messages: 354180 nosy: James Allsopp priority: normal severity: normal status: open title: urlparse gives no method to build a url with a port versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 05:51:06 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 08 Oct 2019 09:51:06 +0000 Subject: [issue26219] implement per-opcode cache in ceval In-Reply-To: <1570452060.66.0.886326993478.issue26219@roundup.psfhosted.org> Message-ID: Inada Naoki added the comment: On Mon, Oct 7, 2019 at 9:41 PM Mark Shannon wrote: > > Mark Shannon added the comment: > > Given that > def foo(): int; str; bytes; float; int; str; bytes; float > can be trivially be rewritten as > def foo(): pass > I think that benchmark is meaningless. > Do you mean every microbenchmark measuring single feature is meaningless? I think it is worth enough for readers who understand what `LOAD_GLOBAL` instruction means. (e.g. People who using techniques like `int_ = int` before a loop.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 06:02:00 2019 From: report at bugs.python.org (Roundup Robot) Date: Tue, 08 Oct 2019 10:02:00 +0000 Subject: [issue32996] Improve What's New in 3.7 In-Reply-To: <1520251006.69.0.467229070634.issue32996@psf.upfronthosting.co.za> Message-ID: <1570528920.75.0.040752402381.issue32996@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +16229 pull_request: https://github.com/python/cpython/pull/16646 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 06:29:06 2019 From: report at bugs.python.org (=?utf-8?q?Ricardo_B=C3=A1nffy?=) Date: Tue, 08 Oct 2019 10:29:06 +0000 Subject: [issue38294] Documentation on 3.6->3.7 re.escape no longer escaping "/" or ":" should be obvious In-Reply-To: <1569603997.59.0.0237297108404.issue38294@roundup.psfhosted.org> Message-ID: <1570530546.01.0.303969868226.issue38294@roundup.psfhosted.org> Change by Ricardo B?nffy : ---------- pull_requests: +16230 pull_request: https://github.com/python/cpython/pull/16647 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 06:34:50 2019 From: report at bugs.python.org (M. Eric Irrgang) Date: Tue, 08 Oct 2019 10:34:50 +0000 Subject: [issue32996] Improve What's New in 3.7 In-Reply-To: <1520251006.69.0.467229070634.issue32996@psf.upfronthosting.co.za> Message-ID: <1570530890.05.0.390338975009.issue32996@roundup.psfhosted.org> Change by M. Eric Irrgang : ---------- pull_requests: +16231 pull_request: https://github.com/python/cpython/pull/16648 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 06:46:20 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 08 Oct 2019 10:46:20 +0000 Subject: [issue33714] module can set an exception in tp_clear In-Reply-To: <1527769305.39.0.682650639539.issue33714@psf.upfronthosting.co.za> Message-ID: <1570531580.87.0.10390479039.issue33714@roundup.psfhosted.org> miss-islington added the comment: New changeset d7c387384a27f37e4e3fa7890c859212c56b45b2 by Miss Islington (bot) (Serhiy Storchaka) in branch 'master': bpo-33714: Output an exception raised in module's m_clear(). (GH-16592) https://github.com/python/cpython/commit/d7c387384a27f37e4e3fa7890c859212c56b45b2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 06:47:11 2019 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 08 Oct 2019 10:47:11 +0000 Subject: [issue33714] module can set an exception in tp_clear In-Reply-To: <1527769305.39.0.682650639539.issue33714@psf.upfronthosting.co.za> Message-ID: <1570531631.11.0.646348998905.issue33714@roundup.psfhosted.org> Petr Viktorin added the comment: Indeed, it can be closed. Thanks Serhiy for the better error message! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 06:46:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2019 10:46:47 +0000 Subject: [issue38118] Valgrind warning in PyUnicode_Decode: false alarm with GCC builtin strcmp() In-Reply-To: <1568215737.14.0.192001407155.issue38118@roundup.psfhosted.org> Message-ID: <1570531607.39.0.341324466056.issue38118@roundup.psfhosted.org> STINNER Victor added the comment: > ==6832== at 0x4D87E9: PyUnicode_Decode (unicodeobject.c:3395) This warning is a false alarm: the GCC builtin strcmp() function seems to read past the NUL byte. When recompiling Python with -fno-builtin GCC option, the warning is gone. The valgrind warning can be reproduced using attached valgrind_strcmp_warn.c: On Fedora 30 with: * gcc (GCC) 9.2.1 20190827 (Red Hat 9.2.1-1) * valgrind-3.15.0 GCC builtin strcmp() emits a false alarm in valgrind: it reads past the NUL byte. $ gcc -O3 valgrind_strcmp_warn.c -o valgrind_strcmp_warn -D NDEBUG=1 -g && valgrind ./valgrind_strcmp_warn (...) ==29173== Conditional jump or move depends on uninitialised value(s) ==29173== at 0x4011CB: PyUnicode_Decode.part.0 (valgrind_strcmp_warn.c:276) ==29173== by 0x4898F42: (below main) (in /usr/lib64/libc-2.29.so) ==29173== ==29173== Conditional jump or move depends on uninitialised value(s) ==29173== at 0x4011EE: PyUnicode_Decode.part.0 (valgrind_strcmp_warn.c:280) ==29173== by 0x4898F42: (below main) (in /usr/lib64/libc-2.29.so) ==29173== ==29173== Conditional jump or move depends on uninitialised value(s) ==29173== at 0x401221: PyUnicode_Decode.part.0 (valgrind_strcmp_warn.c:282) ==29173== by 0x4898F42: (below main) (in /usr/lib64/libc-2.29.so) (...) ==29173== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0) versus $ gcc -O3 valgrind_strcmp_warn.c -o valgrind_strcmp_warn -D NDEBUG=1 -fno-builtin -g && valgrind ./valgrind_strcmp_warn ==29217== Memcheck, a memory error detector (...) ==29217== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) ---------- title: Valgrind warnings when running tokenize.py -> Valgrind warning in PyUnicode_Decode: false alarm with GCC builtin strcmp() Added file: https://bugs.python.org/file48647/valgrind_strcmp_warn.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 07:04:03 2019 From: report at bugs.python.org (Matthias Klose) Date: Tue, 08 Oct 2019 11:04:03 +0000 Subject: [issue38368] Crash when subclassing ctypes.Union In-Reply-To: <1570178161.94.0.1951756088.issue38368@roundup.psfhosted.org> Message-ID: <1570532643.77.0.852325441945.issue38368@roundup.psfhosted.org> Change by Matthias Klose : ---------- keywords: +3.7regression -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 07:23:57 2019 From: report at bugs.python.org (Amir Mohamadi) Date: Tue, 08 Oct 2019 11:23:57 +0000 Subject: [issue38408] urlparse gives no method to build a url with a port In-Reply-To: <1570528263.82.0.631134670905.issue38408@roundup.psfhosted.org> Message-ID: <1570533837.25.0.623021877753.issue38408@roundup.psfhosted.org> Amir Mohamadi added the comment: Hi! I'm a newbie but I'd like to work on this issue can I work on it??? ---------- nosy: +Amir _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 07:31:44 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2019 11:31:44 +0000 Subject: [issue38371] Tkinter: deprecate the split() method In-Reply-To: <1570203221.73.0.664458057352.issue38371@roundup.psfhosted.org> Message-ID: <1570534304.15.0.753400463776.issue38371@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset d05b000c6bcd39dba4f4b2656e45954802649562 by Serhiy Storchaka in branch 'master': bpo-38371: Tkinter: deprecate the split() method. (GH-16584) https://github.com/python/cpython/commit/d05b000c6bcd39dba4f4b2656e45954802649562 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 07:32:28 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2019 11:32:28 +0000 Subject: [issue36698] Shell restart when error message contains non-BMP characters In-Reply-To: <1555953357.75.0.808052597637.issue36698@roundup.psfhosted.org> Message-ID: <1570534348.87.0.527093202384.issue36698@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset b690a2759e62d9ee0b6ea1b20e8f7e4b2cdbf8bb by Serhiy Storchaka in branch 'master': bpo-36698: IDLE no longer fails when write non-encodable characters to stderr. (GH-16583) https://github.com/python/cpython/commit/b690a2759e62d9ee0b6ea1b20e8f7e4b2cdbf8bb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 07:32:39 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 08 Oct 2019 11:32:39 +0000 Subject: [issue36698] Shell restart when error message contains non-BMP characters In-Reply-To: <1555953357.75.0.808052597637.issue36698@roundup.psfhosted.org> Message-ID: <1570534359.35.0.948661955757.issue36698@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16232 pull_request: https://github.com/python/cpython/pull/16649 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 07:32:46 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 08 Oct 2019 11:32:46 +0000 Subject: [issue36698] Shell restart when error message contains non-BMP characters In-Reply-To: <1555953357.75.0.808052597637.issue36698@roundup.psfhosted.org> Message-ID: <1570534366.04.0.623647247694.issue36698@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16233 pull_request: https://github.com/python/cpython/pull/16650 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 07:37:58 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2019 11:37:58 +0000 Subject: [issue38371] Tkinter: deprecate the split() method In-Reply-To: <1570203221.73.0.664458057352.issue38371@roundup.psfhosted.org> Message-ID: <1570534678.86.0.56465986531.issue38371@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 07:49:22 2019 From: report at bugs.python.org (hai shi) Date: Tue, 08 Oct 2019 11:49:22 +0000 Subject: [issue16623] argparse help formatter does not honor non-breaking space In-Reply-To: <1354745001.59.0.580615965604.issue16623@psf.upfronthosting.co.za> Message-ID: <1570535362.33.0.848081883932.issue16623@roundup.psfhosted.org> hai shi added the comment: I checked the help format. the help_lines' width in python2.7 is different python3. The width is more likely a hardcode in https://github.com/python/cpython/blob/2.7/Lib/argparse.py#L165. , so the help_lines = [u'This is a very long help string. ex: "--s3', u's3://my.bucket/dir1/dir2"'](when joining this help_lines it will add a '\n' in the middle) Since python 3.3, the width is a dynamic value in https://github.com/python/cpython/blob/master/Lib/argparse.py#L170 , so the help_lines = ['This is a very long help string. ex: "--s3\xa0s3://my.bucket/dir1/dir2"'] ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 07:51:19 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 08 Oct 2019 11:51:19 +0000 Subject: [issue36698] Shell restart when error message contains non-BMP characters In-Reply-To: <1555953357.75.0.808052597637.issue36698@roundup.psfhosted.org> Message-ID: <1570535479.89.0.793645003152.issue36698@roundup.psfhosted.org> miss-islington added the comment: New changeset a1f45008f190b0d340ec0eac623f05ef98e6b4c9 by Miss Islington (bot) in branch '3.8': bpo-36698: IDLE no longer fails when write non-encodable characters to stderr. (GH-16583) https://github.com/python/cpython/commit/a1f45008f190b0d340ec0eac623f05ef98e6b4c9 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 07:52:00 2019 From: report at bugs.python.org (hai shi) Date: Tue, 08 Oct 2019 11:52:00 +0000 Subject: [issue16623] argparse help formatter does not honor non-breaking space In-Reply-To: <1354745001.59.0.580615965604.issue16623@psf.upfronthosting.co.za> Message-ID: <1570535520.64.0.322988835953.issue16623@roundup.psfhosted.org> hai shi added the comment: oh, typo error. the help_lines' width in python2.7 is different python3.-->the help_lines' width in python2.7 is different with python3.x ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 07:52:52 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 08 Oct 2019 11:52:52 +0000 Subject: [issue36698] Shell restart when error message contains non-BMP characters In-Reply-To: <1555953357.75.0.808052597637.issue36698@roundup.psfhosted.org> Message-ID: <1570535572.05.0.147162705897.issue36698@roundup.psfhosted.org> miss-islington added the comment: New changeset 4f962ecfa1aadc45facc250841208f6dd2ce690f by Miss Islington (bot) in branch '3.7': bpo-36698: IDLE no longer fails when write non-encodable characters to stderr. (GH-16583) https://github.com/python/cpython/commit/4f962ecfa1aadc45facc250841208f6dd2ce690f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 07:56:49 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 08 Oct 2019 11:56:49 +0000 Subject: [issue38401] Make dataclass attribute docstrings accessible In-Reply-To: <1570494293.05.0.934356434949.issue38401@roundup.psfhosted.org> Message-ID: <1570535809.61.0.275195380836.issue38401@roundup.psfhosted.org> Eric V. Smith added the comment: Note that those strings are not docstrings, per se. They're just strings, and aren't available in the class definition for the dataclass decorator to see. It's really no different from: class X: x: int 3 That 3 just gets evaluated and thrown away, like the strings in your example. To change this is beyond the scope of dataclasses, and would need to be a language change. I can't think of a good way to attach the string to the annotation before it (I'm assuming this would only work with annotations, but maybe you have other ideas). You might want to bring this up on python-ideas to get some more feedback. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 08:03:42 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2019 12:03:42 +0000 Subject: [issue36698] Shell restart when error message contains non-BMP characters In-Reply-To: <1555953357.75.0.808052597637.issue36698@roundup.psfhosted.org> Message-ID: <1570536222.47.0.18846383732.issue36698@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 08:05:45 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2019 12:05:45 +0000 Subject: [issue22742] IDLE shows traceback when printing non-BMP character In-Reply-To: <1414426704.85.0.168243800807.issue22742@psf.upfronthosting.co.za> Message-ID: <1570536345.26.0.715511866085.issue22742@roundup.psfhosted.org> Serhiy Storchaka added the comment: And with PR 16583 it is now completely fixed. I.e. it can only fail in cases when the regular interactive interpreter fails too. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 08:15:19 2019 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 08 Oct 2019 12:15:19 +0000 Subject: [issue37879] Segfaults in C heap type subclasses In-Reply-To: <1566074851.0.0.451710928537.issue37879@roundup.psfhosted.org> Message-ID: <1570536919.21.0.24289434681.issue37879@roundup.psfhosted.org> Petr Viktorin added the comment: Thanks to St?phane and Eddie for fixing the refleak! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 08:18:12 2019 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 08 Oct 2019 12:18:12 +0000 Subject: [issue38140] Py_tp_dictoffset / Py_tp_finalize are unsettable in stable API In-Reply-To: <1568297060.68.0.400472303762.issue38140@roundup.psfhosted.org> Message-ID: <1570537092.32.0.178105798381.issue38140@roundup.psfhosted.org> Petr Viktorin added the comment: Thank you all! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 08:34:38 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 08 Oct 2019 12:34:38 +0000 Subject: [issue38408] urlparse gives no method to build a url with a port In-Reply-To: <1570528263.82.0.631134670905.issue38408@roundup.psfhosted.org> Message-ID: <1570538078.47.0.890268307934.issue38408@roundup.psfhosted.org> Eric V. Smith added the comment: One way I can think of doing this in a backward compatible way is to add keyword parameters to urlunparse, like: def urlunparse(components, *, username=None, password=None, hostname=None, port=None): Which would make your call: site_to_test = urllib.parse.urlunparse((scheme, host, page, '', '', ''), port=9097) I think that's a horrible interface, but it is backward compatible. A better interface would be have all 10 URL parameters passed in as keyword arguments, with reasonable defaults. If you want to keep this named "urlunparse", you'd need to say you can't pass in both "components" and any other named parameter (other than maybe the 4 parameters that are unnamed in ParseResult). Something like: def urlunparse(components=None, scheme=None, netloc=None, path=None, params=None, query=None, fragment=None, *, username=None, password=None, hostname=None, port=None): Then error if components is set and any of scheme, netloc, path, params, query, or fragment is also set. We could bikeshed about which would be keyword-only, if any, all, or only some as I've shown here. Another option would be to leave urlunparse alone, and add a new function entirely, which wouldn't have to worry about backward compatibility. It might be worthwhile to raise this on python-ideas. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 08:45:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2019 12:45:06 +0000 Subject: [issue38118] Valgrind warning in PyUnicode_Decode: false alarm with GCC builtin strcmp() In-Reply-To: <1568215737.14.0.192001407155.issue38118@roundup.psfhosted.org> Message-ID: <1570538706.79.0.833665135802.issue38118@roundup.psfhosted.org> STINNER Victor added the comment: The valgrind false alarm on GCC builtin strcmp() has been reported to the Valgrind bug tracker in 2011, with an update in 2012 and... nothing :-( https://bugs.kde.org/show_bug.cgi?id=264936 curl worked around the issue by disabling valgrind on the impacted test: https://lists.fedoraproject.org/pipermail/scm-commits/2011-February/567665.html Passing "--partial-loads-ok=yes" to Valgrind has no effect... It became the default: http://valgrind.org/docs/manual/mc-manual.html#opt.partial-loads-ok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 08:45:52 2019 From: report at bugs.python.org (Ben Harper) Date: Tue, 08 Oct 2019 12:45:52 +0000 Subject: [issue36253] Use after free in ctypes test suite In-Reply-To: <1552176520.99.0.273814604607.issue36253@roundup.psfhosted.org> Message-ID: <1570538752.17.0.879238281581.issue36253@roundup.psfhosted.org> Ben Harper added the comment: Changes merged ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 08:47:13 2019 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 08 Oct 2019 12:47:13 +0000 Subject: [issue33803] contextvars: hamt_alloc() must initialize h_root and h_count fields In-Reply-To: <1528415094.5.0.592728768989.issue33803@psf.upfronthosting.co.za> Message-ID: <1570538833.37.0.118563625323.issue33803@roundup.psfhosted.org> Yury Selivanov added the comment: > In bpo-38392, I modified PyObject_GC_Track() in debug mode to detect this bug. Awesome!!! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 08:55:35 2019 From: report at bugs.python.org (Ben Harper) Date: Tue, 08 Oct 2019 12:55:35 +0000 Subject: [issue36356] Failure to build with address sanitizer In-Reply-To: <1552967277.69.0.646647509224.issue36356@roundup.psfhosted.org> Message-ID: <1570539335.52.0.115613780875.issue36356@roundup.psfhosted.org> Ben Harper added the comment: The default build of python with ASAN builds successfully. Test suite and PGO build are currently blocked, but that can be separated if it makes more sense to handle them individually. Would it make sense to add an ASAN build to the CI pipeline to make detection automatic going forward? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 08:56:32 2019 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 08 Oct 2019 12:56:32 +0000 Subject: [issue36356] Failure to build with address sanitizer In-Reply-To: <1552967277.69.0.646647509224.issue36356@roundup.psfhosted.org> Message-ID: <1570539392.58.0.756300746535.issue36356@roundup.psfhosted.org> Change by Yury Selivanov : ---------- nosy: -yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 09:03:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2019 13:03:16 +0000 Subject: [issue36356] Failure to build with address sanitizer In-Reply-To: <1552967277.69.0.646647509224.issue36356@roundup.psfhosted.org> Message-ID: <1570539796.06.0.883588951918.issue36356@roundup.psfhosted.org> STINNER Victor added the comment: > The default build of python with ASAN builds successfully. Test suite and PGO build are currently blocked, but that can be separated if it makes more sense to handle them individually. Yeah, please open one issue per ASAN issue (try to group similar warnings in the same Python issue?). > Would it make sense to add an ASAN build to the CI pipeline to make detection automatic going forward? Gregory maintains a clang UBSan buildbot: https://buildbot.python.org/all/#/builders/135 Usually I prefer to setup a buildbot when most issues are fixed. I close this issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 09:08:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2019 13:08:22 +0000 Subject: [issue38118] Valgrind warning in PyUnicode_Decode: false alarm with GCC builtin strcmp() In-Reply-To: <1568215737.14.0.192001407155.issue38118@roundup.psfhosted.org> Message-ID: <1570540102.84.0.79298705839.issue38118@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +16234 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/16651 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 09:19:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2019 13:19:24 +0000 Subject: [issue38118] Valgrind warning in PyUnicode_Decode: false alarm with GCC builtin strcmp() In-Reply-To: <1568215737.14.0.192001407155.issue38118@roundup.psfhosted.org> Message-ID: <1570540764.31.0.508358838071.issue38118@roundup.psfhosted.org> STINNER Victor added the comment: It seems like Python 2.7 is not affected. ---------- versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 09:29:57 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2019 13:29:57 +0000 Subject: [issue38405] Nested subclasses of typing.NamedTuple are not pickleable In-Reply-To: <1570522682.37.0.234893155024.issue38405@roundup.psfhosted.org> Message-ID: <1570541397.06.0.195489271616.issue38405@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 13abda41003daf599587991d8291f0dacf6e9519 by Serhiy Storchaka in branch 'master': bpo-38405: Make nested subclasses of typing.NamedTuple pickleable. (GH-16641) https://github.com/python/cpython/commit/13abda41003daf599587991d8291f0dacf6e9519 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 09:30:20 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2019 13:30:20 +0000 Subject: [issue38407] Add docstrings for typing.SupportsXXX classes In-Reply-To: <1570525184.08.0.803412577085.issue38407@roundup.psfhosted.org> Message-ID: <1570541420.05.0.856004186365.issue38407@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 8252c52e57283515ace5d4251584255dc5c60eb5 by Serhiy Storchaka in branch 'master': bpo-38407: Add docstrings for typing.SupportsXXX classes. (GH-16644) https://github.com/python/cpython/commit/8252c52e57283515ace5d4251584255dc5c60eb5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 09:42:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2019 13:42:24 +0000 Subject: [issue38118] Valgrind warning in PyUnicode_Decode: false alarm with GCC builtin strcmp() In-Reply-To: <1568215737.14.0.192001407155.issue38118@roundup.psfhosted.org> Message-ID: <1570542144.39.0.554984782854.issue38118@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 03ab6b4fc6f59a4452756e7a3a46310ce30ec4b2 by Victor Stinner in branch 'master': bpo-38118: Ignore Valgrind false alarm in PyUnicode_Decode() (GH-16651) https://github.com/python/cpython/commit/03ab6b4fc6f59a4452756e7a3a46310ce30ec4b2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 09:42:30 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 08 Oct 2019 13:42:30 +0000 Subject: [issue38118] Valgrind warning in PyUnicode_Decode: false alarm with GCC builtin strcmp() In-Reply-To: <1568215737.14.0.192001407155.issue38118@roundup.psfhosted.org> Message-ID: <1570542150.74.0.488052561864.issue38118@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16235 pull_request: https://github.com/python/cpython/pull/16652 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 09:42:38 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 08 Oct 2019 13:42:38 +0000 Subject: [issue38118] Valgrind warning in PyUnicode_Decode: false alarm with GCC builtin strcmp() In-Reply-To: <1568215737.14.0.192001407155.issue38118@roundup.psfhosted.org> Message-ID: <1570542158.4.0.519289532135.issue38118@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16236 pull_request: https://github.com/python/cpython/pull/16653 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 09:49:15 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 08 Oct 2019 13:49:15 +0000 Subject: [issue38118] Valgrind warning in PyUnicode_Decode: false alarm with GCC builtin strcmp() In-Reply-To: <1568215737.14.0.192001407155.issue38118@roundup.psfhosted.org> Message-ID: <1570542555.02.0.445016913722.issue38118@roundup.psfhosted.org> miss-islington added the comment: New changeset 364532fb4962991d278da6470c3aec4e443e533d by Miss Islington (bot) in branch '3.8': bpo-38118: Ignore Valgrind false alarm in PyUnicode_Decode() (GH-16651) https://github.com/python/cpython/commit/364532fb4962991d278da6470c3aec4e443e533d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 09:50:14 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 08 Oct 2019 13:50:14 +0000 Subject: [issue38118] Valgrind warning in PyUnicode_Decode: false alarm with GCC builtin strcmp() In-Reply-To: <1568215737.14.0.192001407155.issue38118@roundup.psfhosted.org> Message-ID: <1570542614.0.0.747747113985.issue38118@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16237 pull_request: https://github.com/python/cpython/pull/16654 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 09:53:51 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 08 Oct 2019 13:53:51 +0000 Subject: [issue38405] Nested subclasses of typing.NamedTuple are not pickleable In-Reply-To: <1570522682.37.0.234893155024.issue38405@roundup.psfhosted.org> Message-ID: <1570542831.53.0.491205528608.issue38405@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16238 pull_request: https://github.com/python/cpython/pull/16655 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 09:54:25 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 08 Oct 2019 13:54:25 +0000 Subject: [issue38407] Add docstrings for typing.SupportsXXX classes In-Reply-To: <1570525184.08.0.803412577085.issue38407@roundup.psfhosted.org> Message-ID: <1570542865.4.0.609225955654.issue38407@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16239 pull_request: https://github.com/python/cpython/pull/16656 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 09:56:11 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 08 Oct 2019 13:56:11 +0000 Subject: [issue38118] Valgrind warning in PyUnicode_Decode: false alarm with GCC builtin strcmp() In-Reply-To: <1568215737.14.0.192001407155.issue38118@roundup.psfhosted.org> Message-ID: <1570542971.36.0.125303518777.issue38118@roundup.psfhosted.org> miss-islington added the comment: New changeset 98043b4fcd80bdfa8cc2be1730fa2a4cf4950958 by Miss Islington (bot) in branch '3.7': bpo-38118: Ignore Valgrind false alarm in PyUnicode_Decode() (GH-16651) https://github.com/python/cpython/commit/98043b4fcd80bdfa8cc2be1730fa2a4cf4950958 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 09:58:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2019 13:58:13 +0000 Subject: [issue38118] Valgrind warning in PyUnicode_Decode: false alarm with GCC builtin strcmp() In-Reply-To: <1568215737.14.0.192001407155.issue38118@roundup.psfhosted.org> Message-ID: <1570543093.07.0.200165263542.issue38118@roundup.psfhosted.org> STINNER Victor added the comment: Ok, the issue has been fixed in 3.7, 3.8 and master branches. Ensure that you use Valgrind with Misc/valgrind.supp. Example: $ echo|PYTHONMALLOC=malloc valgrind --suppressions=Misc/valgrind-python.supp ./python Lib/tokenize.py (...) ==12923== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 1 from 1) I close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 09:59:54 2019 From: report at bugs.python.org (Bob Dowling) Date: Tue, 08 Oct 2019 13:59:54 +0000 Subject: [issue38409] Typo in doc string for str.strip Message-ID: <1570543194.25.0.196797196101.issue38409@roundup.psfhosted.org> New submission from Bob Dowling : The doc string for str.strip() has a typo: the "d" at the end of "removed" is missing. help(str.strip) Currently: Return a copy of the string with leading and trailing whitespace remove. Should be: Return a copy of the string with leading and trailing whitespace removed. I have attached an offered patch. ---------- components: Library (Lib) files: str_strip.patch keywords: patch messages: 354209 nosy: Bob Dowling priority: normal severity: normal status: open title: Typo in doc string for str.strip type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48648/str_strip.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:03:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2019 14:03:35 +0000 Subject: [issue38409] Typo in doc string for str.strip In-Reply-To: <1570543194.25.0.196797196101.issue38409@roundup.psfhosted.org> Message-ID: <1570543415.11.0.916029767299.issue38409@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +newcomer friendly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:06:15 2019 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 08 Oct 2019 14:06:15 +0000 Subject: [issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}() Message-ID: <1570543574.99.0.942798410146.issue38410@roundup.psfhosted.org> New submission from Zackery Spytz : _PyEval_SetAsyncGenFinalizer() and _PyEval_SetAsyncGenFirstiter() don't include proper error handling for their PySys_Audit() calls. This could lead to leaked exceptions and fatal errors. ---------- components: Interpreter Core messages: 354210 nosy: ZackerySpytz priority: normal severity: normal status: open title: Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer,Firstiter}() type: crash versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:08:56 2019 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 08 Oct 2019 14:08:56 +0000 Subject: [issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}() In-Reply-To: <1570543574.99.0.942798410146.issue38410@roundup.psfhosted.org> Message-ID: <1570543736.46.0.62298193918.issue38410@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +16240 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16657 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:12:45 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 08 Oct 2019 14:12:45 +0000 Subject: [issue38405] Nested subclasses of typing.NamedTuple are not pickleable In-Reply-To: <1570522682.37.0.234893155024.issue38405@roundup.psfhosted.org> Message-ID: <1570543965.55.0.19138367918.issue38405@roundup.psfhosted.org> miss-islington added the comment: New changeset 10b475a151dc35c8ca4047331d591130973e914d by Miss Islington (bot) in branch '3.8': bpo-38405: Make nested subclasses of typing.NamedTuple pickleable. (GH-16641) https://github.com/python/cpython/commit/10b475a151dc35c8ca4047331d591130973e914d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:15:02 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 08 Oct 2019 14:15:02 +0000 Subject: [issue38407] Add docstrings for typing.SupportsXXX classes In-Reply-To: <1570525184.08.0.803412577085.issue38407@roundup.psfhosted.org> Message-ID: <1570544102.0.0.934032868773.issue38407@roundup.psfhosted.org> miss-islington added the comment: New changeset 7162440a7247f77d22cd937143f358fd5ac85af4 by Miss Islington (bot) in branch '3.8': bpo-38407: Add docstrings for typing.SupportsXXX classes. (GH-16644) https://github.com/python/cpython/commit/7162440a7247f77d22cd937143f358fd5ac85af4 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:27:02 2019 From: report at bugs.python.org (Tim Peters) Date: Tue, 08 Oct 2019 14:27:02 +0000 Subject: [issue38379] finalizer resurrection in gc In-Reply-To: <1570296686.13.0.00730737596554.issue38379@roundup.psfhosted.org> Message-ID: <1570544822.12.0.800361055336.issue38379@roundup.psfhosted.org> Change by Tim Peters : ---------- keywords: +patch pull_requests: +16241 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16658 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:28:52 2019 From: report at bugs.python.org (Tim Peters) Date: Tue, 08 Oct 2019 14:28:52 +0000 Subject: [issue38379] finalizer resurrection in gc In-Reply-To: <1570296686.13.0.00730737596554.issue38379@roundup.psfhosted.org> Message-ID: <1570544932.05.0.354419655603.issue38379@roundup.psfhosted.org> Tim Peters added the comment: PR 16658 aims to repair the stats reported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:35:36 2019 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 08 Oct 2019 14:35:36 +0000 Subject: [issue36075] python 2to3 conversion tool is generating file with extra line for every input line In-Reply-To: <1550828319.37.0.854628356141.issue36075@roundup.psfhosted.org> Message-ID: <1570545336.02.0.763716610772.issue36075@roundup.psfhosted.org> Mark Dickinson added the comment: Looks like a duplicate of #34108 ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:38:52 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 08 Oct 2019 14:38:52 +0000 Subject: [issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}() In-Reply-To: <1570543574.99.0.942798410146.issue38410@roundup.psfhosted.org> Message-ID: <1570545532.66.0.372638944009.issue38410@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:40:38 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 08 Oct 2019 14:40:38 +0000 Subject: [issue38409] Typo in doc string for str.strip In-Reply-To: <1570543194.25.0.196797196101.issue38409@roundup.psfhosted.org> Message-ID: <1570545638.47.0.952841579256.issue38409@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks for the patch and report. CPython now accepts GitHub pull requests https://devguide.python.org/pullrequest/ ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:44:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2019 14:44:39 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1570545879.69.0.025328431416.issue37531@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16242 pull_request: https://github.com/python/cpython/pull/16659 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:44:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2019 14:44:40 +0000 Subject: [issue38207] subprocess: On Windows, Popen.kill() + Popen.communicate() is blocking until all processes using the pipe close the pipe In-Reply-To: <1568763048.2.0.765446302919.issue38207@roundup.psfhosted.org> Message-ID: <1570545880.06.0.961916659054.issue38207@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +16243 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16659 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:53:47 2019 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 08 Oct 2019 14:53:47 +0000 Subject: [issue38202] A fatal error in test_dictviews In-Reply-To: <1568748421.29.0.795591630213.issue38202@roundup.psfhosted.org> Message-ID: <1570546427.68.0.863523650374.issue38202@roundup.psfhosted.org> Dong-hee Na added the comment: Can you finalize the PR 16241 by adding the unit test which @serhiy.storchaka suggested? ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:54:16 2019 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 08 Oct 2019 14:54:16 +0000 Subject: [issue36075] python 2to3 conversion tool is generating file with extra line for every input line In-Reply-To: <1550828319.37.0.854628356141.issue36075@roundup.psfhosted.org> Message-ID: <1570546456.72.0.215650390696.issue36075@roundup.psfhosted.org> Mark Dickinson added the comment: Closing as duplicate. @sabakauser: if you update to a recent Python 3.7 (anything more recent than 3.7.1 should be enough), you should find that this is fixed. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> 2to3 munges new lines on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 11:15:47 2019 From: report at bugs.python.org (Jack Robison) Date: Tue, 08 Oct 2019 15:15:47 +0000 Subject: [issue38411] SQLITE_MISUSE race condition in sqlite3 is misleadingly raised as a binding error Message-ID: <1570547747.91.0.842919846552.issue38411@roundup.psfhosted.org> New submission from Jack Robison : There is a race condition in the sqlite3 module that is misleadingly raised as sqlite3.InterfaceError('Error binding parameter 0 - probably unsupported type.') There are two issues here, one is the incorrectly raise error (https://bugs.python.org/issue16379), the other is the underlying SQLITE_MISUSE caused by the race condition. I believe this is a race between sqlite3 vs python garbage collection due to the releasing of the GIL. If the GIL releasing is removed from sqlite3, I cannot reproduce the race. Here is a script to reproduce the error, as the number of runners or queries_per_executemany is increased the error happens more frequently. The minimal test case only needs two executemanys where each has two queries to run. import asyncio import sqlite3 from concurrent.futures.thread import ThreadPoolExecutor async def misuse_sqlite(runners=2, queries_per_executemany=2): loop = asyncio.get_event_loop() expected_error = 'Error binding parameter 0 - probably unsupported type.' exceptions = [] executor = ThreadPoolExecutor(1) db = executor.submit(sqlite3.connect, ':memory:', isolation_level=None).result() executor.submit(db.executescript, "create table test (id text primary key);") def query_in_executor(): return asyncio.wrap_future(executor.submit(executemany)) def executemany(): try: return db.executemany("select * from test where id=?", ((str(i),) for i in range(queries_per_executemany))) except Exception as err: exceptions.append(err) for _ in range(runners): loop.call_soon(query_in_executor) await asyncio.sleep(0.01) assert all(str(err) == expected_error and isinstance(err, sqlite3.InterfaceError) for err in exceptions) executor.submit(db.close).result() executor.shutdown() return len(exceptions) > 0 attempts = 0 while True: attempts += 1 if asyncio.run(misuse_sqlite()): print('error hit on attempt', attempts) break ---------- components: Library (Lib) messages: 354218 nosy: Jack Robison priority: normal severity: normal status: open title: SQLITE_MISUSE race condition in sqlite3 is misleadingly raised as a binding error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 11:30:56 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 08 Oct 2019 15:30:56 +0000 Subject: [issue38395] proxy_contains (weakref.proxy) can access an object with 0 refcount In-Reply-To: <1570459749.44.0.879317891234.issue38395@roundup.psfhosted.org> Message-ID: <1570548656.36.0.541013064642.issue38395@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 10cd00a9e3c22af37c748ea5a417f6fb66601e21 by Pablo Galindo in branch 'master': bpo-38395: Fix ownership in weakref.proxy methods (GH-16632) https://github.com/python/cpython/commit/10cd00a9e3c22af37c748ea5a417f6fb66601e21 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 11:47:53 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 08 Oct 2019 15:47:53 +0000 Subject: [issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}() In-Reply-To: <1570543574.99.0.942798410146.issue38410@roundup.psfhosted.org> Message-ID: <1570549673.69.0.954284840542.issue38410@roundup.psfhosted.org> Steve Dower added the comment: You're right, they need either your patch or PyErr_WriteUnraisable(NULL) before returning. ?ukasz - this needs a fix in 3.8, but we don't have to necessarily change the (internal, but exposed) ABI. For 3.9, we'll fix it properly, but for 3.8 I'll let you make the call whether we can also add a return value to these functions. -PyAPI_FUNC(void) _PyEval_SetAsyncGenFirstiter(PyObject *); +PyAPI_FUNC(int) _PyEval_SetAsyncGenFirstiter(PyObject *); PyAPI_FUNC(PyObject *) _PyEval_GetAsyncGenFirstiter(void); -PyAPI_FUNC(void) _PyEval_SetAsyncGenFinalizer(PyObject *); +PyAPI_FUNC(int) _PyEval_SetAsyncGenFinalizer(PyObject *); ---------- keywords: +newcomer friendly nosy: +lukasz.langa priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 11:54:27 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 08 Oct 2019 15:54:27 +0000 Subject: [issue38395] proxy_contains (weakref.proxy) can access an object with 0 refcount In-Reply-To: <1570459749.44.0.879317891234.issue38395@roundup.psfhosted.org> Message-ID: <1570550067.58.0.05557216346.issue38395@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +16244 pull_request: https://github.com/python/cpython/pull/16661 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 11:55:31 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 08 Oct 2019 15:55:31 +0000 Subject: [issue38395] proxy_contains (weakref.proxy) can access an object with 0 refcount In-Reply-To: <1570459749.44.0.879317891234.issue38395@roundup.psfhosted.org> Message-ID: <1570550131.71.0.17685216432.issue38395@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +16245 pull_request: https://github.com/python/cpython/pull/16662 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 11:57:33 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 08 Oct 2019 15:57:33 +0000 Subject: [issue38395] proxy_contains (weakref.proxy) can access an object with 0 refcount In-Reply-To: <1570459749.44.0.879317891234.issue38395@roundup.psfhosted.org> Message-ID: <1570550253.14.0.545801757558.issue38395@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +16246 pull_request: https://github.com/python/cpython/pull/16663 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 12:08:32 2019 From: report at bugs.python.org (Jack Robison) Date: Tue, 08 Oct 2019 16:08:32 +0000 Subject: [issue38411] SQLITE_MISUSE race condition in sqlite3 is misleadingly raised as a binding error In-Reply-To: <1570547747.91.0.842919846552.issue38411@roundup.psfhosted.org> Message-ID: <1570550912.88.0.401306658285.issue38411@roundup.psfhosted.org> Change by Jack Robison : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 12:41:04 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2019 16:41:04 +0000 Subject: [issue38294] Documentation on 3.6->3.7 re.escape no longer escaping "/" or ":" should be obvious In-Reply-To: <1569603997.59.0.0237297108404.issue38294@roundup.psfhosted.org> Message-ID: <1570552864.55.0.701987667886.issue38294@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 43f5c0c4d0a608c04c3978adb45117f3943203b7 by Serhiy Storchaka (Ricardo B?nffy) in branch '3.7': [3.7] bpo-38294: Add list of no-longer-escaped chars to re.escape documentation. (GH-16442) (GH-16647) https://github.com/python/cpython/commit/43f5c0c4d0a608c04c3978adb45117f3943203b7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 12:45:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2019 16:45:53 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1570553153.73.0.585933176308.issue37531@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 0ec618af98ac250a91ee9c91f8569e6df6772758 by Victor Stinner in branch 'master': bpo-37531: regrtest ignores output on timeout (GH-16659) https://github.com/python/cpython/commit/0ec618af98ac250a91ee9c91f8569e6df6772758 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 12:45:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2019 16:45:53 +0000 Subject: [issue38207] subprocess: On Windows, Popen.kill() + Popen.communicate() is blocking until all processes using the pipe close the pipe In-Reply-To: <1568763048.2.0.765446302919.issue38207@roundup.psfhosted.org> Message-ID: <1570553153.65.0.825243791179.issue38207@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 0ec618af98ac250a91ee9c91f8569e6df6772758 by Victor Stinner in branch 'master': bpo-37531: regrtest ignores output on timeout (GH-16659) https://github.com/python/cpython/commit/0ec618af98ac250a91ee9c91f8569e6df6772758 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 13:32:00 2019 From: report at bugs.python.org (belegnar) Date: Tue, 08 Oct 2019 17:32:00 +0000 Subject: [issue38412] csv.reader failed to split string with spaces and quoted delimiter Message-ID: <1570555920.82.0.491270320818.issue38412@roundup.psfhosted.org> New submission from belegnar : ``` >>> list(csv.reader(['param1,"param21,param22",param3'])) [['param1', 'param21,param22', 'param3']] >>> list(csv.reader(['param1, "param21,param22", param3'])) [['param1', ' "param21', 'param22"', ' param3']] ``` version 3.7.4 on linux ---------- components: Library (Lib) messages: 354224 nosy: belegnar priority: normal severity: normal status: open title: csv.reader failed to split string with spaces and quoted delimiter type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 13:36:56 2019 From: report at bugs.python.org (Larry Hastings) Date: Tue, 08 Oct 2019 17:36:56 +0000 Subject: [issue38216] Fix for issue30458 (HTTP Header Injection) prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1570556216.94.0.33019580289.issue38216@roundup.psfhosted.org> Larry Hastings added the comment: New changeset 2784e78dc3445c6dd59e915d86c336374c1fa09a by larryhastings (Jason R. Coombs) in branch '3.5': [3.5] bpo-38216, bpo-36274: Allow subclasses to separately override validation and encoding behavior (GH-16448) (#16475) https://github.com/python/cpython/commit/2784e78dc3445c6dd59e915d86c336374c1fa09a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 13:36:57 2019 From: report at bugs.python.org (Larry Hastings) Date: Tue, 08 Oct 2019 17:36:57 +0000 Subject: [issue36274] http.client cannot send non-ASCII request lines In-Reply-To: <1552422803.93.0.420596825145.issue36274@roundup.psfhosted.org> Message-ID: <1570556217.12.0.953053993671.issue36274@roundup.psfhosted.org> Larry Hastings added the comment: New changeset 2784e78dc3445c6dd59e915d86c336374c1fa09a by larryhastings (Jason R. Coombs) in branch '3.5': [3.5] bpo-38216, bpo-36274: Allow subclasses to separately override validation and encoding behavior (GH-16448) (#16475) https://github.com/python/cpython/commit/2784e78dc3445c6dd59e915d86c336374c1fa09a ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 13:37:30 2019 From: report at bugs.python.org (Larry Hastings) Date: Tue, 08 Oct 2019 17:37:30 +0000 Subject: [issue38216] Fix for issue30458 (HTTP Header Injection) prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1570556250.56.0.973799147062.issue38216@roundup.psfhosted.org> Change by Larry Hastings : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 13:47:27 2019 From: report at bugs.python.org (Eli Schwartz) Date: Tue, 08 Oct 2019 17:47:27 +0000 Subject: [issue1724822] provide a shlex.split alternative for Windows shell syntax Message-ID: <1570556847.62.0.715349478609.issue1724822@roundup.psfhosted.org> Change by Eli Schwartz : ---------- nosy: +eschwartz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 14:13:05 2019 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 08 Oct 2019 18:13:05 +0000 Subject: [issue31722] _io.IncrementalNewlineDecoder doesn't inherit codecs.IncrementalDecoder In-Reply-To: <1507386401.5.0.213398074469.issue31722@psf.upfronthosting.co.za> Message-ID: <1570558385.51.0.526208294829.issue31722@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +16247 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16664 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 14:46:56 2019 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 08 Oct 2019 18:46:56 +0000 Subject: [issue31722] _io.IncrementalNewlineDecoder doesn't inherit codecs.IncrementalDecoder In-Reply-To: <1507386401.5.0.213398074469.issue31722@psf.upfronthosting.co.za> Message-ID: <1570560416.97.0.454249409365.issue31722@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 15:01:21 2019 From: report at bugs.python.org (Ronan Lamy) Date: Tue, 08 Oct 2019 19:01:21 +0000 Subject: [issue38109] Missing constants in Lib/stat.py In-Reply-To: <1568208959.37.0.605416078815.issue38109@roundup.psfhosted.org> Message-ID: <1570561281.62.0.713782954572.issue38109@roundup.psfhosted.org> Change by Ronan Lamy : ---------- keywords: +patch pull_requests: +16248 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16665 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 15:24:03 2019 From: report at bugs.python.org (Aviral) Date: Tue, 08 Oct 2019 19:24:03 +0000 Subject: [issue38307] Provide Class' end line in readmodule module In-Reply-To: <1569691590.29.0.185701662636.issue38307@roundup.psfhosted.org> Message-ID: <1570562643.88.0.19773826804.issue38307@roundup.psfhosted.org> Change by Aviral : ---------- keywords: +patch pull_requests: +16249 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16466 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 15:30:42 2019 From: report at bugs.python.org (Vladimir Ryabtsev) Date: Tue, 08 Oct 2019 19:30:42 +0000 Subject: [issue38413] Remove or change "Multithreading" section Message-ID: <1570563042.6.0.0902531064636.issue38413@roundup.psfhosted.org> New submission from Vladimir Ryabtsev : This is regarding the page https://docs.python.org/3.7/library/sqlite3.html. I believe this section on the very bottom of the page has been kept here for pretty long time, during that both SQLite and the sqlite3 module evolved and improved. Now the content contradicts to the description of function "connect()" in the part describing "check_same_thread" parameter. The function description says that using connections from multiple threads is allowed with serialization handled by the user (and it is true), while the bottom "Mutithreading" section says sharing connections is not allowed. I think we can remove "Mutithreading" section entirely unless there is something important to add to what already mentioned. ---------- assignee: docs at python components: Documentation messages: 354227 nosy: Vladimir Ryabtsev, docs at python priority: normal severity: normal status: open title: Remove or change "Multithreading" section versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 15:51:36 2019 From: report at bugs.python.org (Brandt Bucher) Date: Tue, 08 Oct 2019 19:51:36 +0000 Subject: [issue38307] Provide Class' end line in readmodule module In-Reply-To: <1569691590.29.0.185701662636.issue38307@roundup.psfhosted.org> Message-ID: <1570564296.8.0.0891052811631.issue38307@roundup.psfhosted.org> Change by Brandt Bucher : ---------- nosy: +brandtbucher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 15:57:40 2019 From: report at bugs.python.org (Umar Asghar) Date: Tue, 08 Oct 2019 19:57:40 +0000 Subject: [issue38414] Ordering a nested dictionary in python with json format Message-ID: <1570564660.13.0.727592441748.issue38414@roundup.psfhosted.org> New submission from Umar Asghar : Python does not preserve ordering in JSON format. I have tested it out but it's not working. Here is my code. # Python3 code to demonstrate # Sort nested dictionary by key # using OrderedDict() + sorted() from collections import OrderedDict from operator import getitem import json # initializing dictionary test_dict = {'Nikhil' : { 'roll' : 24, 'marks' : 17}, 'Akshat' : {'roll' : 54, 'marks' : 12}, 'Akash' : { 'roll' : 12, 'marks' : 15}} # printing original dict print("The original dictionary : " + str(test_dict)) # using OrderedDict() + sorted() # Sort nested dictionary by key res = OrderedDict(sorted(test_dict.items(), key = lambda x: getitem(x[1], 'marks'))) print("The sorted dictionary by marks is : " + str(res)) # Output # The sorted dictionary by marks is : OrderedDict([('Akshat', {'marks': 12, 'roll': 54}), ('Akash', {'marks': 15, 'roll': 12}), ('Nikhil', {'marks': 17, 'roll': 24})]) res = json.dumps(res) # print result print("The sorted dictionary by marks is : (json)") print(json.loads(res)) # Output # The sorted dictionary by marks is : # {'Akash': {'marks': 15, 'roll': 12}, 'Akshat': {'marks': 12, 'roll': 54}, 'Nikhil': {'marks': 17, 'roll': 24}} Does anyone suggest any solution for it? It's different than a simple dictionary. It only targets the nested dictionary ordering. Please don't mark it a duplication of simple dictionary ordering with JSON. thanks ---------- messages: 354228 nosy: Umar Asghar priority: normal severity: normal status: open title: Ordering a nested dictionary in python with json format _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 16:00:18 2019 From: report at bugs.python.org (Umar Asghar) Date: Tue, 08 Oct 2019 20:00:18 +0000 Subject: [issue38414] Ordering a nested dictionary in python with json format In-Reply-To: <1570564660.13.0.727592441748.issue38414@roundup.psfhosted.org> Message-ID: <1570564818.23.0.676198758798.issue38414@roundup.psfhosted.org> Umar Asghar added the comment: I guess it exists in all Python versions. I have tested in both Python 2 and Python 3. Python 2.7.15+ (default, Jul 9 2019, 16:51:35) [GCC 7.4.0] on linux2 Python 3.6.8 (default, Aug 20 2019, 17:12:48) [GCC 8.3.0] on linux ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 16:03:24 2019 From: report at bugs.python.org (Brandt Bucher) Date: Tue, 08 Oct 2019 20:03:24 +0000 Subject: [issue38109] Missing constants in Lib/stat.py In-Reply-To: <1568208959.37.0.605416078815.issue38109@roundup.psfhosted.org> Message-ID: <1570565004.02.0.00552834220564.issue38109@roundup.psfhosted.org> Change by Brandt Bucher : ---------- nosy: +brandtbucher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 16:17:27 2019 From: report at bugs.python.org (Umar Asghar) Date: Tue, 08 Oct 2019 20:17:27 +0000 Subject: [issue38414] Ordering a nested dictionary in python with json format In-Reply-To: <1570564660.13.0.727592441748.issue38414@roundup.psfhosted.org> Message-ID: <1570565847.11.0.667042423587.issue38414@roundup.psfhosted.org> Change by Umar Asghar : Added file: https://bugs.python.org/file48649/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 16:25:48 2019 From: report at bugs.python.org (Umar Asghar) Date: Tue, 08 Oct 2019 20:25:48 +0000 Subject: [issue38414] Ordering a nested dictionary in python with json format In-Reply-To: <1570564660.13.0.727592441748.issue38414@roundup.psfhosted.org> Message-ID: <1570566348.6.0.908214448004.issue38414@roundup.psfhosted.org> Umar Asghar added the comment: I have recently attached the file, please review it as a code reference. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 16:26:07 2019 From: report at bugs.python.org (Hansraj Das) Date: Tue, 08 Oct 2019 20:26:07 +0000 Subject: [issue38409] Typo in doc string for str.strip In-Reply-To: <1570543194.25.0.196797196101.issue38409@roundup.psfhosted.org> Message-ID: <1570566367.23.0.683681624357.issue38409@roundup.psfhosted.org> Change by Hansraj Das : ---------- nosy: +hansrajdas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 16:26:47 2019 From: report at bugs.python.org (Umar Asghar) Date: Tue, 08 Oct 2019 20:26:47 +0000 Subject: [issue38414] Ordering a nested dictionary in python with json format In-Reply-To: <1570564660.13.0.727592441748.issue38414@roundup.psfhosted.org> Message-ID: <1570566407.56.0.234342185184.issue38414@roundup.psfhosted.org> Change by Umar Asghar : ---------- versions: +Python 2.7 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 16:38:14 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 08 Oct 2019 20:38:14 +0000 Subject: [issue38395] proxy_contains (weakref.proxy) can access an object with 0 refcount In-Reply-To: <1570459749.44.0.879317891234.issue38395@roundup.psfhosted.org> Message-ID: <1570567094.6.0.679240789079.issue38395@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 526ef856dd598fd3cefdfadeb18ede7a8e57aa41 by Pablo Galindo in branch '3.8': [3.8] bpo-38395: Fix ownership in weakref.proxy methods (GH-16632) (GH-16662) https://github.com/python/cpython/commit/526ef856dd598fd3cefdfadeb18ede7a8e57aa41 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 16:38:32 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 08 Oct 2019 20:38:32 +0000 Subject: [issue38395] proxy_contains (weakref.proxy) can access an object with 0 refcount In-Reply-To: <1570459749.44.0.879317891234.issue38395@roundup.psfhosted.org> Message-ID: <1570567112.06.0.801778720372.issue38395@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- priority: release blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 16:45:49 2019 From: report at bugs.python.org (Jason Fried) Date: Tue, 08 Oct 2019 20:45:49 +0000 Subject: [issue38415] @asynccontextmanager decorated functions are not callable like @contextmanager Message-ID: <1570567549.28.0.993731185011.issue38415@roundup.psfhosted.org> New submission from Jason Fried : The standard contextmanager decorator produces a wrapper that itself can be used as a decorator ``` @contextmanager def some_context(): ... yield @some_context() def some_function(): # we are inside a with some_context() now. ... ``` When I created a version of asynccontextmanager internally before it was available in the stdLib I copied this behavior and I have people internally to facebook using this behavior, Was there a reason this behavior was not replicated to asynccontextmanager? I have a diff an tests to add ---------- components: Library (Lib) messages: 354232 nosy: fried, yselivanov priority: normal severity: normal status: open title: @asynccontextmanager decorated functions are not callable like @contextmanager type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 16:57:33 2019 From: report at bugs.python.org (Jason Fried) Date: Tue, 08 Oct 2019 20:57:33 +0000 Subject: [issue38415] @asynccontextmanager decorated functions are not callable like @contextmanager In-Reply-To: <1570567549.28.0.993731185011.issue38415@roundup.psfhosted.org> Message-ID: <1570568253.64.0.335862852666.issue38415@roundup.psfhosted.org> Change by Jason Fried : ---------- keywords: +patch pull_requests: +16250 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16667 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 16:59:08 2019 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 08 Oct 2019 20:59:08 +0000 Subject: [issue38368] Crash when subclassing ctypes.Union In-Reply-To: <1570178161.94.0.1951756088.issue38368@roundup.psfhosted.org> Message-ID: <1570568348.98.0.361156871394.issue38368@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset e8bedbddadaa86be6bd86dc32dbdbd53933a4988 by Vinay Sajip in branch 'master': bpo-38368: Added fix for ctypes crash when handling arrays in structs? (GH-16589) https://github.com/python/cpython/commit/e8bedbddadaa86be6bd86dc32dbdbd53933a4988 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 17:03:43 2019 From: report at bugs.python.org (Zachary Ware) Date: Tue, 08 Oct 2019 21:03:43 +0000 Subject: [issue34957] Segementation faults on ARM and ARM64 In-Reply-To: <1539251006.2.0.788709270274.issue34957@psf.upfronthosting.co.za> Message-ID: <1570568623.69.0.794119252513.issue34957@roundup.psfhosted.org> Change by Zachary Ware : ---------- resolution: works for me -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 17:14:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2019 21:14:26 +0000 Subject: [issue38416] test_largefile.TestSocketSendfile.test_it() failed with 15 min timeout on AMD64 FreeBSD 10-STABLE Non-Debug 3.x Message-ID: <1570569266.33.0.0795173642593.issue38416@roundup.psfhosted.org> New submission from STINNER Victor : It seems like the 15 min timeout for the overall test_largefile is too short for the very slow AMD64 FreeBSD 10-STABLE Non-Debug 3.x buildbot. The test creates two files of 2.5 GB on the disk. One solution is to skip the test on this buildbot worker. For example, using a test resource like "largefile","cpu" resource, or another one. Maybe only skip TestSocketSendfile.test_it(), or even skip for the whole file. Currently, the whole file requires the "largefile" resource, but only on Windows and macOS. Right now, the buildbot worker runs the test suite using: ./python ./Tools/scripts/run_tests.py -j 1 -u all -W --slowest --fail-env-changed --timeout=900 -j2 -j4 So all resources are enabled. -- https://buildbot.python.org/all/#/builders/167/builds/1695 test_it (test.test_largefile.TestCopyfile) ... ok Timeout (0:15:00)! Thread 0x0000000806c95400 (most recent call first): File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/test_largefile.py", line 193 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/threading.py", line 882 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/threading.py", line 944 in _bootstrap_inner File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/threading.py", line 902 in _bootstrap Thread 0x0000000801c06400 (most recent call first): File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/socket.py", line 386 in _sendfile_use_sendfile File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/socket.py", line 483 in sendfile File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/test_largefile.py", line 207 in test_it File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/unittest/case.py", line 616 in _callTestMethod File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/unittest/case.py", line 659 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/unittest/case.py", line 719 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/unittest/runner.py", line 176 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/support/__init__.py", line 2032 in _run_suite File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/support/__init__.py", line 2128 in run_unittest File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/libregrtest/runtest.py", line 209 in _test_module File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/libregrtest/runtest.py", line 234 in _runtest_inner2 File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/libregrtest/runtest.py", line 270 in _runtest_inner File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/libregrtest/runtest.py", line 153 in _runtest File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/libregrtest/runtest.py", line 193 in runtest File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/libregrtest/main.py", line 318 in rerun_failed_tests File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/libregrtest/main.py", line 691 in _main File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/libregrtest/main.py", line 634 in main File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/libregrtest/main.py", line 712 in main File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/__main__.py", line 2 in File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/runpy.py", line 85 in _run_code File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/runpy.py", line 192 in _run_module_as_main test_it (test.test_largefile.TestSocketSendfile) ... *** Error code 1 ---------- components: Tests messages: 354234 nosy: giampaolo.rodola, pablogsal, vstinner priority: normal severity: normal status: open title: test_largefile.TestSocketSendfile.test_it() failed with 15 min timeout on AMD64 FreeBSD 10-STABLE Non-Debug 3.x versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 17:15:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2019 21:15:28 +0000 Subject: [issue38416] test_largefile.TestSocketSendfile.test_it() failed with 15 min timeout on AMD64 FreeBSD 10-STABLE Non-Debug 3.x In-Reply-To: <1570569266.33.0.0795173642593.issue38416@roundup.psfhosted.org> Message-ID: <1570569328.54.0.801359123196.issue38416@roundup.psfhosted.org> STINNER Victor added the comment: On the previous build, the test failed with timeout while other tests were running in parallel, and then the test passed ... in 14 min 43 seconds... which is very close to the limit of 15 minutes :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 17:16:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2019 21:16:19 +0000 Subject: [issue38416] test_largefile.TestSocketSendfile.test_it() failed with 15 min timeout on AMD64 FreeBSD 10-STABLE Non-Debug 3.x In-Reply-To: <1570569266.33.0.0795173642593.issue38416@roundup.psfhosted.org> Message-ID: <1570569379.36.0.325466957366.issue38416@roundup.psfhosted.org> STINNER Victor added the comment: Another approach is to change the timeout of 15 min for this super slow buildbot. For example, set it to 20 min or 30 min. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 18:00:15 2019 From: report at bugs.python.org (Umar Asghar) Date: Tue, 08 Oct 2019 22:00:15 +0000 Subject: [issue38414] Ordering a nested dictionary in python with json format In-Reply-To: <1570564660.13.0.727592441748.issue38414@roundup.psfhosted.org> Message-ID: <1570572015.41.0.707558807656.issue38414@roundup.psfhosted.org> Umar Asghar added the comment: Please ignore the above shared sample data in the above code and consider this one. this is the exact code that is misbehaving in python 2.7 # Sort nested dictionary by key # using OrderedDict() + sorted() from collections import OrderedDict from operator import getitem import json # initializing dictionary test_dict = {'3' : { 'roll' : 24, 'marks' : 17}, '2' : {'roll' : 54, 'marks' : 12}, '1' : { 'roll' : 12, 'marks' : 15}} # printing original dict print("The original dictionary : " + str(test_dict)) # using OrderedDict() + sorted() # Sort nested dictionary by key res = OrderedDict(sorted(test_dict.items(), key = lambda x: getitem(x[1], 'marks'))) print("The sorted dictionary by marks is : " + str(res)) # Output # The sorted dictionary by marks is : OrderedDict([('2', {'roll': 54, 'marks': 12}), ('1', {'roll': 12, 'marks': 15}), ('3', {'roll': 24, 'marks': 17})]) res1 = json.dumps(res) # print result print("The sorted dictionary by marks is : (json)") print(json.loads(res1)) # Output # The sorted dictionary by marks is : (json) # {u'1': {u'roll': 12, u'marks': 15}, u'3': {u'roll': 24, u'marks': 17}, u'2': {u'roll': 54, u'marks': 12}} ---------- Added file: https://bugs.python.org/file48650/bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 18:02:34 2019 From: report at bugs.python.org (Umar Asghar) Date: Tue, 08 Oct 2019 22:02:34 +0000 Subject: [issue38414] Ordering a nested dictionary in python with json format In-Reply-To: <1570564660.13.0.727592441748.issue38414@roundup.psfhosted.org> Message-ID: <1570572154.98.0.3883011043.issue38414@roundup.psfhosted.org> Change by Umar Asghar : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 18:55:39 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 08 Oct 2019 22:55:39 +0000 Subject: [issue38417] Add support for settting umask in subprocess children Message-ID: <1570575339.67.0.686572067981.issue38417@roundup.psfhosted.org> New submission from Gregory P. Smith : Another use of the deprecated unsafe preexec_fn was to call os.umask in the child prior to exec. As seen in https://github.com/freeipa/freeipa/pull/3769 (see the code in there). We should add an explicit feature for this to avoid people's desire for preexec_fn or for the heavyweight workaround of an intermediate shell calling umask before doing another exec. Any common preexec_fn uses that we can encode into supported parameters will help our ability to remove the ill fated preexec_fn misfeature in the future. ---------- messages: 354238 nosy: gregory.p.smith priority: high severity: normal stage: needs patch status: open title: Add support for settting umask in subprocess children type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 19:00:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2019 23:00:46 +0000 Subject: [issue38417] Add support for settting umask in subprocess children In-Reply-To: <1570575339.67.0.686572067981.issue38417@roundup.psfhosted.org> Message-ID: <1570575646.06.0.969902087971.issue38417@roundup.psfhosted.org> STINNER Victor added the comment: > We should add an explicit feature for this If we need to write a wrapper program for that, I would say that no, we don't "have to" provide something in the stdlib. In OpenStack, I wrote prlimit.py which is a preexec-like wrapper program to apply resource limits when calling a program. It's just a pure Python implementation of the Unix prlimit program. The Python implementation is used when the prlimit progrma is not available. https://github.com/openstack/oslo.concurrency/blob/master/oslo_concurrency/prlimit.py IMHO it's perfectly fine to explain that a wrapper program is needed to implement preexec-like features. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 19:05:28 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 08 Oct 2019 23:05:28 +0000 Subject: [issue38379] finalizer resurrection in gc In-Reply-To: <1570296686.13.0.00730737596554.issue38379@roundup.psfhosted.org> Message-ID: <1570575928.32.0.65473180024.issue38379@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 19:06:10 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 08 Oct 2019 23:06:10 +0000 Subject: [issue38417] Add support for settting umask in subprocess children In-Reply-To: <1570575339.67.0.686572067981.issue38417@roundup.psfhosted.org> Message-ID: <1570575970.2.0.0641925650757.issue38417@roundup.psfhosted.org> Gregory P. Smith added the comment: We don't have to for all possible things, doing this just reduced friction for existing uses. In this case, calling umask in our child ourselves would be easy to support. (easier than the more important setuid/sid/gid/groups-ish stuff that recently went in) I'm trying to make sure we track what is blocking people from getting rid of preexec_fn in their existing code so that we can actually deprecate and get rid of the API entirely. ---------- priority: high -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 20:32:44 2019 From: report at bugs.python.org (Warren Weckesser) Date: Wed, 09 Oct 2019 00:32:44 +0000 Subject: [issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0 In-Reply-To: <1570326378.93.0.0728676630318.issue38382@roundup.psfhosted.org> Message-ID: <1570581164.97.0.236739462384.issue38382@roundup.psfhosted.org> Warren Weckesser added the comment: One more case where the "early out" produces a result that seems wrong: In [20]: harmonic_mean([math.nan, 0]) Out[20]: 0 Anyone who didn't know about the "early out" behavior would probably expect the result to be NAN. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 20:51:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Oct 2019 00:51:47 +0000 Subject: [issue38417] Add support for settting umask in subprocess children In-Reply-To: <1570575339.67.0.686572067981.issue38417@roundup.psfhosted.org> Message-ID: <1570582307.02.0.720758850098.issue38417@roundup.psfhosted.org> STINNER Victor added the comment: > I'm trying to make sure we track what is blocking people from getting rid of preexec_fn in their existing code so that we can actually deprecate and get rid of the API entirely. If you consider posix_spawn(), I think that a convenient replacement for preexec_fn function would be a wrapper process which would execute *arbitrary Python code* before spawning the program. It would not only cover umask case, but also prlimit, and another other custom code. Pseudo-code of the wrapper: import sys code = sys.argv[1] argv = sys.argv[2:] eval(code) os.execv(argv[0], argv) The main risk is that the arbitrary code could create an inheritable file descriptor (not all C extensions respect the PEP 446) which would survive after replacing the process memory with the new program. Such design would allow to implement it in a third party package (on PyPI) for older Python versions as well. -- Currently, preexec_fn is a direct reference to a callable Python object in the current process. preexec_fn calls it just after fork(). Here I'm talking about running arbitrary Python code in a freshly spawned Python process. It's different. -- The new problems are: * How to ensure that Python is configured as expected? Use -I command line option? Use -S to not import the site module? * How to report a Python exception from the child to the parent process? Build a pipe between the two processes and serialize the exception, as we are already doing for preexec_fn? * How to report os.execv() failure to the parent? Just something like sys.exit(OSErrno.errno)? * Should close_fds be implemented in the wrapper as well? If yes, can the parent avoid closing file descriptors? > https://github.com/openstack/oslo.concurrency/blob/master/oslo_concurrency/prlimit.py This wrapper uses os.execv(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 22:09:42 2019 From: report at bugs.python.org (Timothy Stonis) Date: Wed, 09 Oct 2019 02:09:42 +0000 Subject: [issue37677] Seg Fault on OSX when multiprocessing In-Reply-To: <1564042021.53.0.0155934240157.issue37677@roundup.psfhosted.org> Message-ID: <1570586982.4.0.353036050893.issue37677@roundup.psfhosted.org> Timothy Stonis added the comment: Hi, I have the exact same issue and same stack trace from getaddrinfo (except Python 2.7). Same as original poster, it only happens every couple of weeks and I don't know how to reproduce. For me it's in an Odoo instance that spawns multiple workers with connections to a postgres database. I think this is a MacOS bug, since the issue does not happen on High Sierra (10.13). ---------- nosy: +timstonis versions: +Python 2.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 22:19:56 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 09 Oct 2019 02:19:56 +0000 Subject: [issue36161] Use thread-safe functions instead of unsafe ones (crypt, ttyname) In-Reply-To: <1551475826.18.0.295115684796.issue36161@roundup.psfhosted.org> Message-ID: <1570587596.31.0.923812474496.issue36161@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 594e2edfb5e0d24e03469d035d8f39ff29a64d99 by Benjamin Peterson (Antonio Gutierrez) in branch 'master': closes bpo-36161: Use thread-safe ttyname_r instead of ttyname. (GH-14868) https://github.com/python/cpython/commit/594e2edfb5e0d24e03469d035d8f39ff29a64d99 ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 22:28:04 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 09 Oct 2019 02:28:04 +0000 Subject: [issue38418] Audit event for os.system is incorrect Message-ID: <1570588084.56.0.375267797277.issue38418@roundup.psfhosted.org> New submission from Steve Dower : It's documented as "os.system" but implemented as just "system". ---------- assignee: steve.dower messages: 354245 nosy: lukasz.langa, steve.dower priority: normal severity: normal status: open title: Audit event for os.system is incorrect versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 22:30:43 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 09 Oct 2019 02:30:43 +0000 Subject: [issue38418] Audit event for os.system is incorrect In-Reply-To: <1570588084.56.0.375267797277.issue38418@roundup.psfhosted.org> Message-ID: <1570588243.87.0.845051006283.issue38418@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +16251 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16670 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 22:45:31 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 09 Oct 2019 02:45:31 +0000 Subject: [issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0 In-Reply-To: <1570326378.93.0.0728676630318.issue38382@roundup.psfhosted.org> Message-ID: <1570589131.16.0.0666006868712.issue38382@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: rhettinger -> steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 23:48:05 2019 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 09 Oct 2019 03:48:05 +0000 Subject: [issue38419] The path of check-c-globals.py on README is wrong Message-ID: <1570592885.04.0.292567951687.issue38419@roundup.psfhosted.org> New submission from Dong-hee Na : See https://github.com/python/cpython/blob/01171ebd966b0cd6352057799ad876dd1e07942e/Tools/c-analyzer/README#L37 ---------- keywords: newcomer friendly messages: 354246 nosy: corona10 priority: normal severity: normal status: open title: The path of check-c-globals.py on README is wrong _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 23:49:06 2019 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 09 Oct 2019 03:49:06 +0000 Subject: [issue38419] The path of check-c-globals.py on README is wrong In-Reply-To: <1570592885.04.0.292567951687.issue38419@roundup.psfhosted.org> Message-ID: <1570592946.0.0.924917514591.issue38419@roundup.psfhosted.org> Dong-hee Na added the comment: This is newcomer friendly issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 01:17:20 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 09 Oct 2019 05:17:20 +0000 Subject: [issue38368] Crash when subclassing ctypes.Union In-Reply-To: <1570178161.94.0.1951756088.issue38368@roundup.psfhosted.org> Message-ID: <1570598240.45.0.0470432340366.issue38368@roundup.psfhosted.org> Change by Vinay Sajip : ---------- keywords: +patch pull_requests: +16252 pull_request: https://github.com/python/cpython/pull/16671 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 01:31:00 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 09 Oct 2019 05:31:00 +0000 Subject: [issue38368] Crash when subclassing ctypes.Union In-Reply-To: <1570178161.94.0.1951756088.issue38368@roundup.psfhosted.org> Message-ID: <1570599060.07.0.517980805361.issue38368@roundup.psfhosted.org> Change by Vinay Sajip : ---------- pull_requests: +16253 pull_request: https://github.com/python/cpython/pull/16672 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 01:34:30 2019 From: report at bugs.python.org (Larry Hastings) Date: Wed, 09 Oct 2019 05:34:30 +0000 Subject: [issue38174] Security vulnerability in bundled expat CVE-2019-15903 (fix available in expat 2.2.8) In-Reply-To: <1568491807.22.0.03411253388.issue38174@roundup.psfhosted.org> Message-ID: <1570599270.69.0.579864086327.issue38174@roundup.psfhosted.org> Larry Hastings added the comment: New changeset c386c8b06c6e92786f083ef6aba27b37087fdd20 by larryhastings (Victor Stinner) in branch '3.5': closes bpo-38174: Update vendored expat library to 2.2.8. (GH-16346) (#16434) https://github.com/python/cpython/commit/c386c8b06c6e92786f083ef6aba27b37087fdd20 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 01:48:01 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 09 Oct 2019 05:48:01 +0000 Subject: [issue38368] Crash when subclassing ctypes.Union In-Reply-To: <1570178161.94.0.1951756088.issue38368@roundup.psfhosted.org> Message-ID: <1570600081.87.0.270405982787.issue38368@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset d004a5b082d0770682e6efbf03105a67469d4820 by Vinay Sajip in branch '3.8': bpo-38368: Added fix for ctypes crash when handling arrays in structs/unions. (GH-16589) (GH-16671) https://github.com/python/cpython/commit/d004a5b082d0770682e6efbf03105a67469d4820 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 01:48:50 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 09 Oct 2019 05:48:50 +0000 Subject: [issue38368] Crash when subclassing ctypes.Union In-Reply-To: <1570178161.94.0.1951756088.issue38368@roundup.psfhosted.org> Message-ID: <1570600130.72.0.544997300332.issue38368@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 129c2b3d44a962fc5964ef8fd4e6b22dbb691a6c by Vinay Sajip in branch '3.7': bpo-38368: Added fix for ctypes crash when handling arrays in structs/unions. (GH-16589) (GH-16672) https://github.com/python/cpython/commit/129c2b3d44a962fc5964ef8fd4e6b22dbb691a6c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 01:53:37 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 09 Oct 2019 05:53:37 +0000 Subject: [issue38368] Crash when subclassing ctypes.Union In-Reply-To: <1570178161.94.0.1951756088.issue38368@roundup.psfhosted.org> Message-ID: <1570600416.99.0.882867962538.issue38368@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 02:18:06 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2019 06:18:06 +0000 Subject: [issue38414] Ordering a nested dictionary in python with json format In-Reply-To: <1570564660.13.0.727592441748.issue38414@roundup.psfhosted.org> Message-ID: <1570601886.41.0.0890141795428.issue38414@roundup.psfhosted.org> Serhiy Storchaka added the comment: Dictionary preserve the insertion order starting from Python 3.7 (actually from 3.6, but it was not guarantied). I am surprised that you got different result in 3.6. I cannot reproduce it. In older Python versions you can pass object_pairs_hook=OrderedDict to json.loads() to preserve the insertion order. The regular dictionary cannot preserve it, by its structure. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 03:32:22 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 09 Oct 2019 07:32:22 +0000 Subject: [issue38412] csv.reader failed to split string with spaces and quoted delimiter In-Reply-To: <1570555920.82.0.491270320818.issue38412@roundup.psfhosted.org> Message-ID: <1570606342.0.0.509527497744.issue38412@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Can you please add a description of the expected behavior? Does skipinitialspace help with the second input? https://docs.python.org/3/library/csv.html#csv.Dialect.skipinitialspace >>> import csv >>> list(csv.reader(['param1,"param21,param22",param3'])) [['param1', 'param21,param22', 'param3']] >>> list(csv.reader(['param1, "param21,param22", param3'])) [['param1', ' "param21', 'param22"', ' param3']] >>> list(csv.reader(['param1, "param21,param22", param3'], skipinitialspace=True)) [['param1', 'param21,param22', 'param3']] >>> list(csv.reader(['param1,"param21,param22",param3'])) == list(csv.reader(['param1, "param21,param22", param3'], skipinitialspace=True)) True ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 03:58:06 2019 From: report at bugs.python.org (belegnar) Date: Wed, 09 Oct 2019 07:58:06 +0000 Subject: [issue38412] csv.reader failed to split string with spaces and quoted delimiter In-Reply-To: <1570555920.82.0.491270320818.issue38412@roundup.psfhosted.org> Message-ID: <1570607886.59.0.788994747467.issue38412@roundup.psfhosted.org> belegnar added the comment: Yes, https://docs.python.org/3/library/csv.html#csv.Dialect.skipinitialspace helps Sorry ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 04:21:15 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 09 Oct 2019 08:21:15 +0000 Subject: [issue38412] csv.reader failed to split string with spaces and quoted delimiter In-Reply-To: <1570555920.82.0.491270320818.issue38412@roundup.psfhosted.org> Message-ID: <1570609275.2.0.159716051009.issue38412@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: No problem, happy it helped :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 04:21:25 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 09 Oct 2019 08:21:25 +0000 Subject: [issue38412] csv.reader failed to split string with spaces and quoted delimiter In-Reply-To: <1570555920.82.0.491270320818.issue38412@roundup.psfhosted.org> Message-ID: <1570609285.04.0.547861783027.issue38412@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 04:22:42 2019 From: report at bugs.python.org (wang xuancong) Date: Wed, 09 Oct 2019 08:22:42 +0000 Subject: [issue38420] defaultdict does not support parametric lambda Message-ID: <1570609362.26.0.380213879875.issue38420@roundup.psfhosted.org> New submission from wang xuancong : A very common use of defaultdict is that if the key exist, use the corresponding mapped target, if the key does not exist, use the key itself. However, current Python 2/3 defaultdict does not support parametric lambda function: >>> from collections import * >>> aa=defaultdict(lambda t:t) >>> aa defaultdict( at 0x10a55c950>, {}) >>> aa[0] Traceback (most recent call last): File "", line 1, in TypeError: () missing 1 required positional argument: 't' >>> I would like to suggest that use the dict's query key as the first argument in the default lambda function. And use the dict itself as the 2nd argument in the default lambda function (e.g., if the key exist, use the mapped target, otherwise, use the size of the current defaultdict). I think that will make Python much more powerful than any other programming language. Anyone can think of any additional information for the default lambda function? Thanks! ---------- messages: 354255 nosy: xuancong84 priority: normal severity: normal status: open title: defaultdict does not support parametric lambda type: enhancement versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 04:42:27 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 09 Oct 2019 08:42:27 +0000 Subject: [issue38420] defaultdict does not support parametric lambda In-Reply-To: <1570609362.26.0.380213879875.issue38420@roundup.psfhosted.org> Message-ID: <1570610547.43.0.196938338691.issue38420@roundup.psfhosted.org> Steven D'Aprano added the comment: All versions below 3.9 are in feature freeze, so they cannot get new features. This requested feature is already supported by subclassing ``dict`` and giving it a ``__missing__`` method. See issue #38315 ---------- nosy: +steven.daprano resolution: -> rejected stage: -> resolved status: open -> closed versions: -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 04:49:23 2019 From: report at bugs.python.org (wang xuancong) Date: Wed, 09 Oct 2019 08:49:23 +0000 Subject: [issue38315] Provide defaultdict variant that passes key to default_factory In-Reply-To: <1569773559.86.0.293665151535.issue38315@roundup.psfhosted.org> Message-ID: <1570610963.29.0.345406566651.issue38315@roundup.psfhosted.org> wang xuancong added the comment: I agree with Mark Amery. The reason why defaultdict still exists given that everything can be achieved by subclassing the built-in dict is because of convenience. I suggest maybe Python developer can put it into low priority instead. ---------- nosy: +xuancong84 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 05:02:35 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2019 09:02:35 +0000 Subject: [issue38407] Add docstrings for typing.SupportsXXX classes In-Reply-To: <1570525184.08.0.803412577085.issue38407@roundup.psfhosted.org> Message-ID: <1570611755.3.0.766652113514.issue38407@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +16254 pull_request: https://github.com/python/cpython/pull/16673 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 05:06:43 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2019 09:06:43 +0000 Subject: [issue38405] Nested subclasses of typing.NamedTuple are not pickleable In-Reply-To: <1570522682.37.0.234893155024.issue38405@roundup.psfhosted.org> Message-ID: <1570612003.51.0.707056855339.issue38405@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +16255 pull_request: https://github.com/python/cpython/pull/16674 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 05:07:52 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2019 09:07:52 +0000 Subject: [issue38294] Documentation on 3.6->3.7 re.escape no longer escaping "/" or ":" should be obvious In-Reply-To: <1569603997.59.0.0237297108404.issue38294@roundup.psfhosted.org> Message-ID: <1570612072.04.0.994362637129.issue38294@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you for your contribution Ricardo! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 05:11:52 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 09 Oct 2019 09:11:52 +0000 Subject: [issue36953] Remove collections ABCs? In-Reply-To: <1558140764.46.0.049733618419.issue36953@roundup.psfhosted.org> Message-ID: <1570612312.73.0.04660459376.issue36953@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16256 pull_request: https://github.com/python/cpython/pull/16675 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 05:29:38 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 09 Oct 2019 09:29:38 +0000 Subject: [issue36953] Remove collections ABCs? In-Reply-To: <1558140764.46.0.049733618419.issue36953@roundup.psfhosted.org> Message-ID: <1570613378.08.0.526977351205.issue36953@roundup.psfhosted.org> miss-islington added the comment: New changeset 056fa7f52a49a758b1ed5f5a81d8b7ce5c71cec4 by Miss Islington (bot) in branch '3.7': bpo-36953: Delay removal of ABCs from collections. (GH-13409) https://github.com/python/cpython/commit/056fa7f52a49a758b1ed5f5a81d8b7ce5c71cec4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 05:56:52 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2019 09:56:52 +0000 Subject: [issue38405] Nested subclasses of typing.NamedTuple are not pickleable In-Reply-To: <1570522682.37.0.234893155024.issue38405@roundup.psfhosted.org> Message-ID: <1570615012.76.0.814338926861.issue38405@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 87db4d343c9609137f6e62aa3595db610a33842c by Serhiy Storchaka in branch '3.7': [3.7] bpo-38405: Make nested subclasses of typing.NamedTuple pickleable. (GH-16641). (GH-16674) https://github.com/python/cpython/commit/87db4d343c9609137f6e62aa3595db610a33842c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 05:57:18 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2019 09:57:18 +0000 Subject: [issue38407] Add docstrings for typing.SupportsXXX classes In-Reply-To: <1570525184.08.0.803412577085.issue38407@roundup.psfhosted.org> Message-ID: <1570615038.57.0.0897451785525.issue38407@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 0b354fc2bfe1a4624551907df396ed36ea8bf4ca by Serhiy Storchaka in branch '3.7': [3.7] bpo-38407: Add docstrings for typing.SupportsXXX classes. (GH-16644). (GH-16673) https://github.com/python/cpython/commit/0b354fc2bfe1a4624551907df396ed36ea8bf4ca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 05:58:31 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2019 09:58:31 +0000 Subject: [issue38407] Add docstrings for typing.SupportsXXX classes In-Reply-To: <1570525184.08.0.803412577085.issue38407@roundup.psfhosted.org> Message-ID: <1570615111.27.0.279416435836.issue38407@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 05:58:47 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Oct 2019 09:58:47 +0000 Subject: [issue38405] Nested subclasses of typing.NamedTuple are not pickleable In-Reply-To: <1570522682.37.0.234893155024.issue38405@roundup.psfhosted.org> Message-ID: <1570615127.34.0.338894055606.issue38405@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 06:27:20 2019 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 09 Oct 2019 10:27:20 +0000 Subject: [issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0 In-Reply-To: <1570326378.93.0.0728676630318.issue38382@roundup.psfhosted.org> Message-ID: <1570616840.88.0.350995647145.issue38382@roundup.psfhosted.org> Mark Dickinson added the comment: > In [20]: harmonic_mean([math.nan, 0]) > Out[20]: 0 That one seems excusable, for the same sort of reasons that IEEE 754 specifies that hypot(nan, inf) is inf rather than nan. Similarly, sumSquare and sumAbs from IEEE 754-2008 specify that infinities take precedence over NaNs, on the basis that the result doesn't change if the nan is replaced with any non-nan value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 06:38:58 2019 From: report at bugs.python.org (hongweipeng) Date: Wed, 09 Oct 2019 10:38:58 +0000 Subject: [issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call In-Reply-To: <1480885774.84.0.670239959771.issue28869@psf.upfronthosting.co.za> Message-ID: <1570617538.93.0.324270320766.issue28869@roundup.psfhosted.org> hongweipeng added the comment: I think we can refer to typing.py, it does not have this issue. >>> from typing import NamedTuple >>> A = NamedTuple('A', [('name', str), ('id', int)]) >>> class B(NamedTuple): ... name: str ... id: int ... >>> A.__module__ '__main__' >>> B.__module__ '__main__' It uses `nm_tpl.__module__ = sys._getframe(2).f_globals.get('__name__', '__main__')`. ---------- nosy: +hongweipeng _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 08:07:22 2019 From: report at bugs.python.org (hai shi) Date: Wed, 09 Oct 2019 12:07:22 +0000 Subject: [issue38419] The path of check-c-globals.py on README is wrong In-Reply-To: <1570592885.04.0.292567951687.issue38419@roundup.psfhosted.org> Message-ID: <1570622842.14.0.204595671506.issue38419@roundup.psfhosted.org> hai shi added the comment: Maybe the keyword need add the `easy` wrod? (i don't know the internals) newcomer need find it in `Easy issues` ;) ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 08:45:03 2019 From: report at bugs.python.org (David Kernan) Date: Wed, 09 Oct 2019 12:45:03 +0000 Subject: [issue38421] email.utils.parsetime_tz does not return "None" Message-ID: <1570625103.37.0.0601159046628.issue38421@roundup.psfhosted.org> New submission from David Kernan : email.utils.parsetime_tz() is a function which attempts to parse a date, and returns a 10-item tuple. The first 9 items represents a time, and the last item represents the timezone offset from UTC. In Python 2, the original behavior was to return the date, and a "None" value when there was no timezone - this is documented here: https://docs.python.org/3/library/email.utils.html#email.utils.parsedate_tz In Python 3 however, the code specifically prevents "None" from being returned in place of a UTC offset: https://github.com/python/cpython/blob/3.7/Lib/email/_parseaddr.py#L53-#L54 The Python 3 documentation for email.utils.parsetime_tz() - is still the same as the 2.7 documentation, and specifically mentions that should a timezone be missing from the string, the last item will be "None" This isn't the case: Python 3.6.8: >>> import email.utils >>> date_string = 'Wed, 09 Oct 2019 08:32:37' >>> email.utils.parsedate_tz(date_string) (2019, 10, 9, 8, 32, 37, 0, 1, -1, 0) ---- Python 2.7.16: >>> import email.utils >>> date_string = 'Wed, 09 Oct 2019 08:32:37' >>> email.utils.parsedate_tz(date_string) (2019, 10, 9, 8, 32, 37, 0, 1, -1, None) --- Is this an error in code, or is it a mistake in the documentation? ---------- components: email messages: 354265 nosy: David Kernan, barry, r.david.murray priority: normal severity: normal status: open title: email.utils.parsetime_tz does not return "None" versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 08:45:09 2019 From: report at bugs.python.org (David Kernan) Date: Wed, 09 Oct 2019 12:45:09 +0000 Subject: [issue38421] email.utils.parsetime_tz does not return "None" In-Reply-To: <1570625103.37.0.0601159046628.issue38421@roundup.psfhosted.org> Message-ID: <1570625109.73.0.249839458138.issue38421@roundup.psfhosted.org> Change by David Kernan : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 08:46:31 2019 From: report at bugs.python.org (David Kernan) Date: Wed, 09 Oct 2019 12:46:31 +0000 Subject: [issue38421] email.utils.parsetime_tz does not return "None" as the tz offset In-Reply-To: <1570625103.37.0.0601159046628.issue38421@roundup.psfhosted.org> Message-ID: <1570625191.7.0.786053128462.issue38421@roundup.psfhosted.org> Change by David Kernan : ---------- title: email.utils.parsetime_tz does not return "None" -> email.utils.parsetime_tz does not return "None" as the tz offset _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 09:02:36 2019 From: report at bugs.python.org (Ido Michael) Date: Wed, 09 Oct 2019 13:02:36 +0000 Subject: [issue38351] Modernize email example from %-formatting to f-string In-Reply-To: <1570034736.68.0.500723145519.issue38351@roundup.psfhosted.org> Message-ID: <1570626156.33.0.978516441446.issue38351@roundup.psfhosted.org> Ido Michael added the comment: So what was decided? I can fix this issue and I can wait for a final conclusion as it wasn't clear from the thread. ---------- nosy: +Ido Michael _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 09:14:52 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 09 Oct 2019 13:14:52 +0000 Subject: [issue38421] email.utils.parsetime_tz does not return "None" as the tz offset In-Reply-To: <1570625103.37.0.0601159046628.issue38421@roundup.psfhosted.org> Message-ID: <1570626892.19.0.198295303099.issue38421@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +maxking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 09:20:33 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 09 Oct 2019 13:20:33 +0000 Subject: [issue38421] email.utils.parsetime_tz does not return "None" as the tz offset In-Reply-To: <1570625103.37.0.0601159046628.issue38421@roundup.psfhosted.org> Message-ID: <1570627233.68.0.764295005249.issue38421@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: It looks like a documentation issue to me given the change and tests made in https://github.com/python/cpython/commit/875048bd4c95ae90c3e541cad681b11436ce1f3f ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 09:21:20 2019 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 09 Oct 2019 13:21:20 +0000 Subject: [issue38419] The path of check-c-globals.py on README is wrong In-Reply-To: <1570592885.04.0.292567951687.issue38419@roundup.psfhosted.org> Message-ID: <1570627280.89.0.970092748856.issue38419@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 09:25:23 2019 From: report at bugs.python.org (David Kernan) Date: Wed, 09 Oct 2019 13:25:23 +0000 Subject: [issue38421] email.utils.parsetime_tz does not return "None" as the tz offset In-Reply-To: <1570625103.37.0.0601159046628.issue38421@roundup.psfhosted.org> Message-ID: <1570627523.55.0.646908229654.issue38421@roundup.psfhosted.org> David Kernan added the comment: Ah yes, thanks, this does seem pretty intentional. I'll submit a PR for the documentation for this method for the affected version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 09:33:55 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 09 Oct 2019 13:33:55 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1570628035.18.0.262965252652.issue37531@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16257 pull_request: https://github.com/python/cpython/pull/16676 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 09:33:55 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 09 Oct 2019 13:33:55 +0000 Subject: [issue38207] subprocess: On Windows, Popen.kill() + Popen.communicate() is blocking until all processes using the pipe close the pipe In-Reply-To: <1568763048.2.0.765446302919.issue38207@roundup.psfhosted.org> Message-ID: <1570628035.31.0.409762478303.issue38207@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16258 pull_request: https://github.com/python/cpython/pull/16676 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 09:34:02 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 09 Oct 2019 13:34:02 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1570628042.42.0.696759751306.issue37531@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16259 pull_request: https://github.com/python/cpython/pull/16677 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 09:34:02 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 09 Oct 2019 13:34:02 +0000 Subject: [issue38207] subprocess: On Windows, Popen.kill() + Popen.communicate() is blocking until all processes using the pipe close the pipe In-Reply-To: <1568763048.2.0.765446302919.issue38207@roundup.psfhosted.org> Message-ID: <1570628042.53.0.287264872399.issue38207@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16260 pull_request: https://github.com/python/cpython/pull/16677 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 09:35:59 2019 From: report at bugs.python.org (David Kernan) Date: Wed, 09 Oct 2019 13:35:59 +0000 Subject: [issue38421] email.utils.parsetime_tz does not return "None" as the tz offset In-Reply-To: <1570625103.37.0.0601159046628.issue38421@roundup.psfhosted.org> Message-ID: <1570628159.85.0.321286938167.issue38421@roundup.psfhosted.org> Change by David Kernan : ---------- assignee: -> docs at python components: +Documentation -email nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 09:36:40 2019 From: report at bugs.python.org (Roundup Robot) Date: Wed, 09 Oct 2019 13:36:40 +0000 Subject: [issue38421] email.utils.parsetime_tz does not return "None" as the tz offset In-Reply-To: <1570625103.37.0.0601159046628.issue38421@roundup.psfhosted.org> Message-ID: <1570628200.15.0.145793522646.issue38421@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +16261 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16678 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 09:36:58 2019 From: report at bugs.python.org (David Kernan) Date: Wed, 09 Oct 2019 13:36:58 +0000 Subject: [issue38413] Remove or change "Multithreading" section In-Reply-To: <1570563042.6.0.0902531064636.issue38413@roundup.psfhosted.org> Message-ID: <1570628218.73.0.475649885304.issue38413@roundup.psfhosted.org> Change by David Kernan : ---------- keywords: +patch pull_requests: +16262 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16678 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 09:37:21 2019 From: report at bugs.python.org (David Kernan) Date: Wed, 09 Oct 2019 13:37:21 +0000 Subject: [issue38413] Remove or change "Multithreading" section In-Reply-To: <1570563042.6.0.0902531064636.issue38413@roundup.psfhosted.org> Message-ID: <1570628241.63.0.254397345417.issue38413@roundup.psfhosted.org> Change by David Kernan : ---------- pull_requests: -16262 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 09:52:38 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 09 Oct 2019 13:52:38 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1570629158.38.0.211077365295.issue37531@roundup.psfhosted.org> miss-islington added the comment: New changeset 598bfa4d457d61431142ad99ecbb9bd10cf314e6 by Miss Islington (bot) in branch '3.7': bpo-37531: regrtest ignores output on timeout (GH-16659) https://github.com/python/cpython/commit/598bfa4d457d61431142ad99ecbb9bd10cf314e6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 09:52:38 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 09 Oct 2019 13:52:38 +0000 Subject: [issue38207] subprocess: On Windows, Popen.kill() + Popen.communicate() is blocking until all processes using the pipe close the pipe In-Reply-To: <1568763048.2.0.765446302919.issue38207@roundup.psfhosted.org> Message-ID: <1570629158.1.0.179471608183.issue38207@roundup.psfhosted.org> miss-islington added the comment: New changeset 598bfa4d457d61431142ad99ecbb9bd10cf314e6 by Miss Islington (bot) in branch '3.7': bpo-37531: regrtest ignores output on timeout (GH-16659) https://github.com/python/cpython/commit/598bfa4d457d61431142ad99ecbb9bd10cf314e6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 10:02:18 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 09 Oct 2019 14:02:18 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1570629738.59.0.212864318331.issue37531@roundup.psfhosted.org> miss-islington added the comment: New changeset 359a1975cbca488ccd5ea13bd7268d7e88664078 by Miss Islington (bot) in branch '3.8': bpo-37531: regrtest ignores output on timeout (GH-16659) https://github.com/python/cpython/commit/359a1975cbca488ccd5ea13bd7268d7e88664078 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 10:02:18 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 09 Oct 2019 14:02:18 +0000 Subject: [issue38207] subprocess: On Windows, Popen.kill() + Popen.communicate() is blocking until all processes using the pipe close the pipe In-Reply-To: <1568763048.2.0.765446302919.issue38207@roundup.psfhosted.org> Message-ID: <1570629738.47.0.724845605163.issue38207@roundup.psfhosted.org> miss-islington added the comment: New changeset 359a1975cbca488ccd5ea13bd7268d7e88664078 by Miss Islington (bot) in branch '3.8': bpo-37531: regrtest ignores output on timeout (GH-16659) https://github.com/python/cpython/commit/359a1975cbca488ccd5ea13bd7268d7e88664078 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 10:09:01 2019 From: report at bugs.python.org (Mariatta) Date: Wed, 09 Oct 2019 14:09:01 +0000 Subject: [issue38351] Modernize email example from %-formatting to f-string In-Reply-To: <1570034736.68.0.500723145519.issue38351@roundup.psfhosted.org> Message-ID: <1570630141.49.0.171375844526.issue38351@roundup.psfhosted.org> Mariatta added the comment: No decision yet. We're waiting for Julien's input. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 10:35:36 2019 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 09 Oct 2019 14:35:36 +0000 Subject: [issue38408] urlparse gives no method to build a url with a port In-Reply-To: <1570528263.82.0.631134670905.issue38408@roundup.psfhosted.org> Message-ID: <1570631736.09.0.724380412175.issue38408@roundup.psfhosted.org> Guido van Rossum added the comment: Does it work if you pass a string of the form "host:port" as the host field? I'd rather not change this antiquated interface too much, and I don't like proliferating additional functions. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 10:44:33 2019 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 09 Oct 2019 14:44:33 +0000 Subject: [issue38408] urlparse gives no method to build a url with a port In-Reply-To: <1570528263.82.0.631134670905.issue38408@roundup.psfhosted.org> Message-ID: <1570632273.14.0.431057112609.issue38408@roundup.psfhosted.org> Eric V. Smith added the comment: Yes, that does work: >>> urllib.parse.urlunparse(("http", f"{host}:{port}", "/", "", "", "")) 'http://hostname:1234/' The only problem is that your code now needs to look like >>> port=None >>> urllib.parse.urlunparse(("http", f"{host}{(':' + str(port)) if port else ''}", "/", "", "", "")) 'http://hostname/' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 11:01:34 2019 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 09 Oct 2019 15:01:34 +0000 Subject: [issue38408] urlparse gives no method to build a url with a port In-Reply-To: <1570632273.14.0.431057112609.issue38408@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: Then I find insufficient reason to change the API. Users who need this frequently can make their own wrapper. -- --Guido (mobile) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 11:06:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Oct 2019 15:06:10 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1570633570.66.0.264924839656.issue37531@roundup.psfhosted.org> STINNER Victor added the comment: The initial issue has been fixed in branches 3.7, 3.8 and master. I close the issue. Thanks to everybody who help to make these changes possible and helped to debug regressions. It's not perfect, regrtest has to workaround bpo-38207 bug, but at least regrtest should no longer runs for several hours or days. > regrtest should kill a worker process if it runs longer than --timeout seconds. The main regrtest process now kills a worker process running longer than timeout seconds. In practice, it's timeout x 1.5, to give time to the faulthandler watchdog to kill the process. If regrtest hits bpo-38207 bug, regrtest takes 2 min 30 sec to exit in the worst case. > But it means that the main process was stuck for longer than 60 seconds!? The main process is supposed to write an update "running: ..." every 30 seconds. This buildbot is very slow. Maybe 30 and 60 seconds limits are too low? I changed this timeout from 1 minute to 5 minutes. > Calling popen.kill() + popen.stdout.close() + popen.stderr.close() from a thread B does not always interrupt popen.communicate() in thread A. I propose to continue the discussion in bpo-38207 "subprocess: On Windows, Popen.kill() + Popen.communicate() is blocking until all processes using the pipe close the pipe". I implemented workarounds in regrtest so regrtest doesn't block *forever*: it only waits 30 seconds until a worker thread completes, and I added a timeout of 2 minutes on Python exit of the main regrtest process to prevent blocking in threading._shutdown(), because of the blocked threads. > I don't understand why you get 2 typeperf.exe process: only the main process should spawn one. Worker processes don't need it and should not spawn it. I didn't check on my Windows VM if I have the issue. If someone sees more than one typeperf.exe process, please open a separated issue. Note: typeperf.exe is the correct spelling (typepref.exe is a typo ;-)). ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 11:06:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Oct 2019 15:06:57 +0000 Subject: [issue38207] subprocess: On Windows, Popen.kill() + Popen.communicate() is blocking until all processes using the pipe close the pipe In-Reply-To: <1568763048.2.0.765446302919.issue38207@roundup.psfhosted.org> Message-ID: <1570633617.71.0.567427914777.issue38207@roundup.psfhosted.org> STINNER Victor added the comment: regrtest now workarounds this issue using timeouts on subprocess.Popen.wait() and threading.Thread.join() operations: see bpo-37531. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 11:15:39 2019 From: report at bugs.python.org (Ram Rachum) Date: Wed, 09 Oct 2019 15:15:39 +0000 Subject: [issue38422] Clarify docstrings of pathlib suffix(es) Message-ID: <1570634139.23.0.159522926495.issue38422@roundup.psfhosted.org> New submission from Ram Rachum : I'm writing a PR for this right now. ---------- components: Library (Lib) messages: 354279 nosy: cool-RR priority: normal severity: normal status: open title: Clarify docstrings of pathlib suffix(es) versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 11:22:43 2019 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 09 Oct 2019 15:22:43 +0000 Subject: [issue38380] Update SQLite to 3.30 in Windows and macOS installer builds In-Reply-To: <1570313540.41.0.0224198940573.issue38380@roundup.psfhosted.org> Message-ID: <1570634563.95.0.608023864791.issue38380@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: I've prepared a PR for https://github.com/python/cpython-source-deps at https://github.com/erlend-aasland/cpython-source-deps/tree/upgrade-sqlite. Patches for Windows and macOS installer builds on 3.9 prepared at https://github.com/erlend-aasland/cpython/tree/fix-issue-38380. If it looks ok, I'll create PR's for CPython and cpython-source-deps. I guess this should be backported to 3.8, 3.7 and 2.7. ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 11:24:08 2019 From: report at bugs.python.org (Ram Rachum) Date: Wed, 09 Oct 2019 15:24:08 +0000 Subject: [issue38422] Clarify docstrings of pathlib suffix(es) In-Reply-To: <1570634139.23.0.159522926495.issue38422@roundup.psfhosted.org> Message-ID: <1570634648.4.0.515734435788.issue38422@roundup.psfhosted.org> Change by Ram Rachum : ---------- keywords: +patch pull_requests: +16264 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16679 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 11:24:50 2019 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 09 Oct 2019 15:24:50 +0000 Subject: [issue38380] Update SQLite to 3.30 in Windows and macOS installer builds In-Reply-To: <1570313540.41.0.0224198940573.issue38380@roundup.psfhosted.org> Message-ID: <1570634690.8.0.731710514452.issue38380@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: bpo-38380: Update macOS installer to use SQLite 3.30.0 https://github.com/erlend-aasland/cpython/commit/aa7d7b1a3bed9a6a73f0611d0542a3442e85b0b6 ---------- keywords: +patch Added file: https://bugs.python.org/file48651/0001-bpo-38380-Update-macOS-installer-to-use-SQLite-3.30..patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 11:25:42 2019 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 09 Oct 2019 15:25:42 +0000 Subject: [issue38380] Update SQLite to 3.30 in Windows and macOS installer builds In-Reply-To: <1570313540.41.0.0224198940573.issue38380@roundup.psfhosted.org> Message-ID: <1570634742.45.0.504173860498.issue38380@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: bpo-38380: Update Windows builds to use SQLite 3.30.0 https://github.com/erlend-aasland/cpython/commit/e25214e6fa7a64353d9c3e16b139c41f5d62eb31 ---------- Added file: https://bugs.python.org/file48652/0002-bpo-38380-Update-Windows-builds-to-use-SQLite-3.30.0.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 11:30:59 2019 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 09 Oct 2019 15:30:59 +0000 Subject: [issue38408] urlparse gives no method to build a url with a port In-Reply-To: <1570528263.82.0.631134670905.issue38408@roundup.psfhosted.org> Message-ID: <1570635059.68.0.509409934832.issue38408@roundup.psfhosted.org> Eric V. Smith added the comment: Okay, then I'll close this. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 11:56:36 2019 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 09 Oct 2019 15:56:36 +0000 Subject: [issue38380] Update SQLite to 3.30 in Windows and macOS installer builds In-Reply-To: <1570313540.41.0.0224198940573.issue38380@roundup.psfhosted.org> Message-ID: <1570636596.65.0.409891670589.issue38380@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: FYI: Compiled cpython 3.9 with sqlite-3.30 on macOS 10.14.6. Make test completes without errors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 12:16:17 2019 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 09 Oct 2019 16:16:17 +0000 Subject: [issue38408] urlparse gives no method to build a url with a port In-Reply-To: <1570528263.82.0.631134670905.issue38408@roundup.psfhosted.org> Message-ID: <1570637777.38.0.50552232852.issue38408@roundup.psfhosted.org> Guido van Rossum added the comment: @Amir maybe you can update the docs to add an example of how to do this (if there isn't already one there). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 12:51:42 2019 From: report at bugs.python.org (Benjamin Wood) Date: Wed, 09 Oct 2019 16:51:42 +0000 Subject: [issue17254] add thai encoding aliases to encodings.aliases In-Reply-To: <1361360924.27.0.663240022367.issue17254@psf.upfronthosting.co.za> Message-ID: <1570639902.76.0.246476885111.issue17254@roundup.psfhosted.org> Benjamin Wood added the comment: I've created the codepage alias 874. This is only pending is a merge into the mainline. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 13:14:39 2019 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Wed, 09 Oct 2019 17:14:39 +0000 Subject: [issue38423] Event loop implementation docs advertise set_event_loop Message-ID: <1570641279.2.0.929881138502.issue38423@roundup.psfhosted.org> New submission from Hrvoje Nik?i? : The docs of SelectorEventLoop and ProactorEventLoop contain examples that call asyncio.set_event_loop: selector = selectors.SelectSelector() loop = asyncio.SelectorEventLoop(selector) asyncio.set_event_loop(loop) But this won't have any effect on code that uses asyncio.run(), because asyncio.run() creates a fresh event loop. Since asyncio.run() is the recommended way to execute async code and is used consistently throughout the documentation, this might be confusing to someone who tries to e.g. use the proactor loop on Windows. I propose the following: * add a disclaimer that instantiating the event loop won't affect calls to asyncio.run(), and that loop.run_until_complete() must be used; and * link to asyncio.set_event_loop_policy(), which does work with asyncio.run(), but doesn't allow fine-tuning the details, such as which selector to use for the SelectorEventLoop. ---------- assignee: docs at python components: Documentation, asyncio messages: 354288 nosy: asvetlov, docs at python, hniksic, yselivanov priority: normal severity: normal status: open title: Event loop implementation docs advertise set_event_loop versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 13:15:18 2019 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Wed, 09 Oct 2019 17:15:18 +0000 Subject: [issue38423] Event loop implementation docs advertise set_event_loop which doesn't work with asyncio.run In-Reply-To: <1570641279.2.0.929881138502.issue38423@roundup.psfhosted.org> Message-ID: <1570641318.29.0.932893304527.issue38423@roundup.psfhosted.org> Change by Hrvoje Nik?i? : ---------- title: Event loop implementation docs advertise set_event_loop -> Event loop implementation docs advertise set_event_loop which doesn't work with asyncio.run _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 13:19:40 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 09 Oct 2019 17:19:40 +0000 Subject: [issue38413] Remove or change "Multithreading" section In-Reply-To: <1570563042.6.0.0902531064636.issue38413@roundup.psfhosted.org> Message-ID: <1570641580.49.0.770568272099.issue38413@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: +ghaering _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 13:21:58 2019 From: report at bugs.python.org (Amir Mohamadi) Date: Wed, 09 Oct 2019 17:21:58 +0000 Subject: [issue38419] The path of check-c-globals.py on README is wrong In-Reply-To: <1570592885.04.0.292567951687.issue38419@roundup.psfhosted.org> Message-ID: <1570641718.29.0.719997502135.issue38419@roundup.psfhosted.org> Change by Amir Mohamadi : ---------- keywords: +patch pull_requests: +16266 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16680 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 13:36:13 2019 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 09 Oct 2019 17:36:13 +0000 Subject: [issue38423] Event loop implementation docs advertise set_event_loop which doesn't work with asyncio.run In-Reply-To: <1570641279.2.0.929881138502.issue38423@roundup.psfhosted.org> Message-ID: <1570642573.68.0.0669682076496.issue38423@roundup.psfhosted.org> Yury Selivanov added the comment: Yes, docs updates sound good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 13:37:41 2019 From: report at bugs.python.org (Tim Peters) Date: Wed, 09 Oct 2019 17:37:41 +0000 Subject: [issue38379] finalizer resurrection in gc In-Reply-To: <1570296686.13.0.00730737596554.issue38379@roundup.psfhosted.org> Message-ID: <1570642661.43.0.449542093855.issue38379@roundup.psfhosted.org> Tim Peters added the comment: New changeset ecbf35f9335b0420cb8adfda6f299d6747a16515 by Tim Peters in branch 'master': bpo-38379: don't claim objects are collected when they aren't (#16658) https://github.com/python/cpython/commit/ecbf35f9335b0420cb8adfda6f299d6747a16515 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 14:08:59 2019 From: report at bugs.python.org (Tim Peters) Date: Wed, 09 Oct 2019 18:08:59 +0000 Subject: [issue38379] finalizer resurrection in gc In-Reply-To: <1570296686.13.0.00730737596554.issue38379@roundup.psfhosted.org> Message-ID: <1570644539.0.0.125549917569.issue38379@roundup.psfhosted.org> Tim Peters added the comment: I checked the stat fix into master, but GH failed to backport to 3.7 or 3.8 and I'm clueless. More info in the PR. Does someone else here know how to get a backport done? ---------- stage: patch review -> backport needed versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 14:33:48 2019 From: report at bugs.python.org (Daniel Kahn Gillmor) Date: Wed, 09 Oct 2019 18:33:48 +0000 Subject: [issue17123] Add OCSP support to ssl module In-Reply-To: <1359994472.8.0.804183286731.issue17123@psf.upfronthosting.co.za> Message-ID: <1570646028.91.0.799431814838.issue17123@roundup.psfhosted.org> Daniel Kahn Gillmor added the comment: It would be great to see at least minimal OCSP stapling support (in the form of callbacks on the client and server sides) availabl in the ssl module, similar to the way that pyopenssl has added such callbacks: https://github.com/pyca/pyopenssl/pull/580 If that was present in the ssl module, then it would let other implementations supply reasonable callback functionality for fetching and relaying stapled OCSP responses (on the server side) and validating in-band OCSP responses (on the client side). ---------- nosy: +dkg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 14:55:59 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 09 Oct 2019 18:55:59 +0000 Subject: [issue38417] Add support for settting umask in subprocess children In-Reply-To: <1570575339.67.0.686572067981.issue38417@roundup.psfhosted.org> Message-ID: <1570647359.67.0.0345389639499.issue38417@roundup.psfhosted.org> Gregory P. Smith added the comment: We should not provide such an "run arbitrary python code before execing the ultimate child" feature in the standard library. It is complicated, and assumes you have an ability to execute a new interpreter with its own slow startup time as an intermediate in the child in the first place. (embedded pythons do not have that ability) Leave that to someone to implement on top of subprocess as a thing on PyPI. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 15:46:46 2019 From: report at bugs.python.org (Hansraj Das) Date: Wed, 09 Oct 2019 19:46:46 +0000 Subject: [issue38409] Typo in doc string for str.strip In-Reply-To: <1570543194.25.0.196797196101.issue38409@roundup.psfhosted.org> Message-ID: <1570650406.66.0.61151699859.issue38409@roundup.psfhosted.org> Change by Hansraj Das : ---------- pull_requests: +16267 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16681 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 15:59:07 2019 From: report at bugs.python.org (Dema Abu Adas) Date: Wed, 09 Oct 2019 19:59:07 +0000 Subject: [issue38419] The path of check-c-globals.py on README is wrong In-Reply-To: <1570592885.04.0.292567951687.issue38419@roundup.psfhosted.org> Message-ID: <1570651147.96.0.706298570107.issue38419@roundup.psfhosted.org> Dema Abu Adas added the comment: Hey, Can I take on this issue? :-) ---------- nosy: +de-ma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 16:20:03 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 09 Oct 2019 20:20:03 +0000 Subject: [issue38409] Typo in doc string for str.strip In-Reply-To: <1570543194.25.0.196797196101.issue38409@roundup.psfhosted.org> Message-ID: <1570652403.58.0.443573618995.issue38409@roundup.psfhosted.org> Change by Zachary Ware : ---------- pull_requests: +16268 pull_request: https://github.com/python/cpython/pull/16682 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 17:07:10 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 09 Oct 2019 21:07:10 +0000 Subject: [issue38379] finalizer resurrection in gc In-Reply-To: <1570296686.13.0.00730737596554.issue38379@roundup.psfhosted.org> Message-ID: <1570655230.5.0.144479219431.issue38379@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +16269 stage: backport needed -> patch review pull_request: https://github.com/python/cpython/pull/16683 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 17:09:03 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 09 Oct 2019 21:09:03 +0000 Subject: [issue38409] Typo in doc string for str.strip In-Reply-To: <1570543194.25.0.196797196101.issue38409@roundup.psfhosted.org> Message-ID: <1570655343.64.0.122283342338.issue38409@roundup.psfhosted.org> Zachary Ware added the comment: New changeset 09895c27cd8ff60563a794016e8c099bc897cc74 by Zachary Ware in branch 'master': bpo-38409: Fix grammar in str.strip() docstring (GH-16682) https://github.com/python/cpython/commit/09895c27cd8ff60563a794016e8c099bc897cc74 ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 17:09:14 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 09 Oct 2019 21:09:14 +0000 Subject: [issue38409] Typo in doc string for str.strip In-Reply-To: <1570543194.25.0.196797196101.issue38409@roundup.psfhosted.org> Message-ID: <1570655354.08.0.200300859117.issue38409@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16270 pull_request: https://github.com/python/cpython/pull/16684 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 17:11:56 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 09 Oct 2019 21:11:56 +0000 Subject: [issue38379] finalizer resurrection in gc In-Reply-To: <1570296686.13.0.00730737596554.issue38379@roundup.psfhosted.org> Message-ID: <1570655516.75.0.481999407547.issue38379@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +16271 pull_request: https://github.com/python/cpython/pull/16685 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 17:12:29 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 09 Oct 2019 21:12:29 +0000 Subject: [issue38409] Typo in doc string for str.strip In-Reply-To: <1570543194.25.0.196797196101.issue38409@roundup.psfhosted.org> Message-ID: <1570655549.59.0.164315547793.issue38409@roundup.psfhosted.org> Change by Zachary Ware : ---------- pull_requests: +16272 pull_request: https://github.com/python/cpython/pull/16686 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 17:14:53 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 09 Oct 2019 21:14:53 +0000 Subject: [issue38379] finalizer resurrection in gc In-Reply-To: <1570296686.13.0.00730737596554.issue38379@roundup.psfhosted.org> Message-ID: <1570655693.91.0.51380245488.issue38379@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Tim, I have created backports for 3.8 and 3.7 (PR 16683, PR 16685). In my case cherry_picker ecbf35f9335b0420cb8adfda6f299d6747a16515 3.7 and cherry_picker ecbf35f9335b0420cb8adfda6f299d6747a16515 3.8 works after fixing merge conflicts. Maybe there is something going on in your git repo (maybe you didn't fetch from master first and that is why git log fails?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 17:25:09 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 09 Oct 2019 21:25:09 +0000 Subject: [issue38379] finalizer resurrection in gc In-Reply-To: <1570296686.13.0.00730737596554.issue38379@roundup.psfhosted.org> Message-ID: <1570656309.38.0.246642150786.issue38379@roundup.psfhosted.org> miss-islington added the comment: New changeset 0bd9fac7a866ec886ae8f93f9c24dcda6d436929 by Miss Islington (bot) (Pablo Galindo) in branch '3.8': [3.8] bpo-38379: don't claim objects are collected when they aren't (GH-16658) (GH-16683) https://github.com/python/cpython/commit/0bd9fac7a866ec886ae8f93f9c24dcda6d436929 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 17:33:54 2019 From: report at bugs.python.org (Fritz Reese) Date: Wed, 09 Oct 2019 21:33:54 +0000 Subject: [issue24560] codecs.StreamReader doesn't work with nonblocking streams: TypeError: can't concat bytes to NoneType In-Reply-To: <1435936324.39.0.622709208254.issue24560@psf.upfronthosting.co.za> Message-ID: <1570656834.89.0.44105752454.issue24560@roundup.psfhosted.org> Fritz Reese added the comment: This is still an issue on Linux in both 3.4 and 3.7 even when using io.open() as suggested by @vstinner: >>> import io, os, fcntl >>> r, w = os.pipe() >>> fcntl(r, fcntl.F_SETFL, os.O_NONBLOCK) 0 >>> stream = io.open(r, 'rt') >>> stream <_io.TextIOWrapper name=X mode='rt' encoding='UTF-8'> >>> stream.buffer <_io.BufferedReader name=X> >>> print(repr(stream.buffer.read())) None >>> stream.read() Traceback (most recent call last): ... File ".../python3.7/codecs.py"..., in decode data = self.buffer + input TypeError: can't concat NoneType to bytes The error is present in at least 3.4 up to 3.7 where the underlying buffer.read() returns None which is not handled by the TextIOStream. ---------- nosy: +Fritz Reese versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 17:42:57 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 09 Oct 2019 21:42:57 +0000 Subject: [issue38379] finalizer resurrection in gc In-Reply-To: <1570296686.13.0.00730737596554.issue38379@roundup.psfhosted.org> Message-ID: <1570657377.67.0.563297773301.issue38379@roundup.psfhosted.org> miss-islington added the comment: New changeset a081e931505f190b5ccdff9a781e59b3f13fcc31 by Miss Islington (bot) (Pablo Galindo) in branch '3.7': [3.7] bpo-38379: don't claim objects are collected when they aren't (GH-16658) (GH-16685) https://github.com/python/cpython/commit/a081e931505f190b5ccdff9a781e59b3f13fcc31 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 17:53:22 2019 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 09 Oct 2019 21:53:22 +0000 Subject: [issue38380] Update SQLite to 3.30 in Windows and macOS installer builds In-Reply-To: <1570313540.41.0.0224198940573.issue38380@roundup.psfhosted.org> Message-ID: <1570658002.26.0.256828139897.issue38380@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Update: Tested on macOS 10.14.6 with make test on 2.7.17rc1, 3.7.5rc1+, 3.8.0rc1+. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 17:55:42 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 09 Oct 2019 21:55:42 +0000 Subject: [issue38409] Typo in doc string for str.strip In-Reply-To: <1570543194.25.0.196797196101.issue38409@roundup.psfhosted.org> Message-ID: <1570658142.17.0.134738890045.issue38409@roundup.psfhosted.org> Zachary Ware added the comment: New changeset 0baa6b3c7d9ef1d96f10939c40f8ff95aba9155b by Zachary Ware (Miss Islington (bot)) in branch '3.8': bpo-38409: Fix grammar in str.strip() docstring (GH-16682) (GH-16684) https://github.com/python/cpython/commit/0baa6b3c7d9ef1d96f10939c40f8ff95aba9155b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 17:56:10 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 09 Oct 2019 21:56:10 +0000 Subject: [issue38409] Typo in doc string for str.strip In-Reply-To: <1570543194.25.0.196797196101.issue38409@roundup.psfhosted.org> Message-ID: <1570658170.77.0.111726116988.issue38409@roundup.psfhosted.org> Zachary Ware added the comment: New changeset a774ac6637e8f155a28b7733a0a93d4a680584d4 by Zachary Ware in branch '3.7': [3.7] bpo-38409: Fix grammar in str.strip() docstring (GH-16682) (GH-16686) https://github.com/python/cpython/commit/a774ac6637e8f155a28b7733a0a93d4a680584d4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 17:57:24 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 09 Oct 2019 21:57:24 +0000 Subject: [issue38409] Typo in doc string for str.strip In-Reply-To: <1570543194.25.0.196797196101.issue38409@roundup.psfhosted.org> Message-ID: <1570658244.9.0.8320393194.issue38409@roundup.psfhosted.org> Zachary Ware added the comment: Thanks for the report, Bob! ---------- keywords: -newcomer friendly resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 20:34:42 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 10 Oct 2019 00:34:42 +0000 Subject: [issue38379] finalizer resurrection in gc In-Reply-To: <1570296686.13.0.00730737596554.issue38379@roundup.psfhosted.org> Message-ID: <1570667682.16.0.714560454382.issue38379@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +16273 pull_request: https://github.com/python/cpython/pull/16687 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 21:10:51 2019 From: report at bugs.python.org (Ammar Askar) Date: Thu, 10 Oct 2019 01:10:51 +0000 Subject: [issue17894] Edits to descriptor howto In-Reply-To: <1367547112.04.0.920947702161.issue17894@psf.upfronthosting.co.za> Message-ID: <1570669851.6.0.0213153774232.issue17894@roundup.psfhosted.org> Ammar Askar added the comment: Any updates on this? Some of the re-organization and simplifications here look pretty good overall and make the guide way more approachable. Seeing as how this has been sitting a while and Github has an option allow maintainers to make edits to PRs. Raymond, would you be fine with Ned making a PR out of these changes to solicit your feedback and incorporate it the way you want? ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 21:34:39 2019 From: report at bugs.python.org (Dima Tisnek) Date: Thu, 10 Oct 2019 01:34:39 +0000 Subject: [issue38413] Remove or change "Multithreading" section In-Reply-To: <1570563042.6.0.0902531064636.issue38413@roundup.psfhosted.org> Message-ID: <1570671279.79.0.812096867454.issue38413@roundup.psfhosted.org> Dima Tisnek added the comment: That would be nice; someone needs to figure out what exact sqlite version allows safe passing of connection between threads. Ideally other caveats would be covered (is passing open cursors to another thread allowed?, etc...) ---------- nosy: +Dima.Tisnek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 21:38:42 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 10 Oct 2019 01:38:42 +0000 Subject: [issue17123] Add OCSP support to ssl module In-Reply-To: <1359994472.8.0.804183286731.issue17123@psf.upfronthosting.co.za> Message-ID: <1570671522.21.0.151508418003.issue17123@roundup.psfhosted.org> Benjamin Peterson added the comment: Considering OSCP has fallen out of favor relative to CT in recent years, may be should simply reject this feature request. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 21:39:01 2019 From: report at bugs.python.org (Dima Tisnek) Date: Thu, 10 Oct 2019 01:39:01 +0000 Subject: [issue38424] typing.Generator shorthand Message-ID: <1570671541.73.0.307162838122.issue38424@roundup.psfhosted.org> New submission from Dima Tisnek : Currently to annotate a generator, something like `Generator[str, None, None]` is required. Which is a bit confusing and verbose. Can we allow shorthand, like `Generator[str]` for simple cases? I'm not entirely certain what the semantics ought to be... Maybe Generator[t1, t2=Any, t3=None] ? ---------- components: Library (Lib) messages: 354307 nosy: Dima.Tisnek priority: normal severity: normal status: open title: typing.Generator shorthand type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 21:41:48 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 10 Oct 2019 01:41:48 +0000 Subject: [issue38424] typing.Generator shorthand In-Reply-To: <1570671541.73.0.307162838122.issue38424@roundup.psfhosted.org> Message-ID: <1570671708.55.0.414859810396.issue38424@roundup.psfhosted.org> Benjamin Peterson added the comment: Is Iterator[Whatever] not sufficient for you? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 22:29:57 2019 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 10 Oct 2019 02:29:57 +0000 Subject: [issue38419] The path of check-c-globals.py on README is wrong In-Reply-To: <1570592885.04.0.292567951687.issue38419@roundup.psfhosted.org> Message-ID: <1570674597.79.0.831657474465.issue38419@roundup.psfhosted.org> Dong-hee Na added the comment: > Hey, Can I take on this issue? :-) Unfortunately, Amir already sent a patch for this. Please take a look at another issue :) Thank you ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 22:40:05 2019 From: report at bugs.python.org (Dima Tisnek) Date: Thu, 10 Oct 2019 02:40:05 +0000 Subject: [issue38424] typing.Generator shorthand In-Reply-To: <1570671541.73.0.307162838122.issue38424@roundup.psfhosted.org> Message-ID: <1570675205.05.0.236033975548.issue38424@roundup.psfhosted.org> Dima Tisnek added the comment: Actually yes it is sufficient. I don't know why I didn't think of that! Perhaps some note in the docs could help other lost children of Python :P ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 23:24:33 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 10 Oct 2019 03:24:33 +0000 Subject: [issue17894] Edits to descriptor howto In-Reply-To: <1367547112.04.0.920947702161.issue17894@psf.upfronthosting.co.za> Message-ID: <1570677873.24.0.193201552934.issue17894@roundup.psfhosted.org> Raymond Hettinger added the comment: I've been working on some updates to the descriptor how-to and will likely post next month or so (there have been other priorities for 3.8 and I had had some limitations regarding posting my training material). I'm going in a different direction than the patches proposed here and am going to mark this tracker issue as closed. FWIW, this entry is unique in that it is a work of individual authorship, originally posted on my own website. When the analysis became a popular, I was asked to post it on python.org. I will continue to maintain and improve it but am not open to a substantial stylistic rewrite changing it into someone else's style (people can use their own blog posts for that purpose). ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 01:02:14 2019 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 10 Oct 2019 05:02:14 +0000 Subject: =?utf-8?b?W2lzc3VlMzg0MjVdIFJlbW92ZSB3YXJuaW5nOiDigJhyZXPigJkgbWF5IGJl?= =?utf-8?q?_used_uninitialized_in_this_function?= Message-ID: <1570683734.97.0.750890713695.issue38425@roundup.psfhosted.org> New submission from Dong-hee Na : Python/Python-ast.c: In function ?PyAST_obj2mod?: Python/Python-ast.c:10253:12: warning: ?res? may be used uninitialized in this function [-Wmaybe-uninitialized] CentOS Linux release 7.6.1810 gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36) ---------- assignee: corona10 messages: 354312 nosy: corona10 priority: normal severity: normal status: open title: Remove warning: ?res? may be used uninitialized in this function versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 01:05:46 2019 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 10 Oct 2019 05:05:46 +0000 Subject: =?utf-8?b?W2lzc3VlMzg0MjVdIFJlbW92ZSB3YXJuaW5nOiDigJhyZXPigJkgbWF5IGJl?= =?utf-8?q?_used_uninitialized_in_this_function?= In-Reply-To: <1570683734.97.0.750890713695.issue38425@roundup.psfhosted.org> Message-ID: <1570683946.36.0.135014154402.issue38425@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +16274 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16688 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 01:19:25 2019 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 10 Oct 2019 05:19:25 +0000 Subject: =?utf-8?b?W2lzc3VlMzg0MjVdIFJlbW92ZSB3YXJuaW5nOiDigJhyZXPigJkgbWF5IGJl?= =?utf-8?q?_used_uninitialized_in_this_function?= In-Reply-To: <1570683734.97.0.750890713695.issue38425@roundup.psfhosted.org> Message-ID: <1570684765.35.0.106023499865.issue38425@roundup.psfhosted.org> Change by Dong-hee Na : ---------- stage: patch review -> versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 01:31:15 2019 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 10 Oct 2019 05:31:15 +0000 Subject: [issue38426] declare visit_validate in Py_DEBUG macro Message-ID: <1570685475.13.0.949767572532.issue38426@roundup.psfhosted.org> New submission from Dong-hee Na : I've got the warining like this. Modules/gcmodule.c:1925:1: warning: ?visit_validate? defined but not used [-Wunused-function] visit_validate(PyObject *op, void *parent_raw) This looks like only used in pydebug. I'd like to propose declaring this function only in #ifdef Py_DEBUG. My environment is CentOS Linux release 7.6.1810 gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36) ---------- assignee: corona10 components: Interpreter Core messages: 354313 nosy: corona10, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: declare visit_validate in Py_DEBUG macro type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 02:00:23 2019 From: report at bugs.python.org (Shengjing Zhu) Date: Thu, 10 Oct 2019 06:00:23 +0000 Subject: [issue38427] Issue URL on translated Python docs site is always pointed to English version Message-ID: <1570687223.02.0.730833049002.issue38427@roundup.psfhosted.org> New submission from Shengjing Zhu : On footer of https://docs.python.org/fr/3.8, "Found a bug?" links to https://docs.python.org/3/bugs.html It should be https://docs.python.org/fr/3.8/bugs.html as 3.7 version. ---------- assignee: docs at python components: Documentation messages: 354314 nosy: docs at python, zhsj priority: normal severity: normal status: open title: Issue URL on translated Python docs site is always pointed to English version versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 02:50:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 06:50:59 +0000 Subject: [issue38392] Ensure that objects entering the GC are valid In-Reply-To: <1570445338.58.0.651902608854.issue38392@roundup.psfhosted.org> Message-ID: <1570690259.2.0.472666679067.issue38392@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16275 pull_request: https://github.com/python/cpython/pull/16689 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 02:50:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 06:50:59 +0000 Subject: [issue38426] declare visit_validate in Py_DEBUG macro In-Reply-To: <1570685475.13.0.949767572532.issue38426@roundup.psfhosted.org> Message-ID: <1570690259.34.0.41555183993.issue38426@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +16276 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16689 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 02:53:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 06:53:34 +0000 Subject: [issue38426] declare visit_validate in Py_DEBUG macro In-Reply-To: <1570685475.13.0.949767572532.issue38426@roundup.psfhosted.org> Message-ID: <1570690414.24.0.65949074444.issue38426@roundup.psfhosted.org> STINNER Victor added the comment: I wrote PR 16689 to fix the warning. I added the function in bpo-38392. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 02:59:18 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 10 Oct 2019 06:59:18 +0000 Subject: [issue38427] Issue URL on translated Python docs site is always pointed to English version In-Reply-To: <1570687223.02.0.730833049002.issue38427@roundup.psfhosted.org> Message-ID: <1570690758.88.0.529413443068.issue38427@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: There are occasional reports of typo in translations that are opened in bugs.python.org and it would make sense to redirect to respective GitHub repos for the translations. ---------- nosy: +mdk, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 03:18:07 2019 From: report at bugs.python.org (Shengjing Zhu) Date: Thu, 10 Oct 2019 07:18:07 +0000 Subject: [issue38427] Issue URL on translated Python docs site is always pointed to English version In-Reply-To: <1570687223.02.0.730833049002.issue38427@roundup.psfhosted.org> Message-ID: <1570691887.29.0.375892839805.issue38427@roundup.psfhosted.org> Shengjing Zhu added the comment: On https://docs.python.org/zh-cn/3/bugs.html we emphasis that translation bugs should be reported at GitHub. So that's why I want the footer link same as previous (link to translated bugs.html). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 03:32:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 07:32:19 +0000 Subject: [issue38392] Ensure that objects entering the GC are valid In-Reply-To: <1570445338.58.0.651902608854.issue38392@roundup.psfhosted.org> Message-ID: <1570692739.62.0.0839708357576.issue38392@roundup.psfhosted.org> STINNER Victor added the comment: New changeset a5447735c334a041ee2ffdeb5c7e13d7d4502ea2 by Victor Stinner in branch 'master': bpo-38392: Only declare visit_validate() if Py_DEBUG is defined (GH-16689) https://github.com/python/cpython/commit/a5447735c334a041ee2ffdeb5c7e13d7d4502ea2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 03:32:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 07:32:19 +0000 Subject: [issue38426] declare visit_validate in Py_DEBUG macro In-Reply-To: <1570685475.13.0.949767572532.issue38426@roundup.psfhosted.org> Message-ID: <1570692739.77.0.628848298608.issue38426@roundup.psfhosted.org> STINNER Victor added the comment: New changeset a5447735c334a041ee2ffdeb5c7e13d7d4502ea2 by Victor Stinner in branch 'master': bpo-38392: Only declare visit_validate() if Py_DEBUG is defined (GH-16689) https://github.com/python/cpython/commit/a5447735c334a041ee2ffdeb5c7e13d7d4502ea2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 03:34:49 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 07:34:49 +0000 Subject: [issue38109] Missing constants in Lib/stat.py In-Reply-To: <1568208959.37.0.605416078815.issue38109@roundup.psfhosted.org> Message-ID: <1570692889.39.0.739249199396.issue38109@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 7bb14316b8ceddb813f31040a299af94a57ab339 by Victor Stinner (Ronan Lamy) in branch 'master': bpo-38109: Add missing constants to Lib/stat.py (GH-16665) https://github.com/python/cpython/commit/7bb14316b8ceddb813f31040a299af94a57ab339 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 03:35:02 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 10 Oct 2019 07:35:02 +0000 Subject: [issue38109] Missing constants in Lib/stat.py In-Reply-To: <1568208959.37.0.605416078815.issue38109@roundup.psfhosted.org> Message-ID: <1570692902.39.0.40194337881.issue38109@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16277 pull_request: https://github.com/python/cpython/pull/16690 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 03:35:08 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 10 Oct 2019 07:35:08 +0000 Subject: [issue38109] Missing constants in Lib/stat.py In-Reply-To: <1568208959.37.0.605416078815.issue38109@roundup.psfhosted.org> Message-ID: <1570692908.01.0.594612663767.issue38109@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16278 pull_request: https://github.com/python/cpython/pull/16691 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 03:37:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 07:37:02 +0000 Subject: [issue38109] Missing constants in Lib/stat.py In-Reply-To: <1568208959.37.0.605416078815.issue38109@roundup.psfhosted.org> Message-ID: <1570693022.96.0.6606466822.issue38109@roundup.psfhosted.org> STINNER Victor added the comment: Ronan Lamy: Hum, do you really need this change to land in Python 3.7 and 3.8? If not, I will close PR 16690 and PR 16691 backports. I don't think that it's worth it, since _stat should be always present in CPython. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 03:39:23 2019 From: report at bugs.python.org (Christian Heimes) Date: Thu, 10 Oct 2019 07:39:23 +0000 Subject: [issue38417] Add support for settting umask in subprocess children In-Reply-To: <1570575339.67.0.686572067981.issue38417@roundup.psfhosted.org> Message-ID: <1570693163.4.0.188092843017.issue38417@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 03:41:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 07:41:29 +0000 Subject: =?utf-8?b?W2lzc3VlMzg0MjVdIFJlbW92ZSB3YXJuaW5nOiDigJhyZXPigJkgbWF5IGJl?= =?utf-8?q?_used_uninitialized_in_this_function?= In-Reply-To: <1570683734.97.0.750890713695.issue38425@roundup.psfhosted.org> Message-ID: <1570693289.7.0.891344403965.issue38425@roundup.psfhosted.org> STINNER Victor added the comment: New changeset a05fcd3c7adf6e3a0944da8cf80a3346882e9b3b by Victor Stinner (Dong-hee Na) in branch 'master': bpo-38425: Fix ?res? may be used uninitialized warning (GH-16688) https://github.com/python/cpython/commit/a05fcd3c7adf6e3a0944da8cf80a3346882e9b3b ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 03:41:37 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 10 Oct 2019 07:41:37 +0000 Subject: =?utf-8?b?W2lzc3VlMzg0MjVdIFJlbW92ZSB3YXJuaW5nOiDigJhyZXPigJkgbWF5IGJl?= =?utf-8?q?_used_uninitialized_in_this_function?= In-Reply-To: <1570683734.97.0.750890713695.issue38425@roundup.psfhosted.org> Message-ID: <1570693297.57.0.28139157754.issue38425@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16279 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16693 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 03:41:43 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 10 Oct 2019 07:41:43 +0000 Subject: =?utf-8?b?W2lzc3VlMzg0MjVdIFJlbW92ZSB3YXJuaW5nOiDigJhyZXPigJkgbWF5IGJl?= =?utf-8?q?_used_uninitialized_in_this_function?= In-Reply-To: <1570683734.97.0.750890713695.issue38425@roundup.psfhosted.org> Message-ID: <1570693303.25.0.562620984106.issue38425@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16280 pull_request: https://github.com/python/cpython/pull/16694 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 03:47:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 07:47:04 +0000 Subject: [issue36339] test_ttk_guionly: test_traversal() fails randomly on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1552899428.95.0.891639199681.issue36339@roundup.psfhosted.org> Message-ID: <1570693624.31.0.868910525964.issue36339@roundup.psfhosted.org> STINNER Victor added the comment: Recent failure: The Buildbot has detected a failed build on builder AMD64 Windows8.1 Refleaks 2.7 while building Python. Full details are available at: https://buildbot.python.org/all/#builders/33/builds/726 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 03:47:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 07:47:29 +0000 Subject: [issue38426] declare visit_validate in Py_DEBUG macro In-Reply-To: <1570685475.13.0.949767572532.issue38426@roundup.psfhosted.org> Message-ID: <1570693649.71.0.457507190774.issue38426@roundup.psfhosted.org> STINNER Victor added the comment: Thanks for the report. It's now fixed. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 03:49:23 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 10 Oct 2019 07:49:23 +0000 Subject: [issue37677] Seg Fault on OSX when multiprocessing In-Reply-To: <1564042021.53.0.0155934240157.issue37677@roundup.psfhosted.org> Message-ID: <1570693763.38.0.0313372965067.issue37677@roundup.psfhosted.org> Ronald Oussoren added the comment: Looking at the stack trace this is a similar issue as the "no_proxy" one, but in some sense worse because it happens when just calling a regular unix API (not an Apple framework API). The first few lines of the stack trace are for code in the "Network" framework which is new in macOS 10.14 and is based on lib dispatch and hence uses threads. That results in the same problem as the "no_proxy" one: code that causes problems when called after os.fork(). That's a bug in macOS. In Python 3.8 the multiprocessing module switched to "spawn" mode instead of "fork" mode because of this. You can do this manually for earlier versions (https://docs.python.org/3.7/library/multiprocessing.html#contexts-and-start-methods) P.S. A reproducer would still be nice as that would make it easier to raise and issue with Apple about this. ---------- components: +macOS nosy: +ned.deily, ronaldoussoren versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 03:52:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 07:52:58 +0000 Subject: [issue38417] Add support for settting umask in subprocess children In-Reply-To: <1570575339.67.0.686572067981.issue38417@roundup.psfhosted.org> Message-ID: <1570693978.69.0.558573114205.issue38417@roundup.psfhosted.org> STINNER Victor added the comment: > Another use of the deprecated unsafe preexec_fn was to call os.umask in the child prior to exec. What do you mean by "deprecated"? The parameter doesn't seem to be deprecated in the documentation: https://docs.python.org/dev/library/subprocess.html#subprocess.Popen And when I use it, it doesn't emit any warning: --- import os, subprocess, sys def func(): print(f"func called in {os.getpid()}") argv = [sys.executable, "-c", "pass"] print(f"parent: {os.getpid()}") subprocess.run(argv, preexec_fn=func) --- Output: --- $ ./python -Werror x.py parent: 22264 func called in 22265 --- If you want to deprecate it, it should be documented as deprecated and emit a DeprecatedWarning, no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 03:53:19 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 10 Oct 2019 07:53:19 +0000 Subject: [issue38416] test_largefile.TestSocketSendfile.test_it() failed with 15 min timeout on AMD64 FreeBSD 10-STABLE Non-Debug 3.x In-Reply-To: <1570569266.33.0.0795173642593.issue38416@roundup.psfhosted.org> Message-ID: <1570693999.85.0.886379528558.issue38416@roundup.psfhosted.org> Giampaolo Rodola' added the comment: > Another approach is to change the timeout of 15 min for this super slow buildbot. For example, set it to 20 min or 30 min. I think this makes more sense (set timeout to 25 min). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 03:57:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 07:57:08 +0000 Subject: [issue38417] Add support for settting umask in subprocess children In-Reply-To: <1570575339.67.0.686572067981.issue38417@roundup.psfhosted.org> Message-ID: <1570694228.58.0.589566081811.issue38417@roundup.psfhosted.org> STINNER Victor added the comment: pylint emits a warning on subprocess.Popen(preexec_fn=func): W1509: Using preexec_fn keyword which may be unsafe in the presence of threads (subprocess-popen-preexec-fn) But not when using subprocess.run(preexec_fn=func). Maybe a check is missing in pylint. Note: pyflakes doesn't complain about preexec_fn. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:00:30 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 10 Oct 2019 08:00:30 +0000 Subject: =?utf-8?b?W2lzc3VlMzg0MjVdIFJlbW92ZSB3YXJuaW5nOiDigJhyZXPigJkgbWF5IGJl?= =?utf-8?q?_used_uninitialized_in_this_function?= In-Reply-To: <1570683734.97.0.750890713695.issue38425@roundup.psfhosted.org> Message-ID: <1570694430.04.0.457154666764.issue38425@roundup.psfhosted.org> miss-islington added the comment: New changeset 6b6935e563562c427d5bb1b2864d6a2fed0e74fa by Miss Islington (bot) in branch '3.8': bpo-38425: Fix ?res? may be used uninitialized warning (GH-16688) https://github.com/python/cpython/commit/6b6935e563562c427d5bb1b2864d6a2fed0e74fa ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:00:44 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 10 Oct 2019 08:00:44 +0000 Subject: =?utf-8?b?W2lzc3VlMzg0MjVdIFJlbW92ZSB3YXJuaW5nOiDigJhyZXPigJkgbWF5IGJl?= =?utf-8?q?_used_uninitialized_in_this_function?= In-Reply-To: <1570683734.97.0.750890713695.issue38425@roundup.psfhosted.org> Message-ID: <1570694444.65.0.746266963229.issue38425@roundup.psfhosted.org> miss-islington added the comment: New changeset d27a9b1695a1b46c81b3a83a7a35034791265d89 by Miss Islington (bot) in branch '3.7': bpo-38425: Fix ?res? may be used uninitialized warning (GH-16688) https://github.com/python/cpython/commit/d27a9b1695a1b46c81b3a83a7a35034791265d89 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:00:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 08:00:58 +0000 Subject: [issue38417] Add support for settting umask in subprocess children In-Reply-To: <1570575339.67.0.686572067981.issue38417@roundup.psfhosted.org> Message-ID: <1570694458.06.0.497019293333.issue38417@roundup.psfhosted.org> STINNER Victor added the comment: > We should not provide such an "run arbitrary python code before execing the ultimate child" feature in the standard library. Do you want to modify _posixsubprocess to call umask() between fork() and exec()? As it has been done for uid, gid and groups: call setreuid(), setregid() and setgroups()? If so, it means that posix_spawn() couldn't be used when the new umask parameter would be used, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:01:19 2019 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 10 Oct 2019 08:01:19 +0000 Subject: =?utf-8?b?W2lzc3VlMzg0MjVdIFJlbW92ZSB3YXJuaW5nOiDigJhyZXPigJkgbWF5IGJl?= =?utf-8?q?_used_uninitialized_in_this_function?= In-Reply-To: <1570683734.97.0.750890713695.issue38425@roundup.psfhosted.org> Message-ID: <1570694479.53.0.510031105939.issue38425@roundup.psfhosted.org> Change by Dong-hee Na : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:10:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 08:10:52 +0000 Subject: [issue38416] test_largefile.TestSocketSendfile.test_it() failed with 15 min timeout on AMD64 FreeBSD 10-STABLE Non-Debug 3.x In-Reply-To: <1570569266.33.0.0795173642593.issue38416@roundup.psfhosted.org> Message-ID: <1570695052.55.0.768754620697.issue38416@roundup.psfhosted.org> STINNER Victor added the comment: I changed AMD64 FreeBSD 10-STABLE timeout from 15 to 30 minutes. https://github.com/python/buildmaster-config/commit/c3fe0b1b65d94c115bbbb0521dda4daba02775dc ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:13:40 2019 From: report at bugs.python.org (Christian Heimes) Date: Thu, 10 Oct 2019 08:13:40 +0000 Subject: [issue38417] Add support for settting umask in subprocess children In-Reply-To: <1570575339.67.0.686572067981.issue38417@roundup.psfhosted.org> Message-ID: <1570695220.11.0.188099946813.issue38417@roundup.psfhosted.org> Christian Heimes added the comment: preexec_fn does not work in subinterpreters, which (amongst others) affects mod_wsgi and similar WSGI implementations. Therefore portable software must not use preexec_fn at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:14:42 2019 From: report at bugs.python.org (Christian Heimes) Date: Thu, 10 Oct 2019 08:14:42 +0000 Subject: [issue38417] Add support for settting umask in subprocess children In-Reply-To: <1570575339.67.0.686572067981.issue38417@roundup.psfhosted.org> Message-ID: <1570695282.25.0.278204097357.issue38417@roundup.psfhosted.org> Christian Heimes added the comment: Changed in version 3.8: The preexec_fn parameter is no longer supported in subinterpreters. The use of the parameter in a subinterpreter raises RuntimeError. The new restriction may affect applications that are deployed in mod_wsgi, uWSGI, and other embedded environments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:18:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 08:18:30 +0000 Subject: [issue14307] Make subclassing SocketServer simpler for non-blocking frameworks In-Reply-To: <1331767378.71.0.470789063251.issue14307@psf.upfronthosting.co.za> Message-ID: <1570695510.36.0.69983319105.issue14307@roundup.psfhosted.org> STINNER Victor added the comment: Antoine Pitrou: "... I'm against this change ..." Martin Panter: "... But this seems unreasonable to me. ..." I close the issue. You can use asyncio for non-blocking networking code. Or have a look at Twisted, Tornado, eventlet, etc. If you really want to hack socketserver, I suggest you to copy the whole socketserver.py file. But asynchronous programming is a hard problem which requires more than modiying a single function. Slowly, you will built something similar the the project that I cited. ---------- nosy: +vstinner resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:26:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 08:26:26 +0000 Subject: [issue35762] subprocess.Popen with universal_newlines and nonblocking streams fails with "can't concat NoneType to bytes" In-Reply-To: <1547738568.37.0.865745194211.issue35762@roundup.psfhosted.org> Message-ID: <1570695986.74.0.7604967461.issue35762@roundup.psfhosted.org> STINNER Victor added the comment: I close this issue as a duplicate of bpo-13322 which is older and has a longer history. ---------- nosy: +vstinner resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> buffered read() and write() does not raise BlockingIOError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:26:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 08:26:59 +0000 Subject: [issue13322] buffered read() and write() does not raise BlockingIOError In-Reply-To: <1320246535.71.0.465783773129.issue13322@psf.upfronthosting.co.za> Message-ID: <1570696019.38.0.603622413712.issue13322@roundup.psfhosted.org> STINNER Victor added the comment: I closed bpo-35762 as a duplicate of this issue: subprocess.Popen with universal_newlines and nonblocking streams fails with "can't concat NoneType to bytes". ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:27:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 08:27:39 +0000 Subject: [issue26292] Raw I/O writelines() broken for non-blocking I/O In-Reply-To: <1454661860.28.0.473572264835.issue26292@psf.upfronthosting.co.za> Message-ID: <1570696059.18.0.0724102779005.issue26292@roundup.psfhosted.org> STINNER Victor added the comment: I close this issue as duplicate of bpo-13322 which is older and has a longer history. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> buffered read() and write() does not raise BlockingIOError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:27:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 08:27:57 +0000 Subject: [issue13322] buffered read() and write() does not raise BlockingIOError In-Reply-To: <1320246535.71.0.465783773129.issue13322@psf.upfronthosting.co.za> Message-ID: <1570696077.83.0.0891581690408.issue13322@roundup.psfhosted.org> STINNER Victor added the comment: I closed bpo-26292 as a duplicate of this issue: Raw I/O writelines() broken for non-blocking I/O. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:29:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 08:29:35 +0000 Subject: [issue24560] codecs.StreamReader doesn't work with nonblocking streams: TypeError: can't concat bytes to NoneType In-Reply-To: <1435936324.39.0.622709208254.issue24560@psf.upfronthosting.co.za> Message-ID: <1570696175.45.0.0601537592957.issue24560@roundup.psfhosted.org> STINNER Victor added the comment: I close this issue as a duplicate of bpo-13322. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> buffered read() and write() does not raise BlockingIOError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:29:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 08:29:53 +0000 Subject: [issue13322] buffered read() and write() does not raise BlockingIOError In-Reply-To: <1320246535.71.0.465783773129.issue13322@psf.upfronthosting.co.za> Message-ID: <1570696193.72.0.966624003992.issue13322@roundup.psfhosted.org> STINNER Victor added the comment: I closed bpo-24560 as a duplicate of this issue: codecs.StreamReader doesn't work with nonblocking streams: TypeError: can't concat bytes to NoneType. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:30:27 2019 From: report at bugs.python.org (Jakub Stasiak) Date: Thu, 10 Oct 2019 08:30:27 +0000 Subject: [issue13322] buffered read() and write() does not raise BlockingIOError In-Reply-To: <1320246535.71.0.465783773129.issue13322@psf.upfronthosting.co.za> Message-ID: <1570696227.54.0.359837656958.issue13322@roundup.psfhosted.org> Change by Jakub Stasiak : ---------- nosy: +jstasiak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:31:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 08:31:13 +0000 Subject: [issue13322] buffered read() and write() does not raise BlockingIOError In-Reply-To: <1320246535.71.0.465783773129.issue13322@psf.upfronthosting.co.za> Message-ID: <1570696273.75.0.609441035951.issue13322@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-32561: Add API to io objects for non-blocking reads/writes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:32:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 08:32:02 +0000 Subject: [issue13322] The io module doesn't support non-blocking files In-Reply-To: <1320246535.71.0.465783773129.issue13322@psf.upfronthosting.co.za> Message-ID: <1570696322.57.0.987642919285.issue13322@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: -Documentation, IO title: buffered read() and write() does not raise BlockingIOError -> The io module doesn't support non-blocking files versions: +Python 3.9 -Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:34:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 08:34:56 +0000 Subject: [issue32561] Add API to io objects for non-blocking reads/writes In-Reply-To: <1516068442.29.0.467229070634.issue32561@psf.upfronthosting.co.za> Message-ID: <1570696496.93.0.216127922464.issue32561@roundup.psfhosted.org> STINNER Victor added the comment: > Background: Doing I/O to files on disk has a hugely bimodal latency. If the I/O happens to be in or going to cache (either user-space cache, like in io.BufferedIOBase, or the OS's page cache), then the operation returns instantly (~1 ?s) without blocking. OTOH if the I/O isn't cached (for reads) or cacheable (for writes), then the operation may block for 10 ms or more. On Linux 4.14 and newer, Python 3.8 now provides os.preadv(os.RWF_NOWAIT): "Do not wait for data which is not immediately available. If this flag is specified, the system call will return instantly if it would have to read data from the backing storage or wait for a lock. If some data was successfully read, it will return the number of bytes read. If no bytes were read, it will return -1 and set errno to errno.EAGAIN." At least on recent Linux, it became possible to write a different code path for uncached data. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:35:51 2019 From: report at bugs.python.org (Rebecca Fair) Date: Thu, 10 Oct 2019 08:35:51 +0000 Subject: [issue38428] Can't gracefully ctrl+C multiprocessing pool on Python3 & Windows Message-ID: <1570696551.92.0.213022823921.issue38428@roundup.psfhosted.org> New submission from Rebecca Fair : I want to be able to Ctrl+C to exit a multiprocessing Pool.map gracefully, and have made a solution based on this Stack Overflow answer: https://stackoverflow.com/questions/11312525/catch-ctrlc-sigint-and-exit-multiprocesses-gracefully-in-python However, this solution works on Linux, and on Windows 10 with Python 2.7, but not on Windows 10 with Python 3.7. The Ctrl+C is just ignored and I have to kill the processes manually. I've attached the minimum code required to reproduce the problem. Is this a bug, expected, or is there a workaround? I believe it might be caused by the behaviour of threading.Condition.wait() being changed in commit 7c3e577 but I don't know enough about signalling to say any more than that ---------- components: Windows files: bug.py messages: 354344 nosy: paul.moore, rebeccafair, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Can't gracefully ctrl+C multiprocessing pool on Python3 & Windows versions: Python 3.7 Added file: https://bugs.python.org/file48653/bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:37:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 08:37:08 +0000 Subject: [issue13322] The io module doesn't support non-blocking files In-Reply-To: <1320246535.71.0.465783773129.issue13322@psf.upfronthosting.co.za> Message-ID: <1570696628.03.0.0305576828155.issue13322@roundup.psfhosted.org> STINNER Victor added the comment: TextIOWrapper, and maybe also BufferedRead, may raise an exception if the underlying file descriptor is configured in non-blocking mode. It may require an additional syscall() to query the FD properties, which may slowdown the creation of file objects in Python :-/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:39:50 2019 From: report at bugs.python.org (Rebecca Fair) Date: Thu, 10 Oct 2019 08:39:50 +0000 Subject: [issue38428] Can't gracefully ctrl+C multiprocessing pool on Python3 & Windows In-Reply-To: <1570696551.92.0.213022823921.issue38428@roundup.psfhosted.org> Message-ID: <1570696790.98.0.901451616211.issue38428@roundup.psfhosted.org> Rebecca Fair added the comment: Sorry, I didn't realise it wouldn't link to a commit automatically, the commit is here: https://github.com/python/cpython/commit/7c3e5773954009d65520eb063621cf7724da88e3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:42:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 08:42:30 +0000 Subject: [issue32561] Add API to io objects for non-blocking reads/writes In-Reply-To: <1516068442.29.0.467229070634.issue32561@psf.upfronthosting.co.za> Message-ID: <1570696950.82.0.952626335803.issue32561@roundup.psfhosted.org> STINNER Victor added the comment: The Linux kernel 5.1 also got a new "io_uring" for asynchronous I/O: "Ringing in a new asynchronous I/O API" https://lwn.net/Articles/776703/ Linux 5.2: "The io_uring mechanism has a new operation, IORING_OP_SYNC_FILE_RANGE, which performs the equivalent of a sync_file_range() system call. It is also now possible to register an eventfd with an io_uring and get notifications when operations complete." Linux 5.3: "The io_uring mechanism has gained support for asynchronous sendmsg() and recvmsg() operations." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:47:11 2019 From: report at bugs.python.org (Haruka Ma) Date: Thu, 10 Oct 2019 08:47:11 +0000 Subject: [issue38429] Failed to compile with --enable-framework on macOS on master Message-ID: <1570697231.32.0.587121640762.issue38429@roundup.psfhosted.org> New submission from Haruka Ma : Since commit https://github.com/python/cpython/commit/c02b41b1fb115c87693530ea6a480b2e15460424 , some syntax errors are preventing cpython from compiling with --enable-framework on. Specifically, the errors are in Modules/getpath.c on line 1134 and 1165. I've made some inline comments on github as well. ---------- components: macOS messages: 354348 nosy: Haruka Ma, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Failed to compile with --enable-framework on macOS on master type: compile error versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:51:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 08:51:47 +0000 Subject: [issue32561] Add API to io objects for non-blocking reads/writes In-Reply-To: <1516068442.29.0.467229070634.issue32561@psf.upfronthosting.co.za> Message-ID: <1570697507.84.0.658685541605.issue32561@roundup.psfhosted.org> STINNER Victor added the comment: I suggest to close the issue and move the discussion to a place to discuss asynchronous ideas. I'm sorry, but I don't understand what it is proposed here. I understand that Nathaniel wants to add something like a new "asynchronous" mode in the io module which would make FileIO, BufferedReader and TextIOWrapper behave differently. IMHO it's a bad idea. The io module is designed for blocking I/O syscalls. Not only the implementation, but also the API. Non-blocking I/O requires a platform specific implementation for best performances, but that requires something like an event loop, and so unusual programming style like asyncio "await ...". I dislike the idea of having a single module for synchronous (blocking) and asynchronous (non-blocking) operations. IMHO asynchronous programming is so complex that it requires to develop a whole new module. Maybe new module could reuse io code. Like implement an asynchronous using io.TextIOWrapper, but its underlying buffer would be feeded and controlled by asynchronous code. The Python bug tracker is usually used for bugs or to implement a concrete proposal. Here I understand that it's more an idea at the design stage. I don't think that it's the best place to discuss it. I suggest to open a discussion on python-ideas list or a list about asynchronous programming (I looked for "async-sig", but it seems like the list is gone?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 05:19:52 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 10 Oct 2019 09:19:52 +0000 Subject: [issue38416] test_largefile.TestSocketSendfile.test_it() failed with 15 min timeout on AMD64 FreeBSD 10-STABLE Non-Debug 3.x In-Reply-To: <1570569266.33.0.0795173642593.issue38416@roundup.psfhosted.org> Message-ID: <1570699192.85.0.805493478415.issue38416@roundup.psfhosted.org> Giampaolo Rodola' added the comment: Thanks. ---------- resolution: fixed -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 05:21:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 09:21:05 +0000 Subject: [issue38416] test_largefile.TestSocketSendfile.test_it() failed with 15 min timeout on AMD64 FreeBSD 10-STABLE Non-Debug 3.x In-Reply-To: <1570569266.33.0.0795173642593.issue38416@roundup.psfhosted.org> Message-ID: <1570699265.65.0.654849900025.issue38416@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 05:31:05 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 10 Oct 2019 09:31:05 +0000 Subject: [issue38429] Failed to compile with --enable-framework on macOS on master In-Reply-To: <1570697231.32.0.587121640762.issue38429@roundup.psfhosted.org> Message-ID: <1570699865.75.0.334403774696.issue38429@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 05:41:34 2019 From: report at bugs.python.org (Evgeny Nizhibitsky) Date: Thu, 10 Oct 2019 09:41:34 +0000 Subject: [issue38430] Memory leak in ThreadPoolExecutor + run_in_executor Message-ID: <1570700494.14.0.073826419802.issue38430@roundup.psfhosted.org> New submission from Evgeny Nizhibitsky : I have run into a memory leak caused by using run_in_executor + ThreadPoolExecutor while running some stability tests with custom web services. It was 1 MB leaked for 1k requests made for my case and I've extracted the root cause and converted it into minimal script with both mentioned parts + just NOP function to "run". The script can easily eat up to 1 GB of memory in less then 1 minute now. It uses external psutil library to report the memory allocated but it can be easily commented out and the leak will stay anyway. One can found that script attached + Dockerfile/Makefile for reproducibility. I've also reproduced it in my own conda-based 3.7 environment as well as the master branch of cpython. ---------- components: asyncio files: python-leak.zip messages: 354351 nosy: Evgeny Nizhibitsky, asvetlov, yselivanov priority: normal severity: normal status: open title: Memory leak in ThreadPoolExecutor + run_in_executor type: resource usage versions: Python 3.6, Python 3.7, Python 3.9 Added file: https://bugs.python.org/file48654/python-leak.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 05:52:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 09:52:38 +0000 Subject: [issue38430] Memory leak in ThreadPoolExecutor + run_in_executor In-Reply-To: <1570700494.14.0.073826419802.issue38430@roundup.psfhosted.org> Message-ID: <1570701158.11.0.627231041645.issue38430@roundup.psfhosted.org> STINNER Victor added the comment: Well, that's a common issue when using asyncio: you forgot await. async def main(_loop): while True: with futures.ThreadPoolExecutor() as pool: _loop.run_in_executor(pool, nop) sys.stdout.write(f'\r{get_mem():0.3f}MB') It should be: "await _loop.run_in_executor(pool, nop)" ;-) Sadly, PYTHONASYNCIODEBUG=1 env var doesn't complain on this bug. See: https://docs.python.org/dev/library/asyncio-dev.html#debug-mode ---------- nosy: +vstinner resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 05:54:09 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 10 Oct 2019 09:54:09 +0000 Subject: [issue38430] Memory leak in ThreadPoolExecutor + run_in_executor In-Reply-To: <1570700494.14.0.073826419802.issue38430@roundup.psfhosted.org> Message-ID: <1570701249.18.0.705081241042.issue38430@roundup.psfhosted.org> Andrew Svetlov added the comment: You MUST await a future returned from `loop.run_in_executor()` to avoid the leak. Yuri, what should we do with the issue? I see the second similar report in the last half of the year. Sure, we can add weakrefs somewhere in futures._chain_future() but I pretty sure that the proper fix is just enforcing `await` here, e.g. 1. rename existing run_in_executor() into a private _run_in_executor() function. 2. write async trampoline: async def run_in_executor(self, executor, func, *args): return await self._run_in_executor(executor, func, *args) ---------- nosy: -vstinner resolution: not a bug -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 05:54:51 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 10 Oct 2019 09:54:51 +0000 Subject: [issue38430] Memory leak in ThreadPoolExecutor + run_in_executor In-Reply-To: <1570700494.14.0.073826419802.issue38430@roundup.psfhosted.org> Message-ID: <1570701291.32.0.526656344521.issue38430@roundup.psfhosted.org> Andrew Svetlov added the comment: Victor answered the first :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 05:55:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 09:55:34 +0000 Subject: [issue38430] Memory leak in ThreadPoolExecutor + run_in_executor In-Reply-To: <1570700494.14.0.073826419802.issue38430@roundup.psfhosted.org> Message-ID: <1570701334.61.0.0467263739299.issue38430@roundup.psfhosted.org> STINNER Victor added the comment: > Yuri, what should we do with the issue? A Task emits a warning when it's not awaited. Can a Task be used instead of a Future in run_in_executor()? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 06:00:52 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 10 Oct 2019 10:00:52 +0000 Subject: [issue38430] Memory leak in ThreadPoolExecutor + run_in_executor In-Reply-To: <1570700494.14.0.073826419802.issue38430@roundup.psfhosted.org> Message-ID: <1570701652.38.0.598253925459.issue38430@roundup.psfhosted.org> Andrew Svetlov added the comment: > Can a Task be used instead of a Future in run_in_executor()? I don't think that the task is required here. The problem is that run_in_executor is a function that returns asyncio future; that is in turn a wrapper around concurrent future object. If we convert run_in_executor() into async function we'll get a warning about unawaited coroutine even without asyncio debug mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 06:02:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 10:02:05 +0000 Subject: [issue38430] Memory leak in ThreadPoolExecutor + run_in_executor In-Reply-To: <1570700494.14.0.073826419802.issue38430@roundup.psfhosted.org> Message-ID: <1570701725.36.0.847856028622.issue38430@roundup.psfhosted.org> STINNER Victor added the comment: > If we convert run_in_executor() into async function we'll get a warning about unawaited coroutine even without asyncio debug mode. That sounds like a good solution :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 06:02:49 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 10 Oct 2019 10:02:49 +0000 Subject: [issue38430] Memory leak in ThreadPoolExecutor + run_in_executor In-Reply-To: <1570700494.14.0.073826419802.issue38430@roundup.psfhosted.org> Message-ID: <1570701769.25.0.00433262406968.issue38430@roundup.psfhosted.org> Andrew Svetlov added the comment: The change is slightly not backward compatible but 1. It's pretty visible. In the worst-case instead of the memory leak people see a RuntimeWarning 2. We did it already for a part of API, e.g. loop.sock_read() and family ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 06:10:48 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 10:10:48 +0000 Subject: [issue38429] Failed to compile with --enable-framework on macOS on master In-Reply-To: <1570697231.32.0.587121640762.issue38429@roundup.psfhosted.org> Message-ID: <1570702248.92.0.089603851473.issue38429@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +16282 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16695 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 06:10:48 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 10:10:48 +0000 Subject: [issue38353] Cleanup the path configuration implementation code (getpath.c) In-Reply-To: <1570050763.22.0.787922067096.issue38353@roundup.psfhosted.org> Message-ID: <1570702248.83.0.524216205925.issue38353@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16281 pull_request: https://github.com/python/cpython/pull/16695 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 06:11:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 10:11:35 +0000 Subject: [issue38429] Failed to compile with --enable-framework on macOS on master In-Reply-To: <1570697231.32.0.587121640762.issue38429@roundup.psfhosted.org> Message-ID: <1570702295.42.0.0164506535942.issue38429@roundup.psfhosted.org> STINNER Victor added the comment: Oh, I expected that we had macOS buildbots building Python with --enable-framework. Thanks for the reporting the issue. I wrote PR 16695 which should fix the issue, but I cannot test my fix right now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 06:38:17 2019 From: report at bugs.python.org (Evgeny Nizhibitsky) Date: Thu, 10 Oct 2019 10:38:17 +0000 Subject: [issue38430] Memory leak in ThreadPoolExecutor + run_in_executor In-Reply-To: <1570700494.14.0.073826419802.issue38430@roundup.psfhosted.org> Message-ID: <1570703897.35.0.779664640715.issue38430@roundup.psfhosted.org> Evgeny Nizhibitsky added the comment: Oh, I see that in the initial code with leakage (it was heavy ThreadPoolExecutor + xgboost thing) there was an await but I must have lost it somewhere while reducing it to the minimal example and finished in the wrong direction. Glad too see that it raised a discussion to prevent others from getting into this silent trap. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 06:54:58 2019 From: report at bugs.python.org (Haruka Ma) Date: Thu, 10 Oct 2019 10:54:58 +0000 Subject: [issue38429] Failed to compile with --enable-framework on macOS on master In-Reply-To: <1570697231.32.0.587121640762.issue38429@roundup.psfhosted.org> Message-ID: <1570704898.71.0.339555461112.issue38429@roundup.psfhosted.org> Haruka Ma added the comment: I'm now getting double free on the same function: https://pastebin.com/zHWCtTuV (with debug on) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 06:56:30 2019 From: report at bugs.python.org (Nathaniel Smith) Date: Thu, 10 Oct 2019 10:56:30 +0000 Subject: [issue32561] Add API to io objects for non-blocking reads/writes In-Reply-To: <1516068442.29.0.467229070634.issue32561@psf.upfronthosting.co.za> Message-ID: <1570704990.48.0.0102633260734.issue32561@roundup.psfhosted.org> Nathaniel Smith added the comment: The proposal is to be able to run io module operations in two modes: the regular one, and one where performing actual I/O is forbidden ? so if they go down the stack and can fulfill the operation from some in-memory buffer, great, they do that, and if not, they raise an error. It turns out that this is actually the right primitive to enable async disk access. That's the only target use case, and there's no IO loop involved. If you wanted to keep async disk access separate from the io module, then what we'd have to do is to create a fork of all the code in the io module, and add this feature to it. Which doesn't seem like a good design :-). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 07:11:41 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 10 Oct 2019 11:11:41 +0000 Subject: [issue32996] Improve What's New in 3.7 In-Reply-To: <1520251006.69.0.467229070634.issue32996@psf.upfronthosting.co.za> Message-ID: <1570705901.4.0.735562124778.issue32996@roundup.psfhosted.org> Ivan Levkivskyi added the comment: New changeset d47f0dd2e85ce032aebfedbde18cdb2e728fa79f by Ivan Levkivskyi (M. Eric Irrgang) in branch 'master': bpo-32996: Documentation fix-up. (GH-16646) https://github.com/python/cpython/commit/d47f0dd2e85ce032aebfedbde18cdb2e728fa79f ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 07:11:46 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 10 Oct 2019 11:11:46 +0000 Subject: [issue32996] Improve What's New in 3.7 In-Reply-To: <1520251006.69.0.467229070634.issue32996@psf.upfronthosting.co.za> Message-ID: <1570705906.66.0.351071178059.issue32996@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16283 pull_request: https://github.com/python/cpython/pull/16696 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 07:12:19 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 10 Oct 2019 11:12:19 +0000 Subject: [issue32996] Improve What's New in 3.7 In-Reply-To: <1520251006.69.0.467229070634.issue32996@psf.upfronthosting.co.za> Message-ID: <1570705939.61.0.31480137351.issue32996@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16284 pull_request: https://github.com/python/cpython/pull/16697 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 07:17:08 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 10 Oct 2019 11:17:08 +0000 Subject: [issue32996] Improve What's New in 3.7 In-Reply-To: <1520251006.69.0.467229070634.issue32996@psf.upfronthosting.co.za> Message-ID: <1570706228.16.0.583275081055.issue32996@roundup.psfhosted.org> miss-islington added the comment: New changeset ca012360b103f2ab1acfa506aed032b0ed9b105c by Miss Islington (bot) in branch '3.7': bpo-32996: Documentation fix-up. (GH-16646) https://github.com/python/cpython/commit/ca012360b103f2ab1acfa506aed032b0ed9b105c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 07:19:06 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 10 Oct 2019 11:19:06 +0000 Subject: [issue32996] Improve What's New in 3.7 In-Reply-To: <1520251006.69.0.467229070634.issue32996@psf.upfronthosting.co.za> Message-ID: <1570706346.9.0.747852945711.issue32996@roundup.psfhosted.org> miss-islington added the comment: New changeset baf8a9b03a56ce1ee2284763b267ff56ab4507fe by Miss Islington (bot) in branch '3.8': bpo-32996: Documentation fix-up. (GH-16646) https://github.com/python/cpython/commit/baf8a9b03a56ce1ee2284763b267ff56ab4507fe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 07:41:49 2019 From: report at bugs.python.org (Ned Batchelder) Date: Thu, 10 Oct 2019 11:41:49 +0000 Subject: [issue17894] Edits to descriptor howto In-Reply-To: <1367547112.04.0.920947702161.issue17894@psf.upfronthosting.co.za> Message-ID: <1570707709.62.0.828657352808.issue17894@roundup.psfhosted.org> Ned Batchelder added the comment: I think it's a bad precedent to have pages in the official docs that belong to a single author. If you want to maintain that kind of control, it should go on your blog. Part of the agreement for having material added to the official docs should be the understanding that they are fair game for community contributions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 07:59:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 11:59:52 +0000 Subject: [issue38429] Failed to compile with --enable-framework on macOS on master In-Reply-To: <1570697231.32.0.587121640762.issue38429@roundup.psfhosted.org> Message-ID: <1570708792.48.0.285949257744.issue38429@roundup.psfhosted.org> STINNER Victor added the comment: Hum, getpath.c seems to use deprecated APIs: ./Modules/getpath.c:1098:20: warning: 'NSModuleForSymbol' is deprecated: first deprecated in macOS 10.5 - dladdr() [-Wdeprecated-declarations] pythonModule = NSModuleForSymbol(NSLookupAndBindSymbol("_Py_Initialize")); ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/mach-o/dyld.h:193:21: note: 'NSModuleForSymbol' has been explicitly marked deprecated here extern NSModule NSModuleForSymbol(NSSymbol symbol) __API_UNAVAILABLE(ios, tvos, watchos) __OSX_DEPRECATED(10.1, 10.5, "dladdr()"); ^ ./Modules/getpath.c:1098:38: warning: 'NSLookupAndBindSymbol' is deprecated: first deprecated in macOS 10.4 - dlsym() [-Wdeprecated-declarations] pythonModule = NSModuleForSymbol(NSLookupAndBindSymbol("_Py_Initialize")); ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/mach-o/dyld.h:183:17: note: 'NSLookupAndBindSymbol' has been explicitly marked deprecated here extern NSSymbol NSLookupAndBindSymbol(const char* symbolName) __API_UNAVAILABLE(ios, tvos, watchos) __OSX_DEPRECATED(10... ^ ./Modules/getpath.c:1101:27: warning: 'NSLibraryNameForModule' is deprecated: first deprecated in macOS 10.5 [-Wdeprecated-declarations] const char* modPath = NSLibraryNameForModule(pythonModule); ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/mach-o/dyld.h:163:21: note: 'NSLibraryNameForModule' has been explicitly marked deprecated here extern const char* NSLibraryNameForModule(NSModule m) __API_UNAVAILABLE(ios, tvos, watchos) __OSX_DEPRECATED(10.1, 10.5, ""); ^ 3 warnings generated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 08:06:26 2019 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 10 Oct 2019 12:06:26 +0000 Subject: [issue14307] Make subclassing SocketServer simpler for non-blocking frameworks In-Reply-To: <1331767378.71.0.470789063251.issue14307@psf.upfronthosting.co.za> Message-ID: <1570709186.31.0.676925733301.issue14307@roundup.psfhosted.org> Kristj?n Valur J?nsson added the comment: Nice necro :) Socketserver is already subclassable and overridable for so many things. Hard to understand the reluctancy to _allow_ for a different way to handle accept timeouts. But this is also why I stopped contributing to core, because it turned out to be more about lobbying than anything else. Anyway this is already implemented in PythonClassic, so no need for me to push it upstream :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 09:42:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 13:42:36 +0000 Subject: [issue38353] Cleanup the path configuration implementation code (getpath.c) In-Reply-To: <1570050763.22.0.787922067096.issue38353@roundup.psfhosted.org> Message-ID: <1570714956.07.0.638906888976.issue38353@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b6e0fc74265db96fdd0e0b8151c768c583ad80f0 by Victor Stinner in branch 'master': bpo-38353: Fix typos in calculate_argv0_path_framework() (GH-16695) https://github.com/python/cpython/commit/b6e0fc74265db96fdd0e0b8151c768c583ad80f0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 09:42:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 13:42:36 +0000 Subject: [issue38429] Failed to compile with --enable-framework on macOS on master In-Reply-To: <1570697231.32.0.587121640762.issue38429@roundup.psfhosted.org> Message-ID: <1570714956.15.0.791322014207.issue38429@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b6e0fc74265db96fdd0e0b8151c768c583ad80f0 by Victor Stinner in branch 'master': bpo-38353: Fix typos in calculate_argv0_path_framework() (GH-16695) https://github.com/python/cpython/commit/b6e0fc74265db96fdd0e0b8151c768c583ad80f0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 09:43:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 13:43:11 +0000 Subject: [issue38429] Failed to compile with --enable-framework on macOS on master In-Reply-To: <1570697231.32.0.587121640762.issue38429@roundup.psfhosted.org> Message-ID: <1570714991.02.0.605798082084.issue38429@roundup.psfhosted.org> STINNER Victor added the comment: Thanks for the bug report Haruka Ma, it should now be fixed. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 09:47:27 2019 From: report at bugs.python.org (Ronan Lamy) Date: Thu, 10 Oct 2019 13:47:27 +0000 Subject: [issue38109] Missing constants in Lib/stat.py In-Reply-To: <1568208959.37.0.605416078815.issue38109@roundup.psfhosted.org> Message-ID: <1570715247.07.0.933768048108.issue38109@roundup.psfhosted.org> Ronan Lamy added the comment: Well, my interest in this is to reduce the divergence between PyPy and CPython, and, potentially, to help other implementations. So I actually care more about 3.7 than about 3.9, which I probably won't look at before 2021. That said, I don't *need* anything: the fix is already in PyPy and we'll carry it forward regardless of what CPython does. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 09:49:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 13:49:55 +0000 Subject: [issue14307] Make subclassing SocketServer simpler for non-blocking frameworks In-Reply-To: <1331767378.71.0.470789063251.issue14307@psf.upfronthosting.co.za> Message-ID: <1570715395.21.0.90719005641.issue14307@roundup.psfhosted.org> STINNER Victor added the comment: > Hard to understand the reluctancy to _allow_ for a different way to handle accept timeouts. But this is also why I stopped contributing to core, because it turned out to be more about lobbying than anything else. To get a change merged into Python, you need to find someone who wants to be responsible for it: not only merge the change, but also maintain the code later. I touched socketserver recently for my work on making the Python CI more reliable. It was not easy to get a review. I ended to merge the changes with no review (if I recall properly). I dislike socketserver design: it tries to be too generic. Like supporting TCP and UDP, support threading and forking models, etc. To be honest, I didn't look at your issue. I only close it for bug triage, since there was no activity since 2016 and 2 core devs were against the change. And you want to revisit the change, please reopen the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 09:50:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 13:50:37 +0000 Subject: [issue38109] Missing constants in Lib/stat.py In-Reply-To: <1568208959.37.0.605416078815.issue38109@roundup.psfhosted.org> Message-ID: <1570715437.02.0.0453614153848.issue38109@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8ab11c433a81b6c7ef84a66e36fbe199915e2ff6 by Victor Stinner (Miss Islington (bot)) in branch '3.8': bpo-38109: Add missing constants to Lib/stat.py (GH-16665) (GH-16690) https://github.com/python/cpython/commit/8ab11c433a81b6c7ef84a66e36fbe199915e2ff6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 09:50:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 13:50:42 +0000 Subject: [issue38109] Missing constants in Lib/stat.py In-Reply-To: <1568208959.37.0.605416078815.issue38109@roundup.psfhosted.org> Message-ID: <1570715442.01.0.230371972347.issue38109@roundup.psfhosted.org> STINNER Victor added the comment: New changeset f5ed41c1ae9a575e965d55c6a5e86fb59181eee8 by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-38109: Add missing constants to Lib/stat.py (GH-16665) (GH-16691) https://github.com/python/cpython/commit/f5ed41c1ae9a575e965d55c6a5e86fb59181eee8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 09:52:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 13:52:05 +0000 Subject: [issue38109] Missing constants in Lib/stat.py In-Reply-To: <1568208959.37.0.605416078815.issue38109@roundup.psfhosted.org> Message-ID: <1570715525.74.0.00107539595109.issue38109@roundup.psfhosted.org> STINNER Victor added the comment: I understand that backporting the change up to 3.7 makes your life easier, so I merged it. The change is safe and should not affect the regular use case (when the C extension _stat is used). Thanks Ronan for this nice enhancement. It's good to see the stat module respect the PEP 399 ;-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 09:59:51 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 10 Oct 2019 13:59:51 +0000 Subject: [issue38429] Failed to compile with --enable-framework on macOS on master In-Reply-To: <1570697231.32.0.587121640762.issue38429@roundup.psfhosted.org> Message-ID: <1570715991.26.0.938454954917.issue38429@roundup.psfhosted.org> Ronald Oussoren added the comment: W.r.t. the deprecated APIs in getpath.c: Issue15498 That issue contains an ancient patch to switch to non-deprecated APIs, but we haven't had time yet to fully test these. The issue also mentions that Apple's install of Python already switched away from the deprecated APIs, but had some issues at the time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 10:02:14 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 14:02:14 +0000 Subject: [issue15498] Eliminate the use of deprecated OS X APIs in getpath.c In-Reply-To: <1343633664.98.0.256476653975.issue15498@psf.upfronthosting.co.za> Message-ID: <1570716134.29.0.00372303149194.issue15498@roundup.psfhosted.org> STINNER Victor added the comment: The deprecation warnings are not fixed yet. They were quickly mentioned at: https://bugs.python.org/issue38429#msg354367 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 10:07:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 14:07:02 +0000 Subject: [issue38353] Cleanup the path configuration implementation code (getpath.c) In-Reply-To: <1570050763.22.0.787922067096.issue38353@roundup.psfhosted.org> Message-ID: <1570716422.3.0.137811254357.issue38353@roundup.psfhosted.org> STINNER Victor added the comment: I created this issue to attempt to modify _PyPathConfig to use PyWideStringList for module_search_paths, to support ":" character in a path. It would fix bpo-31210. See also bpo-12989. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 10:08:22 2019 From: report at bugs.python.org (Ronan Lamy) Date: Thu, 10 Oct 2019 14:08:22 +0000 Subject: [issue38109] Missing constants in Lib/stat.py In-Reply-To: <1568208959.37.0.605416078815.issue38109@roundup.psfhosted.org> Message-ID: <1570716502.71.0.0180284005663.issue38109@roundup.psfhosted.org> Ronan Lamy added the comment: Thanks Victor! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 10:11:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 14:11:53 +0000 Subject: [issue38367] test_regrtest hanged on AMD64 Windows10 3.x In-Reply-To: <1570147821.98.0.530432590053.issue38367@roundup.psfhosted.org> Message-ID: <1570716713.04.0.0484335998381.issue38367@roundup.psfhosted.org> STINNER Victor added the comment: I hope that this bug has been fixed by my latest fix for bpo-37531. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 10:12:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 14:12:47 +0000 Subject: [issue38339] [3.5] The doc job of Travis CI fails on Python 3.5: needs at least Sphinx v1.8 In-Reply-To: <1569936050.09.0.437024380138.issue38339@roundup.psfhosted.org> Message-ID: <1570716767.04.0.017558281597.issue38339@roundup.psfhosted.org> STINNER Victor added the comment: Larry merged my fix: commit edd9bc9cc99c919bdc87e5955ec8ad93c295fbe2 Author: Victor Stinner Date: Tue Oct 8 19:12:21 2019 +0200 [3.7] Doc: Bump sphinx. (GH-10676) (GH-10803) (#16522) (cherry picked from commit 2db96ae7444880d66d4ef65abab8a5e6ff328711) Co-authored-by: Julien Palard (cherry picked from commit 23a98abd4256f931ed89b65ec6babd4f06dbff97) The doc of job Travis CI is back to green ;-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 10:35:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 14:35:33 +0000 Subject: [issue38282] socketmodule.c: _FORTIFY_SOURCE=2 warning in AF_ALG case of getsockaddrarg() In-Reply-To: <1569460305.42.0.728817437513.issue38282@roundup.psfhosted.org> Message-ID: <1570718133.53.0.655159673132.issue38282@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +16285 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16698 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 10:40:24 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 10 Oct 2019 14:40:24 +0000 Subject: [issue37972] unittest.mock.call does not chain __getitem__ to another _Call object In-Reply-To: <1567024381.55.0.529292089661.issue37972@roundup.psfhosted.org> Message-ID: <1570718424.32.0.74419691462.issue37972@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Closing as fixed since PRs were merged. Thanks Ben. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 10:44:01 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 10 Oct 2019 14:44:01 +0000 Subject: [issue38230] A Path Traversal vulnerability in test/ssl_servers.py In-Reply-To: <1568983665.6.0.164381465993.issue38230@roundup.psfhosted.org> Message-ID: <1570718641.54.0.162037934108.issue38230@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I would propose closing since it's meant for tests and not for end users. I am also not sure if one of the tests depend on this behavior. Adding Victor as friendly ping since it's tagged as security. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 10:46:24 2019 From: report at bugs.python.org (Sylvain Marie) Date: Thu, 10 Oct 2019 14:46:24 +0000 Subject: [issue36553] inspect.is_decorator_call(frame) In-Reply-To: <1554711715.55.0.758701327001.issue36553@roundup.psfhosted.org> Message-ID: <1570718784.89.0.760123357386.issue36553@roundup.psfhosted.org> Sylvain Marie added the comment: Quick update on this feature: for the following example to work: from inspect import is_decorator_call def set_hello_tag(tag='world'): if is_decorator_call(): # called without parenthesis! # the decorated object is `tag` return set_hello_tag()(tag) # note that `is_decorator_call` should not return True for this call else: def decorate(f): setattr(f, 'hello', tag) # set a hello tag on the decorated f return f return decorate Then `is_decorator_call` should be callable without arguments (default to current frame) and should return `True` only if the current frame is the one directly following decorator application. In nested frames (such as the one obtained after first recursive call to `set_hello_tag` above, `is_decorator_call` should return `False`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 10:55:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 14:55:38 +0000 Subject: [issue38230] A Path Traversal vulnerability in test/ssl_servers.py In-Reply-To: <1568983665.6.0.164381465993.issue38230@roundup.psfhosted.org> Message-ID: <1570719338.01.0.370641047292.issue38230@roundup.psfhosted.org> STINNER Victor added the comment: Lib/test/ssl_servers.py is an internal test helper and not designed to be used by any end-user. Don't use it ;-) ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 11:23:12 2019 From: report at bugs.python.org (Benoit Hudson) Date: Thu, 10 Oct 2019 15:23:12 +0000 Subject: [issue37931] crash reimporting posix after Py_Finalize on mac In-Reply-To: <1566574787.75.0.458129578699.issue37931@roundup.psfhosted.org> Message-ID: <1570720992.75.0.88984409332.issue37931@roundup.psfhosted.org> Benoit Hudson added the comment: Ping! The patch has been ready for review for over a month. If the patch can be backported to 2.7.x before that gets end-of-lifed it would be ideal. ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 11:31:02 2019 From: report at bugs.python.org (Samuel Colvin) Date: Thu, 10 Oct 2019 15:31:02 +0000 Subject: [issue38431] dataclasses.InitVar breaks with typing.Optional Message-ID: <1570721462.15.0.939525387822.issue38431@roundup.psfhosted.org> New submission from Samuel Colvin : The following code works fine with python 3.7 but breaks with 3.8: ``` import dataclasses from typing import Optional @dataclasses.dataclass class TestingDataclass: base_path: dataclasses.InitVar[Optional[str]] = None ``` Exception traceback: ``` Traceback (most recent call last): File "test.py", line 6, in class TestingDataclass: File "/usr/local/lib/python3.8/dataclasses.py", line 995, in dataclass return wrap(cls) File "/usr/local/lib/python3.8/dataclasses.py", line 987, in wrap return _process_class(cls, init, repr, eq, order, unsafe_hash, frozen) File "/usr/local/lib/python3.8/dataclasses.py", line 967, in _process_class str(inspect.signature(cls)).replace(' -> None', '')) File "/usr/local/lib/python3.8/inspect.py", line 3050, in __str__ formatted = str(param) File "/usr/local/lib/python3.8/inspect.py", line 2568, in __str__ formatannotation(self._annotation)) File "/usr/local/lib/python3.8/inspect.py", line 1202, in formatannotation return repr(annotation) File "/usr/local/lib/python3.8/dataclasses.py", line 213, in __repr__ return f'dataclasses.InitVar[{self.type.__name__}]' File "/usr/local/lib/python3.8/typing.py", line 757, in __getattr__ raise AttributeError(attr) AttributeError: __name__ ``` The code runs fine with `str` instead of `Optional[str]`. Tested locally with `Python 3.8.0rc1 (tags/v3.8.0rc1:34214de6ab, Oct 10 2019, 16:15:14)`. The same error can be seen (in a more involved context) on travis [here](https://travis-ci.org/samuelcolvin/pydantic/jobs/596131963) ---------- components: Library (Lib) messages: 354388 nosy: samuelcolvin priority: normal severity: normal status: open title: dataclasses.InitVar breaks with typing.Optional type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 11:46:54 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 10 Oct 2019 15:46:54 +0000 Subject: [issue38431] dataclasses.InitVar breaks with typing.Optional In-Reply-To: <1570721462.15.0.939525387822.issue38431@roundup.psfhosted.org> Message-ID: <1570722414.73.0.316668875895.issue38431@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 11:47:32 2019 From: report at bugs.python.org (Samuel Colvin) Date: Thu, 10 Oct 2019 15:47:32 +0000 Subject: [issue38431] dataclasses.InitVar breaks with typing.Optional In-Reply-To: <1570721462.15.0.939525387822.issue38431@roundup.psfhosted.org> Message-ID: <1570722452.01.0.638313368542.issue38431@roundup.psfhosted.org> Samuel Colvin added the comment: This is a bug with the `__repr__` method on `InitVar`. I'm working on a PR now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 11:51:50 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 10 Oct 2019 15:51:50 +0000 Subject: [issue38431] dataclasses.InitVar breaks with typing.Optional In-Reply-To: <1570721462.15.0.939525387822.issue38431@roundup.psfhosted.org> Message-ID: <1570722710.92.0.390127145817.issue38431@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: git blame points to https://github.com/python/cpython/commit/01ee12ba35a333e8a6a25c4153c4a21838e9585c . I am tagging this as a 3.8 regression since the commit was not backported and 3.7 works fine. Feel free to remove it if it's a mistake. ---------- keywords: +3.8regression nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 12:00:41 2019 From: report at bugs.python.org (Samuel Colvin) Date: Thu, 10 Oct 2019 16:00:41 +0000 Subject: [issue38431] dataclasses.InitVar breaks with typing.Optional In-Reply-To: <1570721462.15.0.939525387822.issue38431@roundup.psfhosted.org> Message-ID: <1570723241.85.0.40844368587.issue38431@roundup.psfhosted.org> Change by Samuel Colvin : ---------- keywords: +patch pull_requests: +16286 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16700 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 12:01:41 2019 From: report at bugs.python.org (Behzad Seyfi) Date: Thu, 10 Oct 2019 16:01:41 +0000 Subject: [issue38432] ZeroDivisionError when inf is expected Message-ID: <1570723301.17.0.789552752187.issue38432@roundup.psfhosted.org> New submission from Behzad Seyfi : >>> 1/1e-323 inf >>> 1/1e-324 Traceback (most recent call last): File "", line 1, in ZeroDivisionError: float division by zero in a 1/x fraction, up to x = 1e-324 it is inf but when x = 1e-325 or little it throws ZeroDivisionError. It is not acceptable and accountable behaviour for inf definition. ---------- components: Interpreter Core messages: 354391 nosy: Behzad Seyfi priority: normal severity: normal status: open title: ZeroDivisionError when inf is expected type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 12:06:56 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 10 Oct 2019 16:06:56 +0000 Subject: [issue38431] dataclasses.InitVar breaks with typing.Optional In-Reply-To: <1570721462.15.0.939525387822.issue38431@roundup.psfhosted.org> Message-ID: <1570723616.04.0.788465301186.issue38431@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +16287 pull_request: https://github.com/python/cpython/pull/16701 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 12:08:49 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 10 Oct 2019 16:08:49 +0000 Subject: [issue38431] dataclasses.InitVar breaks with typing.Optional In-Reply-To: <1570721462.15.0.939525387822.issue38431@roundup.psfhosted.org> Message-ID: <1570723729.33.0.299834044495.issue38431@roundup.psfhosted.org> Serhiy Storchaka added the comment: Oh, Samuel already made a PR. Then I withdraw PR 16701. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 12:09:46 2019 From: report at bugs.python.org (Samuel Colvin) Date: Thu, 10 Oct 2019 16:09:46 +0000 Subject: [issue38431] dataclasses.InitVar breaks with typing.Optional In-Reply-To: <1570721462.15.0.939525387822.issue38431@roundup.psfhosted.org> Message-ID: <1570723786.52.0.344719270564.issue38431@roundup.psfhosted.org> Change by Samuel Colvin : ---------- pull_requests: +16288 pull_request: https://github.com/python/cpython/pull/16702 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 12:10:15 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 10 Oct 2019 16:10:15 +0000 Subject: [issue38428] Can't gracefully ctrl+C multiprocessing pool on Python3 & Windows In-Reply-To: <1570696551.92.0.213022823921.issue38428@roundup.psfhosted.org> Message-ID: <1570723815.75.0.654181858229.issue38428@roundup.psfhosted.org> Steve Dower added the comment: I think you're right about that change touching the right code, but I'm pretty sure it wasn't working before either. (Python 2.7 had totally different code, IIRC.) But the good news is that we should be able to use code similar to what's in Modules/timemodule.c#L1878 (the pysleep() function) to also wait on the event we use to emulate signals on Windows. But perhaps there's a reason Antoine (nosied) didn't do that originally? ---------- nosy: +davin, pitrou stage: -> test needed type: -> behavior versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 12:17:42 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 10 Oct 2019 16:17:42 +0000 Subject: [issue38433] 2.7.17rc1 tcl/tk version regression on Windows Message-ID: <1570724262.85.0.67744981479.issue38433@roundup.psfhosted.org> New submission from Terry J. Reedy : In my current 2.7.16+ Windows 10-64 repository build, and on at least one 8.1-64 buildbot, the tcl/tk version is 8.5.19 >>> tk.Tk().tk.call('info', 'patchlevel') '8.5.19' In my installed 2.7.17rc1, it is the older 8.5.15. It would seem to me that we should install the same latest 8.5 bugfix release that we test with. (Or test with what we release ;-) I presume the discrepancy is unintended due to an incomplete final 2.7 tcl/tk update. ---------- components: Build, Tkinter messages: 354394 nosy: benjamin.peterson, serhiy.storchaka, terry.reedy, zach.ware priority: release blocker severity: normal status: open title: 2.7.17rc1 tcl/tk version regression on Windows versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 12:19:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 16:19:04 +0000 Subject: [issue38432] ZeroDivisionError when inf is expected In-Reply-To: <1570723301.17.0.789552752187.issue38432@roundup.psfhosted.org> Message-ID: <1570724344.03.0.528673906499.issue38432@roundup.psfhosted.org> STINNER Victor added the comment: That's not a bug: 64-bit float of IEEE 754 rounds 1e-324 to 0.0. vstinner at apu$ python3 Python 3.7.4 (default, Jul 9 2019, 16:32:37) [GCC 9.1.1 20190503 (Red Hat 9.1.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> 1e-324 0.0 >>> import sys >>> sys.float_info sys.float_info(max=1.7976931348623157e+308, max_exp=1024, max_10_exp=308, min=2.2250738585072014e-308, min_exp=-1021, min_10_exp=-307, dig=15, mant_dig=53, epsilon=2.220446049250313e-16, radix=2, rounds=1) >>> sys.float_info.min 2.2250738585072014e-308 >>> sys.float_info.min.hex() '0x1.0000000000000p-1022' >>> 1/0.0 Traceback (most recent call last): File "", line 1, in ZeroDivisionError: float division by zero >>> 1/1e-324 Traceback (most recent call last): File "", line 1, in ZeroDivisionError: float division by zero ---------- nosy: +vstinner resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 12:25:03 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 10 Oct 2019 16:25:03 +0000 Subject: [issue38434] sys.addaudithook event is not documented Message-ID: <1570724703.62.0.219483741722.issue38434@roundup.psfhosted.org> New submission from Steve Dower : The sys.addaudithook raises an audit event 'sys.addaudithook'. The docs for the function refer to the event, as it has slightly different semantics than most, but it is not named explicitly and does not appear in the table of events. ---------- assignee: docs at python components: Documentation messages: 354396 nosy: docs at python, steve.dower priority: normal severity: normal stage: needs patch status: open title: sys.addaudithook event is not documented type: enhancement versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 13:11:00 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Thu, 10 Oct 2019 17:11:00 +0000 Subject: [issue38014] Python 3.7 does not compile In-Reply-To: <1567477987.66.0.578307493025.issue38014@roundup.psfhosted.org> Message-ID: <1570727460.77.0.824220825634.issue38014@roundup.psfhosted.org> Change by Chih-Hsuan Yen : ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 14:15:32 2019 From: report at bugs.python.org (Ned Batchelder) Date: Thu, 10 Oct 2019 18:15:32 +0000 Subject: [issue17894] Edits to descriptor howto In-Reply-To: <1367547112.04.0.920947702161.issue17894@psf.upfronthosting.co.za> Message-ID: <1570731332.42.0.0256959983324.issue17894@roundup.psfhosted.org> Change by Ned Batchelder : ---------- resolution: rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 14:18:17 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 10 Oct 2019 18:18:17 +0000 Subject: [issue38435] Start the deprecation cycle for subprocess preexec_fn Message-ID: <1570731497.4.0.313201495913.issue38435@roundup.psfhosted.org> New submission from Gregory P. Smith : subprocess's preexec_fn feature needs to enter PendingDeprecationWarning state in 3.9, to become a DeprecationWarning in 3.10, with a goal of removing it in 3.11. Rationale: We now live in a world full of threads, it is entirely unsafe to call back into the python interpreter within the forked child before exec per POSIX specification. We've also already made preexec_fn no longer supported from CPython subinterpreters in 3.8. If there are not already issues open for desired features of subprocess that do not yet have replacements or workarounds for *specific* actions that preexec_fn is being used for in your application, please open feature requests for those. (ex: calling umask is https://bugs.python.org/issue38417, and group, uid, gid setting has already landed in 3.9) ---------- assignee: gregory.p.smith messages: 354397 nosy: gregory.p.smith priority: normal severity: normal stage: needs patch status: open title: Start the deprecation cycle for subprocess preexec_fn type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 14:25:51 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 10 Oct 2019 18:25:51 +0000 Subject: [issue38417] Add support for settting umask in subprocess children In-Reply-To: <1570575339.67.0.686572067981.issue38417@roundup.psfhosted.org> Message-ID: <1570731951.3.0.800765251372.issue38417@roundup.psfhosted.org> Gregory P. Smith added the comment: preexec_fn has been mentally and advisability deprecated for years. :) I'll mark it officially with pending deprecation in 3.9 destined to be removed in 3.11. tracking that in its own rollup issue https://bugs.python.org/issue38435 As far as posix_spawn goes, I expect these kinds of between fork+exec features to be something that prevents posix_spawn from being usable. As are many other things. People who want to use posix_spawn will need to know that and seek to avoid those. That's a documentation issue first and foremost. Our existing POpen API is very old and wasn't designed to make that nice. A new API could be made that *only* supports posix_spawn available features if you want an entrypoint that encourages the generally lower latency posix_spawn path. (A subprocess.spawn function similar to subprocess.run perhaps?) That should be taken up within its own enhancement issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 15:16:04 2019 From: report at bugs.python.org (Brandt Bucher) Date: Thu, 10 Oct 2019 19:16:04 +0000 Subject: [issue38436] Improved performance for list addition. Message-ID: <1570734964.11.0.75032337331.issue38436@roundup.psfhosted.org> New submission from Brandt Bucher : The attached PR adds a fast path for BINARY_ADD instructions involving two lists, where the left list has a refcount of exactly 1. In this case, we instead do a PySequence_InPlaceConcat operation. This has the affect of avoiding quadratic complexity for list summations, by keeping only one intermediate result and extending it in-place. For (potentially large) lists: a + b + c + d ... Currently executed as: tmp = a + b tmp = tmp + c tmp = tmp + d ... With this change: tmp = a + b tmp += c tmp += d ... Here are the pyperformance results (optimizations enabled): Slower (6): - pickle_list: 3.63 us +- 0.08 us -> 3.78 us +- 0.10 us: 1.04x slower (+4%) - xml_etree_generate: 102 ms +- 2 ms -> 104 ms +- 3 ms: 1.02x slower (+2%) - xml_etree_parse: 166 ms +- 4 ms -> 169 ms +- 9 ms: 1.02x slower (+2%) - scimark_sparse_mat_mult: 5.42 ms +- 0.11 ms -> 5.47 ms +- 0.16 ms: 1.01x slower (+1%) - pickle_dict: 23.6 us +- 0.8 us -> 23.8 us +- 0.4 us: 1.01x slower (+1%) - scimark_fft: 413 ms +- 6 ms -> 416 ms +- 6 ms: 1.01x slower (+1%) Faster (25): - 2to3: 394 ms +- 18 ms -> 381 ms +- 8 ms: 1.03x faster (-3%) - python_startup_no_site: 12.0 ms +- 0.2 ms -> 11.7 ms +- 0.2 ms: 1.03x faster (-3%) - nqueens: 121 ms +- 2 ms -> 118 ms +- 3 ms: 1.03x faster (-2%) - pathlib: 36.0 ms +- 1.3 ms -> 35.1 ms +- 0.9 ms: 1.02x faster (-2%) - pickle_pure_python: 523 us +- 15 us -> 511 us +- 13 us: 1.02x faster (-2%) - deltablue: 8.54 ms +- 0.25 ms -> 8.35 ms +- 0.27 ms: 1.02x faster (-2%) - logging_silent: 220 ns +- 6 ns -> 215 ns +- 8 ns: 1.02x faster (-2%) - raytrace: 566 ms +- 8 ms -> 554 ms +- 11 ms: 1.02x faster (-2%) - hexiom: 11.2 ms +- 0.3 ms -> 11.0 ms +- 0.2 ms: 1.02x faster (-2%) - go: 294 ms +- 6 ms -> 288 ms +- 5 ms: 1.02x faster (-2%) - python_startup: 15.7 ms +- 0.4 ms -> 15.4 ms +- 0.5 ms: 1.02x faster (-2%) - float: 136 ms +- 4 ms -> 134 ms +- 6 ms: 1.02x faster (-2%) - scimark_sor: 232 ms +- 8 ms -> 228 ms +- 5 ms: 1.02x faster (-2%) - fannkuch: 554 ms +- 8 ms -> 545 ms +- 9 ms: 1.02x faster (-2%) - meteor_contest: 115 ms +- 2 ms -> 113 ms +- 3 ms: 1.02x faster (-2%) - telco: 6.58 ms +- 0.22 ms -> 6.48 ms +- 0.15 ms: 1.02x faster (-2%) - regex_effbot: 3.76 ms +- 0.08 ms -> 3.70 ms +- 0.09 ms: 1.02x faster (-2%) - chaos: 129 ms +- 3 ms -> 127 ms +- 2 ms: 1.01x faster (-1%) - regex_v8: 26.3 ms +- 0.4 ms -> 25.9 ms +- 0.6 ms: 1.01x faster (-1%) - regex_compile: 200 ms +- 5 ms -> 197 ms +- 5 ms: 1.01x faster (-1%) - logging_simple: 9.78 us +- 0.19 us -> 9.65 us +- 0.26 us: 1.01x faster (-1%) - sqlite_synth: 3.24 us +- 0.10 us -> 3.20 us +- 0.06 us: 1.01x faster (-1%) - unpickle: 16.4 us +- 0.5 us -> 16.2 us +- 0.5 us: 1.01x faster (-1%) - logging_format: 10.8 us +- 0.2 us -> 10.7 us +- 0.3 us: 1.01x faster (-1%) - json_loads: 30.2 us +- 0.8 us -> 29.9 us +- 0.6 us: 1.01x faster (-1%) Benchmark hidden because not significant (14): json_dumps, nbody, pickle, pidigits, regex_dna, richards, scimark_lu, scimark_monte_carlo, spectral_norm, unpack_sequence, unpickle_list, unpickle_pure_python, xml_etree_iterparse, xml_etree_process This is related to my earlier work in bpo-36229, however this is a much less invasive change that's limited to ceval.c, where our knowledge of context is much better. ---------- components: Interpreter Core messages: 354399 nosy: brandtbucher priority: normal severity: normal status: open title: Improved performance for list addition. type: performance versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 15:16:24 2019 From: report at bugs.python.org (Brandt Bucher) Date: Thu, 10 Oct 2019 19:16:24 +0000 Subject: [issue36229] Avoid unnecessary copies for list, set, and bytearray ops. In-Reply-To: <1551994791.27.0.137413280424.issue36229@roundup.psfhosted.org> Message-ID: <1570734984.79.0.0349460384924.issue36229@roundup.psfhosted.org> Change by Brandt Bucher : ---------- pull_requests: +16290 pull_request: https://github.com/python/cpython/pull/16705 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 15:16:24 2019 From: report at bugs.python.org (Brandt Bucher) Date: Thu, 10 Oct 2019 19:16:24 +0000 Subject: [issue38436] Improved performance for list addition. In-Reply-To: <1570734964.11.0.75032337331.issue38436@roundup.psfhosted.org> Message-ID: <1570734984.73.0.018510953218.issue38436@roundup.psfhosted.org> Change by Brandt Bucher : ---------- keywords: +patch pull_requests: +16289 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16705 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 15:21:35 2019 From: report at bugs.python.org (Brandt Bucher) Date: Thu, 10 Oct 2019 19:21:35 +0000 Subject: [issue36229] Avoid unnecessary copies for list, set, and bytearray ops. In-Reply-To: <1551994791.27.0.137413280424.issue36229@roundup.psfhosted.org> Message-ID: <1570735295.48.0.417973402266.issue36229@roundup.psfhosted.org> Change by Brandt Bucher : ---------- pull_requests: -16290 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 15:30:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 19:30:23 +0000 Subject: [issue38282] socketmodule.c: _FORTIFY_SOURCE=2 warning in AF_ALG case of getsockaddrarg() In-Reply-To: <1569460305.42.0.728817437513.issue38282@roundup.psfhosted.org> Message-ID: <1570735823.67.0.756083096427.issue38282@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d565fb9828ee9c494bb7a80057a08e4738273e30 by Victor Stinner in branch 'master': bpo-38282: Rewrite getsockaddrarg() helper function (GH-16698) https://github.com/python/cpython/commit/d565fb9828ee9c494bb7a80057a08e4738273e30 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 15:30:31 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 10 Oct 2019 19:30:31 +0000 Subject: [issue38282] socketmodule.c: _FORTIFY_SOURCE=2 warning in AF_ALG case of getsockaddrarg() In-Reply-To: <1569460305.42.0.728817437513.issue38282@roundup.psfhosted.org> Message-ID: <1570735831.44.0.222605818338.issue38282@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16291 pull_request: https://github.com/python/cpython/pull/16706 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 15:39:02 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 10 Oct 2019 19:39:02 +0000 Subject: [issue38437] Set GC_DEBUG for debug builds of the interpreter Message-ID: <1570736342.37.0.0664122521403.issue38437@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : While working on bpo-38379 I had to manually set the GC_DEBUG macro to 1 to activate the extra checks that 'validate_list' does. These checks are super useful to make sure all the gc lists used are consistent and in the expected state with the expected masks. For this reason, I propose to always activate GC_DEBUG for debug builds of the interpreter. It will have a performance impact, but the debugging benefits are substantial. ---------- messages: 354401 nosy: pablogsal, vstinner priority: normal severity: normal status: open title: Set GC_DEBUG for debug builds of the interpreter versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 15:40:44 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 10 Oct 2019 19:40:44 +0000 Subject: [issue38437] Set GC_DEBUG for debug builds of the interpreter In-Reply-To: <1570736342.37.0.0664122521403.issue38437@roundup.psfhosted.org> Message-ID: <1570736444.02.0.728323000281.issue38437@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +16292 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16707 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 15:41:01 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 10 Oct 2019 19:41:01 +0000 Subject: [issue38437] Set GC_DEBUG for debug builds of the interpreter In-Reply-To: <1570736342.37.0.0664122521403.issue38437@roundup.psfhosted.org> Message-ID: <1570736461.87.0.287277285621.issue38437@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- stage: patch review -> versions: -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 16:24:39 2019 From: report at bugs.python.org (Bob Alexander) Date: Thu, 10 Oct 2019 20:24:39 +0000 Subject: [issue38438] argparse "usage" overly-complex with nargs="*" Message-ID: <1570739079.02.0.395133592841.issue38438@roundup.psfhosted.org> New submission from Bob Alexander : This program: import argparse ap = argparse.ArgumentParser() ap.add_argument("arg", nargs="*") ap.parse_args() Gives usage message: usage: help_complexity.py [-h] [arg [arg ...]] It's correct, but unnecessarily complex and challenging to the user. If I were manually writing the usage, arg... would do, or maybe [arg ...] to be consistent with other messages?? ---------- components: Library (Lib) messages: 354402 nosy: bobjalex priority: normal severity: normal status: open title: argparse "usage" overly-complex with nargs="*" type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 16:40:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 20:40:37 +0000 Subject: [issue38437] Set GC_DEBUG for debug builds of the interpreter In-Reply-To: <1570736342.37.0.0664122521403.issue38437@roundup.psfhosted.org> Message-ID: <1570740037.02.0.53988688402.issue38437@roundup.psfhosted.org> STINNER Victor added the comment: Under which condition can such list be corrupted? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 16:44:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Oct 2019 20:44:47 +0000 Subject: [issue38435] Start the deprecation cycle for subprocess preexec_fn In-Reply-To: <1570731497.4.0.313201495913.issue38435@roundup.psfhosted.org> Message-ID: <1570740287.54.0.950174055176.issue38435@roundup.psfhosted.org> STINNER Victor added the comment: What is the recommanded way to replace preexec_fn? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 16:56:23 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 10 Oct 2019 20:56:23 +0000 Subject: [issue38437] Set GC_DEBUG for debug builds of the interpreter In-Reply-To: <1570736342.37.0.0664122521403.issue38437@roundup.psfhosted.org> Message-ID: <1570740983.4.0.749612033912.issue38437@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Under which condition can such list be corrupted? If someone is adding/modifiying the gc and calls any of the functions that set the gc flags like (PREV_MASK_COLLECTING). One example is that after calling move_unreachable(), the unreachable set has NEXT_MASK_UNREACHABLE and therefore is an invalid list (until move_legacy_finalizers removes the flag and makes it valid again). If you mess the order or violate any of the contract, the lists will be invalid. It helps a lot to know that you are not leaving the lists in invalid state by mistake or on the other hand, to check that they are valid when they are supposed to be valid. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 17:24:06 2019 From: report at bugs.python.org (Tim Peters) Date: Thu, 10 Oct 2019 21:24:06 +0000 Subject: [issue38437] Set GC_DEBUG for debug builds of the interpreter In-Reply-To: <1570736342.37.0.0664122521403.issue38437@roundup.psfhosted.org> Message-ID: <1570742646.84.0.43974787224.issue38437@roundup.psfhosted.org> Tim Peters added the comment: +1. This code got quite brittle when they decided to fit two pointers, a fat integer, and 3 flags into a struct with room for only the two pointers ;-) It's a mine field now. Enabling one of the few automated mine detectors is thoroughly sensible. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 17:31:38 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 10 Oct 2019 21:31:38 +0000 Subject: [issue38435] Start the deprecation cycle for subprocess preexec_fn In-Reply-To: <1570740287.54.0.950174055176.issue38435@roundup.psfhosted.org> Message-ID: Gregory P. Smith added the comment: With task specific arguments. cwd, start_new_session, group, extra_groups, user, etc.. We cannot provide a general do everything replacement and should not try. It not possible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 17:45:20 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 10 Oct 2019 21:45:20 +0000 Subject: [issue38437] Set GC_DEBUG for debug builds of the interpreter In-Reply-To: <1570736342.37.0.0664122521403.issue38437@roundup.psfhosted.org> Message-ID: <1570743920.49.0.599845547607.issue38437@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 320dd504ddf65efe946e6d1e89053ed2d7ebe1e9 by Pablo Galindo in branch 'master': bpo-38437: Activate GC_DEBUG when PY_DEBUG is set (GH-16707) https://github.com/python/cpython/commit/320dd504ddf65efe946e6d1e89053ed2d7ebe1e9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 17:49:20 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 10 Oct 2019 21:49:20 +0000 Subject: [issue38437] Set GC_DEBUG for debug builds of the interpreter In-Reply-To: <1570736342.37.0.0664122521403.issue38437@roundup.psfhosted.org> Message-ID: <1570744160.92.0.258347410345.issue38437@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 17:49:32 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 10 Oct 2019 21:49:32 +0000 Subject: [issue38437] Set GC_DEBUG for debug builds of the interpreter In-Reply-To: <1570736342.37.0.0664122521403.issue38437@roundup.psfhosted.org> Message-ID: <1570744172.35.0.397168903979.issue38437@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thanks Victor and Tim! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 17:55:33 2019 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 10 Oct 2019 21:55:33 +0000 Subject: [issue38438] argparse "usage" overly-complex with nargs="*" In-Reply-To: <1570739079.02.0.395133592841.issue38438@roundup.psfhosted.org> Message-ID: <1570744533.48.0.52127310983.issue38438@roundup.psfhosted.org> Eric V. Smith added the comment: I think [arg ...] would make sense. Removing 3.5 and 3.6, since they're in security only mode. Adding 3.9. ---------- nosy: +eric.smith versions: +Python 3.9 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 18:07:13 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 10 Oct 2019 22:07:13 +0000 Subject: [issue38436] Improved performance for list addition. In-Reply-To: <1570734964.11.0.75032337331.issue38436@roundup.psfhosted.org> Message-ID: <1570745233.43.0.000687727665718.issue38436@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: >From the PR: Where the benchmarks executed with CPU isolation? I am a bit suspicious of the - pickle_list: 3.63 us +- 0.08 us -> 3.78 us +- 0.10 us: 1.04x slower (+4%) If not, can you repeat them with CPU isolation and affinity? Check this for more info ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 18:10:20 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 10 Oct 2019 22:10:20 +0000 Subject: [issue36553] inspect.is_decorator_call(frame) In-Reply-To: <1554711715.55.0.758701327001.issue36553@roundup.psfhosted.org> Message-ID: <1570745420.08.0.0689161807735.issue36553@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 18:16:10 2019 From: report at bugs.python.org (Nathaniel Smith) Date: Thu, 10 Oct 2019 22:16:10 +0000 Subject: [issue32561] Add API to io objects for cache-only reads/writes In-Reply-To: <1516068442.29.0.467229070634.issue32561@psf.upfronthosting.co.za> Message-ID: <1570745770.56.0.312606268417.issue32561@roundup.psfhosted.org> Nathaniel Smith added the comment: > If you wanted to keep async disk access separate from the io module, then what we'd have to do is to create a fork of all the code in the io module, and add this feature to it. Thinking about this again today, I realized there *might* be another option. The tricky thing about supporting async file I/O is that users want the whole io module interface, and we don't want to have to reimplement all the functionality in TextIOWrapper, BufferedReader, BufferedWriter, etc. And we still need the blocking functionality too, for when we fall back to threads. But, here's a possible hack. We could implement our own version of 'FileIO' that wraps around a real FileIO. Every operation just delegates to the underlying FileIO ? but with a twist. Something like: def wrapped_op(self, *args): if self._cached_op.key == (op, args): return self._cached_op.result if MAGIC_THREAD_LOCAL.io_is_forbidden: def cache_filler(): MAGIC_THREAD_LOCAL.io_is_forbidden = False self._cached_op = self._real_file.op(*args) raise IOForbiddenError(cache_filler) return self._real_file.op(*args) And then in order to implement an async operation, we do something like: async def op(self, *args): while True: try: # First try fulfilling the operation from cache MAGIC_THREAD_LOCAL.io_is_forbidden = True return self._io_obj.op(*args) except IOForbiddenError as exc: # We have to actually hit the disk # Run the real IO operation in a thread, then try again await in_thread(cache_filler) finally: del MAGIC_THREAD_LOCAL.io_is_forbidden This is pretty convoluted: we keep trying the operation on the outer "buffered" object, seeing which low-level I/O operation it gets stuck on, doing that I/O operation, and trying again. There's all kinds of tricky non-local state here; like for example, there isn't any formal guarantee that the next time we try the "outer" I/O operation it will end up making exactly the same request to the "inner" RawIO object. If you try performing I/O operations on the same file from multiple tasks concurrently then you'll get all kinds of havoc. But if it works, then it does have two advantages: First, it doesn't require changes to the io module, which is at least nice for experimentation. And second, it's potentially compatible with the io_uring style of async disk I/O API. I don't actually know if this matters; if you look at the io_uring docs, the only reason they say they're more efficient than a thread pool is that they can do the equivalent of preadv(RWF_NOWAIT), and it's a lot easier to add preadv(RWF_NOWAIT) to a thread pool than it is to implement io_uring. But still, this approach is potentially more flexible than my original idea. We'd still have to reimplement open() in order to set up our weird custom IO stacks, but hopefully that's not *too* bad, since it's mostly just a bunch of if statements to decide which wrappers to stick around the raw IO object. My big concern is, that I'm not actually sure if this works :-). The thing is, for this to work, we need TextIOWrapper/BufferedReader/BufferedWriter to be very well-behaved when the underlying operation raises an exception. In particular, if they're doing a complex operation that requires multiple calls to the underlying object, and the second call raises an exception, they need to keep the first call's results in their buffer so that next time they can pick up where they left off. And I have no idea if that's true. I guess if you squint this is kind of like the non-blocking support in the io module ? IOForbiddenError is like NonBlockingError. The big difference is that here, we don't have any "partial success" state at the low-level; either we do the operation immediately, or we punt and do the operation in a thread. Either way it completes as a single indivisible unit. So that might simplify things? From a quick skim of issue13322 it sounds like a lot of the problems with the current "non-blocking" mode come from these partial success states, but I haven't read it in detail. ---------- title: Add API to io objects for non-blocking reads/writes -> Add API to io objects for cache-only reads/writes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 18:55:20 2019 From: report at bugs.python.org (Eryk Sun) Date: Thu, 10 Oct 2019 22:55:20 +0000 Subject: [issue38428] Can't gracefully ctrl+C multiprocessing pool on Python3 & Windows In-Reply-To: <1570696551.92.0.213022823921.issue38428@roundup.psfhosted.org> Message-ID: <1570748120.99.0.393079648968.issue38428@roundup.psfhosted.org> Eryk Sun added the comment: > Python 2.7 had totally different code, IIRC. In 2.7 the wait() method of threading._Condition implements the timeout with a loop the calls time.sleep() with an increasing delay from 500 microseconds up to 50 ms, and no more than the remaining time. > But the good news is that we should be able to use code similar to > what's in Modules/timemodule.c#L1878 (the pysleep() function) to also > wait on the event we use to emulate signals on Windows. If Python continues to use emulated condition variables, then the kernel wait in _PyCOND_WAIT_MS can easily be adapted to include the SIGINT event. However, isn't it planned at some point to remove the emulated condition-variable implementation in favor of native condition variables? If so and PyCOND_WAIT and PyCOND_TIMEDWAIT end up calling SleepConditionVariableSRW, there's no obvious way to interrupt this to support Ctrl+C and Ctrl+Break (given a custom SIGBREAK handler) in the main thread. In particular, in Windows 8+, SleepConditionVariableSRW begins by spinning in user mode for a fixed number of cycles. Then it calls NtWaitForAlertByThreadId to block until alerted by NtAlertThreadByThreadId, which gets called internally by Wake[All]ConditionVariable. It wouldn't be kosher to call NtAlertThreadByThreadId directly in order to alert the main thread because it's an undocumented system call, plus it's poking into the internal implementation details of SleepConditionVariableSRW and WakeConditionVariable, which could leave the variable in a bad state. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 19:14:29 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 10 Oct 2019 23:14:29 +0000 Subject: [issue38348] Make python -m ast more configurable In-Reply-To: <1570029299.56.0.0303865742584.issue38348@roundup.psfhosted.org> Message-ID: <1570749269.97.0.491398633417.issue38348@roundup.psfhosted.org> Ivan Levkivskyi added the comment: I don't have any strong opinion either way, so it looks like we need to wait until someone else will ask for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 19:14:55 2019 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Thu, 10 Oct 2019 23:14:55 +0000 Subject: [issue38439] IDLE menu icon is blurry on GNOME Message-ID: <1570749295.67.0.980962290264.issue38439@roundup.psfhosted.org> New submission from Miro Hron?ok : See the attached screenshot. All the GNOME apps have scalable icons, only the IDLE icon is scaled up from 48x48 pixels. I've found similar issue32129, but apparently the accepted resolution was to change a bit of code somewhere, not to provide higher resolution icons. ---------- assignee: terry.reedy components: IDLE files: idle.png messages: 354415 nosy: hroncok, terry.reedy priority: normal severity: normal status: open title: IDLE menu icon is blurry on GNOME versions: Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48655/idle.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 19:45:16 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 10 Oct 2019 23:45:16 +0000 Subject: [issue38344] activate.bat else needs to be on the same line as the if In-Reply-To: <1569997823.02.0.0977203709428.issue38344@roundup.psfhosted.org> Message-ID: <1570751116.4.0.133927662779.issue38344@roundup.psfhosted.org> Change by Kyle Stanley : ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 19:46:23 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 10 Oct 2019 23:46:23 +0000 Subject: [issue38359] pyw.exe opens console window in Windows 10 In-Reply-To: <1570096405.52.0.325874974028.issue38359@roundup.psfhosted.org> Message-ID: <1570751183.18.0.724096636422.issue38359@roundup.psfhosted.org> Change by Kyle Stanley : ---------- stage: backport needed -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 19:47:03 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 10 Oct 2019 23:47:03 +0000 Subject: [issue38355] ntpath.realpath() fails on sys.executable In-Reply-To: <1570055857.28.0.434394542652.issue38355@roundup.psfhosted.org> Message-ID: <1570751223.09.0.771616578857.issue38355@roundup.psfhosted.org> Change by Kyle Stanley : ---------- stage: backport needed -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 20:06:40 2019 From: report at bugs.python.org (Brandt Bucher) Date: Fri, 11 Oct 2019 00:06:40 +0000 Subject: [issue38438] argparse "usage" overly-complex with nargs="*" In-Reply-To: <1570739079.02.0.395133592841.issue38438@roundup.psfhosted.org> Message-ID: <1570752400.73.0.543888060056.issue38438@roundup.psfhosted.org> Change by Brandt Bucher : ---------- nosy: +brandtbucher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 20:18:53 2019 From: report at bugs.python.org (Teddy Thomas) Date: Fri, 11 Oct 2019 00:18:53 +0000 Subject: [issue38014] Python 3.7 does not compile In-Reply-To: <1567477987.66.0.578307493025.issue38014@roundup.psfhosted.org> Message-ID: <1570753133.71.0.882391577658.issue38014@roundup.psfhosted.org> Change by Teddy Thomas : ---------- nosy: +tthoma24 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 20:44:07 2019 From: report at bugs.python.org (Brandt Bucher) Date: Fri, 11 Oct 2019 00:44:07 +0000 Subject: [issue38422] Clarify docstrings of pathlib suffix(es) In-Reply-To: <1570634139.23.0.159522926495.issue38422@roundup.psfhosted.org> Message-ID: <1570754647.32.0.465431420225.issue38422@roundup.psfhosted.org> Change by Brandt Bucher : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 21:00:04 2019 From: report at bugs.python.org (Matt Joiner) Date: Fri, 11 Oct 2019 01:00:04 +0000 Subject: [issue13322] The io module doesn't support non-blocking files In-Reply-To: <1320246535.71.0.465783773129.issue13322@psf.upfronthosting.co.za> Message-ID: <1570755604.97.0.22246207434.issue13322@roundup.psfhosted.org> Change by Matt Joiner : ---------- nosy: -anacrolix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 21:30:06 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 11 Oct 2019 01:30:06 +0000 Subject: [issue17894] Edits to descriptor howto In-Reply-To: <1367547112.04.0.920947702161.issue17894@psf.upfronthosting.co.za> Message-ID: <1570757405.99.0.279864514826.issue17894@roundup.psfhosted.org> Raymond Hettinger added the comment: I am actively working on updates. However, the work on Python 3.8's whatsnew and doc fixes are a more immediate priority. Cumulatively, I've put an a lot of effort in to this and have made a continuous stream of improvements over the years including this year. In a way, maintaining this entry is not much different from being a module maintainer who has the principal responsibility and authority over the updates. This is something that I frequently teach and have battle tested course material that I'm looking forward to including in the entry. Please give me space and don't shove. IMO some of the past posts on this subject are border-line abusive, leaving me feeling hounded and degraded (especially with respect to my writing style). Please be kind and let me continue to improve my contribution at my own pace. Please don't re-open this issue. I have marked the patch as rejected because it is at odds with the improvements that I already have in progress and because some of it is essentially just a stylistic difference. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 22:02:12 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 11 Oct 2019 02:02:12 +0000 Subject: [issue38438] argparse "usage" overly-complex with nargs="*" In-Reply-To: <1570739079.02.0.395133592841.issue38438@roundup.psfhosted.org> Message-ID: <1570759332.98.0.307308216157.issue38438@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 22:40:05 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 11 Oct 2019 02:40:05 +0000 Subject: [issue38167] O_DIRECT read fails with 4K mmap buffer In-Reply-To: <1568417320.49.0.42295605579.issue38167@roundup.psfhosted.org> Message-ID: <1570761605.45.0.783447412785.issue38167@roundup.psfhosted.org> Josh Rosenberg added the comment: Yeah, not a bug. The I/O subsystem was substantially rewritten between Python 2 and Python 3, so you sometimes need to be more explicit about things like buffering, but as you note, once the buffering is correct, the code works; there's nothing to fix. ---------- resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 00:27:28 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 11 Oct 2019 04:27:28 +0000 Subject: [issue38440] Possible news issues with IDLE Message-ID: <1570768048.83.0.927013766779.issue38440@roundup.psfhosted.org> New submission from Raymond Hettinger : I've been exercising the 3.8.0rc1 version of IDLE and noticed two anomalies but have not had a chance to investigate further: * Periodically in a long shell session, the cursor jumps to the beginning of the cumulative text output. This necessitates a lot of scrolling to get back down to the active part of the session. * The pop-up message box for interrupting currently running code will appear several times in succession. Dismissing the box doesn't clear a queue of events, so the message may occur several times in a row. ---------- assignee: terry.reedy components: IDLE messages: 354418 nosy: rhettinger, terry.reedy priority: normal severity: normal status: open title: Possible news issues with IDLE versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 01:11:44 2019 From: report at bugs.python.org (Matej Cepl) Date: Fri, 11 Oct 2019 05:11:44 +0000 Subject: [issue38014] Python 3.7 does not compile In-Reply-To: <1567477987.66.0.578307493025.issue38014@roundup.psfhosted.org> Message-ID: <1570770704.32.0.0787776240946.issue38014@roundup.psfhosted.org> Change by Matej Cepl : ---------- nosy: -mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 01:19:43 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 11 Oct 2019 05:19:43 +0000 Subject: [issue38438] argparse "usage" overly-complex with nargs="*" In-Reply-To: <1570739079.02.0.395133592841.issue38438@roundup.psfhosted.org> Message-ID: <1570771183.67.0.598950245811.issue38438@roundup.psfhosted.org> Raymond Hettinger added the comment: Bob, would like to create a PR? ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 02:06:52 2019 From: report at bugs.python.org (Mohsin Boruah) Date: Fri, 11 Oct 2019 06:06:52 +0000 Subject: [issue35058] Unable to Install Python on Windows In-Reply-To: <1540390509.38.0.788709270274.issue35058@psf.upfronthosting.co.za> Message-ID: <1570774012.55.0.0767243667404.issue35058@roundup.psfhosted.org> Mohsin Boruah added the comment: Thats an amazing information. ---------- nosy: +Mohsin Boruah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 02:08:42 2019 From: report at bugs.python.org (Mohsin Boruah) Date: Fri, 11 Oct 2019 06:08:42 +0000 Subject: [issue35058] Unable to Install Python on Windows In-Reply-To: <1540390509.38.0.788709270274.issue35058@psf.upfronthosting.co.za> Message-ID: <1570774122.22.0.356643575547.issue35058@roundup.psfhosted.org> Mohsin Boruah added the comment: Also try this article which I believe will help you out. http://techstuffsarena.com/2019/01/15/how-to-fix-windows-10-update-error-0x8024a105/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 02:28:46 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Oct 2019 06:28:46 +0000 Subject: [issue38439] Python needs higher resolution app/menu icons In-Reply-To: <1570749295.67.0.980962290264.issue38439@roundup.psfhosted.org> Message-ID: <1570775326.59.0.73317234606.issue38439@roundup.psfhosted.org> Terry J. Reedy added the comment: I think you misunderstood #32129. It was specific to macOS Aqua systems. On Windows and generally on Linux, window title bars have a little icon on the left end (at least on Windows). IDLE uses the tcl/tk GUI framework and by default, on these systems, tk windows have a generic tk icon at the left end. (At least that is the position on Windows.) #20406 replaced the tk icon with versions of the Python app icon. On mac Aqua, tk window title bars do not have an icon. Somehow Mac, Aqua, and tk interact so that the replacement icon instead replaced Apple's version of the Python app (menu) icon, which is different from the *nix/Windows python app icon. This was unintended and a bug. The fix was to not execute the replacement code on Mac Aqua systems. Your png shows the Python app icon used for IDLE as a Python application. It is the same one used for Python applications on the Windows taskbar, including but not limited to IDLE. I agreed on #32129 that it would be good if someone contributed higher resolution versions. But it is not specifically an IDLE issue. I will say more tomorrow. ---------- assignee: terry.reedy -> nosy: +serhiy.storchaka stage: -> needs patch title: IDLE menu icon is blurry on GNOME -> Python needs higher resolution app/menu icons _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 02:45:40 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Oct 2019 06:45:40 +0000 Subject: [issue38440] Possible news issues with IDLE In-Reply-To: <1570768048.83.0.927013766779.issue38440@roundup.psfhosted.org> Message-ID: <1570776340.95.0.911578378305.issue38440@roundup.psfhosted.org> Terry J. Reedy added the comment: I presume this is on macOS, with its finicky tk. Have you 'upgraded' to Catalina? I have not, that I know of. I will try 3.8.0rc1 on my MacBook Air tomorrow. 1. Jumps. All the way to before the beginning "Python 3.8..." splash line? How long is long? I may not do not do long enough sessions on the mac to see this. 2. Do you mean the box with "Your program is still running!\nDo you want to kill it?" resulting from 'quit()' or 'exit()' or occasionally otherwise? Will test tomorrow. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 03:13:31 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Oct 2019 07:13:31 +0000 Subject: [issue38436] Improved performance for list addition. In-Reply-To: <1570734964.11.0.75032337331.issue38436@roundup.psfhosted.org> Message-ID: <1570778011.42.0.0316610896656.issue38436@roundup.psfhosted.org> Serhiy Storchaka added the comment: How often do you need to add three or more lists in comparison with other uses of the "+" operator? How larger is the benefit of this optimization? How much it slows down other uses of the "+" operator? Would be nice if you provide some numbers. More efficient way of concatenating several lists in single expression is: [*a, *b, *c, *d, ...] ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 03:26:31 2019 From: report at bugs.python.org (Aurora) Date: Fri, 11 Oct 2019 07:26:31 +0000 Subject: [issue38441] failing to build the Documentation Message-ID: <1570778791.42.0.554605100784.issue38441@roundup.psfhosted.org> New submission from Aurora : I'm failing to build the cpython/Doc dir. The full build log is as follows: mkdir -p build Building NEWS from Misc/NEWS.d with blurb PATH=./venv/bin:$PATH sphinx-build -b epub -d build/doctrees -D latex_elements.papersize= -W . build/epub Running Sphinx v2.2.0 making output directory... done building [mo]: targets for 0 po files that are out of date building [epub]: targets for 476 source files that are out of date updating environment: [new config] 476 added, 0 changed, 0 removed reading sources... [100%] whatsnew/index Warning, treated as error: /home/aurora/A.Code/Python/Reference/python/cpython/Doc/library/email.message.rst:4:duplicate object description of email.message, other instance in library/email.compat32-message, use :noindex: for one of them make: *** [Makefile:46: build] Error 2 Running on Debian Experimental kernel v5.3 ---------- assignee: docs at python components: Documentation messages: 354425 nosy: aurora, docs at python priority: normal severity: normal status: open title: failing to build the Documentation type: compile error versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 03:28:14 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Oct 2019 07:28:14 +0000 Subject: [issue38440] Possible new issues with IDLE In-Reply-To: <1570768048.83.0.927013766779.issue38440@roundup.psfhosted.org> Message-ID: <1570778894.53.0.121987879871.issue38440@roundup.psfhosted.org> Ned Deily added the comment: (Just FYI: the version of Tcl/Tk, 8.6.8, we are shipping with the python.org installers for macOS is unchanged since 3.7.2 a year ago, 2.7.16 (in March), and has not changed during the 3.8.0 pre-release cycle. We did try to update to 8.6.9 for 3.7.2rc1 but there were too many new regressions so we reverted to 8.6.8 and have stuck with it awaiting a release of 8.7.10.) ---------- title: Possible news issues with IDLE -> Possible new issues with IDLE _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 03:35:46 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Oct 2019 07:35:46 +0000 Subject: [issue38441] failing to build the Documentation In-Reply-To: <1570778791.42.0.554605100784.issue38441@roundup.psfhosted.org> Message-ID: <1570779346.88.0.807381643165.issue38441@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the report. That problem was fixed on the master branch by 141da44bb45bc182886303fce92cbbae5631cb4c on 2019-06-03. Suggest you build from a more recent source release or updated git repo. ---------- nosy: +ned.deily resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 03:38:37 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Oct 2019 07:38:37 +0000 Subject: [issue38442] Doc/whatsnew/3.8.rst has an execution bit Message-ID: <1570779517.76.0.861587491217.issue38442@roundup.psfhosted.org> New submission from Serhiy Storchaka : It likely happened when it was edited on Windows. ---------- assignee: docs at python components: Documentation messages: 354428 nosy: docs at python, lukasz.langa, serhiy.storchaka priority: normal severity: normal status: open title: Doc/whatsnew/3.8.rst has an execution bit versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 03:38:58 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Oct 2019 07:38:58 +0000 Subject: [issue38442] Doc/whatsnew/3.8.rst has an execution bit In-Reply-To: <1570779517.76.0.861587491217.issue38442@roundup.psfhosted.org> Message-ID: <1570779538.34.0.909718354875.issue38442@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +16293 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16715 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 03:53:54 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Oct 2019 07:53:54 +0000 Subject: [issue38443] unavailable --with-universal-archs= macOS confgure options fail cryptically Message-ID: <1570780434.84.0.507087684939.issue38443@roundup.psfhosted.org> New submission from Ned Deily : ./configure's --with-universal-archs= supports a number of different CPU architecture combinations. However most of them are no longer supported on current macOS systems. If you choose an option with archs not available in the build tool chain in use, the configure script fails in various cryptic ways, usually with multiple configure test failures like: checking dlfcn.h presence... yes configure: WARNING: dlfcn.h: present but cannot be compiled configure: WARNING: dlfcn.h: check for missing prerequisite headers? configure: WARNING: dlfcn.h: see the Autoconf documentation configure: WARNING: dlfcn.h: section "Present But Cannot Be Compiled" configure: WARNING: dlfcn.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## ./configure should be more user-friendly here. At a minimum, it should report near the beginning exactly which archs are going to be tested; it already reports the --with-universal-archs value. Even better it should explicitly test for support of each arch in the build tool chain in use and stop if any of the requested archs are not available. ---------- components: Build, macOS messages: 354429 nosy: ned.deily, ronaldoussoren priority: normal severity: normal stage: needs patch status: open title: unavailable --with-universal-archs= macOS confgure options fail cryptically versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 04:08:33 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Oct 2019 08:08:33 +0000 Subject: [issue38443] unavailable --with-universal-archs= macOS confgure options fail cryptically In-Reply-To: <1570780434.84.0.507087684939.issue38443@roundup.psfhosted.org> Message-ID: <1570781313.81.0.691188082982.issue38443@roundup.psfhosted.org> Ned Deily added the comment: Also note that, on current macOS systems, specifying just --enable-universalsdk to ./configure results in an implicit --with-universal-archs of intel (which implies both x86_64 and i386). checking for --enable-universalsdk... / checking for --with-universal-archs... intel With macOS 10.15 Catalina and Xcode 11, i364 arch is no longer supported and that results in another cryptic ./configure failure: checking size of size_t... configure: error: in `/Users/sysadmin/cpython': configure: error: cannot compute sizeof (size_t) See `config.log' for more details ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 04:20:55 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Oct 2019 08:20:55 +0000 Subject: [issue38014] ./configure on recent macOS versions can fail with multiple "present but cannot be compiled" messages In-Reply-To: <1567477987.66.0.578307493025.issue38014@roundup.psfhosted.org> Message-ID: <1570782055.35.0.483468652053.issue38014@roundup.psfhosted.org> Ned Deily added the comment: Going and back and looking closer at the original failure, I see now that the root cause of the configure failures *is* using --with-universal-archs=64-bit. As noted in the Mac/README file, "64-bit" means compile for both "ppc64" and "x86_64" architectures; the configure tests fail because the Apple-supplied build tools (via Xcode or the Command Line Tools) have not supported either ppc or ppc64 for many years (since 10.7, I believe). In more recent releases prior to macOS 10.15 Catalina, macOS still supported running programs in either intel-32 (i386) or intel-64 (x86_64) so there was still some use for --with-universal-archs=intel, which compiles for both x64_64 and i386. But 10.15 Catalina no longer includes 32-bit libraries and frameworks, so it is not possible to run 32-bit executables natively anymore. Thus the only architecture option that is of use on 10.15 is the default, x86_64. So my original suggestion, to remove the --enable-universalsdk and --with-universal-arch options from your ./configure command should solve the problems you are seeing. I also verified that --enable-optimizations without --wiht-universal-arch and --enable-universalsdk resulted in a successful build (after following the Devguide's recommendations to install missing libraries using Homebrew). That said, ./configure should be less cryptic about these kinds of problems. I've opened Issue38443 to suggest that ./configure be enhanced to give better error messages when a CPU arch is not available to build. I was unable to reproduce the different failure reported by Bill Minasian in msg351312. If that problem can be reproduced with the stable release of 10.15 and Xcode 11, please open a new issue for it with details on how to reproduce. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed title: Python 3.7 does not compile -> ./configure on recent macOS versions can fail with multiple "present but cannot be compiled" messages _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 04:21:54 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Oct 2019 08:21:54 +0000 Subject: [issue38014] ./configure on recent macOS versions can fail with multiple "present but cannot be compiled" messages In-Reply-To: <1567477987.66.0.578307493025.issue38014@roundup.psfhosted.org> Message-ID: <1570782114.14.0.0235457985293.issue38014@roundup.psfhosted.org> Ned Deily added the comment: Going back and looking closer at the original failure, I see now that the root cause of the configure failures *is* using --with-universal-archs=64-bit. As noted in the Mac/README file, "64-bit" means compile for both "ppc64" and "x86_64" architectures; the configure tests fail because the Apple-supplied build tools (via Xcode or the Command Line Tools) have not supported either ppc or ppc64 for many years (since 10.7, I believe). In more recent releases prior to macOS 10.15 Catalina, macOS still supported running programs in either intel-32 (i386) or intel-64 (x86_64) so there was still some use for --with-universal-archs=intel, which compiles for both x64_64 and i386. But 10.15 Catalina no longer includes 32-bit libraries and frameworks, so it is not possible to run 32-bit executables natively anymore. Thus the only architecture option that is of use on 10.15 is the default, x86_64. So my original suggestion, to remove the --enable-universalsdk and --with-universal-arch options from your ./configure command should solve the problems you are seeing. I also verified that --enable-optimizations without --wiht-universal-arch and --enable-universalsdk resulted in a successful build (after following the Devguide's recommendations to install missing libraries using Homebrew). That said, ./configure should be less cryptic about these kinds of problems. I've opened Issue38443 to suggest that ./configure be enhanced to give better error messages when a CPU arch is not available to build. I was unable to reproduce the different failure reported by Bill Minasian in msg351312. If that problem can be reproduced with the stable release of 10.15 and Xcode 11, please open a new issue for it with details on how to reproduce. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 04:22:08 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Oct 2019 08:22:08 +0000 Subject: [issue38014] ./configure on recent macOS versions can fail with multiple "present but cannot be compiled" messages In-Reply-To: <1567477987.66.0.578307493025.issue38014@roundup.psfhosted.org> Message-ID: <1570782128.0.0.220693243604.issue38014@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg354431 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 04:41:09 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Oct 2019 08:41:09 +0000 Subject: [issue38440] Possible new issues with IDLE In-Reply-To: <1570768048.83.0.927013766779.issue38440@roundup.psfhosted.org> Message-ID: <1570783269.63.0.202849255307.issue38440@roundup.psfhosted.org> Ned Deily added the comment: (?8.7.10? should be ?8.6.10?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 04:44:47 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Oct 2019 08:44:47 +0000 Subject: [issue38442] Doc/whatsnew/3.8.rst has an execution bit In-Reply-To: <1570779517.76.0.861587491217.issue38442@roundup.psfhosted.org> Message-ID: <1570783487.33.0.36002037752.issue38442@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset cbb548130caf24275fa16100bccc537570cb46df by Serhiy Storchaka in branch 'master': bpo-38442: Remove an execution bit from Doc/whatsnew/3.8.rst. (GH-16715) https://github.com/python/cpython/commit/cbb548130caf24275fa16100bccc537570cb46df ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 04:49:50 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Oct 2019 08:49:50 +0000 Subject: [issue38442] Doc/whatsnew/3.8.rst has an execution bit In-Reply-To: <1570779517.76.0.861587491217.issue38442@roundup.psfhosted.org> Message-ID: <1570783790.13.0.823439545004.issue38442@roundup.psfhosted.org> Serhiy Storchaka added the comment: Strange, it was only in master. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 06:39:29 2019 From: report at bugs.python.org (Fabrice BAUZAC) Date: Fri, 11 Oct 2019 10:39:29 +0000 Subject: [issue12271] panel.h is not found even if it's installed on various flavours of SUSE In-Reply-To: <1307365298.12.0.602165301483.issue12271@psf.upfronthosting.co.za> Message-ID: <1570790369.86.0.524146964017.issue12271@roundup.psfhosted.org> Fabrice BAUZAC added the comment: I have been hit by the same issue today. Kenneth's patch seems fine. Why not integrate it? ---------- nosy: +fbauzac _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 06:39:38 2019 From: report at bugs.python.org (Shmuel H.) Date: Fri, 11 Oct 2019 10:39:38 +0000 Subject: [issue38444] dataclass: always generate default __init__ on __default_init__ Message-ID: <1570790378.12.0.986632197987.issue38444@roundup.psfhosted.org> New submission from Shmuel H. : Currently, `dataclasses.dataclass` will generate `__init__` only where the user has not defined one. However, sometimes, with frozen classes or dataclasses with a lot of members, redefinition of this function is not trivial, especially if the only purpose is to change the default behaviour for only one member: ```python from dataclasses import dataclass @dataclass(frozen=True) class Dataclass: #...big list of members member20: int def __init__(self, member20: str, **kwargs): # self.member20 = int(member20) object.__setattr__(self, "member20", int(member20)) # Now we have to trivially initialize # 20 other members like that :[ ``` My idea is to generate the default `__init__` into `__default_init__` even, if the user has defined their own version. That will allow them to use it like that: ```python from dataclasses import dataclass @dataclass(frozen=True) class Dataclass: #...big list of members member20: int def __init__(self, member20: str, **kwargs): # Oh, that's better :) self.__default_init__(member20=int(member20), **kwargs) ``` Implementing that is pretty trivial (I can do that if this change will be approved). Please let me know what you think about that. ---------- components: Library (Lib) messages: 354437 nosy: Shmuel H. priority: normal severity: normal status: open title: dataclass: always generate default __init__ on __default_init__ type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 06:41:31 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 11 Oct 2019 10:41:31 +0000 Subject: [issue38444] dataclass: always generate default __init__ on __default_init__ In-Reply-To: <1570790378.12.0.986632197987.issue38444@roundup.psfhosted.org> Message-ID: <1570790491.23.0.871217415729.issue38444@roundup.psfhosted.org> Change by Eric V. Smith : ---------- assignee: -> eric.smith nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 06:42:07 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 11 Oct 2019 10:42:07 +0000 Subject: [issue38444] dataclass: always generate default __init__ on __default_init__ In-Reply-To: <1570790378.12.0.986632197987.issue38444@roundup.psfhosted.org> Message-ID: <1570790527.35.0.60576384181.issue38444@roundup.psfhosted.org> Eric V. Smith added the comment: This would be a 3.9 feature only, so changing the versions. ---------- versions: -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 07:00:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2019 11:00:31 +0000 Subject: [issue38435] Start the deprecation cycle for subprocess preexec_fn In-Reply-To: <1570731497.4.0.313201495913.issue38435@roundup.psfhosted.org> Message-ID: <1570791631.28.0.626647457704.issue38435@roundup.psfhosted.org> STINNER Victor added the comment: > We cannot provide a general do everything replacement and should not try. It not possible. Well, I proposed a solution at: https://bugs.python.org/issue38417#msg354242 I know that this solution has multiple flaws, but a bad solution may be better than no solution: breaking applications when upgrading to Python 3.11. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 07:16:42 2019 From: report at bugs.python.org (Nika) Date: Fri, 11 Oct 2019 11:16:42 +0000 Subject: [issue38445] os.path.exists() takes bool as argument and returns True Message-ID: <1570792602.16.0.709405121857.issue38445@roundup.psfhosted.org> New submission from Nika : os.path.exists() accepts either True or False as argument and returns True. Reproducible on Windows, e. g., in jupyter notebook or in Eclipse, although not in IDLE, which returns False, as expected. import os print(os.path.exists(False)) ---------- messages: 354440 nosy: Nika priority: normal severity: normal status: open title: os.path.exists() takes bool as argument and returns True type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 07:18:11 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 11 Oct 2019 11:18:11 +0000 Subject: [issue38444] dataclass: always generate default __init__ on __default_init__ In-Reply-To: <1570790378.12.0.986632197987.issue38444@roundup.psfhosted.org> Message-ID: <1570792691.41.0.608285275887.issue38444@roundup.psfhosted.org> Eric V. Smith added the comment: Doesn't __post_init__ address this use case? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 07:29:11 2019 From: report at bugs.python.org (Dan Snider) Date: Fri, 11 Oct 2019 11:29:11 +0000 Subject: [issue38446] Ambiguous signature for builtins.__build_class__ Message-ID: <1570793351.47.0.198943437011.issue38446@roundup.psfhosted.org> New submission from Dan Snider : The function has the following signature documented: __build_class__(func, name, *bases, metaclass=None, **kwds) This implies that `func` and `name` are not positional only parameters when in fact, they are. Another problem with that signature is that None is not a valid value for the metaclass parameter. ---------- messages: 354442 nosy: bup priority: normal severity: normal status: open title: Ambiguous signature for builtins.__build_class__ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 07:47:55 2019 From: report at bugs.python.org (Mariano Anaya) Date: Fri, 11 Oct 2019 11:47:55 +0000 Subject: [issue38445] os.path.exists() takes bool as argument and returns True In-Reply-To: <1570792602.16.0.709405121857.issue38445@roundup.psfhosted.org> Message-ID: <1570794475.33.0.0598430740933.issue38445@roundup.psfhosted.org> Mariano Anaya added the comment: Hi, I would like to take a look at this issue. Could someone please assign it to me? Thanks ---------- nosy: +Mariano Anaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 08:17:27 2019 From: report at bugs.python.org (Eryk Sun) Date: Fri, 11 Oct 2019 12:17:27 +0000 Subject: [issue38445] os.path.exists() takes bool as argument and returns True In-Reply-To: <1570792602.16.0.709405121857.issue38445@roundup.psfhosted.org> Message-ID: <1570796247.75.0.235295203615.issue38445@roundup.psfhosted.org> Eryk Sun added the comment: Note that the underlying stat call supports file descriptors, which are non-negative integers. This is a supported and tested capability for genericpath.exists (see GenericTest.test_exists_fd in Lib/test/test_genericpath.py). False and True are integers with the values 0 and 1: >>> issubclass(bool, int) True >>> False + 0 0 >>> True + 0 1 That can be useful, but there may be cases where we don't want to conflate bools and integers. IMO, a bool should not be supported as a file descriptor. It's likely a bug that should be caught early instead of meaninglessly propagated. A high-level solution would check for bool instances in genericpath.exists. A low-level solution, to make this policy consistent in general, would be to modify _fd_converter in Modules/posixmodule.c to disallow bool instances. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 08:42:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2019 12:42:55 +0000 Subject: [issue32561] Add API to io objects for cache-only reads/writes In-Reply-To: <1516068442.29.0.467229070634.issue32561@psf.upfronthosting.co.za> Message-ID: <1570797775.61.0.0230707707315.issue32561@roundup.psfhosted.org> STINNER Victor added the comment: Here a proof-of-concept of an asynchronous io module reusing the existing blocking io module: it implements AsyncBufferedReader.readline() using existing _pyio.BufferedReader.readline(). The approach seems to work, but only if bpo-13322 is fixed first: BufferedReader, TextIOWrapper & friends must return None if the underlying object ("raw" and "buffer" objects) return None. -- My PoC uses 3 classes: * AsyncFileIO: similar to io.FileIO but uses "async def" * AsyncBufferedReader: similar to io.BufferedReader but uses "async def" * FileIOSandwich: glue between asynchronous AsyncFileIO and blocking io.BufferedReader At the first read, FileIOSandwich.read(n) call returns None, but it stores the request read size (n). If AsyncBufferedReader gets None, is calls FileIOSandwich._prepare_read() *asynchronously*/ Then FileIOSandwich.read(n) is called again, and this time it no longer blocks, since data has been already read. -- Since bpo-13322 is not fixed, my PoC uses _pyio since it's easier to fix. It needs the following fix for _pyio.BufferedReader.readline(): diff --git a/Lib/_pyio.py b/Lib/_pyio.py index c1bdac7913..e90742ec43 100644 --- a/Lib/_pyio.py +++ b/Lib/_pyio.py @@ -557,6 +557,8 @@ class IOBase(metaclass=abc.ABCMeta): res = bytearray() while size < 0 or len(res) < size: b = self.read(nreadahead()) + if b is None and not res: + return None if not b: break res += b --- Example: $ ./python poc_aio.py poc_aio.py data: b'import asyncio\n' Internally, _prepare_read() reads 8 KiB. ---------- Added file: https://bugs.python.org/file48656/poc_aio.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 08:47:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2019 12:47:25 +0000 Subject: [issue32561] Add API to io objects for cache-only reads/writes In-Reply-To: <1516068442.29.0.467229070634.issue32561@psf.upfronthosting.co.za> Message-ID: <1570798045.41.0.313364157711.issue32561@roundup.psfhosted.org> STINNER Victor added the comment: I suggest to leave not attempt to put "async or "await" in the io module to keep it a "simple" as possible, but fix bpo-13322 (in io and _pyio modules). Instead, I suggest to write a new module only providing asynchronous methods, maybe even for open() and close(). But the new module can reuse the existing io module to avoid having to write complex algorithm like read-ahead, buffering, etc. Well, I'm not 100% sure that it's doable, since io is hiding many implementation details, there are complex issues like multithreading, locks, interlaced read and write operations, etc. Note: The io module doesn't fully suppored interlaced read and write :-) See bpo-12215 for example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 09:01:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2019 13:01:44 +0000 Subject: [issue38447] test_multiprocessing_spawn: Dangling processes: {} on AMD64 RHEL7 Refleaks 3.7 Message-ID: <1570798904.01.0.669672054648.issue38447@roundup.psfhosted.org> New submission from STINNER Victor : AMD64 RHEL7 Refleaks 3.7: https://buildbot.python.org/all/#/builders/311/builds/22 0:15:09 load avg: 12.21 [311/416/1] test_multiprocessing_spawn failed (env changed) (14 min 39 sec) -- running: test_shelve (5 min 11 sec), test_sqlite (1 min), test_cmd_line_script (1 min 26 sec), test_asyncio (3 min 13 sec), test_io (8 min 6 sec), test_pickle (53.8 sec), test_concurrent_futures (12 min 52 sec) beginning 6 repetitions 123456 ....Warning -- Dangling processes: {} Warning -- Dangling processes: {} .Warning -- Dangling processes: {} . ---------- components: Tests messages: 354447 nosy: vstinner priority: normal severity: normal status: open title: test_multiprocessing_spawn: Dangling processes: {} on AMD64 RHEL7 Refleaks 3.7 versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 09:08:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2019 13:08:53 +0000 Subject: [issue38448] test_concurrent_futures: reap_children() reaped child process 26487 on AMD64 RHEL8 Refleaks 3.x Message-ID: <1570799333.75.0.17786723855.issue38448@roundup.psfhosted.org> New submission from STINNER Victor : AMD64 RHEL8 Refleaks 3.x: https://buildbot.python.org/all/#/builders/272/builds/23 0:27:13 load avg: 4.88 [416/419/1] test_concurrent_futures failed (env changed) (17 min 11 sec) -- running: test_capi (7 min 28 sec), test_gdb (8 min 49 sec), test_asyncio (23 min 23 sec) beginning 6 repetitions 123456 .Warning -- reap_children() reaped child process 26487 ..... Warning -- multiprocessing.process._dangling was modified by test_concurrent_futures Before: set() After: {} ---------- components: Tests messages: 354448 nosy: vstinner priority: normal severity: normal status: open title: test_concurrent_futures: reap_children() reaped child process 26487 on AMD64 RHEL8 Refleaks 3.x versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 09:10:43 2019 From: report at bugs.python.org (Thomas Caswell) Date: Fri, 11 Oct 2019 13:10:43 +0000 Subject: [issue37980] regression when passing numpy bools to sorted(..., reverse=r) In-Reply-To: <1567096742.32.0.970581980709.issue37980@roundup.psfhosted.org> Message-ID: <1570799443.02.0.165681177867.issue37980@roundup.psfhosted.org> Thomas Caswell added the comment: Any update on resolving this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 09:36:50 2019 From: report at bugs.python.org (Brandt Bucher) Date: Fri, 11 Oct 2019 13:36:50 +0000 Subject: [issue38438] argparse "usage" overly-complex with nargs="*" In-Reply-To: <1570739079.02.0.395133592841.issue38438@roundup.psfhosted.org> Message-ID: <1570801010.31.0.947819924337.issue38438@roundup.psfhosted.org> Brandt Bucher added the comment: I?m happy to write one. This seems like a pretty straightforward fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 09:36:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2019 13:36:55 +0000 Subject: [issue38347] pathfix.py does not find Python scripts that have '-' in its filename In-Reply-To: <1570007735.24.0.378926810144.issue38347@roundup.psfhosted.org> Message-ID: <1570801015.94.0.896215228412.issue38347@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 2b7dc40b2af6578181808ba73c1533fc114e55df by Victor Stinner (Ruediger Pluem) in branch 'master': bpo-38347: find pathfix for Python scripts whose name contain a '-' (GH-16536) https://github.com/python/cpython/commit/2b7dc40b2af6578181808ba73c1533fc114e55df ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 09:37:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2019 13:37:51 +0000 Subject: [issue37415] Error build Python with Intel compiler: doesn't provide atomic_uintptr_t In-Reply-To: <1561563167.55.0.111630694926.issue37415@roundup.psfhosted.org> Message-ID: <1570801071.89.0.657531909904.issue37415@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16294 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16717 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 09:37:53 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 11 Oct 2019 13:37:53 +0000 Subject: [issue38347] pathfix.py does not find Python scripts that have '-' in its filename In-Reply-To: <1570007735.24.0.378926810144.issue38347@roundup.psfhosted.org> Message-ID: <1570801073.51.0.930082244698.issue38347@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16295 pull_request: https://github.com/python/cpython/pull/16718 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 09:38:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2019 13:38:46 +0000 Subject: [issue37415] Error build Python with Intel compiler: doesn't provide atomic_uintptr_t In-Reply-To: <1561563167.55.0.111630694926.issue37415@roundup.psfhosted.org> Message-ID: <1570801126.94.0.264515109941.issue37415@roundup.psfhosted.org> STINNER Victor added the comment: I wrote PR 16717 which uses a similar approach than python.patch. ---------- components: +Build versions: +Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 09:46:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2019 13:46:35 +0000 Subject: [issue37415] Error build Python with Intel compiler: doesn't provide atomic_uintptr_t In-Reply-To: <1561563167.55.0.111630694926.issue37415@roundup.psfhosted.org> Message-ID: <1570801595.62.0.91956456722.issue37415@roundup.psfhosted.org> STINNER Victor added the comment: Can someone please test PR 16717 with ICC? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 09:49:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2019 13:49:25 +0000 Subject: [issue38347] pathfix.py does not find Python scripts that have '-' in its filename In-Reply-To: <1570007735.24.0.378926810144.issue38347@roundup.psfhosted.org> Message-ID: <1570801765.2.0.0206896347261.issue38347@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16296 pull_request: https://github.com/python/cpython/pull/16719 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 09:56:51 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 11 Oct 2019 13:56:51 +0000 Subject: [issue38347] pathfix.py does not find Python scripts that have '-' in its filename In-Reply-To: <1570007735.24.0.378926810144.issue38347@roundup.psfhosted.org> Message-ID: <1570802211.95.0.486028444478.issue38347@roundup.psfhosted.org> miss-islington added the comment: New changeset 73665b41470532f873315d5ae39906160192320d by Miss Islington (bot) in branch '3.8': bpo-38347: find pathfix for Python scripts whose name contain a '-' (GH-16536) https://github.com/python/cpython/commit/73665b41470532f873315d5ae39906160192320d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 10:06:40 2019 From: report at bugs.python.org (Yaroslav Halchenko) Date: Fri, 11 Oct 2019 14:06:40 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename Message-ID: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> New submission from Yaroslav Halchenko : Our tests in DataLad started to fail while building on Debian with Python 3.7.5rc1 whenever they passed just fine previously with 3.7.3rc1. Analysis boiled down to mimetypes $> ./python3.9 -c 'import mimetypes; mimedb = mimetypes.MimeTypes(strict=False); print(mimedb.guess_type(";1.tar.gz"))' (None, None) $> ./python3.9 -c 'import mimetypes; mimedb = mimetypes.MimeTypes(strict=False); print(mimedb.guess_type("1.tar.gz"))' ('application/x-tar', 'gzip') $> git describe v3.8.0b1-1174-g2b7dc40b2af Ref: - original issue in DataLad: https://github.com/datalad/datalad/issues/3769 ---------- components: Library (Lib) messages: 354455 nosy: Yaroslav.Halchenko priority: normal severity: normal status: open title: regression - mimetypes guess_type is confused by ; in the filename type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 10:08:39 2019 From: report at bugs.python.org (Yaroslav Halchenko) Date: Fri, 11 Oct 2019 14:08:39 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1570802919.66.0.323298390635.issue38449@roundup.psfhosted.org> Yaroslav Halchenko added the comment: FWIW, our more complete test filename is # python3 -c 'import patoolib.util as ut; print(ut.guess_mime(r" \"\`;b&b&c |.tar.gz"))' (None, None) which works fine with older versions ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 10:18:33 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 11 Oct 2019 14:18:33 +0000 Subject: [issue38438] argparse "usage" overly-complex with nargs="*" In-Reply-To: <1570739079.02.0.395133592841.issue38438@roundup.psfhosted.org> Message-ID: <1570803513.75.0.614873941243.issue38438@roundup.psfhosted.org> Raymond Hettinger added the comment: Bob, as OP you get first dibs on a PR. Brandt, you're next in line :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 10:19:47 2019 From: report at bugs.python.org (Shmuel H.) Date: Fri, 11 Oct 2019 14:19:47 +0000 Subject: [issue38444] dataclass: always generate default __init__ on __default_init__ In-Reply-To: <1570790378.12.0.986632197987.issue38444@roundup.psfhosted.org> Message-ID: <1570803587.36.0.689686996788.issue38444@roundup.psfhosted.org> Shmuel H. added the comment: I think it was designed to. However, it is not very usable in production for a number of reasons: 1. It won't work with frozen instances (you'll have to call `object.__setattr__` directly). 2. It gets very messy with more than one or two `InitVar`s which makes it very hard to differentiate between "real" values, `InitVar`s and the init logic: ```python from dataclasses import dataclass, InitVar @dataclass class DataClass: member0_init: InitVar[str] = None member1_init: InitVar[list] = None member0: int = None member1: dict = None def __post_init__(self, member0_init: str, member1_init: list): if member0_init is not None and self.member0 is None: self.member0 = int(member0_init) if member1_init is not None and self.member1 is None: self.member1 = dict(member1_init) ``` That code should be equivalent to: ```python from dataclasses import dataclass from typing import Union @dataclass class DataClass: member0: int member1: dict def __init__(self, member0: Union[int, str], member1: Union[dict, list]): if isinstance(member0, str): member0 = int(member0) if isinstance(member1, list): member1 = dict(member1) self.__default_init__(member0=member0, member1=member1) ``` Which is much closer to regular python code to someone new for dataclasses. I would be happy to hear if you have a better solution; I just think it is pretty simple and straight-forward. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 10:33:34 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 11 Oct 2019 14:33:34 +0000 Subject: [issue38444] dataclass: always generate default __init__ on __default_init__ In-Reply-To: <1570790378.12.0.986632197987.issue38444@roundup.psfhosted.org> Message-ID: <1570804414.29.0.774993136984.issue38444@roundup.psfhosted.org> Eric V. Smith added the comment: I'll try and think of something better. I know I'm guilty of sending to python-ideas all the time, but discussing proposed design decisions like this are what that list is all about. If you want to bring it up there, I'd focus on making the problem description crystal clear, and not so much on any proposed solution. At least for starters. And, someone will ask what attrs or other projects do to solve this problem, so you should research that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 10:59:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2019 14:59:23 +0000 Subject: [issue1294959] Problems with /usr/lib64 builds. Message-ID: <1570805963.62.0.508023666225.issue1294959@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 11:16:34 2019 From: report at bugs.python.org (Matej Cepl) Date: Fri, 11 Oct 2019 15:16:34 +0000 Subject: [issue1294959] Problems with /usr/lib64 builds. Message-ID: <1570806994.37.0.251238036371.issue1294959@roundup.psfhosted.org> Change by Matej Cepl : ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 11:16:47 2019 From: report at bugs.python.org (Matej Cepl) Date: Fri, 11 Oct 2019 15:16:47 +0000 Subject: [issue1294959] Problems with /usr/lib64 builds. Message-ID: <1570807007.81.0.223183650349.issue1294959@roundup.psfhosted.org> Change by Matej Cepl : ---------- versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 11:36:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2019 15:36:12 +0000 Subject: [issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak In-Reply-To: <1565194972.64.0.065323919799.issue37788@roundup.psfhosted.org> Message-ID: <1570808172.7.0.486906625874.issue37788@roundup.psfhosted.org> STINNER Victor added the comment: Copy of wmanley's comment: https://github.com/python/cpython/pull/13948#issuecomment-541076882 """ This caused a regression for people overriding Thread.join to implement custom thread interruption. See https://stackoverflow.com/questions/50486083/ending-non-daemon-threads-when-shutting-down-an-interactive-python-session """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 11:37:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2019 15:37:09 +0000 Subject: [issue38347] pathfix.py does not find Python scripts that have '-' in its filename In-Reply-To: <1570007735.24.0.378926810144.issue38347@roundup.psfhosted.org> Message-ID: <1570808229.04.0.202400455495.issue38347@roundup.psfhosted.org> STINNER Victor added the comment: New changeset ed189ce49423f15ba8774ff174c15d03d12bc807 by Victor Stinner in branch '3.7': bpo-38347: find pathfix for Python scripts whose name contain a '-' (GH-16536) (GH-16719) https://github.com/python/cpython/commit/ed189ce49423f15ba8774ff174c15d03d12bc807 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 11:37:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2019 15:37:39 +0000 Subject: [issue38347] pathfix.py does not find Python scripts that have '-' in its filename In-Reply-To: <1570007735.24.0.378926810144.issue38347@roundup.psfhosted.org> Message-ID: <1570808259.88.0.975853231129.issue38347@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Ruediger Pluem: I merged your change into master and backported to 3.8 and 3.7. For the 3.7 backport, I skipped tests. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 11:42:52 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 11 Oct 2019 15:42:52 +0000 Subject: [issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak In-Reply-To: <1565194972.64.0.065323919799.issue37788@roundup.psfhosted.org> Message-ID: <1570808572.81.0.122611445241.issue37788@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Hummm....is this really a regression? The docs say: > No other methods (except for the constructor) should be overridden in a subclass. In other words, only override the __init__() and run() methods of this class. So if someone is overriding join() they are out of contract ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 12:02:58 2019 From: report at bugs.python.org (Sebastian Rittau) Date: Fri, 11 Oct 2019 16:02:58 +0000 Subject: [issue38450] 3.8 Release Notes: IDLE section dupe Message-ID: <1570809778.37.0.687630988781.issue38450@roundup.psfhosted.org> New submission from Sebastian Rittau : In the 3.8 release notes (https://docs.python.org/3.8/whatsnew/3.8.html), the section "IDLE and idlelib" is duplicated as "idlelib and IDLE". Also, the section "gc" and "gzip" between them are not sorted alphabetically like the rest of the list. ---------- assignee: docs at python components: Documentation messages: 354464 nosy: docs at python, srittau priority: normal severity: normal status: open title: 3.8 Release Notes: IDLE section dupe versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 12:13:34 2019 From: report at bugs.python.org (Kyle Meyer) Date: Fri, 11 Oct 2019 16:13:34 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1570810414.35.0.166038851141.issue38449@roundup.psfhosted.org> Kyle Meyer added the comment: I've performed a bisect the issue with the following script: #!/bin/sh make -j3 || exit 125 ./python <<\EOF || exit 1 import sys import mimetypes res = mimetypes.MimeTypes(strict=False).guess_type(";1.tar.gz") if res[0] is None: sys.exit(1) EOF That points to 87bd2071c7 (bpo-22347: Update mimetypes.guess_type to allow proper parsing of URLs (GH-15522), 2019-09-05). That commit was included in 3.7.5rc1 when it was cherry picked by 8873bff287. ---------- nosy: +kyleam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 12:53:36 2019 From: report at bugs.python.org (Arne Recknagel) Date: Fri, 11 Oct 2019 16:53:36 +0000 Subject: [issue34632] Port importlib_metadata to Python 3.8 In-Reply-To: <1536689803.48.0.0269046726804.issue34632@psf.upfronthosting.co.za> Message-ID: <1570812816.84.0.229449330975.issue34632@roundup.psfhosted.org> Arne Recknagel added the comment: Is there a reason the object returned by importlib.metadata.metadata is an EmailMessage and not a dict? If it quacks like a duck it should be a duck, no? ---------- nosy: +arne _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 13:02:29 2019 From: report at bugs.python.org (Nick Timkovich) Date: Fri, 11 Oct 2019 17:02:29 +0000 Subject: [issue38438] argparse "usage" overly-complex with nargs="*" In-Reply-To: <1570739079.02.0.395133592841.issue38438@roundup.psfhosted.org> Message-ID: <1570813349.04.0.652926390757.issue38438@roundup.psfhosted.org> Nick Timkovich added the comment: The `[arg [arg ...]]` feels a bit more formal to me, and I might prefer it in the example shown where the arg name is fairly short. That said, `man mv` shows something like: mv [OPTION]... [-T] SOURCE DEST mv [OPTION]... SOURCE... DIRECTORY mv [OPTION]... -t DIRECTORY SOURCE... ---------- nosy: +nicktimko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 13:03:13 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Fri, 11 Oct 2019 17:03:13 +0000 Subject: [issue32498] urllib.parse.unquote raises incorrect errormessage when string parameter is bytes In-Reply-To: <1515179710.49.0.467229070634.issue32498@psf.upfronthosting.co.za> Message-ID: <1570813393.64.0.303847169556.issue32498@roundup.psfhosted.org> Joannah Nanjekye added the comment: > Should I update the Status and Resolution of the issue here, or wait for some kind of confirmation? The status is changed after the patch is merged. The person that merges will usually change the status of the issue or If he/she forgets, anyone with developer role can update the status too. ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 13:07:27 2019 From: report at bugs.python.org (Arne Recknagel) Date: Fri, 11 Oct 2019 17:07:27 +0000 Subject: [issue34632] Port importlib_metadata to Python 3.8 In-Reply-To: <1536689803.48.0.0269046726804.issue34632@psf.upfronthosting.co.za> Message-ID: <1570813647.26.0.14140085788.issue34632@roundup.psfhosted.org> Arne Recknagel added the comment: I just learned that metadata is stored as an email, and changing the format was rejected in PEP 426. Be that as it may, if it isn't too much of an issue it might still be something that should be hidden from users of the module. Noone wants to know that this particular duck is actually powered by fins under the surface, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 13:17:31 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Oct 2019 17:17:31 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1570814251.15.0.834231648282.issue38449@roundup.psfhosted.org> Ned Deily added the comment: Marking as regression release blocker for 3.7.5 final and 3.8.0 final. ---------- keywords: +3.7regression nosy: +lukasz.langa, martin.panter, ned.deily, vstinner priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 13:18:38 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Oct 2019 17:18:38 +0000 Subject: [issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name In-Reply-To: <1409971957.28.0.64915967452.issue22347@psf.upfronthosting.co.za> Message-ID: <1570814318.03.0.695663535837.issue22347@roundup.psfhosted.org> Ned Deily added the comment: This change introduces a potential 3.7 regression; see Issue38449. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 13:19:23 2019 From: report at bugs.python.org (Shmuel H.) Date: Fri, 11 Oct 2019 17:19:23 +0000 Subject: [issue38444] dataclass: always generate default __init__ on __default_init__ In-Reply-To: <1570790378.12.0.986632197987.issue38444@roundup.psfhosted.org> Message-ID: <1570814363.12.0.347176845463.issue38444@roundup.psfhosted.org> Shmuel H. added the comment: The only other solution I could think about was to change setattr's behaviour dynamically so that it would be valid to call it from frozen instance's `__init__`, but I think it is somehow even worst. However, thanks for your help, I think we can close this one for now and I'll hopefully write that mail in the next day or two. As for other projects, I doubt I'll find any big projects that use frozen dataclasses internally, but I'll try my best to come with one. (Only now I realize that your the one behind python's dataclasses, keep up the good work!). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 13:24:08 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 11 Oct 2019 17:24:08 +0000 Subject: [issue35826] Typo in example for async with statement with condition In-Reply-To: <1548413052.91.0.387178410518.issue35826@roundup.psfhosted.org> Message-ID: <1570814648.09.0.869784050043.issue35826@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16297 pull_request: https://github.com/python/cpython/pull/16720 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 13:25:26 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 11 Oct 2019 17:25:26 +0000 Subject: [issue38436] Improved performance for list addition. In-Reply-To: <1570734964.11.0.75032337331.issue38436@roundup.psfhosted.org> Message-ID: <1570814726.35.0.890454189582.issue38436@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I have repeated the benchmark in the speed.python.org server with CPU isolation + PGO + LTO: Slower (21): - xml_etree_iterparse: 127 ms +- 2 ms -> 131 ms +- 2 ms: 1.03x slower (+3%) - xml_etree_parse: 195 ms +- 1 ms -> 200 ms +- 2 ms: 1.03x slower (+3%) - pickle_list: 5.62 us +- 0.05 us -> 5.76 us +- 0.06 us: 1.03x slower (+3%) - pickle: 13.2 us +- 0.1 us -> 13.5 us +- 0.1 us: 1.02x slower (+2%) - scimark_lu: 185 ms +- 3 ms -> 188 ms +- 5 ms: 1.02x slower (+2%) - scimark_fft: 427 ms +- 2 ms -> 434 ms +- 2 ms: 1.02x slower (+2%) - sympy_integrate: 25.0 ms +- 0.2 ms -> 25.3 ms +- 0.2 ms: 1.01x slower (+1%) - spectral_norm: 166 ms +- 3 ms -> 169 ms +- 1 ms: 1.01x slower (+1%) - scimark_sor: 246 ms +- 6 ms -> 249 ms +- 4 ms: 1.01x slower (+1%) - sympy_sum: 203 ms +- 2 ms -> 205 ms +- 2 ms: 1.01x slower (+1%) - chaos: 138 ms +- 1 ms -> 139 ms +- 1 ms: 1.01x slower (+1%) - json_loads: 37.2 us +- 1.0 us -> 37.5 us +- 0.3 us: 1.01x slower (+1%) - xml_etree_process: 91.0 ms +- 1.1 ms -> 91.7 ms +- 1.8 ms: 1.01x slower (+1%) - sympy_str: 315 ms +- 2 ms -> 317 ms +- 2 ms: 1.01x slower (+1%) - sqlalchemy_declarative: 210 ms +- 3 ms -> 211 ms +- 3 ms: 1.01x slower (+1%) - regex_compile: 214 ms +- 1 ms -> 215 ms +- 1 ms: 1.01x slower (+1%) - regex_dna: 268 ms +- 1 ms -> 270 ms +- 1 ms: 1.01x slower (+1%) - logging_format: 11.2 us +- 0.1 us -> 11.3 us +- 0.2 us: 1.01x slower (+1%) - unpickle_pure_python: 392 us +- 4 us -> 394 us +- 4 us: 1.00x slower (+0%) - sympy_expand: 492 ms +- 2 ms -> 493 ms +- 3 ms: 1.00x slower (+0%) - pidigits: 236 ms +- 1 ms -> 236 ms +- 1 ms: 1.00x slower (+0%) Faster (21): - unpack_sequence: 73.9 ns +- 1.3 ns -> 69.3 ns +- 1.0 ns: 1.07x faster (-6%) - 2to3: 405 ms +- 2 ms -> 393 ms +- 2 ms: 1.03x faster (-3%) - float: 146 ms +- 1 ms -> 142 ms +- 2 ms: 1.03x faster (-3%) - scimark_sparse_mat_mult: 5.46 ms +- 0.02 ms -> 5.34 ms +- 0.06 ms: 1.02x faster (-2%) - unpickle: 17.1 us +- 0.1 us -> 16.7 us +- 0.2 us: 1.02x faster (-2%) - regex_effbot: 3.89 ms +- 0.11 ms -> 3.82 ms +- 0.03 ms: 1.02x faster (-2%) - json_dumps: 15.9 ms +- 0.1 ms -> 15.7 ms +- 0.1 ms: 1.01x faster (-1%) - python_startup: 12.4 ms +- 0.1 ms -> 12.3 ms +- 0.0 ms: 1.01x faster (-1%) - go: 320 ms +- 4 ms -> 316 ms +- 3 ms: 1.01x faster (-1%) - pathlib: 25.4 ms +- 0.4 ms -> 25.1 ms +- 0.3 ms: 1.01x faster (-1%) - mako: 19.6 ms +- 0.2 ms -> 19.4 ms +- 0.1 ms: 1.01x faster (-1%) - fannkuch: 598 ms +- 7 ms -> 591 ms +- 4 ms: 1.01x faster (-1%) - hexiom: 12.2 ms +- 0.2 ms -> 12.1 ms +- 0.1 ms: 1.01x faster (-1%) - richards: 85.9 ms +- 1.3 ms -> 85.0 ms +- 1.3 ms: 1.01x faster (-1%) - python_startup_no_site: 9.18 ms +- 0.05 ms -> 9.09 ms +- 0.02 ms: 1.01x faster (-1%) - genshi_xml: 74.8 ms +- 0.6 ms -> 74.2 ms +- 0.9 ms: 1.01x faster (-1%) - nbody: 157 ms +- 2 ms -> 155 ms +- 2 ms: 1.01x faster (-1%) - unpickle_list: 5.89 us +- 0.03 us -> 5.85 us +- 0.04 us: 1.01x faster (-1%) - genshi_text: 36.7 ms +- 0.4 ms -> 36.5 ms +- 0.3 ms: 1.01x faster (-1%) - dulwich_log: 80.5 ms +- 0.5 ms -> 80.0 ms +- 0.5 ms: 1.01x faster (-1%) - regex_v8: 28.9 ms +- 0.1 ms -> 28.9 ms +- 0.1 ms: 1.00x faster (-0%) Benchmark hidden because not significant (15): chameleon, crypto_pyaes, deltablue, logging_silent, logging_simple, meteor_contest, nqueens, pickle_dict, pickle_pure_python, raytrace, scimark_monte_carlo, sqlalchemy_imperative, sqlite_synth, telco, xml_etree_generate Ignored benchmarks (3) of json/2019-09-16_14-25-master-89b8933bb537.json.gz: django_template, html5lib, tornado_http ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 13:26:13 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 11 Oct 2019 17:26:13 +0000 Subject: [issue38444] dataclass: always generate default __init__ on __default_init__ In-Reply-To: <1570790378.12.0.986632197987.issue38444@roundup.psfhosted.org> Message-ID: <1570814773.08.0.405919090572.issue38444@roundup.psfhosted.org> Eric V. Smith added the comment: Thanks. I'm always looking for ways to make dataclasses easier to use, while keeping within the original goals. I'll close this for now. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 13:30:37 2019 From: report at bugs.python.org (Brandt Bucher) Date: Fri, 11 Oct 2019 17:30:37 +0000 Subject: [issue38438] argparse "usage" overly-complex with nargs="*" In-Reply-To: <1570739079.02.0.395133592841.issue38438@roundup.psfhosted.org> Message-ID: <1570815037.94.0.638571991361.issue38438@roundup.psfhosted.org> Brandt Bucher added the comment: For backward compatibility with 2 metavars, the two-name form should still be possible. Just pass metavar=("FOO", "FOO"). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 13:31:45 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 11 Oct 2019 17:31:45 +0000 Subject: [issue38438] argparse "usage" overly-complex with nargs="*" In-Reply-To: <1570739079.02.0.395133592841.issue38438@roundup.psfhosted.org> Message-ID: <1570815105.06.0.37668452057.issue38438@roundup.psfhosted.org> Eric V. Smith added the comment: I don't think it's any more precise. It just seems verbose and confusing to me, while conveying the same information. `[arg [arg ...]]` to me means "optionally, an arg followed by one or more optional args". While `[arg ...]` to me means "optionally, one or more args". So, I'd vote for the simpler version, especially since we're presumably trying to communicate with people who aren't BNF or regex experts! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 13:46:13 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Fri, 11 Oct 2019 17:46:13 +0000 Subject: [issue38445] os.path.exists() takes bool as argument and returns True In-Reply-To: <1570792602.16.0.709405121857.issue38445@roundup.psfhosted.org> Message-ID: <1570815973.46.0.987380530534.issue38445@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 13:50:10 2019 From: report at bugs.python.org (Pouria) Date: Fri, 11 Oct 2019 17:50:10 +0000 Subject: [issue38451] Datetime definition does not work in function definition as list definition Message-ID: <1570816210.41.0.305155920593.issue38451@roundup.psfhosted.org> Change by Pouria : ---------- components: Library (Lib) nosy: Pouria_ff priority: normal severity: normal status: open title: Datetime definition does not work in function definition as list definition type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 13:57:16 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Oct 2019 17:57:16 +0000 Subject: [issue38432] ZeroDivisionError when inf is expected In-Reply-To: <1570723301.17.0.789552752187.issue38432@roundup.psfhosted.org> Message-ID: <1570816636.77.0.214519212711.issue38432@roundup.psfhosted.org> Serhiy Storchaka added the comment: See https://en.wikipedia.org/wiki/Denormal_number. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:00:15 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 11 Oct 2019 18:00:15 +0000 Subject: [issue38451] Datetime definition does not work in function definition as list definition Message-ID: <1570816815.04.0.693882405229.issue38451@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : Can you please add an example of the issue and the actual/expected behavior? ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 13:50:10 2019 From: report at bugs.python.org (Pouria) Date: Fri, 11 Oct 2019 17:50:10 +0000 Subject: [issue38451] Datetime definition does not work in function definition as list definition Message-ID: <1570816210.41.0.305155920593.issue38451@roundup.psfhosted.org> Change by Pouria : ---------- components: Library (Lib) nosy: Pouria_ff priority: normal severity: normal status: open title: Datetime definition does not work in function definition as list definition type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:20:35 2019 From: report at bugs.python.org (Brandt Bucher) Date: Fri, 11 Oct 2019 18:20:35 +0000 Subject: [issue38436] Improved performance for list addition. In-Reply-To: <1570734964.11.0.75032337331.issue38436@roundup.psfhosted.org> Message-ID: <1570818035.53.0.99455845507.issue38436@roundup.psfhosted.org> Brandt Bucher added the comment: Thanks, Pablo, for providing that. So the changes look like mostly a wash on these benchmarks. Serhiy: I do not see any significant change in + operator timing on my machine (again, just a rough test): $ ./python.exe -m timeit -s z=0 z+0 # master 10000000 loops, best of 5: 21.3 nsec per loop $ ./python.exe -m timeit -s z=0 z+0 # list-add 10000000 loops, best of 5: 21.2 nsec per loop I'm aware that unpacking is "better". With that said, adding a list literal (or a slice of any list, or a list comprehension) to another list is a fairly common operation (I count several dozen examples in the stdlib). Even though these cases only have two operands, they will still see the speed-up. And the speed-up is good, even in these cases. You can compare using the new code: $ ./python.exe -m timeit -s l=[0,1,2,3] [0,1,2,3]+l # Hits new branch 5000000 loops, best of 5: 87.9 nsec per loop $ ./python.exe -m timeit -s l=[0,1,2,3] l+[0,1,2,3] # Hits old branch 5000000 loops, best of 5: 92.5 nsec per loop ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:23:50 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 11 Oct 2019 18:23:50 +0000 Subject: [issue38424] typing.Generator shorthand In-Reply-To: <1570671541.73.0.307162838122.issue38424@roundup.psfhosted.org> Message-ID: <1570818230.42.0.922592428604.issue38424@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:24:00 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 11 Oct 2019 18:24:00 +0000 Subject: [issue38431] dataclasses.InitVar breaks with typing.Optional In-Reply-To: <1570721462.15.0.939525387822.issue38431@roundup.psfhosted.org> Message-ID: <1570818240.29.0.733820824907.issue38431@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:25:13 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 11 Oct 2019 18:25:13 +0000 Subject: [issue38446] Ambiguous signature for builtins.__build_class__ In-Reply-To: <1570793351.47.0.198943437011.issue38446@roundup.psfhosted.org> Message-ID: <1570818313.37.0.650138750456.issue38446@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:26:12 2019 From: report at bugs.python.org (Brandt Bucher) Date: Fri, 11 Oct 2019 18:26:12 +0000 Subject: [issue38436] Improved performance for list addition. In-Reply-To: <1570734964.11.0.75032337331.issue38436@roundup.psfhosted.org> Message-ID: <1570818372.75.0.651389909478.issue38436@roundup.psfhosted.org> Brandt Bucher added the comment: ...and obviously the gains are more pronounced for more/longer lists. In general I'm not married to this change, though. If the consensus is "not worth it", I get it. But it seems like too easy of a win to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:26:14 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Oct 2019 18:26:14 +0000 Subject: [issue38445] os.path.exists() takes bool as argument and returns True In-Reply-To: <1570792602.16.0.709405121857.issue38445@roundup.psfhosted.org> Message-ID: <1570818374.69.0.410773713453.issue38445@roundup.psfhosted.org> Serhiy Storchaka added the comment: Eryk, I think testing for bool in _fd_converter and issuing a warning is a good idea. Do you want to create a PR? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:26:18 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 11 Oct 2019 18:26:18 +0000 Subject: [issue38424] typing.Generator shorthand In-Reply-To: <1570671541.73.0.307162838122.issue38424@roundup.psfhosted.org> Message-ID: <1570818378.23.0.431241275361.issue38424@roundup.psfhosted.org> Ivan Levkivskyi added the comment: If you would like to propose a doc fix, then please go ahead and make a PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:26:28 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 11 Oct 2019 18:26:28 +0000 Subject: [issue38424] typing.Generator shorthand In-Reply-To: <1570671541.73.0.307162838122.issue38424@roundup.psfhosted.org> Message-ID: <1570818388.47.0.245768756245.issue38424@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:29:49 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Oct 2019 18:29:49 +0000 Subject: [issue38424] typing.Generator shorthand In-Reply-To: <1570671541.73.0.307162838122.issue38424@roundup.psfhosted.org> Message-ID: <1570818589.76.0.696835463626.issue38424@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is already documented, with examples. I do not think the documentation can be made better. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:34:45 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 11 Oct 2019 18:34:45 +0000 Subject: [issue38424] typing.Generator shorthand In-Reply-To: <1570671541.73.0.307162838122.issue38424@roundup.psfhosted.org> Message-ID: <1570818885.33.0.0819596516023.issue38424@roundup.psfhosted.org> Ivan Levkivskyi added the comment: Actually Serhiy is right, I just checked and found this sentence: ``` Alternatively, annotate your generator as having a return type of either Iterable[YieldType] or Iterator[YieldType] ``` ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:37:08 2019 From: report at bugs.python.org (Brandt Bucher) Date: Fri, 11 Oct 2019 18:37:08 +0000 Subject: [issue36229] Avoid unnecessary copies for list, set, and bytearray ops. In-Reply-To: <1551994791.27.0.137413280424.issue36229@roundup.psfhosted.org> Message-ID: <1570819028.34.0.0623587989712.issue36229@roundup.psfhosted.org> Change by Brandt Bucher : ---------- pull_requests: +16298 pull_request: https://github.com/python/cpython/pull/16705 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:43:44 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Oct 2019 18:43:44 +0000 Subject: [issue38436] Improved performance for list addition. In-Reply-To: <1570734964.11.0.75032337331.issue38436@roundup.psfhosted.org> Message-ID: <1570819424.93.0.770331724126.issue38436@roundup.psfhosted.org> Serhiy Storchaka added the comment: > I do not see any significant change in + operator timing on my machine (again, just a rough test): Because the time includes the time of iterating, which can be significant in comparison with adding two integers. Please use the pyperf module with --duplicate=1000. > I'm aware that unpacking is "better". With that said, adding a list literal (or a slice of any list, or a list comprehension) to another list is a fairly common operation (I count several dozen examples in the stdlib). Could you provide any numbers? For example you can patch ceval.c to count these BINARY_ADD for which your optimization works and these for which it does not work and output counts at the exit of Python. Run several Python programs with the modified interpreter. Tests are bad example, but better than nothing. Something like hg would be better. You are free to find programs that would benefit the most from your optimization. > And the speed-up is good, even in these cases. 5%. It is not impressive for optimizing a single rare operation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:46:05 2019 From: report at bugs.python.org (Armin Rigo) Date: Fri, 11 Oct 2019 18:46:05 +0000 Subject: [issue36229] Avoid unnecessary copies for list, set, and bytearray ops. In-Reply-To: <1551994791.27.0.137413280424.issue36229@roundup.psfhosted.org> Message-ID: <1570819565.17.0.415670681804.issue36229@roundup.psfhosted.org> Change by Armin Rigo : ---------- nosy: -arigo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 14:59:01 2019 From: report at bugs.python.org (=?utf-8?b?UsO8ZGlnZXIgUGzDvG0=?=) Date: Fri, 11 Oct 2019 18:59:01 +0000 Subject: [issue38347] pathfix.py does not find Python scripts that have '-' in its filename In-Reply-To: <1570007735.24.0.378926810144.issue38347@roundup.psfhosted.org> Message-ID: <1570820341.47.0.362012464779.issue38347@roundup.psfhosted.org> R?diger Pl?m added the comment: Welcome Victor Stinner. Any chance to get it also backported to 3.6 as I guess this would increase the chance to see it in RedHat 8 where I hit the issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 15:24:51 2019 From: report at bugs.python.org (Brandt Bucher) Date: Fri, 11 Oct 2019 19:24:51 +0000 Subject: [issue38436] Improved performance for list addition. In-Reply-To: <1570734964.11.0.75032337331.issue38436@roundup.psfhosted.org> Message-ID: <1570821891.78.0.986011233513.issue38436@roundup.psfhosted.org> Brandt Bucher added the comment: Serhiy, here are the better performance measurements: $ ./python.exe -m pyperf timeit --duplicate=1000 -s z=0 z+0 # list-add ..................... Mean +- std dev: 17.3 ns +- 0.3 ns $ ./python.exe -m pyperf timeit --duplicate=1000 -s z=0 z+0 # master ..................... Mean +- std dev: 17.2 ns +- 0.3 ns $ ./python.exe -m pyperf timeit --duplicate=1000 -s l=[0,1,2,3] [0,1,2,3]+l # New branch ..................... Mean +- std dev: 92.6 ns +- 1.7 ns $ ./python.exe -m pyperf timeit --duplicate=1000 -s l=[0,1,2,3] l+[0,1,2,3] # Old branch ..................... Mean +- std dev: 99.8 ns +- 1.4 ns Honestly, I'll defer to you here. If you feel like pursuing this is a total waste of time, I'll just close the issue/PR. Otherwise I can explore how often the branch is hit in production code, as you suggested. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 16:11:09 2019 From: report at bugs.python.org (Abhilash Raj) Date: Fri, 11 Oct 2019 20:11:09 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1570824669.53.0.427945750391.issue38449@roundup.psfhosted.org> Abhilash Raj added the comment: I am looking into the issue. ---------- nosy: +maxking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 16:13:43 2019 From: report at bugs.python.org (Caris Moses) Date: Fri, 11 Oct 2019 20:13:43 +0000 Subject: [issue21478] mock calls don't propagate to parent (autospec) In-Reply-To: <1399899394.81.0.714942512868.issue21478@psf.upfronthosting.co.za> Message-ID: <1570824823.97.0.629660389969.issue21478@roundup.psfhosted.org> Caris Moses added the comment: Hello, I am still running into this issue. I have tested the following code with Python 3.7.4, 3.7.5rc1 , and 3.8.0rc1. from unittest import TestCase from unittest.mock import patch, Mock, call class MyObject: def __init__(self): self.foo = 0 self.bar = 0 def set_foo(self, value): self.foo = value def set_bar(self, value): self.bar = value def do_something(): o = MyObject() o.set_foo(3) o.set_bar(4) return 'something unrelated' class MyObjectTest(TestCase): @patch('test_mock.MyObject.set_bar', autospec=True) @patch('test_mock.MyObject.set_foo', autospec=True) def test_do_something(self, mock_set_foo, mock_set_bar): manager = Mock() manager.attach_mock(mock_set_foo, 'set_foo_func') manager.attach_mock(mock_set_bar, 'set_bar_func') do_something() assert manager.mock_calls == [call.set_foo_func(3), call.set_bar_func(4)] ---------- nosy: +Caris Moses _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 16:29:08 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 11 Oct 2019 20:29:08 +0000 Subject: [issue38395] proxy_contains (weakref.proxy) can access an object with 0 refcount In-Reply-To: <1570459749.44.0.879317891234.issue38395@roundup.psfhosted.org> Message-ID: <1570825748.77.0.522059723725.issue38395@roundup.psfhosted.org> miss-islington added the comment: New changeset 193366e25c4f84a58d2f6c6c577fd9f0143dc6e1 by Miss Islington (bot) (Pablo Galindo) in branch '3.7': [3.7] bpo-38395: Fix ownership in weakref.proxy methods (GH-16632) (GH-16663) https://github.com/python/cpython/commit/193366e25c4f84a58d2f6c6c577fd9f0143dc6e1 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 16:35:09 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 11 Oct 2019 20:35:09 +0000 Subject: [issue21478] mock calls don't propagate to parent (autospec) In-Reply-To: <1399899394.81.0.714942512868.issue21478@psf.upfronthosting.co.za> Message-ID: <1570826109.12.0.536355023799.issue21478@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Oh well :( My initial guess is that the report is for methods. The other reports were for functions. So I am wondering if the check for FunctionType is successful and if I need to handle something more. I haven't tried it yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 16:42:25 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 11 Oct 2019 20:42:25 +0000 Subject: [issue38341] Add SMTPNotSupportedError in the exports of smtplib In-Reply-To: <1569963046.98.0.477841717728.issue38341@roundup.psfhosted.org> Message-ID: <1570826545.42.0.0884915278397.issue38341@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16299 pull_request: https://github.com/python/cpython/pull/16721 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 16:49:18 2019 From: report at bugs.python.org (Brandt Bucher) Date: Fri, 11 Oct 2019 20:49:18 +0000 Subject: [issue38436] Improved performance for list addition. In-Reply-To: <1570734964.11.0.75032337331.issue38436@roundup.psfhosted.org> Message-ID: <1570826958.05.0.996283006757.issue38436@roundup.psfhosted.org> Brandt Bucher added the comment: I went ahead and ran an instrumented build on some random production code (mostly financial data processing), just because I was curious: BINARY_ADD ops: 3,720,776 BINARY_ADD ops with two lists: 100,452 (2.7% of total) BINARY_ADD with new fast path: 26,357 (26.2% of list adds, 0.7% of total) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 16:51:16 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Oct 2019 20:51:16 +0000 Subject: [issue38450] 3.8 Release Notes: IDLE section dupe In-Reply-To: <1570809778.37.0.687630988781.issue38450@roundup.psfhosted.org> Message-ID: <1570827076.13.0.704929265382.issue38450@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the report! Those whatsnew issues are being addressed in PR 16621. ---------- nosy: +ned.deily resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 16:56:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2019 20:56:34 +0000 Subject: [issue38347] pathfix.py does not find Python scripts that have '-' in its filename In-Reply-To: <1570007735.24.0.378926810144.issue38347@roundup.psfhosted.org> Message-ID: <1570827394.5.0.607338696402.issue38347@roundup.psfhosted.org> STINNER Victor added the comment: > Welcome Victor Stinner. Any chance to get it also backported to 3.6 as I guess this would increase the chance to see it in RedHat 8 where I hit the issue? Python 3.6 doesn't accept bugfixes upstream. If you are a Red Hat customer, you can contact the support to request a backport. Or you can copy the file from the master branch :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 16:58:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2019 20:58:46 +0000 Subject: [issue38445] os.path.exists() takes bool as argument and returns True In-Reply-To: <1570792602.16.0.709405121857.issue38445@roundup.psfhosted.org> Message-ID: <1570827526.63.0.0245680273186.issue38445@roundup.psfhosted.org> STINNER Victor added the comment: Maybe os.fspath() can be used: >>> os.fspath(True) Traceback (most recent call last): File "", line 1, in TypeError: expected str, bytes or os.PathLike object, not bool ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 17:09:27 2019 From: report at bugs.python.org (Caris Moses) Date: Fri, 11 Oct 2019 21:09:27 +0000 Subject: [issue21478] mock calls don't propagate to parent (autospec) In-Reply-To: <1399899394.81.0.714942512868.issue21478@psf.upfronthosting.co.za> Message-ID: <1570828167.49.0.553181497043.issue21478@roundup.psfhosted.org> Caris Moses added the comment: I tried it with mocked functions instead of methods and got the same result, so I dug into this a little deeper. It seems as though the issue it how the mocked functions are called. If I replace the do_something() line with the following then it works. #do_something() manager.set_foo_func(3) manager.set_bar_func(4) I am a beginner with unittest so please let me know if I am just using this incorrectly. However in the original code I posted, if I print(manager.set_foo_func.mock_calls, manager.set_bar_func.mock_calls) I get the calls made in do_something(), however print(manager.mock_calls) returns an empty list which leads me to believe something else is wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 17:10:23 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Oct 2019 21:10:23 +0000 Subject: [issue38270] Tests: Avoid MD5 or check for MD5 availablity In-Reply-To: <1569406198.76.0.145895264341.issue38270@roundup.psfhosted.org> Message-ID: <1570828223.52.0.709136411732.issue38270@roundup.psfhosted.org> Ned Deily added the comment: It looks like Christian originally requested autobackports to both 3.8 and 3.7 but both failed due to git checkout errors. He then manually restarted the 3.8 backport but it looks like the 3.7 one did not get restarted. Christian, was that intentional or just an oversight? If the latter, you should try the 3.7 backport again. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 17:22:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2019 21:22:31 +0000 Subject: [issue28188] os.putenv should support bytes arguments on Windows In-Reply-To: <1474123387.93.0.730915025745.issue28188@psf.upfronthosting.co.za> Message-ID: <1570828951.53.0.783840045939.issue28188@roundup.psfhosted.org> STINNER Victor added the comment: In the meanwhile, the PEP 540 "UTF-8 Mode" has been implemented. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 17:22:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2019 21:22:50 +0000 Subject: [issue28188] os.putenv should support bytes arguments on Windows In-Reply-To: <1474123387.93.0.730915025745.issue28188@psf.upfronthosting.co.za> Message-ID: <1570828970.52.0.516411287432.issue28188@roundup.psfhosted.org> STINNER Victor added the comment: This issue was referenced from https://bugs.python.org/issue29240#msg285482 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 17:26:30 2019 From: report at bugs.python.org (Abhilash Raj) Date: Fri, 11 Oct 2019 21:26:30 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1570829190.29.0.583026963073.issue38449@roundup.psfhosted.org> Abhilash Raj added the comment: The bug is interesting due to some of the implementation details of "guess_type". The documentation says that it can parse either a URL or a filename. Switching from urllib.parse._splittype to urllib.parse.urlparse changed what a valid "path" is. _splittype doesn't care about the rest of the URL except the scheme, but urlparse does. Previously, we used to split things like: >>> print(urllib.parse._splittype(';1.tar.gz') (None, ';1.tar.gz') Then, we'd just treat the 2nd part as a filesystem path, which would rightfully guess the extension as .tar.gz However, switching to using parsing via urllib.parse.urlparse, we get: >>> print(urllib.parse.urlparse(';1.tar.gz') ParseResult(scheme='', netloc='', path='', params='1.tar.gz', query='', fragment='') And then we get the ".path" attribute for further processing, which being empty, returns (None, None). The format of all these parts is: scheme://netloc/path;parameters?query#fragment A simple fix would be to just merge path, parameters, query and fragment together (with appropriate delimiters) and the proceed with further processing. That would fix parsing of Filesystem paths but would break (again) parsing of URLs like: >>> mimetypes.guess_type('http://example.com/index.html;1.tar.gz') ('application/x-tar', 'gzip') It should return 'text/html' as the type, since this is a URL and everything after the ';' should not be used to determine the mimetype. But, if there is no scheme provided, we should treat it as a filesystem path and in that case 'application/x-tar' is the right type. I hope I am not confusing everyone here. The right fix IMO would be to make "guess_type" not treat URLs and filesytem paths alike. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 17:28:59 2019 From: report at bugs.python.org (Danylo) Date: Fri, 11 Oct 2019 21:28:59 +0000 Subject: [issue38452] unittest setUpClass missing 1 required positional argument: 'cls' Message-ID: <1570829339.09.0.69466145285.issue38452@roundup.psfhosted.org> New submission from Danylo : Currently, unittest setUpClass and tearDownClass methods are incorrectly called from within its core. ``` class TestUltrasonicEnv(unittest.TestCase): def setUpClass(cls): pass def tearDownClass(cls): pass ``` Traceback (the same for teadDownClass) ``` File "/home/dizcza/anaconda3/envs/robotsim/lib/python3.7/unittest/suite.py", line 163, in _handleClassSetUp setUpClass() TypeError: setUpClass() missing 1 required positional argument: 'cls' ``` The traceback is self-descriptive. ---------- components: Tests messages: 354501 nosy: dizcza priority: normal severity: normal status: open title: unittest setUpClass missing 1 required positional argument: 'cls' versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 17:32:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2019 21:32:55 +0000 Subject: [issue32238] Handle "POSIX" in the legacy locale detection In-Reply-To: <1512606515.62.0.213398074469.issue32238@psf.upfronthosting.co.za> Message-ID: <1570829575.93.0.410995116988.issue32238@roundup.psfhosted.org> STINNER Victor added the comment: In Python 3.8, if the LC_CTYPE is "POSIX", the default stdio error handler is now "surrogateescape" instead of "strict", and the UTF-8 is now enabled. In short, LC_CTYPE="POSIX" now behaves as LC_CTYPE="C". This change impacts at least FreeBSD. If I correctly, if there is no LC_ALL, LC_CTYPE or LANG environment variable on FreeBSD, the LC_CTYPE locale is "POSIX". See bpo-34485, bpo-19977 and the "POSIX locale on FreeBSD" section of my article: https://vstinner.github.io/python3-locales-encodings.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 17:35:15 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2019 21:35:15 +0000 Subject: [issue30672] PEP 538: Unexpected locale behaviour on *BSD (including Mac OS X) In-Reply-To: <1497518633.36.0.998856107706.issue30672@psf.upfronthosting.co.za> Message-ID: <1570829715.63.0.560576591098.issue30672@roundup.psfhosted.org> STINNER Victor added the comment: Since this issue has been created, I deeply reworked the Python Initialization with the PEP 587, and I made many changes related to locales and the UTF-8 Mode (PEP 540). What's the status of this issue? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 17:36:49 2019 From: report at bugs.python.org (Tal Einat) Date: Fri, 11 Oct 2019 21:36:49 +0000 Subject: [issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0 In-Reply-To: <1570326378.93.0.0728676630318.issue38382@roundup.psfhosted.org> Message-ID: <1570829809.66.0.663005342504.issue38382@roundup.psfhosted.org> Tal Einat added the comment: I'd certainly be surprised to have the order of zero and negative values in the input have such a dramatic effect on the result. It would make debugging these cases unnecessarily confusing and difficult. And I think it is indeed worth fixing, as these edge-cases are likely to come up of time when dealing with large amounts of data. I'm +1 on Warren's latest suggestion for a fix. P.S If we agree on this, either Warren should make the fix himself or we should mark it "newcomer friendly" and let a newcomer handle it. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 17:38:52 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Oct 2019 21:38:52 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1570829932.39.0.798660765805.issue38449@roundup.psfhosted.org> Ned Deily added the comment: Thanks for looking into this, @maxking. With both 3.8.0 final and 3.7.5 final scheduled for just a few days away, I wonder if the best thing to do at this point is to revert them and work on a more robust fix targeted for the next maintenance releases since the original issue was not identified as being a security issue or otherwise critical. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 17:53:36 2019 From: report at bugs.python.org (Zachary Ware) Date: Fri, 11 Oct 2019 21:53:36 +0000 Subject: [issue38452] unittest setUpClass missing 1 required positional argument: 'cls' In-Reply-To: <1570829339.09.0.69466145285.issue38452@roundup.psfhosted.org> Message-ID: <1570830816.62.0.685824711935.issue38452@roundup.psfhosted.org> Zachary Ware added the comment: `setUpClass` and `tearDownClass` are classmethods and must be decorated as such (`@classmethod`). ---------- nosy: +zach.ware resolution: -> not a bug status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 18:09:28 2019 From: report at bugs.python.org (Tal Einat) Date: Fri, 11 Oct 2019 22:09:28 +0000 Subject: [issue38401] Make dataclass attribute docstrings accessible In-Reply-To: <1570494293.05.0.934356434949.issue38401@roundup.psfhosted.org> Message-ID: <1570831768.84.0.161865175743.issue38401@roundup.psfhosted.org> Tal Einat added the comment: Thanks for this suggestion John! Unfortunately, only the first string literal in the example is a doc-string, and the rest indeed are not. (PEP-258 suggested adding such doc-strings, but it was rejected.) There is currently no standard way to attach a doc-string to a field in dataclasses, nor in attrs on which dataclasses was mostly based. However, both libraries support custom field meta-data, using which one could add such per-field documentation. So if one really needs something like this, it is possible to work up a custom solution. Eric is correct that this is far from a straightforward suggestion, which would require a significant language change to implement. Due to the depth of the change required, it would need to be discussed on Python-ideas mailing list first. Please bring this up there if you'd like to pursue this further. I'm closing this as "rejected" for now since I believe the likelihood of pursuing this to be very small, but this can be re-opened later if further discussion warrants it. ---------- nosy: +taleinat resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 18:11:34 2019 From: report at bugs.python.org (Tal Einat) Date: Fri, 11 Oct 2019 22:11:34 +0000 Subject: [issue38422] Clarify docstrings of pathlib suffix(es) In-Reply-To: <1570634139.23.0.159522926495.issue38422@roundup.psfhosted.org> Message-ID: <1570831894.26.0.904939799452.issue38422@roundup.psfhosted.org> Tal Einat added the comment: >From the PR, the rationale for this suggestion is: "Whenever I use path.suffix I have to check again whether it includes the dot or not. I decided to add it to the docstring so I won't have to keep checking." ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 18:27:20 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 11 Oct 2019 22:27:20 +0000 Subject: [issue38453] ntpath.realpath() should make absolute path earlier Message-ID: <1570832840.2.0.910161330311.issue38453@roundup.psfhosted.org> New submission from Steve Dower : Because the abspath() call is deferred until the end of the resolution process, if the current working directory is not already a real path, it will not be fully resolved. By passing it through abspath() at the start of the function, we ensure that the correct path is resolved. This will help resolve some inconsistencies in the test suite when tests are launched with a short filename (FILENA~1) in the working directory (though some other fixes are probably needed to help here). ---------- components: Windows messages: 354509 nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: ntpath.realpath() should make absolute path earlier type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 18:28:48 2019 From: report at bugs.python.org (Tal Einat) Date: Fri, 11 Oct 2019 22:28:48 +0000 Subject: [issue38440] Possible new issues with IDLE In-Reply-To: <1570768048.83.0.927013766779.issue38440@roundup.psfhosted.org> Message-ID: <1570832928.88.0.141910149787.issue38440@roundup.psfhosted.org> Change by Tal Einat : ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 18:33:37 2019 From: report at bugs.python.org (Tal Einat) Date: Fri, 11 Oct 2019 22:33:37 +0000 Subject: [issue38445] os.path.exists() takes bool as argument and returns True In-Reply-To: <1570792602.16.0.709405121857.issue38445@roundup.psfhosted.org> Message-ID: <1570833217.4.0.145323226534.issue38445@roundup.psfhosted.org> Tal Einat added the comment: Mariano Anaya, you're welcome to work on this and create a PR. There's no need to have this issue assigned to you: feel free to just begin working. Anyone reading this will know that you intended to work on this. (FYI, we only assign issues to core developers, and assigning means something slightly different than "who is working on this.") ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 18:35:42 2019 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 11 Oct 2019 22:35:42 +0000 Subject: [issue38450] 3.8 Release Notes: IDLE section dupe In-Reply-To: <1570809778.37.0.687630988781.issue38450@roundup.psfhosted.org> Message-ID: <1570833342.66.0.742406640246.issue38450@roundup.psfhosted.org> Change by A.M. Kuchling : ---------- pull_requests: +16300 pull_request: https://github.com/python/cpython/pull/16621 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 18:42:30 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 11 Oct 2019 22:42:30 +0000 Subject: [issue38453] ntpath.realpath() should make absolute path earlier In-Reply-To: <1570832840.2.0.910161330311.issue38453@roundup.psfhosted.org> Message-ID: <1570833750.17.0.50048470532.issue38453@roundup.psfhosted.org> Steve Dower added the comment: Updating change_cwd() in Lib/test/support/__init__.py to call chdir(realpath(path)) also fixes the test issues I was facing, but the realpath() implementation needs fixing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 19:01:47 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 11 Oct 2019 23:01:47 +0000 Subject: [issue38453] ntpath.realpath() should make absolute path earlier In-Reply-To: <1570832840.2.0.910161330311.issue38453@roundup.psfhosted.org> Message-ID: <1570834907.72.0.7600910022.issue38453@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +16301 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16723 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 19:03:21 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 11 Oct 2019 23:03:21 +0000 Subject: [issue38453] ntpath.realpath() should make absolute path earlier In-Reply-To: <1570832840.2.0.910161330311.issue38453@roundup.psfhosted.org> Message-ID: <1570835001.84.0.963288087726.issue38453@roundup.psfhosted.org> Steve Dower added the comment: PR 16723 is just for the test fix. The realpath() fix should get tests that chdir (without change_cwd()) into a symlink and then realpath() on a relative path. Today, that should fail to resolve the sections in the CWD, and with the fix it should resolve the entire path. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 20:38:51 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 12 Oct 2019 00:38:51 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1570840731.6.0.443857779991.issue38449@roundup.psfhosted.org> Abhilash Raj added the comment: Yeah, I agree. I'll submit a PR for reverting the commits. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 20:42:58 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 12 Oct 2019 00:42:58 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1570840978.15.0.68222021928.issue38449@roundup.psfhosted.org> Change by Abhilash Raj : ---------- keywords: +patch pull_requests: +16302 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16724 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 20:42:58 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 12 Oct 2019 00:42:58 +0000 Subject: [issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name In-Reply-To: <1409971957.28.0.64915967452.issue22347@psf.upfronthosting.co.za> Message-ID: <1570840978.29.0.853260303709.issue22347@roundup.psfhosted.org> Change by Abhilash Raj : ---------- pull_requests: +16303 pull_request: https://github.com/python/cpython/pull/16724 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 20:50:15 2019 From: report at bugs.python.org (Eryk Sun) Date: Sat, 12 Oct 2019 00:50:15 +0000 Subject: [issue38445] os.path.exists() takes bool as argument and returns True In-Reply-To: <1570792602.16.0.709405121857.issue38445@roundup.psfhosted.org> Message-ID: <1570841415.31.0.436808755077.issue38445@roundup.psfhosted.org> Eryk Sun added the comment: > Maybe os.fspath() can be used I think that would already be the case if genericpath.exists didn't have to support file descriptors. It's documented that the path argument "refers to an existing path or an open file descriptor". Modifying _fd_converter would provide consistent behavior for all calls that ultimately use argument clinic's path_t(allow_fd=True) and/or dir_fd. Serhiy's suggestion to raise a warning sounds good. Here are some examples that currently pass silently in Linux: >>> os.chown(False, 1000, 1000) >>> os.chmod(False, 0o666) >>> os.utime(False, (1500000000, 1500000000)) Probably os.fstat and other "f" functions (e.g. fstatvfs, fchdir, fchown, fchmod, ftruncate, fdatasync, fsync, and fpathconf) should also raise a warning when passed a bool. For example, the following would raise a warning instead of passing silently: >>> os.fstat(False).st_size 0 These cases could be addressed by consistently using an argument clinic type. Some of them already us the fildes type (e.g. fchdir, fsync, fdatasync). However, fildes_converter calls PyObject_AsFileDescriptor, which also supports objects with a fileno() method. That's documented behavior for PyObject_AsFileDescriptor, but nothing in the documentation of fchdir, fsync, and fdatasync suggests to me that they support objects with a fileno() method: >>> os.fchdir(sys.stdin) Traceback (most recent call last): File "", line 1, in NotADirectoryError: [Errno 20] Not a directory If not for this behavior, we could simply change all of the "f" functions to use the fildes type. PyObject_AsFileDescriptor is used in various other places as well, such as the select module. In the latter case, supporting objects with a fileno() method is clearly documented. Also consider including open() and os.fdopen by modifying _io_open_impl in Modules/_io/_iomodule.c. For example: >>> open(False, closefd=False) <_io.TextIOWrapper name=False mode='r' encoding='UTF-8'> Currently it calls PyNumber_Check(file). If true, a warning could be raised if PyBool_Check(file) is also true. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 21:51:50 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 12 Oct 2019 01:51:50 +0000 Subject: [issue38378] os.sendfile() has improperly named parameter In-Reply-To: <1570287843.24.0.0727618245068.issue38378@roundup.psfhosted.org> Message-ID: <1570845110.16.0.616048006376.issue38378@roundup.psfhosted.org> Giampaolo Rodola' added the comment: I?m for renaming both. Since the function is about transmitting or copying (on Linux) files src_fd and dst_fd could also be good candidates. ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 23:15:55 2019 From: report at bugs.python.org (Dima Tisnek) Date: Sat, 12 Oct 2019 03:15:55 +0000 Subject: [issue38424] typing.Generator shorthand In-Reply-To: <1570671541.73.0.307162838122.issue38424@roundup.psfhosted.org> Message-ID: <1570850155.72.0.653488270828.issue38424@roundup.psfhosted.org> Dima Tisnek added the comment: Clearly my attention span does not exceed 5 paragraphs, so sorry! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 00:46:31 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 12 Oct 2019 04:46:31 +0000 Subject: [issue38451] Datetime definition does not work in function definition as list definition In-Reply-To: <1570816815.04.0.693882405229.issue38451@roundup.psfhosted.org> Message-ID: <1570855591.22.0.786733575382.issue38451@roundup.psfhosted.org> Terry J. Reedy added the comment: Without more information, we cannot do anything with this. ---------- nosy: +terry.reedy status: open -> pending versions: -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 01:06:32 2019 From: report at bugs.python.org (Batuhan) Date: Sat, 12 Oct 2019 05:06:32 +0000 Subject: [issue38454] test_listdir is failing on ubuntu with WSL Message-ID: <1570856792.9.0.835565691535.issue38454@roundup.psfhosted.org> New submission from Batuhan : Run tests sequentially 0:00:00 load avg: 0.52 [1/1] test_os test test_os failed -- Traceback (most recent call last): File "/home/isidentical/cpython/Lib/test/test_os.py", line 2059, in test_listdir self.assertEqual(found, expected) AssertionError: Items in the first set but not the second: '@test_12966_tmp-?' Items in the second set but not the first: '@test_12966_tmp-\udcff' test_os failed == Tests result: FAILURE == 1 test failed: test_os Total duration: 2 sec 587 ms Tests result: FAILURE System: - Ubuntu 18.04 bionic - x86_64 Linux 4.4.0-18362-Microsoft ---------- components: Tests messages: 354518 nosy: BTaskaya, steve.dower priority: normal severity: normal status: open title: test_listdir is failing on ubuntu with WSL versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 01:06:50 2019 From: report at bugs.python.org (Pouria) Date: Sat, 12 Oct 2019 05:06:50 +0000 Subject: [issue38451] Datetime definition does not work in function definition as list definition In-Reply-To: <1570855591.22.0.786733575382.issue38451@roundup.psfhosted.org> Message-ID: Pouria added the comment: For example Def a(time=datetime.datetime.today()): Print(time) Output: The output of each run is equal to the first time output For exaple : If you run a() Sleep(10) a() Sleep(10) a() You see one output three time ?? ????? ???? ?? ????? ?????? ?:?? Terry J. Reedy ????: > > Terry J. Reedy added the comment: > > Without more information, we cannot do anything with this. > > ---------- > nosy: +terry.reedy > status: open -> pending > versions: -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 01:10:36 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 12 Oct 2019 05:10:36 +0000 Subject: [issue38451] Datetime definition does not work in function definition as list definition In-Reply-To: <1570816815.04.0.693882405229.issue38451@roundup.psfhosted.org> Message-ID: <1570857036.84.0.34129408011.issue38451@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Default arguments are evaluated only once as the function is defined and not per call. This is a common gotcha : https://stackoverflow.com/questions/1132941/least-astonishment-and-the-mutable-default-argument ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 01:41:50 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Oct 2019 05:41:50 +0000 Subject: [issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name In-Reply-To: <1409971957.28.0.64915967452.issue22347@psf.upfronthosting.co.za> Message-ID: <1570858910.71.0.335374592646.issue22347@roundup.psfhosted.org> miss-islington added the comment: New changeset 19a3d873005e5730eeabdc394c961e93f2ec02f0 by Miss Islington (bot) (Abhilash Raj) in branch 'master': bpo-38449: Revert "bpo-22347: Update mimetypes.guess_type to allow oper parsing of URLs (GH-15522)" (GH-16724) https://github.com/python/cpython/commit/19a3d873005e5730eeabdc394c961e93f2ec02f0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 01:41:54 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Oct 2019 05:41:54 +0000 Subject: [issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name In-Reply-To: <1409971957.28.0.64915967452.issue22347@psf.upfronthosting.co.za> Message-ID: <1570858914.01.0.296709556077.issue22347@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16305 pull_request: https://github.com/python/cpython/pull/16725 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 01:41:50 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Oct 2019 05:41:50 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1570858910.87.0.692949868217.issue38449@roundup.psfhosted.org> miss-islington added the comment: New changeset 19a3d873005e5730eeabdc394c961e93f2ec02f0 by Miss Islington (bot) (Abhilash Raj) in branch 'master': bpo-38449: Revert "bpo-22347: Update mimetypes.guess_type to allow oper parsing of URLs (GH-15522)" (GH-16724) https://github.com/python/cpython/commit/19a3d873005e5730eeabdc394c961e93f2ec02f0 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 01:41:53 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Oct 2019 05:41:53 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1570858913.72.0.72407936528.issue38449@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16304 pull_request: https://github.com/python/cpython/pull/16725 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 02:04:23 2019 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 12 Oct 2019 06:04:23 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1570860263.87.0.0609286891195.issue38449@roundup.psfhosted.org> Dong-hee Na added the comment: I'd like to suggest add unit test for the report case. So that we can detect future regression issue :) ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 02:13:56 2019 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 12 Oct 2019 06:13:56 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1570860836.42.0.490998271389.issue38449@roundup.psfhosted.org> Dong-hee Na added the comment: And I aplogize for my patch which makes regrssion issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 03:12:15 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 12 Oct 2019 07:12:15 +0000 Subject: [issue38417] Add support for settting umask in subprocess children In-Reply-To: <1570575339.67.0.686572067981.issue38417@roundup.psfhosted.org> Message-ID: <1570864335.73.0.370546876786.issue38417@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- assignee: -> gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 03:16:24 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 12 Oct 2019 07:16:24 +0000 Subject: [issue38417] Add support for settting umask in subprocess children In-Reply-To: <1570575339.67.0.686572067981.issue38417@roundup.psfhosted.org> Message-ID: <1570864584.47.0.659124840406.issue38417@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- keywords: +patch pull_requests: +16306 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16726 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 04:09:36 2019 From: report at bugs.python.org (Danylo) Date: Sat, 12 Oct 2019 08:09:36 +0000 Subject: [issue38452] unittest setUpClass missing 1 required positional argument: 'cls' In-Reply-To: <1570829339.09.0.69466145285.issue38452@roundup.psfhosted.org> Message-ID: <1570867776.31.0.865248900972.issue38452@roundup.psfhosted.org> Danylo added the comment: Sorry, true. You can close the issue. ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 04:49:49 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 12 Oct 2019 08:49:49 +0000 Subject: [issue38451] Datetime definition does not work in function definition as list definition In-Reply-To: <1570816815.04.0.693882405229.issue38451@roundup.psfhosted.org> Message-ID: <1570870189.02.0.121820613859.issue38451@roundup.psfhosted.org> Steven D'Aprano added the comment: This is not a bug, this is the design of function default arguments. Default arguments in Python use *early binding*, which means they are calculated once, when the function is declared, rather than *late binding*, which means they are calculated each time the function is called. You can get the effect of late binding by testing for None: def func(time=None): if time is None: time = datetime.datetime.today() print(time) Neither choice is right or wrong, they both have advantages and disadvantages. Python chooses early binding for function defaults, and late binding for closures, which have their own, different, gotchas. ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 04:52:39 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 12 Oct 2019 08:52:39 +0000 Subject: [issue38451] Datetime definition does not work in function definition as list definition In-Reply-To: <1570816815.04.0.693882405229.issue38451@roundup.psfhosted.org> Message-ID: <1570870359.86.0.656689209626.issue38451@roundup.psfhosted.org> Steven D'Aprano added the comment: Oh, I forgot to mention that this is discussed in one of the FAQs: https://docs.python.org/3/faq/programming.html#why-are-default-values-shared-between-objects ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 06:29:49 2019 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 12 Oct 2019 10:29:49 +0000 Subject: [issue37731] Possible redifinition of _POSIX_C_SOURCE in ./pyconfig.h In-Reply-To: <1564582479.63.0.743037360682.issue37731@roundup.psfhosted.org> Message-ID: <1570876189.8.0.817666913756.issue37731@roundup.psfhosted.org> Dong-hee Na added the comment: This is also reproducible on Ubuntu 18.04 gcc 7.4.0 In file included from /home/corona10/cpython/Modules/expat/expat_config.h:8:0, from /home/corona10/cpython/Modules/expat/xmltok.c:49: ./pyconfig.h:1586:0: warning: "_POSIX_C_SOURCE" redefined #define _POSIX_C_SOURCE 200809L In file included from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33:0, from /usr/include/string.h:26, from /home/corona10/cpython/Modules/expat/xmltok.c:34: /usr/include/features.h:294:0: note: this is the location of the previous definition # define _POSIX_C_SOURCE 199506L ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 07:24:06 2019 From: report at bugs.python.org (Caleb Hattingh) Date: Sat, 12 Oct 2019 11:24:06 +0000 Subject: [issue38306] High level API for loop.run_in_executor(None, ...)? In-Reply-To: <1569681785.01.0.799144749415.issue38306@roundup.psfhosted.org> Message-ID: <1570879446.69.0.504074792483.issue38306@roundup.psfhosted.org> Caleb Hattingh added the comment: Even before task groups land, this API can be easily improved by adding asyncio.run_in_executor(func, *args, **kwargs) - Only valid inside a coro or async context (uses get_running_loop internally) - Analogous to how `loop.create_task` became `asyncio.create_task` - Drop having to specify `None` for the default executor - Users already know the `run_in_executor` name - Allow both positional and kwargs (we can partial internally before calling loop.run_in_executor) ---------- nosy: +cjrh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 07:39:45 2019 From: report at bugs.python.org (Antoine Pietri) Date: Sat, 12 Oct 2019 11:39:45 +0000 Subject: [issue38306] High level API for loop.run_in_executor(None, ...)? In-Reply-To: <1570879446.69.0.504074792483.issue38306@roundup.psfhosted.org> Message-ID: Antoine Pietri added the comment: On Sat, Oct 12, 2019 at 1:24 PM Caleb Hattingh wrote: > Even before task groups land, this API can be easily improved by adding > > asyncio.run_in_executor(func, *args, **kwargs) > > - Only valid inside a coro or async context (uses get_running_loop internally) > - Analogous to how `loop.create_task` became `asyncio.create_task` > - Drop having to specify `None` for the default executor > - Users already know the `run_in_executor` name > - Allow both positional and kwargs (we can partial internally before calling loop.run_in_executor) I think it should be run_thread() if it only works for thread. run_in_executor() should take an executor= parameter, but it wouldn't be as clear for beginners. I think there's value in having a simple, explicit way of saying "I want to run this function in a thread" without having to know what executors are. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 07:53:14 2019 From: report at bugs.python.org (Caleb Hattingh) Date: Sat, 12 Oct 2019 11:53:14 +0000 Subject: [issue38306] High level API for loop.run_in_executor(None, ...)? In-Reply-To: <1569681785.01.0.799144749415.issue38306@roundup.psfhosted.org> Message-ID: <1570881194.39.0.593388289728.issue38306@roundup.psfhosted.org> Caleb Hattingh added the comment: We can't allow both an `executor=` kwarg, as well as **kwargs for the target func, unfortunately. If we do `executor=`, we'll again have to force users to use functools.partial to wrap their functions that take kwargs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 08:10:23 2019 From: report at bugs.python.org (Larry Hastings) Date: Sat, 12 Oct 2019 12:10:23 +0000 Subject: [issue36274] http.client cannot send non-ASCII request lines In-Reply-To: <1552422803.93.0.420596825145.issue36274@roundup.psfhosted.org> Message-ID: <1570882223.29.0.945645486661.issue36274@roundup.psfhosted.org> Change by Larry Hastings : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 08:18:20 2019 From: report at bugs.python.org (Antoine Pietri) Date: Sat, 12 Oct 2019 12:18:20 +0000 Subject: [issue38306] High level API for loop.run_in_executor(None, ...)? In-Reply-To: <1570881194.39.0.593388289728.issue38306@roundup.psfhosted.org> Message-ID: Antoine Pietri added the comment: Yes, that's why I'm in favor of calling it run_thread. Because it fundamentally *isn't* a way to run a function in an executor, it's a way to run a function in a thread. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 11:52:49 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 12 Oct 2019 15:52:49 +0000 Subject: [issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name In-Reply-To: <1409971957.28.0.64915967452.issue22347@psf.upfronthosting.co.za> Message-ID: <1570895569.53.0.819439290642.issue22347@roundup.psfhosted.org> Change by Abhilash Raj : ---------- pull_requests: +16307 pull_request: https://github.com/python/cpython/pull/16727 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 11:56:15 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 12 Oct 2019 15:56:15 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1570895775.19.0.250240860671.issue38449@roundup.psfhosted.org> Change by Abhilash Raj : ---------- pull_requests: +16308 pull_request: https://github.com/python/cpython/pull/16727 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 12:04:59 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 12 Oct 2019 16:04:59 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1570896299.66.0.929065693785.issue38449@roundup.psfhosted.org> Change by Abhilash Raj : ---------- pull_requests: +16309 pull_request: https://github.com/python/cpython/pull/16728 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 12:04:59 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 12 Oct 2019 16:04:59 +0000 Subject: [issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name In-Reply-To: <1409971957.28.0.64915967452.issue22347@psf.upfronthosting.co.za> Message-ID: <1570896299.88.0.580068529889.issue22347@roundup.psfhosted.org> Change by Abhilash Raj : ---------- pull_requests: +16310 pull_request: https://github.com/python/cpython/pull/16728 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 12:08:27 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Oct 2019 16:08:27 +0000 Subject: [issue38341] Add SMTPNotSupportedError in the exports of smtplib In-Reply-To: <1569963046.98.0.477841717728.issue38341@roundup.psfhosted.org> Message-ID: <1570896507.63.0.619157703021.issue38341@roundup.psfhosted.org> miss-islington added the comment: New changeset 1da648aceb2496c672aff82ba37ee071ac6054ac by Miss Islington (bot) in branch '3.8': bpo-38341: Add SMTPNotSupportedError in the exports of smtplib (GH-16525) https://github.com/python/cpython/commit/1da648aceb2496c672aff82ba37ee071ac6054ac ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 12:26:08 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Oct 2019 16:26:08 +0000 Subject: [issue38341] Add SMTPNotSupportedError in the exports of smtplib In-Reply-To: <1569963046.98.0.477841717728.issue38341@roundup.psfhosted.org> Message-ID: <1570897568.11.0.535432365457.issue38341@roundup.psfhosted.org> miss-islington added the comment: New changeset cb580d6fa8349acff723a7a044181d896d076871 by Miss Islington (bot) in branch '3.7': bpo-38341: Add SMTPNotSupportedError in the exports of smtplib (GH-16525) https://github.com/python/cpython/commit/cb580d6fa8349acff723a7a044181d896d076871 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 12:29:38 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 12 Oct 2019 16:29:38 +0000 Subject: [issue38341] Add SMTPNotSupportedError in the exports of smtplib In-Reply-To: <1569963046.98.0.477841717728.issue38341@roundup.psfhosted.org> Message-ID: <1570897778.01.0.238333993645.issue38341@roundup.psfhosted.org> Change by Abhilash Raj : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 12:30:21 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 12 Oct 2019 16:30:21 +0000 Subject: [issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name In-Reply-To: <1409971957.28.0.64915967452.issue22347@psf.upfronthosting.co.za> Message-ID: <1570897821.94.0.334418608825.issue22347@roundup.psfhosted.org> Abhilash Raj added the comment: I am going to re-open this since the fixes were reverted in all the branches. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 12:42:59 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 12 Oct 2019 16:42:59 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1570898579.59.0.118798211088.issue38449@roundup.psfhosted.org> Abhilash Raj added the comment: corona10: That's okay, it happens. I missed it too. There was really no way to foresee all the use cases, which is why we have beta and rc period to catch bugs. Yes, we should add a test case definitely, do you want to work on a PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 12:49:08 2019 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 12 Oct 2019 16:49:08 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1570898948.77.0.47925813084.issue38449@roundup.psfhosted.org> Dong-hee Na added the comment: > Yes, we should add a test case definitely, do you want to work on a PR? Sure, I want to finalize this issue :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 12:58:15 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 12 Oct 2019 16:58:15 +0000 Subject: [issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name In-Reply-To: <1409971957.28.0.64915967452.issue22347@psf.upfronthosting.co.za> Message-ID: <1570899495.17.0.138969361547.issue22347@roundup.psfhosted.org> Abhilash Raj added the comment: New changeset 5a638a805503131f4a9cc2bbc5944611295c1500 by Abhilash Raj in branch '3.8': [3.8] bpo-38449: Revert "bpo-22347: Update mimetypes.guess_type to allow oper parsing of URLs" (GH-16724) (GH-16728) https://github.com/python/cpython/commit/5a638a805503131f4a9cc2bbc5944611295c1500 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 12:58:15 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 12 Oct 2019 16:58:15 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1570899495.31.0.932197618624.issue38449@roundup.psfhosted.org> Abhilash Raj added the comment: New changeset 5a638a805503131f4a9cc2bbc5944611295c1500 by Abhilash Raj in branch '3.8': [3.8] bpo-38449: Revert "bpo-22347: Update mimetypes.guess_type to allow oper parsing of URLs" (GH-16724) (GH-16728) https://github.com/python/cpython/commit/5a638a805503131f4a9cc2bbc5944611295c1500 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 13:02:29 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Oct 2019 17:02:29 +0000 Subject: [issue38332] invalid content-transfer-encoding in encoded-word causes KeyError In-Reply-To: <1569877053.41.0.568400002445.issue38332@roundup.psfhosted.org> Message-ID: <1570899748.99.0.759960095468.issue38332@roundup.psfhosted.org> miss-islington added the comment: New changeset febe359559781019c0c8432a2f768809d00af6af by Miss Islington (bot) in branch '3.7': bpo-38332: Catch KeyError from unknown cte in encoded-word. (GH-16503) https://github.com/python/cpython/commit/febe359559781019c0c8432a2f768809d00af6af ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 13:03:27 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Oct 2019 17:03:27 +0000 Subject: [issue38332] invalid content-transfer-encoding in encoded-word causes KeyError In-Reply-To: <1569877053.41.0.568400002445.issue38332@roundup.psfhosted.org> Message-ID: <1570899807.81.0.106754798982.issue38332@roundup.psfhosted.org> miss-islington added the comment: New changeset e540bb546163f108c7c304f2e6865efaa78cd4c2 by Miss Islington (bot) in branch '3.8': bpo-38332: Catch KeyError from unknown cte in encoded-word. (GH-16503) https://github.com/python/cpython/commit/e540bb546163f108c7c304f2e6865efaa78cd4c2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 13:04:04 2019 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 12 Oct 2019 17:04:04 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1570899844.61.0.17346838655.issue38449@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +16311 pull_request: https://github.com/python/cpython/pull/16729 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 13:04:19 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 12 Oct 2019 17:04:19 +0000 Subject: [issue38332] invalid content-transfer-encoding in encoded-word causes KeyError In-Reply-To: <1569877053.41.0.568400002445.issue38332@roundup.psfhosted.org> Message-ID: <1570899859.51.0.765147147752.issue38332@roundup.psfhosted.org> Change by Abhilash Raj : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 13:24:29 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Oct 2019 17:24:29 +0000 Subject: [issue35800] remove smtpd.MailmanProxy In-Reply-To: <1548091630.84.0.140233087609.issue35800@roundup.psfhosted.org> Message-ID: <1570901069.3.0.775421584888.issue35800@roundup.psfhosted.org> miss-islington added the comment: New changeset 822922af90f389b20166f0cd6f5b7c76fd6d42d9 by Miss Islington (bot) (Samuel Colvin) in branch 'master': bpo-35800: Deprecate smtpd.MailmanProxy (GH-11675) https://github.com/python/cpython/commit/822922af90f389b20166f0cd6f5b7c76fd6d42d9 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 14:32:21 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 12 Oct 2019 18:32:21 +0000 Subject: [issue37731] Possible redifinition of _POSIX_C_SOURCE in ./pyconfig.h In-Reply-To: <1564582479.63.0.743037360682.issue37731@roundup.psfhosted.org> Message-ID: <1570905141.52.0.711782224007.issue37731@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +16312 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16733 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 14:50:07 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Oct 2019 18:50:07 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1570906207.15.0.584621401304.issue38449@roundup.psfhosted.org> miss-islington added the comment: New changeset 164bee296ab1f87cc05566b39ee8fb9fb64b3e5a by Miss Islington (bot) (Abhilash Raj) in branch '3.7': [3.7] bpo-38449: Revert "bpo-22347: Update mimetypes.guess_type to allow oper parsing of URLs (GH-15685)" (GH-16724) (GH-16727) https://github.com/python/cpython/commit/164bee296ab1f87cc05566b39ee8fb9fb64b3e5a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 14:50:06 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Oct 2019 18:50:06 +0000 Subject: [issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name In-Reply-To: <1409971957.28.0.64915967452.issue22347@psf.upfronthosting.co.za> Message-ID: <1570906206.95.0.966105605982.issue22347@roundup.psfhosted.org> miss-islington added the comment: New changeset 164bee296ab1f87cc05566b39ee8fb9fb64b3e5a by Miss Islington (bot) (Abhilash Raj) in branch '3.7': [3.7] bpo-38449: Revert "bpo-22347: Update mimetypes.guess_type to allow oper parsing of URLs (GH-15685)" (GH-16724) (GH-16727) https://github.com/python/cpython/commit/164bee296ab1f87cc05566b39ee8fb9fb64b3e5a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 14:52:00 2019 From: report at bugs.python.org (Ned Deily) Date: Sat, 12 Oct 2019 18:52:00 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1570906320.62.0.524473250957.issue38449@roundup.psfhosted.org> Ned Deily added the comment: Thanks everyone for the quick action on this! ---------- priority: release blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 14:52:59 2019 From: report at bugs.python.org (Ned Deily) Date: Sat, 12 Oct 2019 18:52:59 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1570906379.97.0.660250647266.issue38449@roundup.psfhosted.org> Ned Deily added the comment: (On second thought, I'll leave this open as a release blocker until we've cherry-picked the fixes for 3.8.0 final and 3.7.5 final.) ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 15:11:40 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 12 Oct 2019 19:11:40 +0000 Subject: =?utf-8?b?W2lzc3VlMzg0NTVdIOKAmG1lbXNldOKAmSBvZmZzZXQgWzE3LCA4OF0gZnJv?= =?utf-8?q?m_the_object_at_=E2=80=98addrbuf=E2=80=99_is_out_of_the_bounds_?= =?utf-8?q?of_referenced_subobject?= Message-ID: <1570907500.34.0.810333858419.issue38455@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : Compiling 3.8 in release mode emits this warning: In function ?getsockaddrarg?, inlined from ?sock_bind? at /home/pablogsal/github/python/3.8/Modules/socketmodule.c:3066:10: /home/pablogsal/github/python/3.8/Modules/socketmodule.c:2288:9: warning: ?memset? offset [17, 88] from the object at ?addrbuf? is out of the bounds of referenced subobject ?sa? with type ?struct sockaddr? at offset 0 [-Warray-bounds] 2288 | memset(sa, 0, sizeof(*sa)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ---------- messages: 354547 nosy: lukasz.langa, pablogsal, vstinner priority: normal severity: normal status: open title: ?memset? offset [17, 88] from the object at ?addrbuf? is out of the bounds of referenced subobject versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 15:14:14 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 12 Oct 2019 19:14:14 +0000 Subject: [issue37731] Possible redifinition of _POSIX_C_SOURCE in ./pyconfig.h In-Reply-To: <1564582479.63.0.743037360682.issue37731@roundup.psfhosted.org> Message-ID: <1570907654.16.0.834621505929.issue37731@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 8177404d520e81f16324a900f093adf3856d33f8 by Pablo Galindo in branch 'master': bpo-37731: Reorder includes in xmltok.c to avoid redefinition of _POSIX_C_SOURCE (GH-16733) https://github.com/python/cpython/commit/8177404d520e81f16324a900f093adf3856d33f8 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 15:14:21 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Oct 2019 19:14:21 +0000 Subject: [issue37731] Possible redifinition of _POSIX_C_SOURCE in ./pyconfig.h In-Reply-To: <1564582479.63.0.743037360682.issue37731@roundup.psfhosted.org> Message-ID: <1570907661.49.0.358472892741.issue37731@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16313 pull_request: https://github.com/python/cpython/pull/16734 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 15:17:59 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 12 Oct 2019 19:17:59 +0000 Subject: =?utf-8?b?W2lzc3VlMzg0NTVdIOKAmG1lbXNldOKAmSBvZmZzZXQgWzE3LCA4OF0gZnJv?= =?utf-8?q?m_the_object_at_=E2=80=98addrbuf=E2=80=99_is_out_of_the_bounds_?= =?utf-8?q?of_referenced_subobject?= In-Reply-To: <1570907500.34.0.810333858419.issue38455@roundup.psfhosted.org> Message-ID: <1570907879.25.0.72528683453.issue38455@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 15:18:52 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 12 Oct 2019 19:18:52 +0000 Subject: =?utf-8?b?W2lzc3VlMzg0NTVdIOKAmG1lbXNldOKAmSBvZmZzZXQgWzE3LCA4OF0gZnJv?= =?utf-8?q?m_the_object_at_=E2=80=98addrbuf=E2=80=99_is_out_of_the_bounds_?= =?utf-8?q?of_referenced_subobject?= In-Reply-To: <1570907500.34.0.810333858419.issue38455@roundup.psfhosted.org> Message-ID: <1570907932.86.0.757332588206.issue38455@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Duplicate of https://bugs.python.org/issue38282 ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 15:22:20 2019 From: report at bugs.python.org (Eryk Sun) Date: Sat, 12 Oct 2019 19:22:20 +0000 Subject: [issue38454] test_listdir is failing on ubuntu with WSL In-Reply-To: <1570856792.9.0.835565691535.issue38454@roundup.psfhosted.org> Message-ID: <1570908140.02.0.402337981702.issue38454@roundup.psfhosted.org> Eryk Sun added the comment: The test assumes that Unix filesystems store names as arbitrary sequences of bytes, with only ASCII slash and null reserved. Windows NTFS stores names as arbitrary sequences of 16-bit words, with many reserved ASCII characters including \/:*?<>"| and control characters 0x00-0x1F. WSL implements a UTF-8 filesystem encoding over this by transcoding bytes from UTF-8 to UTF-16LE and escaping reserved characters (excepting slash and null) as sequences that begin with "#" (e.g. "<#" -> "#003C#0023"). The latter is only visible from Windows in the distro's "LocalState\rootfs" tree. This scheme fails for TESTFN_UNDECODABLE. Bytes that can't be transcoded to UTF-16LE are replaced by the replacement character U+FFFD. For example: >>> n = b'\xff' >>> open(n, 'w').close() >>> os.listdir(b'.') [b'\xef\xbf\xbd'] >>> hex(ord(os.listdir('.')[0])) '0xfffd' WSL could address this by abandoning their current "#" escaping approach to instead translate all reserved and undecodable bytes to the U+DC00-U+DCFF surrogate range, like Python's "surrogateescape" error handler. The Windows API could even support this with a new flag for MultiByteToWideChar and WideCharToMultiByte. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 15:32:53 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Oct 2019 19:32:53 +0000 Subject: [issue37731] Possible redifinition of _POSIX_C_SOURCE in ./pyconfig.h In-Reply-To: <1564582479.63.0.743037360682.issue37731@roundup.psfhosted.org> Message-ID: <1570908773.13.0.782698108549.issue37731@roundup.psfhosted.org> miss-islington added the comment: New changeset ba44ea6ff8be2b7874c4358f89d5b6f4a558f711 by Miss Islington (bot) in branch '3.8': bpo-37731: Reorder includes in xmltok.c to avoid redefinition of _POSIX_C_SOURCE (GH-16733) https://github.com/python/cpython/commit/ba44ea6ff8be2b7874c4358f89d5b6f4a558f711 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 15:33:48 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 12 Oct 2019 19:33:48 +0000 Subject: [issue37731] Possible redifinition of _POSIX_C_SOURCE in ./pyconfig.h In-Reply-To: <1564582479.63.0.743037360682.issue37731@roundup.psfhosted.org> Message-ID: <1570908828.85.0.390798472737.issue37731@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 16:17:35 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 12 Oct 2019 20:17:35 +0000 Subject: [issue38446] Ambiguous signature for builtins.__build_class__ In-Reply-To: <1570793351.47.0.198943437011.issue38446@roundup.psfhosted.org> Message-ID: <1570911455.99.0.0410221473626.issue38446@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +16314 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16735 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 16:24:59 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 12 Oct 2019 20:24:59 +0000 Subject: [issue38417] Add support for settting umask in subprocess children In-Reply-To: <1570575339.67.0.686572067981.issue38417@roundup.psfhosted.org> Message-ID: <1570911899.39.0.102230919371.issue38417@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset f3751efb5c8b53b37efbbf75d9422c1d11c01646 by Gregory P. Smith in branch 'master': bpo-38417: Add umask support to subprocess (GH-16726) https://github.com/python/cpython/commit/f3751efb5c8b53b37efbbf75d9422c1d11c01646 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 16:26:18 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 12 Oct 2019 20:26:18 +0000 Subject: [issue38417] Add support for settting umask in subprocess children In-Reply-To: <1570575339.67.0.686572067981.issue38417@roundup.psfhosted.org> Message-ID: <1570911978.62.0.271281571581.issue38417@roundup.psfhosted.org> Gregory P. Smith added the comment: Now to see if the more esoteric config buildbots find any platform issues to address... ---------- resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 17:27:44 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 12 Oct 2019 21:27:44 +0000 Subject: [issue38456] Reduce the time test_subprocess takes to complete. Message-ID: <1570915664.41.0.600749429007.issue38456@roundup.psfhosted.org> New submission from Gregory P. Smith : test_subprocess is one of our long running tests, this slows down CI and buildbots. There is room for improvement in its total execution time. Use this issue as a rollup issue for any such work. we need to keep it reliable, just focus on reducing either user/sys cpu time or wall time. ---------- assignee: gregory.p.smith components: Tests messages: 354554 nosy: gregory.p.smith priority: low severity: normal status: open title: Reduce the time test_subprocess takes to complete. type: performance versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 17:33:54 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 12 Oct 2019 21:33:54 +0000 Subject: [issue38456] Reduce the time test_subprocess takes to complete. In-Reply-To: <1570915664.41.0.600749429007.issue38456@roundup.psfhosted.org> Message-ID: <1570916034.08.0.916220242164.issue38456@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- keywords: +patch pull_requests: +16315 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16736 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 17:48:12 2019 From: report at bugs.python.org (Yuval S) Date: Sat, 12 Oct 2019 21:48:12 +0000 Subject: [issue38457] __package__ is None in __init__.py until an import is used Message-ID: <1570916892.54.0.164577302417.issue38457@roundup.psfhosted.org> New submission from Yuval S : In Python 2.7, the __package__ variable isn't set when __init__.py is run, until an import is done. In Python 3.5, it is set correctly. e.g. # mkdir x && echo "print(__package__)" | tee x/__init__.py x/test.py # python2 x.test None x # python3 x.test x x # echo -e "import os\n$(cat x/__init__.py)" > x/__init__.py # python2 x.test x x This is very old, as it's there at least since 2010: https://stackoverflow.com/questions/4437394/package-is-none-when-importing-a-python-module I would expect Python 2 and 3 to behave the same. ---------- components: Library (Lib) messages: 354555 nosy: Yuval S priority: normal severity: normal status: open title: __package__ is None in __init__.py until an import is used versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 19:07:54 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 12 Oct 2019 23:07:54 +0000 Subject: [issue38282] socketmodule.c: _FORTIFY_SOURCE=2 warning in AF_ALG case of getsockaddrarg() In-Reply-To: <1569460305.42.0.728817437513.issue38282@roundup.psfhosted.org> Message-ID: <1570921674.08.0.325931849761.issue38282@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: The failures on FreeBSD are: /usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Modules/socketmodule.c:1931:50: error: no member named 'bt_l2' in 'union sock_addr' struct sockaddr_l2 *addr = &addrbuf->bt_l2; ~~~~~~~ ^ /usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Modules/socketmodule.c:1950:50: error: no member named 'bt_rc' in 'union sock_addr' struct sockaddr_rc *addr = &addrbuf->bt_rc; ~~~~~~~ ^ /usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Modules/socketmodule.c:1967:51: error: no member named 'bt_hci' in 'union sock_addr' struct sockaddr_hci *addr = &addrbuf->bt_hci; ~~~~~~~ ^ 3 errors generated. This is likely due to the fact that those fields are protected by: typedef union sock_addr { #ifdef HAVE_BLUETOOTH_BLUETOOTH_H struct sockaddr_l2 bt_l2; struct sockaddr_rc bt_rc; struct sockaddr_sco bt_sco; struct sockaddr_hci bt_hci; #elif defined(MS_WINDOWS) } and in those machines HAVE_BLUETOOTH_BLUETOOTH_H is absent. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 19:35:56 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 12 Oct 2019 23:35:56 +0000 Subject: [issue38456] Reduce the time test_subprocess takes to complete. In-Reply-To: <1570915664.41.0.600749429007.issue38456@roundup.psfhosted.org> Message-ID: <1570923356.52.0.858098976782.issue38456@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 67b93f80c764bca01c81c989d74a99df208bea4d by Gregory P. Smith in branch 'master': bpo-38456: Use /bin/true in test_subprocess (GH-16736) https://github.com/python/cpython/commit/67b93f80c764bca01c81c989d74a99df208bea4d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 19:42:13 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 12 Oct 2019 23:42:13 +0000 Subject: [issue38456] Reduce the time test_subprocess takes to complete. In-Reply-To: <1570915664.41.0.600749429007.issue38456@roundup.psfhosted.org> Message-ID: <1570923733.01.0.441687350525.issue38456@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +16316 pull_request: https://github.com/python/cpython/pull/16737 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 19:54:11 2019 From: report at bugs.python.org (DEVOR BLAKE DANIELS) Date: Sat, 12 Oct 2019 23:54:11 +0000 Subject: [issue38458] lists Message-ID: <1570924451.06.0.602805161238.issue38458@roundup.psfhosted.org> New submission from DEVOR BLAKE DANIELS : l=[2,3,4] p=l p[0]=5 when I change p[0] to 5,l[0] is also changed to 5. I use slicing to get around this ,but when dealing with lists like s[][],slicing does not work ---------- files: three.py messages: 354558 nosy: dev40573 priority: normal severity: normal status: open title: lists type: behavior Added file: https://bugs.python.org/file48657/three.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 20:19:30 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 13 Oct 2019 00:19:30 +0000 Subject: [issue38282] socketmodule.c: _FORTIFY_SOURCE=2 warning in AF_ALG case of getsockaddrarg() In-Reply-To: <1569460305.42.0.728817437513.issue38282@roundup.psfhosted.org> Message-ID: <1570925970.82.0.793099366495.issue38282@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +16317 pull_request: https://github.com/python/cpython/pull/16738 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 20:24:22 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 13 Oct 2019 00:24:22 +0000 Subject: [issue38457] __package__ is None in __init__.py until an import is used In-Reply-To: <1570916892.54.0.164577302417.issue38457@roundup.psfhosted.org> Message-ID: <1570926262.36.0.887200736776.issue38457@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 20:34:11 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 13 Oct 2019 00:34:11 +0000 Subject: [issue38282] socketmodule.c: _FORTIFY_SOURCE=2 warning in AF_ALG case of getsockaddrarg() In-Reply-To: <1569460305.42.0.728817437513.issue38282@roundup.psfhosted.org> Message-ID: <1570926851.78.0.768308972376.issue38282@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: PR 16738 fixes the FreeBSD buildbots by correctly handling the Bluetooth L2CAP socket structure in FreeBSD if only bluetooth.h is available. Check out https://man.cx/ng_btsocket(4) for example for more info in the ng_btsocket protocol for FreeBSD. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 20:41:09 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 13 Oct 2019 00:41:09 +0000 Subject: [issue38458] lists In-Reply-To: <1570924451.06.0.602805161238.issue38458@roundup.psfhosted.org> Message-ID: <1570927269.34.0.35998456506.issue38458@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Hi Devor, This is not a bug in Python but indeed documented behavior. When you do p=l you are creating a new reference to the same list ([2,3,4]), so changing one changes the other. If you want to make a copy you can do p = l.copy() ---------- nosy: +pablogsal resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 20:41:44 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 13 Oct 2019 00:41:44 +0000 Subject: [issue38458] lists In-Reply-To: <1570924451.06.0.602805161238.issue38458@roundup.psfhosted.org> Message-ID: <1570927304.07.0.9117266007.issue38458@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: -pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 20:44:16 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 13 Oct 2019 00:44:16 +0000 Subject: [issue38458] lists In-Reply-To: <1570924451.06.0.602805161238.issue38458@roundup.psfhosted.org> Message-ID: <1570927456.17.0.430647374722.issue38458@roundup.psfhosted.org> Steven D'Aprano added the comment: This is not a bug, it is part of the design of the language. Assignment in Python does not make a copy of lists, or any other object. In your sample code, p and l are two names for the same list, like "Devor Blake Daniels" and "dev40573" are two names for the same person (you). You can use slicing to make a copy of the list, or the copy module, or the list constructor. I don't understand your comment "when dealing with lists like s[][],slicing does not work". ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 20:45:55 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 13 Oct 2019 00:45:55 +0000 Subject: [issue38458] lists In-Reply-To: <1570924451.06.0.602805161238.issue38458@roundup.psfhosted.org> Message-ID: <1570927555.88.0.369899520488.issue38458@roundup.psfhosted.org> Change by Steven D'Aprano : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 21:03:58 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 13 Oct 2019 01:03:58 +0000 Subject: [issue38282] socketmodule.c: _FORTIFY_SOURCE=2 warning in AF_ALG case of getsockaddrarg() In-Reply-To: <1569460305.42.0.728817437513.issue38282@roundup.psfhosted.org> Message-ID: <1570928638.02.0.740913259591.issue38282@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 27b33fb41a7c64a6211d73d14804aa0cd6defccb by Pablo Galindo in branch 'master': bpo-38282: Correctly manage the Bluetooth L2CAP socket structure in FreeBSD (GH-16738) https://github.com/python/cpython/commit/27b33fb41a7c64a6211d73d14804aa0cd6defccb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 21:09:52 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 13 Oct 2019 01:09:52 +0000 Subject: [issue38456] Reduce the time test_subprocess takes to complete. In-Reply-To: <1570915664.41.0.600749429007.issue38456@roundup.psfhosted.org> Message-ID: <1570928992.06.0.524471419963.issue38456@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +16318 pull_request: https://github.com/python/cpython/pull/16739 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 21:40:27 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 13 Oct 2019 01:40:27 +0000 Subject: [issue38456] Reduce the time test_subprocess takes to complete. In-Reply-To: <1570915664.41.0.600749429007.issue38456@roundup.psfhosted.org> Message-ID: <1570930827.64.0.840487041081.issue38456@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 46113e0cf32748f66cf64cd633984d143b433cd1 by Pablo Galindo in branch 'master': bpo-38456: Handle the case when there is no 'true' command (GH-16739) https://github.com/python/cpython/commit/46113e0cf32748f66cf64cd633984d143b433cd1 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 23:14:27 2019 From: report at bugs.python.org (Ma Lin) Date: Sun, 13 Oct 2019 03:14:27 +0000 Subject: [issue38056] Overhaul Error Handlers section in codecs documentation In-Reply-To: <1567952070.11.0.225789110598.issue38056@roundup.psfhosted.org> Message-ID: <1570936467.87.0.296982793973.issue38056@roundup.psfhosted.org> Ma Lin added the comment: PR 15732 became an overhaul: - replace/backslashreplace/surrogateescape were wrongly described as encoding only, in fact they can also be used in decoding. - clarify the description of surrogatepass. - add more descriptions to each handler. - add two REPL examples. - add indexes for Error Handler's name. - add default parameter values in codecs.rst - improve term "text encoding". PR 15732 has a screenshot of the Error Handlers section. ---------- components: +Unicode nosy: +ezio.melotti, vstinner title: Add examples for common text encoding Error Handlers -> Overhaul Error Handlers section in codecs documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 23:46:31 2019 From: report at bugs.python.org (Harmon) Date: Sun, 13 Oct 2019 03:46:31 +0000 Subject: [issue38359] pyw.exe opens console window in Windows 10 In-Reply-To: <1570096405.52.0.325874974028.issue38359@roundup.psfhosted.org> Message-ID: <1570938391.11.0.400144605405.issue38359@roundup.psfhosted.org> Change by Harmon : ---------- nosy: +Harmon758 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 23:56:22 2019 From: report at bugs.python.org (Harmon) Date: Sun, 13 Oct 2019 03:56:22 +0000 Subject: [issue37035] Don't log OSError exceptions in asyncio transports In-Reply-To: <1558708377.15.0.222546736903.issue37035@roundup.psfhosted.org> Message-ID: <1570938982.66.0.556934215588.issue37035@roundup.psfhosted.org> Change by Harmon : ---------- nosy: +Harmon758 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 03:18:25 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 13 Oct 2019 07:18:25 +0000 Subject: [issue38440] Possible new issues with IDLE In-Reply-To: <1570768048.83.0.927013766779.issue38440@roundup.psfhosted.org> Message-ID: <1570951105.45.0.473684879563.issue38440@roundup.psfhosted.org> Raymond Hettinger added the comment: * Am running 3.8.0rc1 on macOS Mojave 10.14.6. * My Python is the stock mac 64-build from python.org. * Started IDLE from a terminal with: $ python3.8 -m idlelib.idle * Yes, the box is "Your program is still running!\nDo you want to kill it?" * I'm running another course this week and see if I can get more specifics and perhaps a reproducer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 03:25:55 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 13 Oct 2019 07:25:55 +0000 Subject: [issue38440] Possible new issues with IDLE In-Reply-To: <1570768048.83.0.927013766779.issue38440@roundup.psfhosted.org> Message-ID: <1570951555.16.0.235587008452.issue38440@roundup.psfhosted.org> Raymond Hettinger added the comment: ???? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 03:26:03 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 13 Oct 2019 07:26:03 +0000 Subject: [issue38440] Possible new issues with IDLE In-Reply-To: <1570768048.83.0.927013766779.issue38440@roundup.psfhosted.org> Message-ID: <1570951563.08.0.206905159242.issue38440@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- Removed message: https://bugs.python.org/msg354566 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 03:43:25 2019 From: report at bugs.python.org (Yuval S) Date: Sun, 13 Oct 2019 07:43:25 +0000 Subject: [issue38457] __package__ is None in __init__.py until an import is used In-Reply-To: <1570916892.54.0.164577302417.issue38457@roundup.psfhosted.org> Message-ID: <1570952605.61.0.23101230568.issue38457@roundup.psfhosted.org> Yuval S added the comment: * It should be python[23] -m x.test, of course. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 04:05:46 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Oct 2019 08:05:46 +0000 Subject: [issue38378] os.sendfile() has improperly named parameter In-Reply-To: <1570287843.24.0.0727618245068.issue38378@roundup.psfhosted.org> Message-ID: <1570953945.99.0.510792501167.issue38378@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +16319 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16742 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 04:31:24 2019 From: report at bugs.python.org (John Lennon) Date: Sun, 13 Oct 2019 08:31:24 +0000 Subject: [issue38459] typing: Classes that inherit `Generic[...]` indirectly aren't considered generic. Message-ID: <1570955483.97.0.910944150391.issue38459@roundup.psfhosted.org> New submission from John Lennon : Given the file `example.py` with the following contents: ```python from typing import Generic, TypeVar KT = TypeVar("KT") VT = TypeVar("VT") class GenericMapping(Generic[KT, VT]): pass class SomeImplMapping(GenericMapping): pass a: GenericMapping[int, float] b: SomeImplMapping[int, float] ``` I would expect `SomeImplMapping` to be generic as well as `GenericMapping`. However, currently this code fails with the following error: ```sh Traceback (most recent call last): File "adt.py", line 18, in b: SomeImplMapping[int, float] File "/usr/local/lib/python3.7/typing.py", line 254, in inner return func(*args, **kwds) File "/usr/local/lib/python3.7/typing.py", line 841, in __class_getitem__ _check_generic(cls, params) File "/usr/local/lib/python3.7/typing.py", line 204, in _check_generic raise TypeError(f"{cls} is not a generic class") TypeError: is not a generic class ``` If I understand everything correctly, that's because `typing` doesn't check bases of the class to have `__parameters__` attribute: https://github.com/python/cpython/blob/master/Lib/typing.py#L210 I did not found the restriction that only direct childs of `Generic[..]` class can be generic in the docs, so I think this is a bug. ---------- components: Library (Lib) messages: 354568 nosy: John Lennon priority: normal severity: normal status: open title: typing: Classes that inherit `Generic[...]` indirectly aren't considered generic. type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 04:41:51 2019 From: report at bugs.python.org (John Lennon) Date: Sun, 13 Oct 2019 08:41:51 +0000 Subject: [issue38459] typing: Classes that inherit `Generic[...]` indirectly aren't considered generic. In-Reply-To: <1570955483.97.0.910944150391.issue38459@roundup.psfhosted.org> Message-ID: <1570956111.83.0.204301552028.issue38459@roundup.psfhosted.org> John Lennon added the comment: However, if I change the signature to: ```python class SomeImplMapping(GenericMapping[KT, VT]): ``` Everything works just fine. And that's not really clear for me: we already have declared the generic types, we can not change the amount of those arguments, so why do we have to pass the same generic parameters again? And even if that's the designed way to do things, I would expect the first example to fail not because of the type substitution, but for deriving the `GenericMapping` without generic type arguments provided (as if I'll try to derive `Generic` instead of `Generic[...]`). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 04:43:44 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 13 Oct 2019 08:43:44 +0000 Subject: [issue38459] typing: Classes that inherit `Generic[...]` indirectly aren't considered generic. In-Reply-To: <1570955483.97.0.910944150391.issue38459@roundup.psfhosted.org> Message-ID: <1570956224.29.0.402313258646.issue38459@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +gvanrossum, levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 04:58:18 2019 From: report at bugs.python.org (John Lennon) Date: Sun, 13 Oct 2019 08:58:18 +0000 Subject: [issue38459] typing: Classes that inherit `Generic[...]` indirectly aren't considered generic. In-Reply-To: <1570955483.97.0.910944150391.issue38459@roundup.psfhosted.org> Message-ID: <1570957098.93.0.92437162077.issue38459@roundup.psfhosted.org> John Lennon added the comment: BTW I don't mind creating a PR for that issue if there will be an agreement on what is the desired behavior here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 04:59:36 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Oct 2019 08:59:36 +0000 Subject: [issue38378] os.sendfile() has improperly named parameter In-Reply-To: <1570287843.24.0.0727618245068.issue38378@roundup.psfhosted.org> Message-ID: <1570957176.72.0.253894067853.issue38378@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 140a7d1f3579e778656a6b6bfad72489e9870a4d by Serhiy Storchaka in branch 'master': bpo-38378: Rename parameters "out" and "in" of os.sendfile(). (GH-16742) https://github.com/python/cpython/commit/140a7d1f3579e778656a6b6bfad72489e9870a4d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 05:01:45 2019 From: report at bugs.python.org (retnikt) Date: Sun, 13 Oct 2019 09:01:45 +0000 Subject: [issue38397] __init_subclass__ causes TypeError when used with more standard library metaclasses (such as EnumMeta) In-Reply-To: <1570464400.89.0.0085195281122.issue38397@roundup.psfhosted.org> Message-ID: <1570957305.31.0.513111237422.issue38397@roundup.psfhosted.org> Change by retnikt : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 05:18:44 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Oct 2019 09:18:44 +0000 Subject: [issue38378] os.sendfile() has improperly named parameter In-Reply-To: <1570287843.24.0.0727618245068.issue38378@roundup.psfhosted.org> Message-ID: <1570958324.35.0.664748867894.issue38378@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 06:41:30 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 13 Oct 2019 10:41:30 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1570963290.24.0.496804965545.issue28556@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- pull_requests: +16320 pull_request: https://github.com/python/cpython/pull/16743 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 06:43:13 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 13 Oct 2019 10:43:13 +0000 Subject: [issue38459] typing: Classes that inherit `Generic[...]` indirectly aren't considered generic. In-Reply-To: <1570955483.97.0.910944150391.issue38459@roundup.psfhosted.org> Message-ID: <1570963393.51.0.155590410453.issue38459@roundup.psfhosted.org> Ivan Levkivskyi added the comment: The docs for typing module are clear about this: ``` Using a generic class without specifying type parameters assumes Any for each position. ``` There is also an example involving a base class. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 07:03:48 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Oct 2019 11:03:48 +0000 Subject: [issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call In-Reply-To: <1480885774.84.0.670239959771.issue28869@psf.upfronthosting.co.za> Message-ID: <1570964628.12.0.740608535085.issue28869@roundup.psfhosted.org> Serhiy Storchaka added the comment: PR 14166 now fixes the issue in more generic way. It skips one additional frame when type.__new__ is called not directly from type.__call__. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 07:45:39 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Oct 2019 11:45:39 +0000 Subject: [issue38431] dataclasses.InitVar breaks with typing.Optional In-Reply-To: <1570721462.15.0.939525387822.issue38431@roundup.psfhosted.org> Message-ID: <1570967139.53.0.555806680032.issue38431@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 793cb85437299a3da3d74fe65480d720af330cbb by Serhiy Storchaka (Samuel Colvin) in branch 'master': bpo-38431: Fix __repr__ method of InitVar to work with typing objects. (GH-16702) https://github.com/python/cpython/commit/793cb85437299a3da3d74fe65480d720af330cbb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 07:45:48 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 13 Oct 2019 11:45:48 +0000 Subject: [issue38431] dataclasses.InitVar breaks with typing.Optional In-Reply-To: <1570721462.15.0.939525387822.issue38431@roundup.psfhosted.org> Message-ID: <1570967148.21.0.5205545062.issue38431@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16321 pull_request: https://github.com/python/cpython/pull/16744 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 07:49:08 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Oct 2019 11:49:08 +0000 Subject: [issue38202] A fatal error in test_dictviews In-Reply-To: <1568748421.29.0.795591630213.issue38202@roundup.psfhosted.org> Message-ID: <1570967348.28.0.881656307495.issue38202@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset b16e382c446d76ede22780b15c75f43c5f132e25 by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-38202: Fix a crash in dict_view & non-itearble. (GH-16241) https://github.com/python/cpython/commit/b16e382c446d76ede22780b15c75f43c5f132e25 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 07:52:55 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Oct 2019 11:52:55 +0000 Subject: [issue38202] A fatal error in test_dictviews In-Reply-To: <1568748421.29.0.795591630213.issue38202@roundup.psfhosted.org> Message-ID: <1570967575.76.0.32876109597.issue38202@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 08:04:08 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 13 Oct 2019 12:04:08 +0000 Subject: [issue38431] dataclasses.InitVar breaks with typing.Optional In-Reply-To: <1570721462.15.0.939525387822.issue38431@roundup.psfhosted.org> Message-ID: <1570968248.03.0.445295875495.issue38431@roundup.psfhosted.org> miss-islington added the comment: New changeset 6da52ac411947d1a7958bbad831fcf8dfc8c95fe by Miss Islington (bot) in branch '3.8': bpo-38431: Fix __repr__ method of InitVar to work with typing objects. (GH-16702) https://github.com/python/cpython/commit/6da52ac411947d1a7958bbad831fcf8dfc8c95fe ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 08:20:54 2019 From: report at bugs.python.org (Sebastian Rittau) Date: Sun, 13 Oct 2019 12:20:54 +0000 Subject: [issue38460] 3.8 Release Notes: document asyncio exception changes Message-ID: <1570969254.43.0.827620904639.issue38460@roundup.psfhosted.org> New submission from Sebastian Rittau : In Python 3.8 asyncio exceptions were consolidated into the new module "asyncio.exceptions". Previously they were spread out over several modules. While the documentation always mandated to import the exceptions from top-level "asyncio", code that incorrectly imported directly from the submodules will break. ---------- assignee: docs at python components: Documentation messages: 354577 nosy: docs at python, srittau priority: normal severity: normal status: open title: 3.8 Release Notes: document asyncio exception changes versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 08:50:54 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Oct 2019 12:50:54 +0000 Subject: [issue38431] dataclasses.InitVar breaks with typing.Optional In-Reply-To: <1570721462.15.0.939525387822.issue38431@roundup.psfhosted.org> Message-ID: <1570971054.2.0.986353837994.issue38431@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you for your contribution Samuel! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 09:06:44 2019 From: report at bugs.python.org (Sebastian Rittau) Date: Sun, 13 Oct 2019 13:06:44 +0000 Subject: [issue38461] 3.8 Release Notes: "curses" misspelled as "ncurses" Message-ID: <1570972004.47.0.506267753893.issue38461@roundup.psfhosted.org> New submission from Sebastian Rittau : The "curses" module is misspelled and sorted as "ncurses" in the release notes. ---------- messages: 354579 nosy: srittau priority: normal severity: normal status: open title: 3.8 Release Notes: "curses" misspelled as "ncurses" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 09:09:19 2019 From: report at bugs.python.org (Joshua Root) Date: Sun, 13 Oct 2019 13:09:19 +0000 Subject: [issue38014] ./configure on recent macOS versions can fail with multiple "present but cannot be compiled" messages In-Reply-To: <1567477987.66.0.578307493025.issue38014@roundup.psfhosted.org> Message-ID: <1570972159.96.0.539198369114.issue38014@roundup.psfhosted.org> Joshua Root added the comment: The crash reported by BMinas is reputedly related to the -fstack-check option, which is said to be on by default when MACOSX_DEPLOYMENT_TARGET=10.15. I've been unable to confirm whether there was just a bug in the beta, or if it's still a problem on the final Catalina release. ---------- nosy: +jmr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 09:31:35 2019 From: report at bugs.python.org (Roy Smith) Date: Sun, 13 Oct 2019 13:31:35 +0000 Subject: [issue38462] Typo (nam ing) in import system docs Message-ID: <1570973495.13.0.272264963981.issue38462@roundup.psfhosted.org> New submission from Roy Smith : In https://docs.python.org/3.5/reference/import.html#importsystem, section "5.2 Packages", second sentence, the word "naming" is broken across two lines. In 3.7.5rc1 as well. Didn't check any others. ---------- assignee: docs at python components: Documentation messages: 354581 nosy: docs at python, roysmith priority: normal severity: normal status: open title: Typo (nam ing) in import system docs versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 09:47:22 2019 From: report at bugs.python.org (Sebastian Rittau) Date: Sun, 13 Oct 2019 13:47:22 +0000 Subject: [issue38463] 3.8 Release Notes: Link to SSLContext.post_handshake_auth missing Message-ID: <1570974442.94.0.731112598518.issue38463@roundup.psfhosted.org> New submission from Sebastian Rittau : The link to SSLContext.post_handshake_auth in the "ssl" section in the release notes is missing. ---------- assignee: docs at python components: Documentation messages: 354582 nosy: docs at python, srittau priority: normal severity: normal status: open title: 3.8 Release Notes: Link to SSLContext.post_handshake_auth missing versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 10:04:29 2019 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 13 Oct 2019 14:04:29 +0000 Subject: [issue38462] Typo (nam ing) in import system docs In-Reply-To: <1570973495.13.0.272264963981.issue38462@roundup.psfhosted.org> Message-ID: <1570975469.79.0.719081189231.issue38462@roundup.psfhosted.org> Eric V. Smith added the comment: I'm not seeing this in either the master or 3.5 branches. Perhaps this is being done locally by your browser? Unfortunately I can't find a way for github to link to a specific line in a .rst file, but when I look at the source code and https://github.com/python/cpython/blob/3.5/Doc/reference/import.rst, I don't see any line breaks. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 10:20:27 2019 From: report at bugs.python.org (Sebastian Rittau) Date: Sun, 13 Oct 2019 14:20:27 +0000 Subject: [issue38464] documentation for NormalDist.quantiles(): missing argument Message-ID: <1570976427.94.0.852447580797.issue38464@roundup.psfhosted.org> New submission from Sebastian Rittau : The documentation for NormalDist.quantiles() (https://docs.python.org/3.8/library/statistics.html#statistics.NormalDist) is missing the "n" argument from the definition. ---------- assignee: docs at python components: Documentation messages: 354584 nosy: docs at python, rhettinger, srittau priority: normal severity: normal status: open title: documentation for NormalDist.quantiles(): missing argument versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 10:27:27 2019 From: report at bugs.python.org (Roy Smith) Date: Sun, 13 Oct 2019 14:27:27 +0000 Subject: [issue38462] Typo (nam ing) in import system docs In-Reply-To: <1570973495.13.0.272264963981.issue38462@roundup.psfhosted.org> Message-ID: <1570976847.0.0.380576940846.issue38462@roundup.psfhosted.org> Roy Smith added the comment: Yeah, that's weird. Looks like this may be a Chrome bug. I'm seeing it in Chrome (Version 77.0.3865.90 (Official Build) (64-bit)), but not Safari. This is on MacOS (High Sierra). In the attached screenshot, I narrowed the window a bit. In the second paragraph, it's mis-broken "modules" and "contain", but hyphenated some other line breaks. If I diddle with the CSS and disable "hyphens: auto", it stops breaking words completely (which is probably better than breaking them wrong). I guess close this and I'll open a bug against Chrome. ---------- Added file: https://bugs.python.org/file48658/Screen Shot 2019-10-13 at 10.12.15 AM.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 10:57:15 2019 From: report at bugs.python.org (hai shi) Date: Sun, 13 Oct 2019 14:57:15 +0000 Subject: [issue38465] The type of ob_exports in PyByteArrayObject become Py_ssize_t. Message-ID: <1570978635.87.0.596564542888.issue38465@roundup.psfhosted.org> New submission from hai shi : for a code example: ``` v = [] b = bytearray(0xffff) for i in range(2**31+1) # the ob_exports would be overflow in 32 bit machine when i = 2**31. v.append(memoryview(b)) ``` IMHO, i thought converting the type of ob_exports to Py_ssize_t is fine. PS: I have no actual user scenario. ---------- components: Interpreter Core messages: 354586 nosy: shihai1991 priority: normal severity: normal status: open title: The type of ob_exports in PyByteArrayObject become Py_ssize_t. type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 10:59:28 2019 From: report at bugs.python.org (hai shi) Date: Sun, 13 Oct 2019 14:59:28 +0000 Subject: [issue38465] The type of ob_exports in PyByteArrayObject become Py_ssize_t. In-Reply-To: <1570978635.87.0.596564542888.issue38465@roundup.psfhosted.org> Message-ID: <1570978768.78.0.525999569944.issue38465@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +16322 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16746 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 11:03:36 2019 From: report at bugs.python.org (hai shi) Date: Sun, 13 Oct 2019 15:03:36 +0000 Subject: [issue38465] The type of ob_exports in PyByteArrayObject become Py_ssize_t. In-Reply-To: <1570978635.87.0.596564542888.issue38465@roundup.psfhosted.org> Message-ID: <1570979016.58.0.426038764343.issue38465@roundup.psfhosted.org> hai shi added the comment: sorry, typo error. # the ob_exports would be overflow in 32 bit machine when i = 2**31. --> # the ob_exports would be overflow in 64 bit machine when i = 2**31. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 11:40:26 2019 From: report at bugs.python.org (Sebastian Rittau) Date: Sun, 13 Oct 2019 15:40:26 +0000 Subject: [issue38466] threading.excepthook doc talks about "object" Message-ID: <1570981226.47.0.762418362865.issue38466@roundup.psfhosted.org> New submission from Sebastian Rittau : The documentation of threading.excepthook (https://docs.python.org/3.8/library/threading.html#threading.excepthook) talks about "object", when it only has a "thread" attribute: "Storing object using a custom hook can resurrect it if it is set to an object which is being finalized. Avoid storing object after the custom hook completes to avoid resurrecting objects." I believe this is a copy and paste error from sys.unraisablehook. ---------- assignee: docs at python components: Documentation messages: 354588 nosy: docs at python, srittau, vstinner priority: normal severity: normal status: open title: threading.excepthook doc talks about "object" versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 11:49:02 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 13 Oct 2019 15:49:02 +0000 Subject: [issue38379] finalizer resurrection in gc In-Reply-To: <1570296686.13.0.00730737596554.issue38379@roundup.psfhosted.org> Message-ID: <1570981742.77.0.81195110295.issue38379@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 466326dcdf038b948d94302c315be407c73e60d1 by Pablo Galindo in branch 'master': bpo-38379: Don't block collection of unreachable objects when some objects resurrect (GH-16687) https://github.com/python/cpython/commit/466326dcdf038b948d94302c315be407c73e60d1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 11:55:39 2019 From: report at bugs.python.org (Ned Deily) Date: Sun, 13 Oct 2019 15:55:39 +0000 Subject: [issue38463] 3.8 Release Notes: Link to SSLContext.post_handshake_auth missing In-Reply-To: <1570974442.94.0.731112598518.issue38463@roundup.psfhosted.org> Message-ID: <1570982139.36.0.934446876037.issue38463@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +akuchling, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 11:56:21 2019 From: report at bugs.python.org (Ned Deily) Date: Sun, 13 Oct 2019 15:56:21 +0000 Subject: [issue38461] 3.8 Release Notes: "curses" misspelled as "ncurses" In-Reply-To: <1570972004.47.0.506267753893.issue38461@roundup.psfhosted.org> Message-ID: <1570982181.2.0.239547170849.issue38461@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +akuchling, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 11:58:24 2019 From: report at bugs.python.org (Ned Deily) Date: Sun, 13 Oct 2019 15:58:24 +0000 Subject: [issue38460] 3.8 Release Notes: document asyncio exception changes In-Reply-To: <1570969254.43.0.827620904639.issue38460@roundup.psfhosted.org> Message-ID: <1570982304.88.0.946227259285.issue38460@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +akuchling, asvetlov, rhettinger, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 12:04:33 2019 From: report at bugs.python.org (Sebastian Rittau) Date: Sun, 13 Oct 2019 16:04:33 +0000 Subject: [issue38467] Misspelled argument names for typing.get_origin and get_args Message-ID: <1570982673.75.0.804199303932.issue38467@roundup.psfhosted.org> New submission from Sebastian Rittau : The arguments for typing.get_origin() and typing.get_args() are named "typ" in the documentation (https://docs.python.org/3.8/library/typing.html#typing.get_origin), while they are named "tp" in the implementation. Important if used as keyword argument. ---------- assignee: docs at python components: Documentation messages: 354590 nosy: docs at python, srittau priority: normal severity: normal status: open title: Misspelled argument names for typing.get_origin and get_args versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 12:11:27 2019 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 13 Oct 2019 16:11:27 +0000 Subject: [issue38462] Typo (nam ing) in import system docs In-Reply-To: <1570973495.13.0.272264963981.issue38462@roundup.psfhosted.org> Message-ID: <1570983087.68.0.82865017336.issue38462@roundup.psfhosted.org> Change by Eric V. Smith : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 12:13:45 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Sun, 13 Oct 2019 16:13:45 +0000 Subject: [issue38468] Refactor python-config.in - use getvar() Message-ID: <1570983225.71.0.166757825145.issue38468@roundup.psfhosted.org> New submission from Joannah Nanjekye : Use getvar for all still existing sysconfig.get_config_var() calls. ---------- messages: 354591 nosy: nanjekyejoannah priority: normal severity: normal status: open title: Refactor python-config.in - use getvar() versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 12:16:05 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Sun, 13 Oct 2019 16:16:05 +0000 Subject: [issue38468] Refactor python-config.in - use getvar() In-Reply-To: <1570983225.71.0.166757825145.issue38468@roundup.psfhosted.org> Message-ID: <1570983365.92.0.812812610324.issue38468@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- keywords: +patch pull_requests: +16323 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16749 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 12:53:11 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 13 Oct 2019 16:53:11 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1570985591.98.0.870640115887.issue28556@roundup.psfhosted.org> miss-islington added the comment: New changeset 8144095707f87bdee6f3e1bbb15283ea61381be6 by Miss Islington (bot) (Ivan Levkivskyi) in branch 'master': bpo-28556: Remove another mention of metaclass of Generic in typing docs (GH-16743) https://github.com/python/cpython/commit/8144095707f87bdee6f3e1bbb15283ea61381be6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 12:53:19 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 13 Oct 2019 16:53:19 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1570985599.47.0.800892657245.issue28556@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16324 pull_request: https://github.com/python/cpython/pull/16750 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 12:53:26 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 13 Oct 2019 16:53:26 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1570985606.73.0.392361346982.issue28556@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16325 pull_request: https://github.com/python/cpython/pull/16751 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 12:59:02 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 13 Oct 2019 16:59:02 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1570985942.97.0.0380821161888.issue28556@roundup.psfhosted.org> miss-islington added the comment: New changeset 20d1f49a0008e7c306cbe34dcc1b7d6e62dc3d24 by Miss Islington (bot) in branch '3.7': bpo-28556: Remove another mention of metaclass of Generic in typing docs (GH-16743) https://github.com/python/cpython/commit/20d1f49a0008e7c306cbe34dcc1b7d6e62dc3d24 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 13:00:22 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 13 Oct 2019 17:00:22 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1570986022.53.0.741810446164.issue28556@roundup.psfhosted.org> miss-islington added the comment: New changeset e742826531d4369cb1eff65337fa95fd67de8d42 by Miss Islington (bot) in branch '3.8': bpo-28556: Remove another mention of metaclass of Generic in typing docs (GH-16743) https://github.com/python/cpython/commit/e742826531d4369cb1eff65337fa95fd67de8d42 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 13:02:01 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 13 Oct 2019 17:02:01 +0000 Subject: [issue38463] 3.8 Release Notes: Link to SSLContext.post_handshake_auth missing In-Reply-To: <1570974442.94.0.731112598518.issue38463@roundup.psfhosted.org> Message-ID: <1570986121.55.0.648947282678.issue38463@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 13:02:20 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 13 Oct 2019 17:02:20 +0000 Subject: [issue38461] 3.8 Release Notes: "curses" misspelled as "ncurses" In-Reply-To: <1570972004.47.0.506267753893.issue38461@roundup.psfhosted.org> Message-ID: <1570986140.76.0.719204637527.issue38461@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 13:03:32 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 13 Oct 2019 17:03:32 +0000 Subject: [issue38460] 3.8 Release Notes: document asyncio exception changes In-Reply-To: <1570969254.43.0.827620904639.issue38460@roundup.psfhosted.org> Message-ID: <1570986212.81.0.934383855769.issue38460@roundup.psfhosted.org> Raymond Hettinger added the comment: Please put all suggestions in a single tracker entry. Having multiple entries is more of a hindrance than a help. ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 13:18:19 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 13 Oct 2019 17:18:19 +0000 Subject: [issue38467] Misspelled argument names for typing.get_origin and get_args In-Reply-To: <1570982673.75.0.804199303932.issue38467@roundup.psfhosted.org> Message-ID: <1570987099.71.0.154716114215.issue38467@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 14:10:26 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 13 Oct 2019 18:10:26 +0000 Subject: [issue38467] Misspelled argument names for typing.get_origin and get_args In-Reply-To: <1570982673.75.0.804199303932.issue38467@roundup.psfhosted.org> Message-ID: <1570990226.49.0.241127954062.issue38467@roundup.psfhosted.org> Ivan Levkivskyi added the comment: I think adjusting the docs would be less disruptive than changing implementation. Would you like to make a PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 14:19:14 2019 From: report at bugs.python.org (Sebastian Rittau) Date: Sun, 13 Oct 2019 18:19:14 +0000 Subject: [issue38467] Misspelled argument names for typing.get_origin and get_args In-Reply-To: <1570982673.75.0.804199303932.issue38467@roundup.psfhosted.org> Message-ID: <1570990754.14.0.291991460246.issue38467@roundup.psfhosted.org> Change by Sebastian Rittau : ---------- keywords: +patch pull_requests: +16326 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16753 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 14:20:11 2019 From: report at bugs.python.org (Sebastian Rittau) Date: Sun, 13 Oct 2019 18:20:11 +0000 Subject: [issue38467] Misspelled argument names for typing.get_origin and get_args In-Reply-To: <1570982673.75.0.804199303932.issue38467@roundup.psfhosted.org> Message-ID: <1570990811.62.0.63026664182.issue38467@roundup.psfhosted.org> Sebastian Rittau added the comment: https://github.com/python/cpython/pull/16753 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 14:27:47 2019 From: report at bugs.python.org (Ned Deily) Date: Sun, 13 Oct 2019 18:27:47 +0000 Subject: [issue38014] ./configure on recent macOS versions can fail with multiple "present but cannot be compiled" messages In-Reply-To: <1567477987.66.0.578307493025.issue38014@roundup.psfhosted.org> Message-ID: <1570991267.49.0.298746832112.issue38014@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the input, @jmr! I realize that what I wrote was ambiguous so to clarify I *have* tested that example with the final release versions of Catalina and Xcode 11.1 and could not reproduce. Just for fun, I've also tested with the latest developer previews of 10.15.1 and 11.2 with and without adding -fstack-check via 'OPT=' again without failure. (Not being familiar with the stack-check option, I don't know if just adding it to the compiler command lines is sufficient.) So if anyone *can* reproduce with current releases, please open a new issue about it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 14:31:39 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 13 Oct 2019 18:31:39 +0000 Subject: [issue38467] Misspelled argument names for typing.get_origin and get_args In-Reply-To: <1570982673.75.0.804199303932.issue38467@roundup.psfhosted.org> Message-ID: <1570991499.05.0.850295100896.issue38467@roundup.psfhosted.org> Ivan Levkivskyi added the comment: New changeset fdfe2833ace93021278fe4c41c40e1d08d70abf9 by Ivan Levkivskyi (Sebastian Rittau) in branch 'master': bpo-38467: Fix argument name of typing functions (GH-16753) https://github.com/python/cpython/commit/fdfe2833ace93021278fe4c41c40e1d08d70abf9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 14:31:47 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 13 Oct 2019 18:31:47 +0000 Subject: [issue38467] Misspelled argument names for typing.get_origin and get_args In-Reply-To: <1570982673.75.0.804199303932.issue38467@roundup.psfhosted.org> Message-ID: <1570991507.2.0.543700425688.issue38467@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16327 pull_request: https://github.com/python/cpython/pull/16754 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 14:38:48 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 13 Oct 2019 18:38:48 +0000 Subject: [issue38467] Misspelled argument names for typing.get_origin and get_args In-Reply-To: <1570982673.75.0.804199303932.issue38467@roundup.psfhosted.org> Message-ID: <1570991928.32.0.431683459885.issue38467@roundup.psfhosted.org> miss-islington added the comment: New changeset c732660b7b18352ba8524ac78d39975afe4392ef by Miss Islington (bot) in branch '3.8': bpo-38467: Fix argument name of typing functions (GH-16753) https://github.com/python/cpython/commit/c732660b7b18352ba8524ac78d39975afe4392ef ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 14:47:25 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 13 Oct 2019 18:47:25 +0000 Subject: [issue38467] Misspelled argument names for typing.get_origin and get_args In-Reply-To: <1570982673.75.0.804199303932.issue38467@roundup.psfhosted.org> Message-ID: <1570992445.55.0.57113763266.issue38467@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 16:54:11 2019 From: report at bugs.python.org (Pierre Quentel) Date: Sun, 13 Oct 2019 20:54:11 +0000 Subject: [issue38469] PEP 572 : assignment expression to a global variable in a comprehension Message-ID: <1571000051.15.0.611092311064.issue38469@roundup.psfhosted.org> New submission from Pierre Quentel : PEP 572 says that "an assignment expression occurring in a (...) comprehension (...) binds the target in the containing scope, honoring a nonlocal or global declaration for the target in that scope, if one exists." In Appendix B, the PEP shows this example : def f(): global TARGET a = [TARGET := EXPR for VAR in ITERABLE] So I don't understand why this fails: Python 3.8.0rc1 (tags/v3.8.0rc1:34214de, Oct 1 2019, 18:42:37) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> x = 0 >>> def f(): ... global x ... [x := i for i in range(5)] ... File "", line 3 SyntaxError: no binding for nonlocal 'x' found >>> Is this a bug or am I missing something ? ---------- components: Interpreter Core messages: 354601 nosy: quentel priority: normal severity: normal status: open title: PEP 572 : assignment expression to a global variable in a comprehension type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 17:19:17 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sun, 13 Oct 2019 21:19:17 +0000 Subject: [issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}() In-Reply-To: <1570543574.99.0.942798410146.issue38410@roundup.psfhosted.org> Message-ID: <1571001557.23.0.601751459163.issue38410@roundup.psfhosted.org> ?ukasz Langa added the comment: Unfortunately at this point we will have to leave the ABI as is. We are in fact promising to lock it by Beta 3 so quite a long time ago. ---------- versions: -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 17:30:54 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 13 Oct 2019 21:30:54 +0000 Subject: [issue38469] PEP 572 : assignment expression to a global variable in a comprehension In-Reply-To: <1571000051.15.0.611092311064.issue38469@roundup.psfhosted.org> Message-ID: <1571002254.58.0.557692552221.issue38469@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +emilyemorehouse, gvanrossum, ncoghlan, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 17:58:18 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 13 Oct 2019 21:58:18 +0000 Subject: [issue38469] PEP 572 : assignment expression to a global variable in a comprehension In-Reply-To: <1571000051.15.0.611092311064.issue38469@roundup.psfhosted.org> Message-ID: <1571003898.86.0.405989077454.issue38469@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I think this is a bug in the symtable_extend_namedexpr_scope function because when visiting the stack in reverse order and finding a function block is always assigning the scope as DEF_NONLOCAL. Marking also as a release blocker unless Nick, Guido or Emily confirm otherwise. ---------- nosy: +lukasz.langa priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 17:58:22 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 13 Oct 2019 21:58:22 +0000 Subject: [issue38469] PEP 572 : assignment expression to a global variable in a comprehension In-Reply-To: <1571000051.15.0.611092311064.issue38469@roundup.psfhosted.org> Message-ID: <1571003902.57.0.848868285073.issue38469@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 18:07:00 2019 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 13 Oct 2019 22:07:00 +0000 Subject: [issue38469] PEP 572 : assignment expression to a global variable in a comprehension In-Reply-To: <1571000051.15.0.611092311064.issue38469@roundup.psfhosted.org> Message-ID: <1571004420.56.0.513495732966.issue38469@roundup.psfhosted.org> Guido van Rossum added the comment: It's a bug, but it's honestly such an odd corner case that I don't think this should hold up the 3.8.0 release. Let's fix it in 3.9 and backport it to 3.8.1. ---------- priority: release blocker -> normal stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 18:17:33 2019 From: report at bugs.python.org (Tim Peters) Date: Sun, 13 Oct 2019 22:17:33 +0000 Subject: [issue38379] finalizer resurrection in gc In-Reply-To: <1570296686.13.0.00730737596554.issue38379@roundup.psfhosted.org> Message-ID: <1571005053.45.0.316725424517.issue38379@roundup.psfhosted.org> Tim Peters added the comment: Everything here has been addressed, so closing this. zleak.py can apparently run forever now without leaking a byte :-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 18:20:03 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 13 Oct 2019 22:20:03 +0000 Subject: [issue38469] PEP 572 : assignment expression to a global variable in a comprehension In-Reply-To: <1571000051.15.0.611092311064.issue38469@roundup.psfhosted.org> Message-ID: <1571005203.64.0.12040069124.issue38469@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I am working on a fix now, se we can merge it before the final release ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 18:27:16 2019 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 13 Oct 2019 22:27:16 +0000 Subject: [issue38469] PEP 572 : assignment expression to a global variable in a comprehension In-Reply-To: <1571000051.15.0.611092311064.issue38469@roundup.psfhosted.org> Message-ID: <1571005636.9.0.220796121929.issue38469@roundup.psfhosted.org> Guido van Rossum added the comment: Thanks for working on a fix. But is it really important enough to violate the desired "rc1 == release" invariant? It's up to the release manager. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 18:40:12 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 13 Oct 2019 22:40:12 +0000 Subject: [issue38469] PEP 572 : assignment expression to a global variable in a comprehension In-Reply-To: <1571000051.15.0.611092311064.issue38469@roundup.psfhosted.org> Message-ID: <1571006412.02.0.693009620036.issue38469@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +16328 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16755 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 18:44:21 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 13 Oct 2019 22:44:21 +0000 Subject: [issue38469] PEP 572 : assignment expression to a global variable in a comprehension In-Reply-To: <1571000051.15.0.611092311064.issue38469@roundup.psfhosted.org> Message-ID: <1571006661.2.0.401144392905.issue38469@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > But is it really important enough to violate the desired "rc1 == release" invariant? I created the fix because many other bug fixes have been merged since rc1 already so apologies if it seemed a bit precipitate. Let's see what the release manager thinks (in case the bugfix is correct) :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:16:45 2019 From: report at bugs.python.org (Daniel Hillier) Date: Mon, 14 Oct 2019 00:16:45 +0000 Subject: [issue38334] zipfile: Seeking encrypted file breaks after seeking backwards In-Reply-To: <1569917842.05.0.044912868688.issue38334@roundup.psfhosted.org> Message-ID: <1571012205.91.0.501636465123.issue38334@roundup.psfhosted.org> Change by Daniel Hillier : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:45:36 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 14 Oct 2019 00:45:36 +0000 Subject: [issue38470] test_compileall fails in AMD64 Windows7 SP1 3.x Message-ID: <1571013936.71.0.668005842061.issue38470@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : This buildbot has been failing for a long time (example failure https://buildbot.python.org/all/#/builders/40/builds/3291) since https://github.com/python/cpython/commit/4267c989e7fc6cd528e8a1d04a07fac5cca85ec7: ====================================================================== FAIL: test_compile_dir_maxlevels (test.test_compileall.CompileallTestsWithSourceEpoch) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_py_compile.py", line 30, in wrapper return fxn(*args, **kwargs) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_compileall.py", line 257, in test_compile_dir_maxlevels self.assertTrue(os.path.isfile(self.bc_path_long)) AssertionError: False is not true ====================================================================== FAIL: test_compile_dir_maxlevels (test.test_compileall.CompileallTestsWithoutSourceEpoch) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_py_compile.py", line 20, in wrapper return fxn(*args, **kwargs) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_compileall.py", line 257, in test_compile_dir_maxlevels self.assertTrue(os.path.isfile(self.bc_path_long)) AssertionError: False is not true ---------------------------------------------------------------------- Can someone try to fix the error, otherwise we would need to revert commit 4267c989e7fc6cd528e8a1d04a07fac5cca85ec7. ---------- components: Tests, Windows messages: 354609 nosy: hroncok, pablogsal, paul.moore, petr.viktorin, steve.dower, tim.golden, vstinner, zach.ware priority: normal severity: normal status: open title: test_compileall fails in AMD64 Windows7 SP1 3.x type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:46:40 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 14 Oct 2019 00:46:40 +0000 Subject: [issue38112] Compileall improvements In-Reply-To: <1568210479.53.0.901531773072.issue38112@roundup.psfhosted.org> Message-ID: <1571014000.69.0.685016792013.issue38112@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: The AMD64 Windows7 SP1 3.x buildbot has been failing for a while since commit 4267c989e7fc6cd528e8a1d04a07fac5cca85ec7, please take a look at https://bugs.python.org/issue38470. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:59:37 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Oct 2019 00:59:37 +0000 Subject: [issue38464] documentation for NormalDist.quantiles(): missing argument In-Reply-To: <1570976427.94.0.852447580797.issue38464@roundup.psfhosted.org> Message-ID: <1571014777.97.0.270738665362.issue38464@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks for noticing.. Will get that fixed up shortly. ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 22:46:02 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Oct 2019 02:46:02 +0000 Subject: [issue38464] documentation for NormalDist.quantiles(): missing argument In-Reply-To: <1570976427.94.0.852447580797.issue38464@roundup.psfhosted.org> Message-ID: <1571021162.87.0.11169410049.issue38464@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +16329 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16757 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 22:53:33 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Oct 2019 02:53:33 +0000 Subject: [issue38464] documentation for NormalDist.quantiles(): missing argument In-Reply-To: <1570976427.94.0.852447580797.issue38464@roundup.psfhosted.org> Message-ID: <1571021613.67.0.575047874944.issue38464@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 8a6cbf8adb68aa2c43a48769af92e50d5ca1539d by Raymond Hettinger in branch 'master': bpo-38464: Document parameter for NormalDist.quantiles() (GH-16757) https://github.com/python/cpython/commit/8a6cbf8adb68aa2c43a48769af92e50d5ca1539d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 22:54:13 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 14 Oct 2019 02:54:13 +0000 Subject: [issue38464] documentation for NormalDist.quantiles(): missing argument In-Reply-To: <1570976427.94.0.852447580797.issue38464@roundup.psfhosted.org> Message-ID: <1571021653.59.0.463920145291.issue38464@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16330 pull_request: https://github.com/python/cpython/pull/16758 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 23:04:32 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Oct 2019 03:04:32 +0000 Subject: [issue38464] documentation for NormalDist.quantiles(): missing argument In-Reply-To: <1570976427.94.0.852447580797.issue38464@roundup.psfhosted.org> Message-ID: <1571022272.15.0.0346815774006.issue38464@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 36f62860f631acefd7988b76901863339ffa26c9 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-38464: Document parameter for NormalDist.quantiles() (GH-16757) (GH-16758) https://github.com/python/cpython/commit/36f62860f631acefd7988b76901863339ffa26c9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 23:04:57 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Oct 2019 03:04:57 +0000 Subject: [issue38464] documentation for NormalDist.quantiles(): missing argument In-Reply-To: <1570976427.94.0.852447580797.issue38464@roundup.psfhosted.org> Message-ID: <1571022297.19.0.134151023769.issue38464@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 23:56:13 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Oct 2019 03:56:13 +0000 Subject: [issue38460] 3.8 Release Notes: document asyncio exception changes In-Reply-To: <1570969254.43.0.827620904639.issue38460@roundup.psfhosted.org> Message-ID: <1571025373.02.0.619598860133.issue38460@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- Removed message: https://bugs.python.org/msg354595 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 23:57:02 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Oct 2019 03:57:02 +0000 Subject: [issue38460] 3.8 Release Notes: document asyncio exception changes In-Reply-To: <1570969254.43.0.827620904639.issue38460@roundup.psfhosted.org> Message-ID: <1571025422.35.0.689453597671.issue38460@roundup.psfhosted.org> Raymond Hettinger added the comment: Yuri, would you propose an entry for this? ---------- assignee: rhettinger -> yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:18:07 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 14 Oct 2019 04:18:07 +0000 Subject: [issue38469] PEP 572 : assignment expression to a global variable in a comprehension In-Reply-To: <1571000051.15.0.611092311064.issue38469@roundup.psfhosted.org> Message-ID: <1571026687.96.0.112117968899.issue38469@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset fd5c414880b2e05720b9cf14ab0b0d7ae2b7d925 by Pablo Galindo in branch 'master': bpo-38469: Handle named expression scope with global/nonlocal keywords (GH-16755) https://github.com/python/cpython/commit/fd5c414880b2e05720b9cf14ab0b0d7ae2b7d925 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:18:20 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 14 Oct 2019 04:18:20 +0000 Subject: [issue38469] PEP 572 : assignment expression to a global variable in a comprehension In-Reply-To: <1571000051.15.0.611092311064.issue38469@roundup.psfhosted.org> Message-ID: <1571026700.04.0.10277313022.issue38469@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16331 pull_request: https://github.com/python/cpython/pull/16760 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:20:05 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Oct 2019 04:20:05 +0000 Subject: [issue38461] 3.8 Release Notes: "curses" misspelled as "ncurses" In-Reply-To: <1570972004.47.0.506267753893.issue38461@roundup.psfhosted.org> Message-ID: <1571026805.45.0.918070940347.issue38461@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +16332 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16761 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:20:05 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Oct 2019 04:20:05 +0000 Subject: [issue38463] 3.8 Release Notes: Link to SSLContext.post_handshake_auth missing In-Reply-To: <1570974442.94.0.731112598518.issue38463@roundup.psfhosted.org> Message-ID: <1571026805.72.0.44541699377.issue38463@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +16333 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16761 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:31:15 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Oct 2019 04:31:15 +0000 Subject: [issue38463] 3.8 Release Notes: Link to SSLContext.post_handshake_auth missing In-Reply-To: <1570974442.94.0.731112598518.issue38463@roundup.psfhosted.org> Message-ID: <1571027475.92.0.303830117631.issue38463@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 61a6db5e79921b89b9e2a154990f01f5f3150213 by Raymond Hettinger in branch 'master': bpo-38461 and bpo-38463: Minor fixes to Whatsnew 3.8 (GH-16761) https://github.com/python/cpython/commit/61a6db5e79921b89b9e2a154990f01f5f3150213 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:31:15 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Oct 2019 04:31:15 +0000 Subject: [issue38461] 3.8 Release Notes: "curses" misspelled as "ncurses" In-Reply-To: <1570972004.47.0.506267753893.issue38461@roundup.psfhosted.org> Message-ID: <1571027475.73.0.340839812806.issue38461@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 61a6db5e79921b89b9e2a154990f01f5f3150213 by Raymond Hettinger in branch 'master': bpo-38461 and bpo-38463: Minor fixes to Whatsnew 3.8 (GH-16761) https://github.com/python/cpython/commit/61a6db5e79921b89b9e2a154990f01f5f3150213 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:31:24 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 14 Oct 2019 04:31:24 +0000 Subject: [issue38461] 3.8 Release Notes: "curses" misspelled as "ncurses" In-Reply-To: <1570972004.47.0.506267753893.issue38461@roundup.psfhosted.org> Message-ID: <1571027484.0.0.232331853564.issue38461@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16334 pull_request: https://github.com/python/cpython/pull/16762 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:31:24 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 14 Oct 2019 04:31:24 +0000 Subject: [issue38463] 3.8 Release Notes: Link to SSLContext.post_handshake_auth missing In-Reply-To: <1570974442.94.0.731112598518.issue38463@roundup.psfhosted.org> Message-ID: <1571027484.09.0.0120203959769.issue38463@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16335 pull_request: https://github.com/python/cpython/pull/16762 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:54:12 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Oct 2019 04:54:12 +0000 Subject: [issue38463] 3.8 Release Notes: Link to SSLContext.post_handshake_auth missing In-Reply-To: <1570974442.94.0.731112598518.issue38463@roundup.psfhosted.org> Message-ID: <1571028852.64.0.884861014414.issue38463@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset c09379bd6ebdd896547008c641e8899a1e36aa42 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-38461 and bpo-38463: Minor fixes to Whatsnew 3.8 (GH-16761) (GH-16762) https://github.com/python/cpython/commit/c09379bd6ebdd896547008c641e8899a1e36aa42 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:54:12 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Oct 2019 04:54:12 +0000 Subject: [issue38461] 3.8 Release Notes: "curses" misspelled as "ncurses" In-Reply-To: <1570972004.47.0.506267753893.issue38461@roundup.psfhosted.org> Message-ID: <1571028852.51.0.587140381258.issue38461@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset c09379bd6ebdd896547008c641e8899a1e36aa42 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-38461 and bpo-38463: Minor fixes to Whatsnew 3.8 (GH-16761) (GH-16762) https://github.com/python/cpython/commit/c09379bd6ebdd896547008c641e8899a1e36aa42 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:54:49 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Oct 2019 04:54:49 +0000 Subject: [issue38463] 3.8 Release Notes: Link to SSLContext.post_handshake_auth missing In-Reply-To: <1570974442.94.0.731112598518.issue38463@roundup.psfhosted.org> Message-ID: <1571028889.43.0.589464917272.issue38463@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 00:59:25 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Oct 2019 04:59:25 +0000 Subject: [issue38461] 3.8 Release Notes: "curses" misspelled as "ncurses" In-Reply-To: <1570972004.47.0.506267753893.issue38461@roundup.psfhosted.org> Message-ID: <1571029165.11.0.256599227512.issue38461@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 02:18:55 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Oct 2019 06:18:55 +0000 Subject: [issue37759] Polish whatsnew for 3.8 In-Reply-To: <1564971591.59.0.825854790144.issue37759@roundup.psfhosted.org> Message-ID: <1571033935.87.0.632800683851.issue37759@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +16336 pull_request: https://github.com/python/cpython/pull/16763 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 02:32:09 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Oct 2019 06:32:09 +0000 Subject: [issue37759] Polish whatsnew for 3.8 In-Reply-To: <1564971591.59.0.825854790144.issue37759@roundup.psfhosted.org> Message-ID: <1571034729.08.0.090785955562.issue37759@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset a3291531ea51455cfa5989119db496267425323c by Raymond Hettinger in branch 'master': bpo-37759: Add examples for the new typing features (GH-16763) https://github.com/python/cpython/commit/a3291531ea51455cfa5989119db496267425323c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 02:32:15 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 14 Oct 2019 06:32:15 +0000 Subject: [issue37759] Polish whatsnew for 3.8 In-Reply-To: <1564971591.59.0.825854790144.issue37759@roundup.psfhosted.org> Message-ID: <1571034735.97.0.0688970667539.issue37759@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16337 pull_request: https://github.com/python/cpython/pull/16764 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 02:45:50 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Oct 2019 06:45:50 +0000 Subject: [issue37759] Polish whatsnew for 3.8 In-Reply-To: <1564971591.59.0.825854790144.issue37759@roundup.psfhosted.org> Message-ID: <1571035550.48.0.542345846235.issue37759@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 3ac152948d63f52267d312be33306067d3847e2a by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-37759: Add examples for the new typing features (GH-16763) (GH-16764) https://github.com/python/cpython/commit/3ac152948d63f52267d312be33306067d3847e2a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 04:34:02 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Oct 2019 08:34:02 +0000 Subject: [issue37759] Polish whatsnew for 3.8 In-Reply-To: <1564971591.59.0.825854790144.issue37759@roundup.psfhosted.org> Message-ID: <1571042042.42.0.395876924776.issue37759@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +16338 pull_request: https://github.com/python/cpython/pull/16769 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 05:06:10 2019 From: report at bugs.python.org (Paul Martin) Date: Mon, 14 Oct 2019 09:06:10 +0000 Subject: [issue37759] Polish whatsnew for 3.8 In-Reply-To: <1564971591.59.0.825854790144.issue37759@roundup.psfhosted.org> Message-ID: <1571043970.02.0.861887251219.issue37759@roundup.psfhosted.org> Paul Martin added the comment: Should singledispatchmethod and cached_property be added? ---------- nosy: +primal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 05:51:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 09:51:29 +0000 Subject: [issue38282] socketmodule.c: _FORTIFY_SOURCE=2 warning in AF_ALG case of getsockaddrarg() In-Reply-To: <1569460305.42.0.728817437513.issue38282@roundup.psfhosted.org> Message-ID: <1571046689.32.0.7932630657.issue38282@roundup.psfhosted.org> STINNER Victor added the comment: I close the issue. I planned to backport the change to 3.8, but 3.8.0 final is supposed to be released today. I prefer to avoid putting a last minute regression on some platforms like DragonflyBSD in 3.8. Backporting the change is not strictly required, it's just a compiler warning, it's a false alarm, and it's only when building with _FORTIFY_SOURCE defined. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 06:13:57 2019 From: report at bugs.python.org (Tal Einat) Date: Mon, 14 Oct 2019 10:13:57 +0000 Subject: [issue32498] urllib.parse.unquote raises incorrect errormessage when string parameter is bytes In-Reply-To: <1515179710.49.0.467229070634.issue32498@psf.upfronthosting.co.za> Message-ID: <1571048037.48.0.770692722897.issue32498@roundup.psfhosted.org> Change by Tal Einat : ---------- versions: +Python 3.9 -Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 06:27:18 2019 From: report at bugs.python.org (Tal Einat) Date: Mon, 14 Oct 2019 10:27:18 +0000 Subject: [issue32498] urllib.parse.unquote raises incorrect errormessage when string parameter is bytes In-Reply-To: <1515179710.49.0.467229070634.issue32498@psf.upfronthosting.co.za> Message-ID: <1571048838.76.0.448675662376.issue32498@roundup.psfhosted.org> Tal Einat added the comment: So urllib.parse.unquote() will accept bytes in addition to str starting with 3.9. The unclear exception remains in prior versions. Would someone like to add a better exception for 3.7 and 3.8? (I'm marking this as "newcomer friendly", referring only to improving the exception for 3.7 and 3.8.) ---------- keywords: +newcomer friendly nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 06:36:33 2019 From: report at bugs.python.org (Tal Einat) Date: Mon, 14 Oct 2019 10:36:33 +0000 Subject: [issue32498] urllib.parse.unquote raises incorrect errormessage when string parameter is bytes In-Reply-To: <1515179710.49.0.467229070634.issue32498@psf.upfronthosting.co.za> Message-ID: <1571049393.09.0.193250554455.issue32498@roundup.psfhosted.org> Tal Einat added the comment: New changeset aad2ee01561f260c69af1951c0d6fcaf75c4d41b by Tal Einat (Stein Karlsen) in branch 'master': bpo-32498: urllib.parse.unquote also accepts bytes (GH-7768) https://github.com/python/cpython/commit/aad2ee01561f260c69af1951c0d6fcaf75c4d41b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 06:42:35 2019 From: report at bugs.python.org (Paul Martin) Date: Mon, 14 Oct 2019 10:42:35 +0000 Subject: [issue38471] _ProactorDatagramTransport: If close() is called when write buffer is not empty, the remaining data is not sent and connection_lost is not called Message-ID: <1571049755.46.0.456741846567.issue38471@roundup.psfhosted.org> New submission from Paul Martin : Expected behaviour for DatagramTransport (from_SelectorDatagramTransport): transport.close() called. If there is data in the write buffer, don't call connection_lost. When all data is written and the buffer is empty, check if connection has been lost and if so, call connection_lost However for _ProactorDatagramTransport, if close is called with data in the buffer, _loop_writing returns immediately, so it never gets to the point of sending the remaining data or calling connection_lost. The code for calling connection_lost inside _loop_writing is completely unreachable, because the method immediately returns if the connection has been lost. ---------- components: Windows, asyncio messages: 354626 nosy: asvetlov, paul.moore, primal, steve.dower, tim.golden, yselivanov, zach.ware priority: normal severity: normal status: open title: _ProactorDatagramTransport: If close() is called when write buffer is not empty, the remaining data is not sent and connection_lost is not called type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 06:42:49 2019 From: report at bugs.python.org (Paul Martin) Date: Mon, 14 Oct 2019 10:42:49 +0000 Subject: [issue38471] _ProactorDatagramTransport: If close() is called when write buffer is not empty, the remaining data is not sent and connection_lost is not called In-Reply-To: <1571049755.46.0.456741846567.issue38471@roundup.psfhosted.org> Message-ID: <1571049769.74.0.758793920138.issue38471@roundup.psfhosted.org> Change by Paul Martin : ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 07:32:09 2019 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 14 Oct 2019 11:32:09 +0000 Subject: [issue38470] test_compileall fails in AMD64 Windows7 SP1 3.x In-Reply-To: <1571013936.71.0.668005842061.issue38470@roundup.psfhosted.org> Message-ID: <1571052729.12.0.0313162884213.issue38470@roundup.psfhosted.org> Petr Viktorin added the comment: Oh! Sorry, I thought I saw green bots, and haven't looked since. I should have time for this tomorrow. If that's too late, remove/skip test_compile_dir_maxlevels on Windows. (The feature was untested before, and the 3.9 enhancement added test coverage, so I think it's fair to skip the failing test.) I don't think simply reverting 4267c989e7fc6cd528e8a1d04a07fac5cca85ec7 will fix the bots. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 07:40:18 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 14 Oct 2019 11:40:18 +0000 Subject: [issue38469] PEP 572 : assignment expression to a global variable in a comprehension In-Reply-To: <1571000051.15.0.611092311064.issue38469@roundup.psfhosted.org> Message-ID: <1571053218.48.0.230004614621.issue38469@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 927f07c816aad9f8ed961d7ace6a367837f7fa8f by ?ukasz Langa (Miss Islington (bot)) in branch '3.8': bpo-38469: Handle named expression scope with global/nonlocal keywords (GH-16755) (#16760) https://github.com/python/cpython/commit/927f07c816aad9f8ed961d7ace6a367837f7fa8f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 08:28:35 2019 From: report at bugs.python.org (Alex Grund) Date: Mon, 14 Oct 2019 12:28:35 +0000 Subject: [issue38472] GCC detection in setup.py is broken Message-ID: <1571056115.0.0.505317698716.issue38472@roundup.psfhosted.org> New submission from Alex Grund : `setup.py` runs ` -E -v - /dev/null` to figure out include and library paths from the compiler in the function `add_gcc_paths`. However sample output from the compiler is: Es werden eingebaute Spezifikationen verwendet. COLLECT_GCC=g++ Ziel: x86_64-pc-linux-gnu Konfiguriert mit: ../configure --enable-languages=c,c++,fortran --enable-lto --enable-checking=release --disable-multilib --enable-shared=yes --enable-static=yes --enable-threads=posix --enable-plugins --enable-gold=default --enable-ld --with-plugin-ld=ld.gold --prefix=/sw/installed/GCCcore/9.1.0 --with-local-prefix=/sw/installed/GCCcore/9.1.0 --enable-bootstrap --with-isl=/dev/shm/easybuild-build/GCCcore/9.1.0/dummy-/gcc-9.1.0/stage2_stuff Thread-Modell: posix gcc-Version 9.1.0 (GCC) COLLECT_GCC_OPTIONS='-E' '-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /software/haswell/GCCcore/9.1.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/9.1.0/cc1 -E -quiet -v -iprefix /software/haswell/GCCcore/9.1.0/bin/../lib/gcc/x86_64-pc-linux-gnu/9.1.0/ - -mtune=generic -march=x86-64 nicht vorhandenes Verzeichnis ?/software/haswell/GCCcore/9.1.0/bin/../lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/include? wird ignoriert doppeltes Verzeichnis ?/software/haswell/GCCcore/9.1.0/bin/../lib/gcc/../../lib/gcc/x86_64-pc-linux-gnu/9.1.0/include? wird ignoriert doppeltes Verzeichnis ?/software/haswell/GCCcore/9.1.0/bin/../lib/gcc/../../lib/gcc/x86_64-pc-linux-gnu/9.1.0/include-fixed? wird ignoriert nicht vorhandenes Verzeichnis ?/software/haswell/GCCcore/9.1.0/bin/../lib/gcc/../../lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/include? wird ignoriert doppeltes Verzeichnis ?/sw/installed/GCCcore/9.1.0/include? wird ignoriert da es ein Nicht-Systemverzeichnis ist, das ein Systemverzeichnis dupliziert Suche f?r ?#include "..."? beginnt hier: Suche f?r ?#include <...>? beginnt hier: /sw/installed/binutils/2.32-GCCcore-9.1.0/include /sw/installed/zlib/1.2.11-GCCcore-9.1.0/include /software/haswell/GCCcore/9.1.0/bin/../lib/gcc/x86_64-pc-linux-gnu/9.1.0/include /software/haswell/GCCcore/9.1.0/bin/../lib/gcc/x86_64-pc-linux-gnu/9.1.0/include-fixed /sw/installed/GCCcore/9.1.0/include /usr/include Ende der Suchliste. COMPILER_PATH=/software/haswell/GCCcore/9.1.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/9.1.0/:/software/haswell/GCCcore/9.1.0/bin/../libexec/gcc/ LIBRARY_PATH=/software/haswell/GCCcore/9.1.0/bin/../lib/gcc/x86_64-pc-linux-gnu/9.1.0/:/software/haswell/GCCcore/9.1.0/bin/../lib/gcc/:/sw/installed/GCCcore/9.1.0/lib64/../lib64/:/sw/installed/GCCcore/9.1.0/lib/../lib64/:/software/haswell/GCCcore/9.1.0/bin/../lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/sw/installed/binutils/2.32-GCCcore-9.1.0/lib/:/sw/installed/zlib/1.2.11-GCCcore-9.1.0/lib/:/sw/installed/GCCcore/9.1.0/lib64/:/sw/installed/GCCcore/9.1.0/lib/:/software/haswell/GCCcore/9.1.0/bin/../lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-E' '-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' So the correct matcher would be "gcc-Version", maybe in addition to "gcc version" Due to this the setup fails to build e.g. bzip2 modules as the include and lib paths are passed in via CPATH and LIBRARY_PATH only (module system on HPC system) ---------- components: Build messages: 354629 nosy: Alex Grund priority: normal severity: normal status: open title: GCC detection in setup.py is broken type: compile error versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 08:30:28 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 14 Oct 2019 12:30:28 +0000 Subject: [issue38472] GCC detection in setup.py is broken In-Reply-To: <1571056115.0.0.505317698716.issue38472@roundup.psfhosted.org> Message-ID: <1571056228.74.0.188199253293.issue38472@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 08:43:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 12:43:44 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1571057024.08.0.297521586604.issue38449@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 08:44:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 12:44:20 +0000 Subject: [issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name In-Reply-To: <1409971957.28.0.64915967452.issue22347@psf.upfronthosting.co.za> Message-ID: <1571057060.08.0.385582003646.issue22347@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 09:10:44 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 14 Oct 2019 13:10:44 +0000 Subject: [issue37759] Polish whatsnew for 3.8 In-Reply-To: <1564971591.59.0.825854790144.issue37759@roundup.psfhosted.org> Message-ID: <1571058644.66.0.00972088084308.issue37759@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 298439ce3fb01de6c3110cc4847e6afe3253ba7a by ?ukasz Langa (Serhiy Storchaka) in branch 'master': bpo-37759: Polish What's New in Python 3.8. (#16769) https://github.com/python/cpython/commit/298439ce3fb01de6c3110cc4847e6afe3253ba7a ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 09:12:14 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 13:12:14 +0000 Subject: [issue38466] [Easy doc] threading.excepthook doc talks about "object" In-Reply-To: <1570981226.47.0.762418362865.issue38466@roundup.psfhosted.org> Message-ID: <1571058734.05.0.391869845849.issue38466@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +newcomer friendly title: threading.excepthook doc talks about "object" -> [Easy doc] threading.excepthook doc talks about "object" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 09:12:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 13:12:37 +0000 Subject: [issue38445] os.path.exists() takes bool as argument and returns True In-Reply-To: <1570792602.16.0.709405121857.issue38445@roundup.psfhosted.org> Message-ID: <1571058757.12.0.689098996694.issue38445@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 09:17:51 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 14 Oct 2019 13:17:51 +0000 Subject: [issue37759] Polish whatsnew for 3.8 In-Reply-To: <1564971591.59.0.825854790144.issue37759@roundup.psfhosted.org> Message-ID: <1571059071.37.0.0682375011723.issue37759@roundup.psfhosted.org> Change by ?ukasz Langa : ---------- pull_requests: +16339 pull_request: https://github.com/python/cpython/pull/16777 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 09:25:49 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 14 Oct 2019 13:25:49 +0000 Subject: [issue37759] Polish whatsnew for 3.8 In-Reply-To: <1564971591.59.0.825854790144.issue37759@roundup.psfhosted.org> Message-ID: <1571059549.75.0.420511212104.issue37759@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset e498329ebe0d86a5d80471112d766502b144a476 by ?ukasz Langa in branch '3.8': [3.8] bpo-37759: Polish What's New in Python 3.8. (GH-16769) (#16777) https://github.com/python/cpython/commit/e498329ebe0d86a5d80471112d766502b144a476 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 09:31:34 2019 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 14 Oct 2019 13:31:34 +0000 Subject: [issue38470] test_compileall fails in AMD64 Windows7 SP1 3.x In-Reply-To: <1571013936.71.0.668005842061.issue38470@roundup.psfhosted.org> Message-ID: <1571059894.93.0.820007967829.issue38470@roundup.psfhosted.org> Change by Petr Viktorin : ---------- keywords: +patch pull_requests: +16340 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16778 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 09:35:58 2019 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 14 Oct 2019 13:35:58 +0000 Subject: [issue38470] test_compileall fails in AMD64 Windows7 SP1 3.x In-Reply-To: <1571013936.71.0.668005842061.issue38470@roundup.psfhosted.org> Message-ID: <1571060158.43.0.938884795769.issue38470@roundup.psfhosted.org> Petr Viktorin added the comment: If someone has access to Windows and can reproduce this (you need a more special setup than "just Windows"), and you want to spend some time debugging, please do. I'm shooting in the dark. My proposed patch limits the maximum path depth to 20 directories on Windows. That is enough to test compileall's maxlevels option. Still a longer path would be nicer if possible. ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 09:53:56 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 14 Oct 2019 13:53:56 +0000 Subject: [issue38470] test_compileall fails in AMD64 Windows7 SP1 3.x In-Reply-To: <1571013936.71.0.668005842061.issue38470@roundup.psfhosted.org> Message-ID: <1571061236.85.0.377796292482.issue38470@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: You can trigger custom buildbot runs by pushing to the 'buildbot-custom' branch in the CPython repo. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 10:01:06 2019 From: report at bugs.python.org (Paul Martin) Date: Mon, 14 Oct 2019 14:01:06 +0000 Subject: [issue38471] _ProactorDatagramTransport: If close() is called when write buffer is not empty, the remaining data is not sent and connection_lost is not called In-Reply-To: <1571049755.46.0.456741846567.issue38471@roundup.psfhosted.org> Message-ID: <1571061666.3.0.365833146525.issue38471@roundup.psfhosted.org> Change by Paul Martin : ---------- keywords: +patch pull_requests: +16341 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16779 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 10:01:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 14:01:50 +0000 Subject: [issue36338] urlparse of urllib returns wrong hostname In-Reply-To: <1552896371.92.0.122580708995.issue36338@roundup.psfhosted.org> Message-ID: <1571061710.8.0.667916268026.issue36338@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16342 pull_request: https://github.com/python/cpython/pull/16780 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 10:04:07 2019 From: report at bugs.python.org (Tal Einat) Date: Mon, 14 Oct 2019 14:04:07 +0000 Subject: [issue38445] os.path.exists() takes bool as argument and returns True In-Reply-To: <1570792602.16.0.709405121857.issue38445@roundup.psfhosted.org> Message-ID: <1571061847.79.0.0793681262421.issue38445@roundup.psfhosted.org> Change by Tal Einat : ---------- nosy: -taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 10:07:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 14:07:13 +0000 Subject: [issue36338] urlparse of urllib returns wrong hostname In-Reply-To: <1552896371.92.0.122580708995.issue36338@roundup.psfhosted.org> Message-ID: <1571062033.18.0.93296219562.issue36338@roundup.psfhosted.org> STINNER Victor added the comment: I proposed PR 16780 which makes the urllib.parse module way more stricter: * the IPv6 address is validated by ipaddress.IPv6Address() parser * invalid characters are rejected in the IPv6 zone: "%", "[" and "]" * the port number is now validated when parsing the URL: must be an integer in the [0; 65535] range Sadly, validating using ipaddress.IPv6Address() cannot be easily ported to Python 2 which doesn't have this module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 10:25:09 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 14 Oct 2019 14:25:09 +0000 Subject: [issue38473] AttributeError on asserting autospecced mock object added using attach_mock Message-ID: <1571063109.86.0.136370910863.issue38473@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : The following program causes AttributeError while retrieving the spec signature of a call. It seems that not all mocks specced should have _spec_signature where if autospec is used and the mock is attached with attach_mock then the "mock" attribute has the correct object from which _spec_signature has to be derived. On the attribute being not present we can fallback to the sig being None. This can be workaround by disabling autospec but since this is present in 3.7.5RC1 and 3.8.0RC1 I am tagging it as regression. I am also attaching a patch with script to reproduce this that should pass with the patch. I will try to make a PR tonight. Sorry for the last minute report I just stumbled upon this while debugging https://bugs.python.org/issue21478#msg354489. This change was introduced as part of https://bugs.python.org/issue36871 by me. I am tagging the nosy list from issue for review of the patch. import unittest from unittest.mock import patch, Mock, call, ANY class Foo: def set_foo(self, val): pass class FooTest(unittest.TestCase): @patch(f"{__name__}.Foo.set_foo", autospec=True) def test_autospec_attach_mock_assert(self, mock_set_foo): manager = Mock() manager.attach_mock(mock_set_foo, "set_foo_func") obj = Foo() obj.set_foo(3) manager.assert_has_calls([call.set_foo_func(ANY, 3)]) if __name__ == "__main__": unittest.main() ? Python-3.7.5rc1 ./python autospec_regression.py E ====================================================================== ERROR: test_autospec_attach_mock_assert (__main__.FooTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/xtreak/Python-3.7.5rc1/Lib/unittest/mock.py", line 1255, in patched return func(*args, **keywargs) File "autospec_regression.py", line 16, in test_autospec_attach_mock_assert manager.assert_has_calls([call.set_foo_func(ANY, 3)]) File "/home/xtreak/Python-3.7.5rc1/Lib/unittest/mock.py", line 897, in assert_has_calls expected = [self._call_matcher(c) for c in calls] File "/home/xtreak/Python-3.7.5rc1/Lib/unittest/mock.py", line 897, in expected = [self._call_matcher(c) for c in calls] File "/home/xtreak/Python-3.7.5rc1/Lib/unittest/mock.py", line 812, in _call_matcher sig = self._get_call_signature_from_name(_call[0]) File "/home/xtreak/Python-3.7.5rc1/Lib/unittest/mock.py", line 798, in _get_call_signature_from_name sig = child._spec_signature AttributeError: 'function' object has no attribute '_spec_signature' ---------------------------------------------------------------------- Ran 1 test in 0.003s FAILED (errors=1) Patch : ? Python-3.7.5rc1 diff -u Lib/unittest/mock.py Lib/unittest/mock_patched.py --- Lib/unittest/mock.py 2019-10-01 22:53:17.000000000 +0530 +++ Lib/unittest/mock_patched.py 2019-10-14 19:18:00.038416294 +0530 @@ -795,7 +795,16 @@ break else: children = child._mock_children - sig = child._spec_signature + # If an autospecced object is attached using attach_mock the + # child would be a function with mock object as attribute from + # which signature has to be derived. If there is no signature + # attribute then fallback to None to ensure old signature is + # not used. + child = _extract_mock(child) + try: + sig = child._spec_signature + except AttributeError: + sig = None return sig ---------- components: Library (Lib) keywords: 3.7regression, 3.8regression messages: 354635 nosy: cjw296, gregory.p.smith, lisroach, lukasz.langa, mariocj89, michael.foord, ned.deily, xtreak priority: normal severity: normal status: open title: AttributeError on asserting autospecced mock object added using attach_mock versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 10:50:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 14:50:46 +0000 Subject: [issue38470] test_compileall fails in AMD64 Windows7 SP1 3.x In-Reply-To: <1571013936.71.0.668005842061.issue38470@roundup.psfhosted.org> Message-ID: <1571064646.01.0.366984880523.issue38470@roundup.psfhosted.org> STINNER Victor added the comment: To reproduce the recent on a recent Windows 10, you can opt-out for long path using this change: diff --git a/PC/python.manifest b/PC/python.manifest index 8e1bc022ad..524f9b2f6d 100644 --- a/PC/python.manifest +++ b/PC/python.manifest @@ -18,7 +18,6 @@ - true ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 11:41:18 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 14 Oct 2019 15:41:18 +0000 Subject: [issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}() In-Reply-To: <1570543574.99.0.942798410146.issue38410@roundup.psfhosted.org> Message-ID: <1571067678.31.0.695936481613.issue38410@roundup.psfhosted.org> Steve Dower added the comment: In that case, the fix for 3.8 should be to call PyErr_WriteUnraisable(NULL) when an error occurs. This will report it through the new unraisable hook, and also prevent a fatal error if the exception escapes. ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 11:42:25 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 14 Oct 2019 15:42:25 +0000 Subject: [issue38453] ntpath.realpath() should make absolute path earlier In-Reply-To: <1570832840.2.0.910161330311.issue38453@roundup.psfhosted.org> Message-ID: <1571067745.43.0.605004946694.issue38453@roundup.psfhosted.org> Steve Dower added the comment: New changeset d83fc2702951f56a7339aa95d62414ed6e0fb40d by Steve Dower in branch 'master': bpo-38453: Resolve test directories before chdir to them (GH-16723) https://github.com/python/cpython/commit/d83fc2702951f56a7339aa95d62414ed6e0fb40d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 11:43:02 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 14 Oct 2019 15:43:02 +0000 Subject: [issue38453] ntpath.realpath() should make absolute path earlier In-Reply-To: <1570832840.2.0.910161330311.issue38453@roundup.psfhosted.org> Message-ID: <1571067782.36.0.610601530004.issue38453@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16343 pull_request: https://github.com/python/cpython/pull/16783 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 11:54:00 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 14 Oct 2019 15:54:00 +0000 Subject: [issue38470] test_compileall fails in AMD64 Windows7 SP1 3.x In-Reply-To: <1571013936.71.0.668005842061.issue38470@roundup.psfhosted.org> Message-ID: <1571068440.24.0.088361045507.issue38470@roundup.psfhosted.org> Steve Dower added the comment: I'm okay with skipping the failing test if we detect sys.getwindowsversion().major < 10 Windows 7 is not supported for Python 3.9, so this buildbot can be disabled/upgraded. Windows 8.1 will be supported for at least 3.9, so we'll have to keep skipping the test there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 11:54:14 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 14 Oct 2019 15:54:14 +0000 Subject: [issue38473] AttributeError on asserting autospecced mock object added using attach_mock In-Reply-To: <1571063109.86.0.136370910863.issue38473@roundup.psfhosted.org> Message-ID: <1571068454.07.0.325863352255.issue38473@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +16344 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16784 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 11:54:28 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Oct 2019 15:54:28 +0000 Subject: [issue37759] Polish whatsnew for 3.8 In-Reply-To: <1564971591.59.0.825854790144.issue37759@roundup.psfhosted.org> Message-ID: <1571068468.71.0.318235506268.issue37759@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +16345 pull_request: https://github.com/python/cpython/pull/16785 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 12:01:32 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 14 Oct 2019 16:01:32 +0000 Subject: [issue38453] ntpath.realpath() should make absolute path earlier In-Reply-To: <1570832840.2.0.910161330311.issue38453@roundup.psfhosted.org> Message-ID: <1571068892.93.0.260224309841.issue38453@roundup.psfhosted.org> miss-islington added the comment: New changeset aa909b6b1242b4969b20bb0250ac386f9b4120d7 by Miss Islington (bot) in branch '3.8': bpo-38453: Resolve test directories before chdir to them (GH-16723) https://github.com/python/cpython/commit/aa909b6b1242b4969b20bb0250ac386f9b4120d7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 12:03:20 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 14 Oct 2019 16:03:20 +0000 Subject: [issue37759] Polish whatsnew for 3.8 In-Reply-To: <1564971591.59.0.825854790144.issue37759@roundup.psfhosted.org> Message-ID: <1571069000.02.0.205501829824.issue37759@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16346 pull_request: https://github.com/python/cpython/pull/16786 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 12:35:03 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 14 Oct 2019 16:35:03 +0000 Subject: [issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}() In-Reply-To: <1570543574.99.0.942798410146.issue38410@roundup.psfhosted.org> Message-ID: <1571070903.84.0.971022763413.issue38410@roundup.psfhosted.org> Steve Dower added the comment: But I'm okay to defer it - this is still going to be obscure functionality for the time being, and it's possible to avoid the issue. ---------- priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 12:38:59 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 14 Oct 2019 16:38:59 +0000 Subject: [issue38453] ntpath.realpath() does not fully resolve relative paths In-Reply-To: <1570832840.2.0.910161330311.issue38453@roundup.psfhosted.org> Message-ID: <1571071139.86.0.0895939224597.issue38453@roundup.psfhosted.org> Change by Steve Dower : ---------- title: ntpath.realpath() should make absolute path earlier -> ntpath.realpath() does not fully resolve relative paths _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 13:40:46 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 14 Oct 2019 17:40:46 +0000 Subject: [issue21478] mock calls don't propagate to parent (autospec) In-Reply-To: <1399899394.81.0.714942512868.issue21478@psf.upfronthosting.co.za> Message-ID: <1571074846.5.0.108200238922.issue21478@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I tried your example as below using __name__. I received an AttributeError for which issue38473 in 3.7.5RC1 and 3.8.0RC1 and opened issue38473 and I am running my below code under that issue PR. For 3.7.4, I received manager.mock_calls to be an empty list since it doesn't contain the patch for this issue. Can you please confirm my results too. ? cpython git:(bpo38473) cat ../backups/bpo21478.py import unittest from unittest import TestCase from unittest.mock import patch, Mock, call, ANY class MyObject: def __init__(self): self.foo = 0 self.bar = 0 def set_foo(self, value): self.foo = value def set_bar(self, value): self.bar = value def do_something(): o = MyObject() o.set_foo(3) o.set_bar(4) return "something unrelated" class MyObjectTest(TestCase): @patch(f"{__name__}.MyObject.set_bar", autospec=True) @patch(f"{__name__}.MyObject.set_foo", autospec=True) def test_do_something(self, mock_set_foo, mock_set_bar): manager = Mock() manager.attach_mock(mock_set_foo, "set_foo_func") manager.attach_mock(mock_set_bar, "set_bar_func") do_something() assert manager.mock_calls == [ call.set_foo_func(ANY, 3), call.set_bar_func(ANY, 4), ] manager.assert_has_calls([call.set_foo_func(ANY, 3), call.set_bar_func(ANY, 4)]) if __name__ == "__main__": unittest.main() ? cpython git:(bpo38473) ./python ../backups/bpo21478.py . ---------------------------------------------------------------------- Ran 1 test in 0.006s OK ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 13:56:10 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 14 Oct 2019 17:56:10 +0000 Subject: [issue38473] AttributeError on asserting autospecced mock object added using attach_mock In-Reply-To: <1571063109.86.0.136370910863.issue38473@roundup.psfhosted.org> Message-ID: <1571075770.45.0.727200864162.issue38473@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 14:30:34 2019 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 14 Oct 2019 18:30:34 +0000 Subject: [issue38474] digit check logic can be replaced by Py_ISDIGIT on prepare_s Message-ID: <1571077834.59.0.937971525821.issue38474@roundup.psfhosted.org> New submission from Dong-hee Na : digit check logic can be replaced by Py_ISDIGIT on prepare_s. ---------- assignee: corona10 messages: 354643 nosy: corona10 priority: normal severity: normal status: open title: digit check logic can be replaced by Py_ISDIGIT on prepare_s _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 14:31:49 2019 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 14 Oct 2019 18:31:49 +0000 Subject: [issue38474] digit check logic can be replaced by Py_ISDIGIT on prepare_s In-Reply-To: <1571077834.59.0.937971525821.issue38474@roundup.psfhosted.org> Message-ID: <1571077909.95.0.412503297719.issue38474@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +16347 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16787 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 14:34:01 2019 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 14 Oct 2019 18:34:01 +0000 Subject: [issue38474] digit check logic can be replaced by Py_ISDIGIT on prepare_s In-Reply-To: <1571077834.59.0.937971525821.issue38474@roundup.psfhosted.org> Message-ID: <1571078041.24.0.254000263742.issue38474@roundup.psfhosted.org> Change by Dong-hee Na : ---------- versions: +Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 14:34:35 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 14 Oct 2019 18:34:35 +0000 Subject: [issue38469] PEP 572 : assignment expression to a global variable in a comprehension In-Reply-To: <1571000051.15.0.611092311064.issue38469@roundup.psfhosted.org> Message-ID: <1571078075.38.0.894045618361.issue38469@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 15:16:10 2019 From: report at bugs.python.org (Pierre Quentel) Date: Mon, 14 Oct 2019 19:16:10 +0000 Subject: [issue38469] PEP 572 : assignment expression to a global variable in a comprehension In-Reply-To: <1571000051.15.0.611092311064.issue38469@roundup.psfhosted.org> Message-ID: <1571080570.44.0.468024728102.issue38469@roundup.psfhosted.org> Pierre Quentel added the comment: That was a quick fix, thanks ! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 15:22:30 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Mon, 14 Oct 2019 19:22:30 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1571080950.08.0.173984022185.issue38006@roundup.psfhosted.org> Change by Neil Schemenauer : ---------- pull_requests: +16348 pull_request: https://github.com/python/cpython/pull/16788 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 15:31:02 2019 From: report at bugs.python.org (DEVOR BLAKE DANIELS) Date: Mon, 14 Oct 2019 19:31:02 +0000 Subject: [issue38475] Break Statement Message-ID: <1571081462.55.0.733459298847.issue38475@roundup.psfhosted.org> New submission from DEVOR BLAKE DANIELS : The break statement in my AiO() function seems to cause my Uinput() function to malfunction. ---------- components: Windows files: three.py messages: 354645 nosy: dev40573, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Break Statement versions: Python 3.8 Added file: https://bugs.python.org/file48659/three.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 15:58:43 2019 From: report at bugs.python.org (Sam Franklin) Date: Mon, 14 Oct 2019 19:58:43 +0000 Subject: [issue37910] argparse wrapping fails with metavar="" (no metavar) In-Reply-To: <1566425299.96.0.375120843288.issue37910@roundup.psfhosted.org> Message-ID: <1571083123.74.0.898608552523.issue37910@roundup.psfhosted.org> Sam Franklin added the comment: Paul, very true. If I find time I may take a look at rewriting it as you suggest. For the moment, though, there's a relatively simple change that opens up a range of allowable whitespace characters. It's still a bandage, but it covers decent-sized area and should be easily backported. What do you think of the pull request? It's passed a first review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:40:36 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 14 Oct 2019 20:40:36 +0000 Subject: [issue38456] Reduce the time test_subprocess takes to complete. In-Reply-To: <1570915664.41.0.600749429007.issue38456@roundup.psfhosted.org> Message-ID: <1571085636.33.0.775647392173.issue38456@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 4f0587f161786318cdfa22c42459676fa42aacb6 by Gregory P. Smith in branch '3.8': [3.8] bpo-38456: Use /bin/true in test_subprocess (GH-16737) https://github.com/python/cpython/commit/4f0587f161786318cdfa22c42459676fa42aacb6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:48:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 20:48:42 +0000 Subject: [issue38456] Reduce the time test_subprocess takes to complete. In-Reply-To: <1570915664.41.0.600749429007.issue38456@roundup.psfhosted.org> Message-ID: <1571086122.34.0.754714501255.issue38456@roundup.psfhosted.org> STINNER Victor added the comment: Nice. Any idea of the speedup on Travis CI and/or on a specific buildbot worker? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:51:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 20:51:24 +0000 Subject: [issue38470] test_compileall fails in AMD64 Windows7 SP1 3.x In-Reply-To: <1571013936.71.0.668005842061.issue38470@roundup.psfhosted.org> Message-ID: <1571086284.27.0.916418169522.issue38470@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16350 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16789 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 16:56:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 20:56:13 +0000 Subject: [issue38470] test_compileall fails in AMD64 Windows7 SP1 3.x In-Reply-To: <1571013936.71.0.668005842061.issue38470@roundup.psfhosted.org> Message-ID: <1571086573.35.0.781651098587.issue38470@roundup.psfhosted.org> STINNER Victor added the comment: The new test was added by bpo-38112: commit 4267c989e7fc6cd528e8a1d04a07fac5cca85ec7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:00:19 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 14 Oct 2019 21:00:19 +0000 Subject: [issue38456] Reduce the time test_subprocess takes to complete. In-Reply-To: <1570915664.41.0.600749429007.issue38456@roundup.psfhosted.org> Message-ID: <1571086819.76.0.803990234781.issue38456@roundup.psfhosted.org> Gregory P. Smith added the comment: I assume the CI systems are shared and potentially noisy. It should be easier to look at some logs from slower buildbots. but sadly test_subprocess has fallen off the list of "10 slowest tests" that timing info is supplied for. concurrent.futures, multiprocessing, asyncio, tokenize, etc. all take longer. I still don't expect it to be more than a few seconds. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:06:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 21:06:26 +0000 Subject: [issue37431] test_asyncio: test_start_tls_server_1() failed on ARMv7 Debian buster 3.7 In-Reply-To: <1561654379.48.0.149014452571.issue37431@roundup.psfhosted.org> Message-ID: <1571087186.09.0.0355326025732.issue37431@roundup.psfhosted.org> STINNER Victor added the comment: I close this issue as a duplicate of bpo-35998. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:06:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 21:06:28 +0000 Subject: [issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 In-Reply-To: <1550225538.04.0.738886867119.issue35998@roundup.psfhosted.org> Message-ID: <1571087188.45.0.0482483119621.issue35998@roundup.psfhosted.org> STINNER Victor added the comment: I closed bpo-37431 as a duplicate of this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:07:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 21:07:17 +0000 Subject: [issue35031] test_asyncio test_start_tls_server_1 fails in AMD64 FreeBSD CURRENT buildbots In-Reply-To: <1540044407.71.0.788709270274.issue35031@psf.upfronthosting.co.za> Message-ID: <1571087237.13.0.316798353709.issue35031@roundup.psfhosted.org> STINNER Victor added the comment: It seems like the issue has been fixed. See also bpo-35998 for a similar issue on other platforms. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:13:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 21:13:23 +0000 Subject: [issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 In-Reply-To: <1550225538.04.0.738886867119.issue35998@roundup.psfhosted.org> Message-ID: <1571087603.19.0.556642364956.issue35998@roundup.psfhosted.org> STINNER Victor added the comment: I didn't check if it's the same issue than previous failures, but test_start_tls_server_1() just failed on x86 Gentoo Installed with X 3.8 buildbot: pythoninfo: ssl.HAS_SNI: True ssl.OPENSSL_VERSION: OpenSSL 1.1.1d 10 Sep 2019 ssl.OPENSSL_VERSION_INFO: (1, 1, 1, 4, 15) ssl.OP_ALL: -0x7fffffac ssl.OP_NO_TLSv1_1: 0x10000000 ssl.SSLContext.maximum_version: TLSVersion.MAXIMUM_SUPPORTED ssl.SSLContext.minimum_version: TLSVersion.MINIMUM_SUPPORTED ssl.SSLContext.options: Options.OP_NO_SSLv3|OP_CIPHER_SERVER_PREFERENCE|OP_ENABLE_MIDDLEBOX_COMPAT|OP_NO_COMPRESSION|OP_ALL ssl.SSLContext.protocol: _SSLMethod.PROTOCOL_TLS ssl.SSLContext.verify_mode: VerifyMode.CERT_NONE ssl.default_https_context.maximum_version: TLSVersion.MAXIMUM_SUPPORTED ssl.default_https_context.minimum_version: TLSVersion.MINIMUM_SUPPORTED ssl.default_https_context.options: Options.OP_NO_SSLv3|OP_CIPHER_SERVER_PREFERENCE|OP_ENABLE_MIDDLEBOX_COMPAT|OP_NO_COMPRESSION|OP_ALL ssl.default_https_context.protocol: _SSLMethod.PROTOCOL_TLS ssl.default_https_context.verify_mode: VerifyMode.CERT_REQUIRED ssl.stdlib_context.maximum_version: TLSVersion.MAXIMUM_SUPPORTED ssl.stdlib_context.minimum_version: TLSVersion.MINIMUM_SUPPORTED ssl.stdlib_context.options: Options.OP_NO_SSLv3|OP_CIPHER_SERVER_PREFERENCE|OP_ENABLE_MIDDLEBOX_COMPAT|OP_NO_COMPRESSION|OP_ALL ssl.stdlib_context.protocol: _SSLMethod.PROTOCOL_TLS ssl.stdlib_context.verify_mode: VerifyMode.CERT_NONE https://buildbot.python.org/all/#/builders/230/builds/435 test_start_tls_server_1 (test.test_asyncio.test_sslproto.SelectorStartTLSTests) ... Exception in thread test-client: Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/test/test_asyncio/functional.py", line 190, in run self._prog(TestSocketWrapper(self._sock)) File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/test/test_asyncio/test_sslproto.py", line 575, in with self.tcp_client(lambda sock: client(sock, addr), File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/test/test_asyncio/test_sslproto.py", line 520, in client answer = sock.recv_all(len(ANSWER)) File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/test/test_asyncio/functional.py", line 130, in recv_all data = self.recv(n - len(buf)) File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/ssl.py", line 1226, in recv return self.read(buflen) File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/ssl.py", line 1101, in read return self._sslobj.read(len) ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:2560) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/test/test_asyncio/functional.py", line 192, in run self._test._abort_socket_test(ex) File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/test/test_asyncio/functional.py", line 114, in _abort_socket_test self.fail(ex) File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/unittest/case.py", line 753, in fail raise self.failureException(msg) AssertionError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:2560) /buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/threading.py:934: ResourceWarning: unclosed self._invoke_excepthook(self) ResourceWarning: Enable tracemalloc to get the object allocation traceback ERROR Unhandled error in exception handler context: {'message': 'Task was destroyed but it is pending!', 'task': .main() running at /buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/test/test_asyncio/test_sslproto.py:555> wait_for= cb=[_release_waiter(()]>)() at /buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/asyncio/tasks.py:429]>} Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/asyncio/base_events.py", line 1729, in call_exception_handler self._exception_handler(self, context) File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/test/test_asyncio/functional.py", line 22, in loop_exception_handler self.loop.default_exception_handler(context) AttributeError: 'NoneType' object has no attribute 'default_exception_handler' /buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/test/test_asyncio/test_streams.py:40: ResourceWarning: unclosed gc.collect() ResourceWarning: Enable tracemalloc to get the object allocation traceback /buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/asyncio/selector_events.py:684: ResourceWarning: unclosed transport <_SelectorSocketTransport fd=8> _warn(f"unclosed transport {self!r}", ResourceWarning, source=self) ResourceWarning: Enable tracemalloc to get the object allocation traceback /buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/asyncio/sslproto.py:321: ResourceWarning: unclosed transport _warn(f"unclosed transport {self!r}", ResourceWarning, source=self) ResourceWarning: Enable tracemalloc to get the object allocation traceback Unhandled error in exception handler context: {'message': 'Fatal error on SSL transport', 'exception': RuntimeError('Event loop is closed'), 'transport': <_SelectorSocketTransport closing fd=8>, 'protocol': } Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/asyncio/selector_events.py", line 898, in write n = self._sock.send(data) OSError: [Errno 9] Bad file descriptor During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/asyncio/sslproto.py", line 685, in _process_write_backlog self._transport.write(chunk) File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/asyncio/selector_events.py", line 904, in write self._fatal_error(exc, 'Fatal write error on socket transport') File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/asyncio/selector_events.py", line 699, in _fatal_error self._force_close(exc) File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/asyncio/selector_events.py", line 711, in _force_close self._loop.call_soon(self._call_connection_lost, exc) File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/asyncio/base_events.py", line 711, in call_soon self._check_closed() File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/asyncio/base_events.py", line 504, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/asyncio/base_events.py", line 1729, in call_exception_handler self._exception_handler(self, context) File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/test/test_asyncio/functional.py", line 22, in loop_exception_handler self.loop.default_exception_handler(context) AttributeError: 'NoneType' object has no attribute 'default_exception_handler' /buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/test/test_asyncio/test_streams.py:40: ResourceWarning: unclosed gc.collect() ResourceWarning: Enable tracemalloc to get the object allocation traceback ERROR: test_start_tls_server_1 (test.test_asyncio.test_sslproto.SelectorStartTLSTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/test/test_asyncio/test_sslproto.py", line 585, in test_start_tls_server_1 self.loop.run_until_complete(run_main()) File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.installed/build/target/lib/python3.8/asyncio/base_events.py", line 606, in run_until_complete raise RuntimeError('Event loop stopped before Future completed.') RuntimeError: Event loop stopped before Future completed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:15:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 21:15:16 +0000 Subject: [issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 In-Reply-To: <1550225538.04.0.738886867119.issue35998@roundup.psfhosted.org> Message-ID: <1571087716.86.0.457340967002.issue35998@roundup.psfhosted.org> STINNER Victor added the comment: Similar failure on x86 Gentoo Non-Debug with X 3.x: https://buildbot.python.org/all/#/builders/99/builds/3472 ERROR: test_start_tls_server_1 (test.test_asyncio.test_sslproto.SelectorStartTLSTests) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:23:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 21:23:30 +0000 Subject: [issue33356] Windows 10 buildbot: test__xxsubinterpreters.test_already_running() fails randomly In-Reply-To: <1524666400.61.0.682650639539.issue33356@psf.upfronthosting.co.za> Message-ID: <1571088210.71.0.26277300328.issue33356@roundup.psfhosted.org> STINNER Victor added the comment: I close this issue as a duplicate of bpo-37224. ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:24:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 21:24:46 +0000 Subject: [issue37224] test__xxsubinterpreters failed on AMD64 Windows8.1 Refleaks 3.8 In-Reply-To: <1560214681.61.0.906498246375.issue37224@roundup.psfhosted.org> Message-ID: <1571088286.06.0.696612485767.issue37224@roundup.psfhosted.org> STINNER Victor added the comment: I marked bpo-33356 as a duplicate of this issue: * Windows10 3.x: test_already_running() failed once, but passed when run again: ... * AMD64 FreeBSD 10-STABLE Non-Debug 3.x: ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:26:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 21:26:18 +0000 Subject: [issue37224] test__xxsubinterpreters failed on AMD64 Windows8.1 Refleaks 3.8 In-Reply-To: <1560214681.61.0.906498246375.issue37224@roundup.psfhosted.org> Message-ID: <1571088378.58.0.704067510827.issue37224@roundup.psfhosted.org> STINNER Victor added the comment: I closed bpo-38154 as a duplicate of this issue: * AMD64 FreeBSD CURRENT Shared 3.x: ... Kyle Stanley proposed a fix: PR 16293. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:26:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 21:26:24 +0000 Subject: [issue38154] test__xxsubinterpreters: random failures on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1568368239.98.0.217777678278.issue38154@roundup.psfhosted.org> Message-ID: <1571088384.65.0.758227506409.issue38154@roundup.psfhosted.org> STINNER Victor added the comment: I close this issue as a duplicate of bpo-37224. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test__xxsubinterpreters failed on AMD64 Windows8.1 Refleaks 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:26:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 21:26:37 +0000 Subject: [issue37224] test__xxsubinterpreters fails randomly In-Reply-To: <1560214681.61.0.906498246375.issue37224@roundup.psfhosted.org> Message-ID: <1571088396.99.0.111628238532.issue37224@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: test__xxsubinterpreters failed on AMD64 Windows8.1 Refleaks 3.8 -> test__xxsubinterpreters fails randomly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:27:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 21:27:17 +0000 Subject: [issue37224] test__xxsubinterpreters fails randomly In-Reply-To: <1560214681.61.0.906498246375.issue37224@roundup.psfhosted.org> Message-ID: <1571088437.05.0.403538501454.issue37224@roundup.psfhosted.org> STINNER Victor added the comment: AMD64 FreeBSD CURRENT Shared 3.x: https://buildbot.python.org/all/#/builders/168/builds/1630 FAIL: test_still_running (test.test__xxsubinterpreters.DestroyTests) 1:07:09 load avg: 8.18 Re-running failed tests in verbose mode 1:07:09 load avg: 8.18 Re-running test__xxsubinterpreters in verbose mode FAIL: test_still_running (test.test__xxsubinterpreters.DestroyTests) FAIL: test_subinterpreter (test.test__xxsubinterpreters.IsRunningTests) FAIL: test_already_running (test.test__xxsubinterpreters.RunStringTests) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:28:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 21:28:12 +0000 Subject: [issue37224] test__xxsubinterpreters fails randomly In-Reply-To: <1560214681.61.0.906498246375.issue37224@roundup.psfhosted.org> Message-ID: <1571088492.77.0.470889374099.issue37224@roundup.psfhosted.org> STINNER Victor added the comment: AMD64 FreeBSD CURRENT Shared 3.8: https://buildbot.python.org/all/#/builders/212/builds/310 FAIL: test_still_running (test.test__xxsubinterpreters.DestroyTests) FAIL: test_run_coroutine_threadsafe_with_timeout (test.test_asyncio.test_tasks.RunCoroutineThreadsafeTests) 1:01:44 load avg: 7.72 Re-running failed tests in verbose mode 1:01:44 load avg: 7.72 Re-running test__xxsubinterpreters in verbose mode FAIL: test_still_running (test.test__xxsubinterpreters.DestroyTests) 1:02:01 load avg: 7.58 Re-running test_asyncio in verbose mode ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:28:44 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 14 Oct 2019 21:28:44 +0000 Subject: [issue38475] Break Statement In-Reply-To: <1571081462.55.0.733459298847.issue38475@roundup.psfhosted.org> Message-ID: <1571088524.88.0.00948942129725.issue38475@roundup.psfhosted.org> Steven D'Aprano added the comment: Define "malfunction". Are we supposed to know what your code is meant to do, as well as what it actually does? Please don't use the bug tracker as a help desk for your own scripts. There are many forums where you can ask for help, such as the mailing lists, the Python Discuss forum, Stackoverflow, Reddit's r/learnpython etc. If you are going to submit something here as a bug, please ensure that: (1) it actually is a bug in the Python interpreter first, rather than a bug in your own code; and (2) you provide a MINIMAL example, with a description of the expected output, a reason why you expect it, and the actual output. It may help for you to read this: http://sscce.org/ ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:42:18 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 14 Oct 2019 21:42:18 +0000 Subject: [issue38469] PEP 572 : assignment expression to a global variable in a comprehension In-Reply-To: <1571000051.15.0.611092311064.issue38469@roundup.psfhosted.org> Message-ID: <1571089338.93.0.878789752347.issue38469@roundup.psfhosted.org> ?ukasz Langa added the comment: (FTR the fix is part of Python 3.8.0) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:45:09 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 14 Oct 2019 21:45:09 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1571089509.43.0.144067168046.issue38449@roundup.psfhosted.org> ?ukasz Langa added the comment: (3.8.0 is released with this fix) ---------- priority: release blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:45:39 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 14 Oct 2019 21:45:39 +0000 Subject: [issue38359] pyw.exe opens console window in Windows 10 In-Reply-To: <1570096405.52.0.325874974028.issue38359@roundup.psfhosted.org> Message-ID: <1571089539.04.0.658882333405.issue38359@roundup.psfhosted.org> ?ukasz Langa added the comment: (3.8.0 is released with this fix) ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:45:49 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 14 Oct 2019 21:45:49 +0000 Subject: [issue38355] ntpath.realpath() fails on sys.executable In-Reply-To: <1570055857.28.0.434394542652.issue38355@roundup.psfhosted.org> Message-ID: <1571089549.96.0.52068258994.issue38355@roundup.psfhosted.org> ?ukasz Langa added the comment: (3.8.0 is released with this fix) ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:46:14 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 14 Oct 2019 21:46:14 +0000 Subject: [issue38344] activate.bat else needs to be on the same line as the if In-Reply-To: <1569997823.02.0.0977203709428.issue38344@roundup.psfhosted.org> Message-ID: <1571089574.59.0.976202024158.issue38344@roundup.psfhosted.org> ?ukasz Langa added the comment: (3.8.0 is released with this fix) ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:52:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 21:52:47 +0000 Subject: [issue38476] test_multiprocessing_fork.test_terminate() failed on AMD64 Debian PGO 3.x Message-ID: <1571089967.06.0.895638026997.issue38476@roundup.psfhosted.org> New submission from STINNER Victor : test_multiprocessing_fork.test_terminate() failed twice on AMD64 Debian PGO 3.x: https://buildbot.python.org/all/#/builders/47/builds/3699 0:23:37 load avg: 0.01 [419/419/1] test_multiprocessing_fork crashed (Exit code 1) Timeout (0:15:00)! Thread 0x00007f0272748700 (most recent call first): File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/connection.py", line 379 in _recv File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/connection.py", line 414 in _recv_bytes File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/connection.py", line 250 in recv File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/pool.py", line 599 in _handle_results File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/threading.py", line 882 in run File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/threading.py", line 944 in _bootstrap_inner File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/threading.py", line 902 in _bootstrap Thread 0x00007f027a8a6500 (most recent call first): File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/pool.py", line 674 in _help_stuff_finish File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/pool.py", line 689 in _terminate_pool File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/util.py", line 201 in __call__ File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/pool.py", line 656 in terminate File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/test/_test_multiprocessing.py", line 2521 in test_terminate ... 0:23:37 load avg: 0.01 Re-running test_multiprocessing_fork in verbose mode ... test_starmap (test.test_multiprocessing_fork.WithProcessesTestPool) ... ok test_starmap_async (test.test_multiprocessing_fork.WithProcessesTestPool) ... ok Timeout (0:15:00)! Thread 0x00007f251d553700 (most recent call first): File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/connection.py", line 379 in _recv File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/connection.py", line 414 in _recv_bytes File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/connection.py", line 250 in recv File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/pool.py", line 599 in _handle_results File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/threading.py", line 882 in run File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/threading.py", line 944 in _bootstrap_inner File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/threading.py", line 902 in _bootstrap Thread 0x00007f2523e76500 (most recent call first): File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/pool.py", line 674 in _help_stuff_finish File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/pool.py", line 689 in _terminate_pool File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/util.py", line 201 in __call__ File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/pool.py", line 656 in terminate File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/test/_test_multiprocessing.py", line 2521 in test_terminate ---------- components: Tests messages: 354669 nosy: vstinner priority: normal severity: normal status: open title: test_multiprocessing_fork.test_terminate() failed on AMD64 Debian PGO 3.x versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:54:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 21:54:33 +0000 Subject: [issue38476] test_multiprocessing_fork.test_terminate() failed on AMD64 Debian PGO 3.x In-Reply-To: <1571089967.06.0.895638026997.issue38476@roundup.psfhosted.org> Message-ID: <1571090073.94.0.897887151835.issue38476@roundup.psfhosted.org> STINNER Victor added the comment: > https://buildbot.python.org/all/#/builders/47/builds/3699 The 7 following builds are success. But the latest build failed with "no space left on disk": https://buildbot.python.org/all/#/builders/47/builds/3707 OSError: [Errno 28] No space left on device: '@test_23959_tmp' -> '@test_23959_tmp2' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 18:00:59 2019 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 14 Oct 2019 22:00:59 +0000 Subject: [issue38470] test_compileall fails in AMD64 Windows7 SP1 3.x In-Reply-To: <1571013936.71.0.668005842061.issue38470@roundup.psfhosted.org> Message-ID: <1571090459.01.0.328321394731.issue38470@roundup.psfhosted.org> Jeremy Kloth added the comment: > Windows 7 is not supported for Python 3.9, so this buildbot can be disabled/upgraded. As long as 3.7 and 3.8 are being tested through the buildbots, I would think testing on Windows 7 is still advised. That said, once those versions are no longer tested (or deemed to not need Windows 7 support) I will be upgrading that buildbot. ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 18:01:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 22:01:47 +0000 Subject: [issue38470] test_compileall fails in AMD64 Windows7 SP1 3.x In-Reply-To: <1571013936.71.0.668005842061.issue38470@roundup.psfhosted.org> Message-ID: <1571090507.95.0.173432620771.issue38470@roundup.psfhosted.org> STINNER Victor added the comment: I wrote PR 16789 which fix the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 18:13:07 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 14 Oct 2019 22:13:07 +0000 Subject: [issue38133] py.exe cannot locate Store package In-Reply-To: <1568286313.97.0.196410705778.issue38133@roundup.psfhosted.org> Message-ID: <1571091187.7.0.0630344831254.issue38133@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +16351 pull_request: https://github.com/python/cpython/pull/16791 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 18:27:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 22:27:11 +0000 Subject: [issue36389] Add gc.enable_object_debugger(): detect corrupted Python objects in the GC In-Reply-To: <1553166161.96.0.697085261419.issue36389@roundup.psfhosted.org> Message-ID: <1571092031.52.0.486502700018.issue36389@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16352 pull_request: https://github.com/python/cpython/pull/16796 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 18:32:37 2019 From: report at bugs.python.org (Tahia K) Date: Mon, 14 Oct 2019 22:32:37 +0000 Subject: [issue38288] shutil.make_archive() should allow setting zipfile.ZipFile() 'strict_timestamps' In-Reply-To: <1569516230.4.0.693896047629.issue38288@roundup.psfhosted.org> Message-ID: <1571092357.61.0.803116724071.issue38288@roundup.psfhosted.org> Change by Tahia K : ---------- keywords: +patch pull_requests: +16353 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16797 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 18:34:20 2019 From: report at bugs.python.org (Tahia K) Date: Mon, 14 Oct 2019 22:34:20 +0000 Subject: [issue38288] shutil.make_archive() should allow setting zipfile.ZipFile() 'strict_timestamps' In-Reply-To: <1569516230.4.0.693896047629.issue38288@roundup.psfhosted.org> Message-ID: <1571092460.83.0.958255900202.issue38288@roundup.psfhosted.org> Tahia K added the comment: I went ahead and picked this one up :) PR is posted to github. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 18:44:02 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Mon, 14 Oct 2019 22:44:02 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1571093042.65.0.827472874937.issue38006@roundup.psfhosted.org> Neil Schemenauer added the comment: > It's fundamentally insane to expect any gc to work perfectly when it may be blind to what the object graph _is_. I'm often amazed it works at all, let alone perfectly. ;-P This did trigger me to think of another possible problem. I setup my unit test as you suggested: # Z <- Y <- A--+--> WZ -> C # ^ | # +--+ # where: # WZ is a weakref to Z with callback C # Y doesn't implement tp_traverse # A contains a reference to itself, Y and WZ But what happens if the GC doesn't see that WZ is trash? Then it will not be cleared. Hang it off Y so the GC can't find it. We can set things up so that Z is freed before WZ (e.g. WZ in a second and newer cycle). Then, the callback might still run. On further thought, this seems safe (but maybe broken) because of the handle_weakrefs() logic. The GC will think WZ is going to outlive Z so it will call it before doing any tp_clear calls. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 18:45:46 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 14 Oct 2019 22:45:46 +0000 Subject: [issue38133] py.exe cannot locate Store package In-Reply-To: <1568286313.97.0.196410705778.issue38133@roundup.psfhosted.org> Message-ID: <1571093146.64.0.886634751866.issue38133@roundup.psfhosted.org> Steve Dower added the comment: New changeset 4d202281c128e2026e78fc5f4cc752b1dafbf3ad by Steve Dower in branch 'master': bpo-38133: Update docs to reflect fixes to py.exe launcher (GH-16791) https://github.com/python/cpython/commit/4d202281c128e2026e78fc5f4cc752b1dafbf3ad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 18:45:55 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 14 Oct 2019 22:45:55 +0000 Subject: [issue38133] py.exe cannot locate Store package In-Reply-To: <1568286313.97.0.196410705778.issue38133@roundup.psfhosted.org> Message-ID: <1571093155.45.0.186521008281.issue38133@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16354 pull_request: https://github.com/python/cpython/pull/16798 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 18:52:52 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 14 Oct 2019 22:52:52 +0000 Subject: [issue38133] py.exe cannot locate Store package In-Reply-To: <1568286313.97.0.196410705778.issue38133@roundup.psfhosted.org> Message-ID: <1571093572.01.0.701040419505.issue38133@roundup.psfhosted.org> miss-islington added the comment: New changeset 42308e8b27c8023e3f9d037f5e4a8892f2dcbc48 by Miss Islington (bot) in branch '3.8': bpo-38133: Update docs to reflect fixes to py.exe launcher (GH-16791) https://github.com/python/cpython/commit/42308e8b27c8023e3f9d037f5e4a8892f2dcbc48 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 19:00:08 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 14 Oct 2019 23:00:08 +0000 Subject: [issue37224] test__xxsubinterpreters fails randomly In-Reply-To: <1560214681.61.0.906498246375.issue37224@roundup.psfhosted.org> Message-ID: <1571094008.34.0.889886513921.issue37224@roundup.psfhosted.org> Kyle Stanley added the comment: > Kyle Stanley proposed a fix: PR 16293. Note that I'm not confident about the fix I proposed in GH-16293, it was more of an idea to fix the intermittent failures more than anything. It definitely needs review from someone knowledgeable about sub-interpreters and the PyInterpreterState API. This isn't an area that I'm experienced in, but I am interested in it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 19:11:16 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 14 Oct 2019 23:11:16 +0000 Subject: [issue31387] asyncio should make it easy to enable cooperative SIGINT handling In-Reply-To: <1504813050.77.0.505378891387.issue31387@psf.upfronthosting.co.za> Message-ID: <1571094676.73.0.405076774504.issue31387@roundup.psfhosted.org> Change by Kyle Stanley : ---------- nosy: +aeros _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 19:43:37 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 14 Oct 2019 23:43:37 +0000 Subject: [issue28533] Replace asyncore In-Reply-To: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za> Message-ID: <1571096617.94.0.854094101149.issue28533@roundup.psfhosted.org> Change by Kyle Stanley : ---------- nosy: +aeros _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 20:19:05 2019 From: report at bugs.python.org (Tim Peters) Date: Tue, 15 Oct 2019 00:19:05 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1571098745.91.0.653023783074.issue38006@roundup.psfhosted.org> Tim Peters added the comment: > I'm often amazed it works at all, let alone perfectly. ;-P Indeed! Every time I take a break from gc and come back, I burn another hour wondering why it doesn't recycle _everything_ ;-) > But what happens if the GC doesn't see that WZ is trash? > Then it will not be cleared. Hang it off Y so the GC > can't find it. In that case it won't think C is trash either (a weakref holds a strong reference to its callback), so C won't be tp_clear'ed - if WZ isn't in the unreachable set, C can't be either. > We can set things up so that Z is freed before WZ (e.g. > WZ in a second and newer cycle). Then, the callback > might still run. Since C hasn't been damaged, and nothing reachable from C would have been considered trash either, I don't see a problem. > On further thought, this seems safe (but maybe broken) because > of the handle_weakrefs() logic. The GC will think WZ is going > to outlive Z so it will call it before doing any tp_clear calls. Don't think that applies. As above, WZ isn't in the unreachable set, so gc knows nothing about it. Z will eventually be reclaimed via refcounting side effect, C _will_ run, and then WZ, and then C, will be reclaimed by refcounting. Or am I missing something? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 21:06:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Oct 2019 01:06:20 +0000 Subject: [issue36389] Add gc.enable_object_debugger(): detect corrupted Python objects in the GC In-Reply-To: <1553166161.96.0.697085261419.issue36389@roundup.psfhosted.org> Message-ID: <1571101580.98.0.545851655769.issue36389@roundup.psfhosted.org> STINNER Victor added the comment: New changeset f82ce5b1b12873b65927149a016be6a7c65e979d by Victor Stinner in branch '3.8': [3.8] bpo-36389: Backport debug enhancements from master (GH-16796) https://github.com/python/cpython/commit/f82ce5b1b12873b65927149a016be6a7c65e979d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 21:06:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Oct 2019 01:06:21 +0000 Subject: [issue38376] ./configure --with-assertions generates a broken build In-Reply-To: <1570279431.23.0.578903771856.issue38376@roundup.psfhosted.org> Message-ID: <1571101581.09.0.114031990884.issue38376@roundup.psfhosted.org> STINNER Victor added the comment: New changeset f82ce5b1b12873b65927149a016be6a7c65e979d by Victor Stinner in branch '3.8': [3.8] bpo-36389: Backport debug enhancements from master (GH-16796) https://github.com/python/cpython/commit/f82ce5b1b12873b65927149a016be6a7c65e979d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 21:06:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Oct 2019 01:06:21 +0000 Subject: [issue38070] visit_decref(): add an assertion to check that the object is not freed In-Reply-To: <1568037936.88.0.10373402622.issue38070@roundup.psfhosted.org> Message-ID: <1571101581.16.0.978804837319.issue38070@roundup.psfhosted.org> STINNER Victor added the comment: New changeset f82ce5b1b12873b65927149a016be6a7c65e979d by Victor Stinner in branch '3.8': [3.8] bpo-36389: Backport debug enhancements from master (GH-16796) https://github.com/python/cpython/commit/f82ce5b1b12873b65927149a016be6a7c65e979d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 21:42:50 2019 From: report at bugs.python.org (Louis Huemiller) Date: Tue, 15 Oct 2019 01:42:50 +0000 Subject: [issue38477] magiccube2x2 permutations 28% slower with Python 3.8.0rc1 vs 3.7 Message-ID: <1571103770.08.0.648523147203.issue38477@roundup.psfhosted.org> New submission from Louis Huemiller : Have created a program that by brute force determines all reachable states of a 2-by-2 MagicCube, sometimes referred to as a 2x2 Rubick's cube. On one of my servers, which is described in the attached file 20191011b_configuration, this program takes 19520.03 seconds to execute under Python2.7.15+, while under 3.8.0rc1 it takes 21887.53 seconds. This program is taking 12.13% longer to execute with 3.8.0rc1 versus 2.7.15+. The exact versions of Python as reported by sys.version are: 2.7.15+ (default, Oct 7 2019, 17:39:04) [GCC 7.4.0] 3.8.0rc1 (default, Oct 1 2019, 21:48:24) [GCC 7.4.0] Used the following script to execute this program under Python 2.7, 3.6, 3.7, and 3.8: mkdir -p ./results echo "======== git log ========" > ./results/20191011b_configuration git log -n4 >> ./results/20191011b_configuration echo "" >> ./results/20191011b_configuration echo "======== uname ========" >> ./results/20191011b_configuration uname -a >> ./results/20191011b_configuration echo "" >> ./results/20191011b_configuration echo "======== lsb_release ========" >> ./results/20191011b_configuration lsb_release -a >> ./results/20191011b_configuration echo "" >> ./results/20191011b_configuration echo "======== lshw ========" >> ./results/20191011b_configuration sudo lshw >> ./results/20191011b_configuration make clean make ./target/permutations2x2 > \ ./results/20191011b_magiccube2x2_permutations_cxx_unordered_map 2>&1 python3.8 ./permutations2x2 > \ ./results/20191011b_magiccube2x2_permutations_python3.8.0rc1 2>&1 python3.7 ./permutations2x2 > \ ./results/20191011b_magiccube2x2_permutations_python3.7 2>&1 python3.6 ./permutations2x2 > \ ./results/20191011b_magiccube2x2_permutations_python3.6 2>&1 python2.7 ./permutations2x2 > ./results/20191011b_magiccube2x2_permutations_python2.7 2>&1 Doing egrep "^# Total_Time:" on each of the output files, shows that the various executions took the following amount of time: cxx_unordered_map:# Total_Time: 1098.25 python2.7:# Total_Time: 19520.03 python3.6:# Total_Time: 19562.28 python3.7:# Total_Time: 17012.67 python3.8.0rc1:# Total_Time: 21887.53 Under Python2.7 and Python3.6 the program ran in approximately the same amount of time, while under Python3.7 it ran 12.8% faster than execution with Python2.7. Finally, the python3.8.0rc1 execution is noticeably slower than all the other executions, at 12.1% lower than Python2.7 and 28.6% slower than Python3.7. The source for the magic_cube2x2 program is available under gist.github.com at: https://gist.github.com/lhuemill/f1273291e5f5e85e4b42e5c7614e60ef This program creates a fairly large dictionary of 88.179840M entries. Each entry has a key of a string of length 29 and a value string of with a maximum length of 22 characters. A quick back-of-the-envelope calculation shows that this dictionary would use approximately 9GB of memory, but for some reason, all of the Python executions use approximately 22.6GB of memory. Even the C++ version is using 20.2GB when the permutations are stored in an unordered_map and 20.55GB when stored in a map. Quite surprising that the C++ is using over twice the expected amount of memory. CAUTION: When executing this program with less than the needed amount of physical memory, be careful that swap is not backed by a flash device. Doing so will likely cause a significant amount of I/O to the flash device and likely quickly wear it out. ---------- files: 20191005b_configuration messages: 354682 nosy: Louis Huemiller priority: normal severity: normal status: open title: magiccube2x2 permutations 28% slower with Python 3.8.0rc1 vs 3.7 type: performance versions: Python 3.8 Added file: https://bugs.python.org/file48660/20191005b_configuration _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 22:26:32 2019 From: report at bugs.python.org (Brian Shaginaw) Date: Tue, 15 Oct 2019 02:26:32 +0000 Subject: [issue38478] inspect.signature.bind does not correctly handle keyword argument with same name as positional-only parameter Message-ID: <1571106392.69.0.85003046785.issue38478@roundup.psfhosted.org> New submission from Brian Shaginaw : >>> import inspect >>> def foo(bar, /, **kwargs): ... print(bar, kwargs) ... >>> foo(1, bar=2) 1 {'bar': 2} >>> inspect.signature(foo).bind(1, bar=2) Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/inspect.py", line 3025, in bind return self._bind(args, kwargs) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/inspect.py", line 2964, in _bind raise TypeError( TypeError: multiple values for argument 'bar' Python 3.8 introduced positional-only parameters, which allow parameter names to remain available for use in **kwargs. It looks like `inspect.signature.bind` does not recognize this, and thinks the parameter is being passed twice, which causes the above TypeError. Expected result: ---------- components: Library (Lib) messages: 354683 nosy: brian.shaginaw priority: normal severity: normal status: open title: inspect.signature.bind does not correctly handle keyword argument with same name as positional-only parameter type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 22:54:53 2019 From: report at bugs.python.org (Eryk Sun) Date: Tue, 15 Oct 2019 02:54:53 +0000 Subject: [issue38470] test_compileall fails in AMD64 Windows7 SP1 3.x In-Reply-To: <1571013936.71.0.668005842061.issue38470@roundup.psfhosted.org> Message-ID: <1571108093.22.0.601340157092.issue38470@roundup.psfhosted.org> Eryk Sun added the comment: I tested in Windows 10 with long paths disabled, and the FileNotFoundError exception showed that the failing .pyc had a numeric suffix appended to the name. create_long_path isn't taking into account _write_atomic in Lib/importlib/_bootstrap_external.py. This function appends the id() of the target path string in order to create a temporary unique name, which it renames to the target if the write succeeds. Since the object ID is a memory address, create_long_path would need to append 16 characters to the longer_cache path. That's 1 for the initial "." of the suffix, plus 15 for the x64 address-space limit of 128 TB, i.e. len(str(0x7FFF_FFFF_FFFF)). Note that, by default, long-path support is not enabled in Windows 10. At process startup, the system runtime library enables long-path support if "LongPathsEnabled" is set in "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" and the application manifest enables "longPathAware". Both settings are required. For the buildbots, pythoninfo checks this as "windows.RtlAreLongPathsEnabled". According to this, for example, bolen-windows10 does not have long paths enabled. Yet test_compileall passed. bolen-windows10 https://buildbot.python.org/all/#/builders/3/builds/3681/steps/3/logs/stdio It seems the test passed because the temp directory on this bot is relatively short: "D:\Temp". That's a factor because create_long_path adds directory components in blocks of 10. It uses 20 "dir_X_Y" components because 30 (240 characters) is too much for MAX_PATH no matter what. The same applies to the following buildbots for Windows 7 and 8.1: bolen-windows7 https://buildbot.python.org/all/#/builders/58/builds/3148/steps/3/logs/stdio ware-win81-release https://buildbot.python.org/all/#/builders/12/builds/3360/steps/3/logs/stdio On the other hand, kloth-win64 has a longer path for its temp directory: "C:\Users\Buildbot\AppData\Local\Temp". This costs an additional 29 characters compared to "D:\Temp" and brings the final path very close to MAX_PATH. The suffix appended by _write_atomic is typically 14-16 characters, which then exceeds MAX_PATH. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 23:01:38 2019 From: report at bugs.python.org (Tim Peters) Date: Tue, 15 Oct 2019 03:01:38 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1571108498.55.0.505360007306.issue38006@roundup.psfhosted.org> Tim Peters added the comment: > While Neil & I haven't thought of ways that can go wrong now > beyond that a "surprise finalizer" may get run any number of > times ... Speaking of which, I no longer believe that's true. Thanks to the usual layers of baffling renaming via macro after macro, I missed object.c's PyObject_CallFinalizerFromDealloc(), which both respects and sets the "am I finalized?" flag regardless of how, e.g., an object with a __del__ ends its life (and possibly resurrects). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 23:28:50 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 15 Oct 2019 03:28:50 +0000 Subject: [issue38478] inspect.signature.bind does not correctly handle keyword argument with same name as positional-only parameter In-Reply-To: <1571106392.69.0.85003046785.issue38478@roundup.psfhosted.org> Message-ID: <1571110130.66.0.745379662649.issue38478@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 00:29:02 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 15 Oct 2019 04:29:02 +0000 Subject: [issue38288] shutil.make_archive() should allow setting zipfile.ZipFile() 'strict_timestamps' In-Reply-To: <1569516230.4.0.693896047629.issue38288@roundup.psfhosted.org> Message-ID: <1571113742.85.0.71577681599.issue38288@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 01:31:30 2019 From: report at bugs.python.org (Young Y) Date: Tue, 15 Oct 2019 05:31:30 +0000 Subject: [issue38479] Segmentation fault: 11 Python3.6 on Macbook Message-ID: <1571117490.83.0.0706569063391.issue38479@roundup.psfhosted.org> New submission from Young Y : Segmentation fault: 11Process: Python [5343] Path: /Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python Identifier: Python Version: 3.6.5 (3.6.5) Code Type: X86-64 (Native) Parent Process: bash [3524] Responsible: Python [5343] User ID: 501 Date/Time: 2019-10-15 13:26:45.395 +0800 OS Version: Mac OS X 10.14.1 (18B75) Report Version: 12 Anonymous UUID: 4552DCD6-6528-6E1A-0C86-24A09F7835F8 Time Awake Since Boot: 9600 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000201c49b57 Exception Note: EXC_CORPSE_NOTIFY Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [5343] VM Regions Near 0x201c49b57: VM_ALLOCATE 0000000181c4a000-0000000181c4b000 [ 4K] r-x/rwx SM=PRV --> __UNIXSTACK 00007fff5b000000-00007fff5c000000 [ 16.0M] rw-/rwx SM=ALI /Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python Application Specific Information: dyld: launch, running initializers /Library/Application Support/Cylance/Desktop/CyMemDef.dylib Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 ??? 0x0000000201c49b57 0 + 8619596631 1 CyMemDef.dylib 0x0000000100a77737 _vm_protect(unsigned int, unsigned long, unsigned long, unsigned int, int) + 149 2 CyMemDef.dylib 0x0000000100a73e3e mach_override_setup + 219 3 CyMemDef.dylib 0x0000000100a79297 injector(inject_s*, unsigned long) + 355 4 CyMemDef.dylib 0x0000000100a790a5 MemDefMemory_initialize() + 35 5 CyMemDef.dylib 0x0000000100a77050 memdefosx_initialize + 28 6 dyld 0x00007fff5f67dcc8 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 518 7 dyld 0x00007fff5f67dec6 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 40 8 dyld 0x00007fff5f6790da ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 358 9 dyld 0x00007fff5f67906d ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 249 10 dyld 0x00007fff5f678254 ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 134 11 dyld 0x00007fff5f6782e8 ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 74 12 dyld 0x00007fff5f667774 dyld::initializeMainExecutable() + 199 13 dyld 0x00007fff5f66c78f dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 6237 14 dyld 0x00007fff5f6664f6 dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*) + 1154 15 dyld 0x00007fff5f666036 _dyld_start + 54 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000000100a94178 rbx: 0x0000000101c4ab3a rcx: 0x0000000000000000 rdx: 0x0000000000000008 rdi: 0x0000000000000103 rsi: 0x0000000101c4ab3a rbp: 0x00007fff5bffdef0 rsp: 0x00007fff5bffdaa8 r8: 0x0000000000000005 r9: 0x0000000000000000 r10: 0x0000000000000000 r11: 0x0000000000000246 r12: 0x0000000000000005 r13: 0x0000000000000103 r14: 0x0000000000000000 r15: 0x0000000000000008 rip: 0x0000000201c49b57 rfl: 0x0000000000010246 cr2: 0x0000000201c49b57 Logical CPU: 1 Error Code: 0x00000014 Trap Number: 14 Binary Images: 0x100000000 - 0x100000ff7 +org.python.python (3.6.5 - 3.6.5) /Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python 0x100003000 - 0x100450fe7 com.apple.CoreFoundation (6.9 - 1560.12) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x1006fb000 - 0x100922fef +org.python.python (3.6.5, [c] 2001-2018 Python Software Foundation. - 3.6.5) /Library/Frameworks/Python.framework/Versions/3.6/Python 0x100a6b000 - 0x100a6cffb libSystem.B.dylib (1252.200.5) /usr/lib/libSystem.B.dylib 0x100a72000 - 0x100a83ff7 +CyMemDef.dylib (0) <7F2E0690-20B4-335A-AE40-D51A0FD1582F> /Library/Application Support/Cylance/*/CyMemDef.dylib 0x100ab5000 - 0x10123bfe7 libobjc.A.dylib (750.1) <9CE27EC3-3A12-35D1-8F2F-3550B9668259> /usr/lib/libobjc.A.dylib 0x1013f3000 - 0x1013f4ff7 libDiagnosticMessagesClient.dylib (107) /usr/lib/libDiagnosticMessagesClient.dylib 0x1013fa000 - 0x10165dffb libicucore.A.dylib (62108.0.1) <969815D4-A345-31BB-82B7-0C3B58CA7E90> /usr/lib/libicucore.A.dylib 0x10174b000 - 0x10175dffb libz.1.dylib (70.200.4) <99A3D725-8388-38B4-B66C-5E9006E6F072> /usr/lib/libz.1.dylib 0x101763000 - 0x101778fff libc++abi.dylib (400.17) /usr/lib/libc++abi.dylib 0x10178f000 - 0x1017e6ff7 libc++.1.dylib (400.9.4) /usr/lib/libc++.1.dylib 0x101847000 - 0x10184bff3 libcache.dylib (81) /usr/lib/system/libcache.dylib 0x101851000 - 0x10185bff3 libcommonCrypto.dylib (60118.220.1) <1099E427-6E81-3059-87AF-6F5FD81CA998> /usr/lib/system/libcommonCrypto.dylib 0x101869000 - 0x101870fff libcompiler_rt.dylib (63.4) /usr/lib/system/libcompiler_rt.dylib 0x10187e000 - 0x101887ff3 libcopyfile.dylib (146.200.3) <4BCDADBF-79F5-3829-B47D-64DA0D44BCBF> /usr/lib/system/libcopyfile.dylib 0x10188e000 - 0x101912fdf libcorecrypto.dylib (602.220.6) /usr/lib/system/libcorecrypto.dylib 0x10192f000 - 0x101969ff7 libdispatch.dylib (1008.220.2) /usr/lib/system/libdispatch.dylib 0x10199a000 - 0x1019c9fff libdyld.dylib (635.2) <1B79A5CE-125F-301F-A441-C1869573AED0> /usr/lib/system/libdyld.dylib 0x1019ec000 - 0x1019ecffb libkeymgr.dylib (30) /usr/lib/system/libkeymgr.dylib 0x1019f1000 - 0x1019f1ff7 liblaunch.dylib (1336.220.5) <95EB6EAF-2DC5-344F-BADB-CA4E35E4E503> /usr/lib/system/liblaunch.dylib 0x1019f8000 - 0x1019fdfff libmacho.dylib (921) /usr/lib/system/libmacho.dylib 0x101a04000 - 0x101a06ffb libquarantine.dylib (86.220.1) <6AE5AEEC-A9FD-3CF8-92DD-12B5AFBE12DE> /usr/lib/system/libquarantine.dylib 0x101a0d000 - 0x101a0eff3 libremovefile.dylib (45.200.2) /usr/lib/system/libremovefile.dylib 0x101a14000 - 0x101a2bff3 libsystem_asl.dylib (356.200.4) /usr/lib/system/libsystem_asl.dylib 0x101a39000 - 0x101a39fff libsystem_blocks.dylib (73) <26419398-C30C-30F1-B656-A92AFA9560F6> /usr/lib/system/libsystem_blocks.dylib 0x101a3e000 - 0x101ac6fff libsystem_c.dylib (1272.200.26) <3DEEE96E-6DF6-35AD-8654-D69AC26B907B> /usr/lib/system/libsystem_c.dylib 0x101aef000 - 0x101af2ff7 libsystem_configuration.dylib (963.200.27) <02CC3996-B34E-333C-8806-AE2699D34424> /usr/lib/system/libsystem_configuration.dylib 0x101af9000 - 0x101afcff7 libsystem_coreservices.dylib (66) <254B6849-2C8F-302C-8616-B8324A11AB30> /usr/lib/system/libsystem_coreservices.dylib 0x101b02000 - 0x101b08ffb libsystem_darwin.dylib (1272.200.26) <974E9EF7-DE72-34B7-B056-0A81C10DF8EB> /usr/lib/system/libsystem_darwin.dylib 0x101b13000 - 0x101b19ff7 libsystem_dnssd.dylib (878.200.35) /usr/lib/system/libsystem_dnssd.dylib 0x101b1f000 - 0x101b6bff3 libsystem_info.dylib (517.200.9) <0707C387-D7DE-372E-8FF1-3DE5C91932D6> /usr/lib/system/libsystem_info.dylib 0x101b82000 - 0x101bcdff7 libsystem_m.dylib (3158.200.7) <43D1796B-954F-37D6-B1AC-9D80DF0655A2> /usr/lib/system/libsystem_m.dylib 0x101bdc000 - 0x101c00ff7 libsystem_malloc.dylib (166.220.1) <3B196122-4E0D-3E3F-AA3E-5115B976DE26> /usr/lib/system/libsystem_malloc.dylib 0x101c0f000 - 0x101c1aff3 libsystem_networkextension.dylib (767.220.1) /usr/lib/system/libsystem_networkextension.dylib 0x101c27000 - 0x101c2efff libsystem_notify.dylib (172.200.21) /usr/lib/system/libsystem_notify.dylib 0x101c35000 - 0x101c38ff7 libsystem_sandbox.dylib (851.220.9) <4D6433A8-C703-3ED9-82EB-B9E481A0FD2F> /usr/lib/system/libsystem_sandbox.dylib 0x101c3f000 - 0x101c41ff3 libsystem_secinit.dylib (30.220.1) <6C681113-8C48-3256-BEF6-0C3723DEB926> /usr/lib/system/libsystem_secinit.dylib 0x101c47000 - 0x101c6eff7 libsystem_kernel.dylib (4903.221.2) <0E882078-7330-3B49-AA5D-3CDB5645A4E5> /usr/lib/system/libsystem_kernel.dylib 0x101c89000 - 0x101c92fef libsystem_platform.dylib (177.200.16) /usr/lib/system/libsystem_platform.dylib 0x101c9b000 - 0x101ca5fff libsystem_pthread.dylib (330.220.2) <4958273C-4273-3501-8137-E44249E10D9C> /usr/lib/system/libsystem_pthread.dylib 0x101cb0000 - 0x101cb7ff7 libsystem_symptoms.dylib (820.227.2) <3147D594-F41F-35FD-BF0B-6B8B66A407DE> /usr/lib/system/libsystem_symptoms.dylib 0x101cbe000 - 0x101cd3ff7 libsystem_trace.dylib (906.220.1) /usr/lib/system/libsystem_trace.dylib 0x101ce3000 - 0x101ce8ffb libunwind.dylib (35.4) <41222EF6-2233-3CF4-947A-15D48CB8C030> /usr/lib/system/libunwind.dylib 0x101cf0000 - 0x101d20fff libxpc.dylib (1336.220.5) /usr/lib/system/libxpc.dylib 0x7fff5f665000 - 0x7fff5f6e36a7 dyld (635.2) <1780094A-8FE2-3EAA-B4A3-C4CF14BC5196> /usr/lib/dyld 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: 26541 thread_create: 0 thread_set_state: 0 VM Region Summary: ReadOnly portion of Libraries: Total=25.4M resident=0K(0%) swapped_out_or_unallocated=25.4M(100%) Writable regions: Total=25.5M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=25.5M(100%) VIRTUAL REGION REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= Kernel Alloc Once 8K 2 MALLOC 9260K 8 MALLOC guard page 16K 5 VM_ALLOCATE 4K 2 __DATA 4316K 59 __LINKEDIT 4768K 46 __TEXT 20.7M 48 __UNICODE 564K 2 __UNIXSTACK 16.0M 2 shared memory 8K 3 =========== ======= ======= TOTAL 55.2M 167 Model: MacBookPro14,1, BootROM 184.0.0.0.0, 2 processors, Intel Core i5, 2.3 GHz, 16 GB, SMC 2.43f6 Graphics: Intel Iris Plus Graphics 640, Intel Iris Plus Graphics 640, Built-In Memory Module: BANK 0/DIMM0, 8 GB, LPDDR3, 2133 MHz, 0x802C, 0x4D5435324C31473332443450472D30393320 Memory Module: BANK 1/DIMM0, 8 GB, LPDDR3, 2133 MHz, 0x802C, 0x4D5435324C31473332443450472D30393320 AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x170), Broadcom BCM43xx 1.0 (7.77.61.1 AirPortDriverBrcmNIC-1305.2) Bluetooth: Version 6.0.9f2, 3 services, 27 devices, 1 incoming serial ports Network Service: Wi-Fi, AirPort, en0 USB Device: USB 3.0 Bus USB Device: USB 2.0 BILLBOARD Thunderbolt Bus: MacBook Pro, Apple Inc., 39.2 ---------- messages: 354686 nosy: Young Y priority: normal severity: normal status: open title: Segmentation fault: 11 Python3.6 on Macbook versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 03:01:13 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 Oct 2019 07:01:13 +0000 Subject: [issue38479] Segmentation fault: 11 Python3.6 on Macbook In-Reply-To: <1571117490.83.0.0706569063391.issue38479@roundup.psfhosted.org> Message-ID: <1571122873.58.0.462006129734.issue38479@roundup.psfhosted.org> Ned Deily added the comment: Your system appears to be running Cylance, which I gather is some sort of third-party virus protection system; from the system crash trace, the crash ssems to have happened in /Library/Application Support/Cylance/Desktop/CyMemDef.dylib which presumably is part of Cylance. I suggest you try disabling it or contacting the vendor for support. Note also that Python 3.6.5 is no longer supported; as of today, 3.8.0 is now available and 3.7.x has been and will be supported for some time. Good luck! ---------- nosy: +ned.deily resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 03:26:20 2019 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 15 Oct 2019 07:26:20 +0000 Subject: [issue11410] Use GCC visibility attrs in PyAPI_* In-Reply-To: <1299391945.72.0.037942723875.issue11410@psf.upfronthosting.co.za> Message-ID: <1571124380.1.0.368573984138.issue11410@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 0b60f64e4343913b4931dc27379d9808e5b78fe1 by Vinay Sajip in branch 'master': bpo-11410: Standardize and use symbol visibility attributes across POSIX and Windows. (GH-16347) https://github.com/python/cpython/commit/0b60f64e4343913b4931dc27379d9808e5b78fe1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 03:30:23 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 Oct 2019 07:30:23 +0000 Subject: [issue32996] Improve What's New in 3.7 In-Reply-To: <1520251006.69.0.467229070634.issue32996@psf.upfronthosting.co.za> Message-ID: <1571124623.98.0.454507824339.issue32996@roundup.psfhosted.org> Ned Deily added the comment: New changeset 49e650b2489da861d4c49b41787160f30d8259bf by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-32996: Documentation fix-up. (GH-16646) https://github.com/python/cpython/commit/49e650b2489da861d4c49b41787160f30d8259bf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 03:30:24 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 Oct 2019 07:30:24 +0000 Subject: [issue36953] Remove collections ABCs? In-Reply-To: <1558140764.46.0.049733618419.issue36953@roundup.psfhosted.org> Message-ID: <1571124624.8.0.0301524056913.issue36953@roundup.psfhosted.org> Ned Deily added the comment: New changeset 42b16b2a867ad3f6c022476076da3d6ea789021b by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-36953: Delay removal of ABCs from collections. (GH-13409) https://github.com/python/cpython/commit/42b16b2a867ad3f6c022476076da3d6ea789021b ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 03:30:24 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 Oct 2019 07:30:24 +0000 Subject: [issue38368] Crash when subclassing ctypes.Union In-Reply-To: <1570178161.94.0.1951756088.issue38368@roundup.psfhosted.org> Message-ID: <1571124624.59.0.543878878431.issue38368@roundup.psfhosted.org> Ned Deily added the comment: New changeset 1c61f2cc7ab44591b1832307a4022c927502d446 by Ned Deily (Vinay Sajip) in branch '3.7': bpo-38368: Added fix for ctypes crash when handling arrays in structs/unions. (GH-16589) (GH-16672) https://github.com/python/cpython/commit/1c61f2cc7ab44591b1832307a4022c927502d446 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 03:30:25 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 Oct 2019 07:30:25 +0000 Subject: [issue38294] Documentation on 3.6->3.7 re.escape no longer escaping "/" or ":" should be obvious In-Reply-To: <1569603997.59.0.0237297108404.issue38294@roundup.psfhosted.org> Message-ID: <1571124625.77.0.923987431526.issue38294@roundup.psfhosted.org> Ned Deily added the comment: New changeset ae41f629e187e1f0cf4d62f5a7b181c64da26466 by Ned Deily (Ricardo B?nffy) in branch '3.7': [3.7] bpo-38294: Add list of no-longer-escaped chars to re.escape documentation. (GH-16442) (GH-16647) https://github.com/python/cpython/commit/ae41f629e187e1f0cf4d62f5a7b181c64da26466 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 03:30:24 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 Oct 2019 07:30:24 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1571124624.26.0.366919524776.issue28556@roundup.psfhosted.org> Ned Deily added the comment: New changeset bd9a70c2c177d2f99f63d87b865e6e9c2936ba2e by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-28556: Remove another mention of metaclass of Generic in typing docs (GH-16743) https://github.com/python/cpython/commit/bd9a70c2c177d2f99f63d87b865e6e9c2936ba2e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 03:30:25 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 Oct 2019 07:30:25 +0000 Subject: [issue38235] Docs of logging module says argument is named "lvl". TypeError. In-Reply-To: <1568996817.83.0.32795106699.issue38235@roundup.psfhosted.org> Message-ID: <1571124625.25.0.283359174741.issue38235@roundup.psfhosted.org> Ned Deily added the comment: New changeset 6eb554583218cda9a145982a41c30612968a942f by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-38235: Correct some arguments names in logging documentation (GH-16571) (GH-16577) https://github.com/python/cpython/commit/6eb554583218cda9a145982a41c30612968a942f ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 03:30:25 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 Oct 2019 07:30:25 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1571124625.48.0.0505856465433.issue38449@roundup.psfhosted.org> Ned Deily added the comment: New changeset 2a405598bbccbc42710dc5ecf3d44c8de4c16582 by Ned Deily (Abhilash Raj) in branch '3.7': [3.7] bpo-38449: Revert "bpo-22347: Update mimetypes.guess_type to allow oper parsing of URLs (GH-15685)" (GH-16724) (GH-16727) https://github.com/python/cpython/commit/2a405598bbccbc42710dc5ecf3d44c8de4c16582 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 03:30:25 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 Oct 2019 07:30:25 +0000 Subject: [issue38344] activate.bat else needs to be on the same line as the if In-Reply-To: <1569997823.02.0.0977203709428.issue38344@roundup.psfhosted.org> Message-ID: <1571124625.89.0.376046184361.issue38344@roundup.psfhosted.org> Ned Deily added the comment: New changeset ab22c8bc488e822d03c4778b30ec60131ea35c63 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-38344: Fix syntax in activate.bat (GH-16533) https://github.com/python/cpython/commit/ab22c8bc488e822d03c4778b30ec60131ea35c63 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 03:30:24 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 Oct 2019 07:30:24 +0000 Subject: [issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop In-Reply-To: <1533549887.39.0.56676864532.issue34344@psf.upfronthosting.co.za> Message-ID: <1571124624.42.0.843528508782.issue34344@roundup.psfhosted.org> Ned Deily added the comment: New changeset 88204a3908663a574919f9c17278bcabed0598fa by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-34344 Fix AbstractEventLoopPolicy.get_event_loop docstring (GH-16463) https://github.com/python/cpython/commit/88204a3908663a574919f9c17278bcabed0598fa ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 03:30:25 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 Oct 2019 07:30:25 +0000 Subject: [issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name In-Reply-To: <1409971957.28.0.64915967452.issue22347@psf.upfronthosting.co.za> Message-ID: <1571124625.65.0.978754717156.issue22347@roundup.psfhosted.org> Ned Deily added the comment: New changeset 2a405598bbccbc42710dc5ecf3d44c8de4c16582 by Ned Deily (Abhilash Raj) in branch '3.7': [3.7] bpo-38449: Revert "bpo-22347: Update mimetypes.guess_type to allow oper parsing of URLs (GH-15685)" (GH-16724) (GH-16727) https://github.com/python/cpython/commit/2a405598bbccbc42710dc5ecf3d44c8de4c16582 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 03:30:26 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 Oct 2019 07:30:26 +0000 Subject: [issue26510] [argparse] Add required argument to add_subparsers In-Reply-To: <1457445361.5.0.530669445668.issue26510@psf.upfronthosting.co.za> Message-ID: <1571124626.28.0.538094229461.issue26510@roundup.psfhosted.org> Ned Deily added the comment: New changeset f168c17b075b4103eaf1f619acd3bca3890fbac7 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-26510: Add versionchanged for required arg of add_subparsers (GH-16588) https://github.com/python/cpython/commit/f168c17b075b4103eaf1f619acd3bca3890fbac7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 03:30:25 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 Oct 2019 07:30:25 +0000 Subject: [issue38391] Typo in tutorial code (does not compile) In-Reply-To: <1570440981.11.0.0420917562712.issue38391@roundup.psfhosted.org> Message-ID: <1571124625.09.0.0633399690746.issue38391@roundup.psfhosted.org> Ned Deily added the comment: New changeset e9c65b4ae765ccd381eccdfc4617dc46899406e1 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-38391: Fixing a typo for Py_DECREF (GH-16616) https://github.com/python/cpython/commit/e9c65b4ae765ccd381eccdfc4617dc46899406e1 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 03:34:20 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 15 Oct 2019 07:34:20 +0000 Subject: [issue38480] resource.setrlimit() should raise PermissionError Message-ID: <1571124860.16.0.598909630124.issue38480@roundup.psfhosted.org> New submission from Giampaolo Rodola' : >>> import resource >>> high = 300 * 1024 * 1024 >>> resource.setrlimit(resource.RLIMIT_MEMLOCK, (high, high)) Traceback (most recent call last): File "", line 1, in ValueError: not allowed to raise maximum limit >>> Internally EPERM is translated into ValueError (should have been PermissionError). resource.prlimit(), on the other hand, is not affected (correctly raises PermissionError): >>> resource.prlimit(os.getpid(), resource.RLIMIT_MEMLOCK, (high, high)) Traceback (most recent call last): File "", line 1, in PermissionError: [Errno 1] Operation not permitted It seems 'ValueError' was used in order to provide a more informative error message, but IMO it was a bad call. Proposal is to change this in 3.9 only, and document it under whatsnew/porting. ---------- components: Library (Lib) messages: 354701 nosy: giampaolo.rodola priority: normal severity: normal status: open title: resource.setrlimit() should raise PermissionError versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 03:36:40 2019 From: report at bugs.python.org (=?utf-8?b?5qWa6Im6?=) Date: Tue, 15 Oct 2019 07:36:40 +0000 Subject: [issue38481] Class static property not static Message-ID: <1571125000.71.0.339898408736.issue38481@roundup.psfhosted.org> New submission from ?? <1090217062 at qq.com>: code: ------------------------------------------------------------------ class D: num = 0 def __init__(self): self.num += 1 print('D num', self.num) for i in range(5): D() --------------------------------------------------------------- console print: --------------------------------------------------------------- Connected to pydev debugger (build 183.5429.31) D num 1 D num 1 D num 1 D num 1 D num 1 Process finished with exit code 0 ---------- components: Windows messages: 354702 nosy: chuyi, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Class static property not static type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 03:42:24 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 Oct 2019 07:42:24 +0000 Subject: [issue38344] activate.bat else needs to be on the same line as the if In-Reply-To: <1569997823.02.0.0977203709428.issue38344@roundup.psfhosted.org> Message-ID: <1571125344.98.0.758436296342.issue38344@roundup.psfhosted.org> Ned Deily added the comment: (3.7.5 is released with this fix) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 03:44:07 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 Oct 2019 07:44:07 +0000 Subject: [issue38368] Crash when subclassing ctypes.Union In-Reply-To: <1570178161.94.0.1951756088.issue38368@roundup.psfhosted.org> Message-ID: <1571125447.77.0.242535461479.issue38368@roundup.psfhosted.org> Ned Deily added the comment: (fix released in 3.8.0 and 3.7.5) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 03:45:01 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 15 Oct 2019 07:45:01 +0000 Subject: [issue38449] regression - mimetypes guess_type is confused by ; in the filename In-Reply-To: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> Message-ID: <1571125501.29.0.0320567965733.issue38449@roundup.psfhosted.org> Ned Deily added the comment: (fix also released in 3.7.5) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 03:47:21 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 15 Oct 2019 07:47:21 +0000 Subject: [issue38481] Class static property not static In-Reply-To: <1571125000.71.0.339898408736.issue38481@roundup.psfhosted.org> Message-ID: <1571125641.33.0.645728489533.issue38481@roundup.psfhosted.org> Eric V. Smith added the comment: When you assign to self.num, you're creating an instance variable which hides the class variable. Instead, assign directly to the class variable: class D: num = 0 def __init__(self): D.num += 1 print('D num', self.num) for i in range(5): D() D num 1 D num 2 D num 3 D num 4 D num 5 ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 04:21:30 2019 From: report at bugs.python.org (Jim Carroll) Date: Tue, 15 Oct 2019 08:21:30 +0000 Subject: [issue38482] BUG in codecs.BufferedIncrementalDecoder Message-ID: <1571127690.05.0.477916235895.issue38482@roundup.psfhosted.org> New submission from Jim Carroll : While working with codecs.iterdecode(), encountered "can't concat int to bytes". The source of the problem is BufferedIncrementalDecoder stores it's internal buffer as a bytes (ie: b""), but decode() can be passed either a byte string or in the case of iterdecode() an int. The solution is to test for this in the decode and if passed an int to coerce to bytes (see attach patch) Platform: Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32 Code to demonstrate the issue: >>> import codecs >>> source = ''.join([chr(x) for x in range(256)]) >>> enc = b''.join(codecs.iterencode(source, 'utf-8')) >>> list(''.join(codecs.iterdecode(enc, 'utf-8'))) Traceback (most recent call last): File "", line 1, in File "C:\Python37\lib\codecs.py", line 1048, in iterdecode output = decoder.decode(input) File "C:\Python37\lib\codecs.py", line 321, in decode data = self.buffer + input TypeError: can't concat int to bytes ---------- components: Library (Lib) files: codecs.patch keywords: patch messages: 354707 nosy: jamercee priority: normal severity: normal status: open title: BUG in codecs.BufferedIncrementalDecoder versions: Python 3.7 Added file: https://bugs.python.org/file48661/codecs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 04:25:03 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 15 Oct 2019 08:25:03 +0000 Subject: [issue38478] inspect.signature.bind does not correctly handle keyword argument with same name as positional-only parameter In-Reply-To: <1571106392.69.0.85003046785.issue38478@roundup.psfhosted.org> Message-ID: <1571127903.25.0.286805018874.issue38478@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- assignee: -> pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 04:26:27 2019 From: report at bugs.python.org (Jim Carroll) Date: Tue, 15 Oct 2019 08:26:27 +0000 Subject: [issue38482] BUG in codecs.BufferedIncrementalDecoder In-Reply-To: <1571127690.05.0.477916235895.issue38482@roundup.psfhosted.org> Message-ID: <1571127987.58.0.203234767329.issue38482@roundup.psfhosted.org> Change by Jim Carroll : Removed file: https://bugs.python.org/file48661/codecs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 04:27:39 2019 From: report at bugs.python.org (Jim Carroll) Date: Tue, 15 Oct 2019 08:27:39 +0000 Subject: [issue38482] BUG in codecs.BufferedIncrementalDecoder In-Reply-To: <1571127690.05.0.477916235895.issue38482@roundup.psfhosted.org> Message-ID: <1571128059.37.0.45527253173.issue38482@roundup.psfhosted.org> Change by Jim Carroll : Added file: https://bugs.python.org/file48662/codecs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 04:36:48 2019 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 15 Oct 2019 08:36:48 +0000 Subject: [issue16575] ctypes: unions as arguments In-Reply-To: <1354163044.21.0.431588472559.issue16575@psf.upfronthosting.co.za> Message-ID: <1571128608.98.0.022334711095.issue16575@roundup.psfhosted.org> Change by Vinay Sajip : ---------- pull_requests: +16355 pull_request: https://github.com/python/cpython/pull/16799 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 05:26:22 2019 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 15 Oct 2019 09:26:22 +0000 Subject: [issue38470] test_compileall fails in AMD64 Windows7 SP1 3.x In-Reply-To: <1571013936.71.0.668005842061.issue38470@roundup.psfhosted.org> Message-ID: <1571131582.23.0.460436739469.issue38470@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset eb1dda2b56f67f09352c303588c28880c471ae87 by Petr Viktorin (Victor Stinner) in branch 'master': bpo-38470: Fix test_compileall.test_compile_dir_maxlevels() (GH-16789) https://github.com/python/cpython/commit/eb1dda2b56f67f09352c303588c28880c471ae87 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 05:50:00 2019 From: report at bugs.python.org (Arnaud Diederen) Date: Tue, 15 Oct 2019 09:50:00 +0000 Subject: [issue37633] Py_CompileString and PyParser_SimpleParseString not exported in python38.dll In-Reply-To: <1563568606.34.0.923231546212.issue37633@roundup.psfhosted.org> Message-ID: <1571133000.39.0.490654278482.issue37633@roundup.psfhosted.org> Arnaud Diederen added the comment: Python 3.8 was released yesterday, but this issue was unfortunately not addressed, making it as an embedded runtime. Are there plans to fix this for a minor 3.8 release? Thanks! ---------- nosy: +Arnaud Diederen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 06:21:32 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 15 Oct 2019 10:21:32 +0000 Subject: [issue37633] Py_CompileString and PyParser_SimpleParseString not exported in python38.dll In-Reply-To: <1563568606.34.0.923231546212.issue37633@roundup.psfhosted.org> Message-ID: <1571134892.93.0.268312951372.issue37633@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 06:40:56 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 15 Oct 2019 10:40:56 +0000 Subject: [issue38478] inspect.signature.bind does not correctly handle keyword argument with same name as positional-only parameter In-Reply-To: <1571106392.69.0.85003046785.issue38478@roundup.psfhosted.org> Message-ID: <1571136056.12.0.893748476053.issue38478@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +16356 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16800 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 06:42:08 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 15 Oct 2019 10:42:08 +0000 Subject: [issue38478] inspect.signature.bind does not correctly handle keyword argument with same name as positional-only parameter In-Reply-To: <1571106392.69.0.85003046785.issue38478@roundup.psfhosted.org> Message-ID: <1571136128.19.0.639026895846.issue38478@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thanks, Brian for the report! I have a fix ready. When merged, this will be available in the next release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 06:42:19 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 15 Oct 2019 10:42:19 +0000 Subject: [issue38478] inspect.signature.bind does not correctly handle keyword argument with same name as positional-only parameter In-Reply-To: <1571106392.69.0.85003046785.issue38478@roundup.psfhosted.org> Message-ID: <1571136139.25.0.623337701885.issue38478@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 06:42:54 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 Oct 2019 10:42:54 +0000 Subject: [issue38482] BUG in codecs.BufferedIncrementalDecoder In-Reply-To: <1571127690.05.0.477916235895.issue38482@roundup.psfhosted.org> Message-ID: <1571136174.39.0.266149665327.issue38482@roundup.psfhosted.org> Serhiy Storchaka added the comment: The first argument of iterdecode() should be an iterable of bytes objects, not a bytes object. Try codecs.iterdecode([enc], 'utf-8') ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 06:51:40 2019 From: report at bugs.python.org (Cooper Lees) Date: Tue, 15 Oct 2019 10:51:40 +0000 Subject: [issue38483] [venv] Add ~/.venvrc to change module defaults Message-ID: <1571136700.53.0.3102397559.issue38483@roundup.psfhosted.org> New submission from Cooper Lees : I'd like to propose adding a run commands (.venvrc) file support to the venv library. File Location: `~/.venvrc` This file will support all current CLI arguments and override the defaults for each CLI if present in the file. I will also endeavour to add test for POSIX + Windows systems. I propose using `configparser` and an `.ini` style config for the `.venvrc`. My main use for this is to allow myself to default to always using `--upgrade-deps` when I create new venvs. Thoughts? Concerns? ---------- components: Library (Lib) messages: 354712 nosy: cooperlees priority: normal severity: normal status: open title: [venv] Add ~/.venvrc to change module defaults type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 07:15:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Oct 2019 11:15:53 +0000 Subject: [issue37759] Polish whatsnew for 3.8 In-Reply-To: <1564971591.59.0.825854790144.issue37759@roundup.psfhosted.org> Message-ID: <1571138153.76.0.572646443902.issue37759@roundup.psfhosted.org> STINNER Victor added the comment: What's New in Python 3.8: * functools.singledispatchmethod is missing https://docs.python.org/dev/library/functools.html#functools.singledispatchmethod * About "Added new multiprocessing.shared_memory module. (Contributed by Davin Potts in bpo-35813.)". Comment on Hacker News: "Hard to understand why this is so far down. This is fantastic news!" and "Shared Memory is the star of this release IMHO." I agree with that :-) * Maybe PYTHONCACHEPREFIX should be better highlighted? "Anyone else most excited about PYTHONCACHEPREFIX? :-P" and "Not sure about most excited, but I am looking forward to setting PYTHONCACHEPREFIX to a location that isn't in a volume mounted into my Docker container for development." ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 07:40:18 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 15 Oct 2019 11:40:18 +0000 Subject: [issue38478] inspect.signature.bind does not correctly handle keyword argument with same name as positional-only parameter In-Reply-To: <1571106392.69.0.85003046785.issue38478@roundup.psfhosted.org> Message-ID: <1571139618.16.0.00890568008243.issue38478@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset f3ef06a7cb347ab7bd3cc2b0b3dcebe4f9ff36f9 by Pablo Galindo in branch 'master': bpo-38478: Correctly handle keyword argument with same name as positional-only parameter (GH-16800) https://github.com/python/cpython/commit/f3ef06a7cb347ab7bd3cc2b0b3dcebe4f9ff36f9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 07:40:26 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 15 Oct 2019 11:40:26 +0000 Subject: [issue38478] inspect.signature.bind does not correctly handle keyword argument with same name as positional-only parameter In-Reply-To: <1571106392.69.0.85003046785.issue38478@roundup.psfhosted.org> Message-ID: <1571139626.33.0.432516257876.issue38478@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16357 pull_request: https://github.com/python/cpython/pull/16801 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 07:58:51 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 Oct 2019 11:58:51 +0000 Subject: [issue38474] digit check logic can be replaced by Py_ISDIGIT on prepare_s In-Reply-To: <1571077834.59.0.937971525821.issue38474@roundup.psfhosted.org> Message-ID: <1571140731.19.0.2699606306.issue38474@roundup.psfhosted.org> Serhiy Storchaka added the comment: What is the benefit of such change? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 07:59:23 2019 From: report at bugs.python.org (Jim Carroll) Date: Tue, 15 Oct 2019 11:59:23 +0000 Subject: [issue38482] BUG in codecs.BufferedIncrementalDecoder In-Reply-To: <1571127690.05.0.477916235895.issue38482@roundup.psfhosted.org> Message-ID: <1571140763.63.0.418366889447.issue38482@roundup.psfhosted.org> Jim Carroll added the comment: According to the documentation (https://docs.python.org/3.7/library/codecs.html#codecs.iterdecode), the first parameter is a bytes object to decode (not an iterable of bytes). Which is also consistent with it's companion iterencode() which accepts a str object, not an iterable of chars. Seems logical that one should be able to pass the output from iterencode() as the direct input to iterdecode() without having to convert, no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 08:00:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Oct 2019 12:00:21 +0000 Subject: [issue37961] Tracemalloc traces do not include original stack trace length In-Reply-To: <1566894205.32.0.427554502238.issue37961@roundup.psfhosted.org> Message-ID: <1571140821.56.0.0727223541794.issue37961@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8d59eb1b66c51b2b918da9881c57d07d08df43b7 by Victor Stinner (Julien Danjou) in branch 'master': bpo-37961, tracemalloc: add Traceback.total_nframe (GH-15545) https://github.com/python/cpython/commit/8d59eb1b66c51b2b918da9881c57d07d08df43b7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 08:02:37 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 15 Oct 2019 12:02:37 +0000 Subject: [issue38478] inspect.signature.bind does not correctly handle keyword argument with same name as positional-only parameter In-Reply-To: <1571106392.69.0.85003046785.issue38478@roundup.psfhosted.org> Message-ID: <1571140957.42.0.942764753911.issue38478@roundup.psfhosted.org> miss-islington added the comment: New changeset f705f8e9b58955d0d9083e98d71ba01b2e69798c by Miss Islington (bot) in branch '3.8': bpo-38478: Correctly handle keyword argument with same name as positional-only parameter (GH-16800) https://github.com/python/cpython/commit/f705f8e9b58955d0d9083e98d71ba01b2e69798c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 08:37:14 2019 From: report at bugs.python.org (Sebastian Rittau) Date: Tue, 15 Oct 2019 12:37:14 +0000 Subject: [issue38484] HTMLParser.handle_starttag should mention that value can be None Message-ID: <1571143034.46.0.408177469405.issue38484@roundup.psfhosted.org> New submission from Sebastian Rittau : The documentation for HTMLParser.handle_starttag (https://docs.python.org/3/library/html.parser.html#html.parser.HTMLParser.handle_starttag) should mention that the value of an attribute can be `None` for argument-less attributes. I can submit a PR if wanted. ---------- assignee: docs at python components: Documentation messages: 354719 nosy: docs at python, srittau priority: normal severity: normal status: open title: HTMLParser.handle_starttag should mention that value can be None versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 08:46:36 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 15 Oct 2019 12:46:36 +0000 Subject: [issue38478] inspect.signature.bind does not correctly handle keyword argument with same name as positional-only parameter In-Reply-To: <1571106392.69.0.85003046785.issue38478@roundup.psfhosted.org> Message-ID: <1571143596.96.0.391610425212.issue38478@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 08:56:13 2019 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 15 Oct 2019 12:56:13 +0000 Subject: [issue38474] digit check logic can be replaced by Py_ISDIGIT on prepare_s In-Reply-To: <1571077834.59.0.937971525821.issue38474@roundup.psfhosted.org> Message-ID: <1571144173.6.0.930289138482.issue38474@roundup.psfhosted.org> Dong-hee Na added the comment: > What is the benefit of such change? I think that if an API is implemented for a specific purpose, it should be used. This will help us to maintain code quality. Especially in the case of pointed out logics, since Py_ISDIGIT is exactly what we want to do, By replacing this logic, we can reduce unnecessary mistakes when someone modifies the logic. This is, of course, my personal opinion. I think it may be different from the policies of the core developers. Thank you ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 09:00:12 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 15 Oct 2019 13:00:12 +0000 Subject: [issue34688] Segfault in pandas that works fine on 3.7 In-Reply-To: <1536954749.8.0.956365154283.issue34688@psf.upfronthosting.co.za> Message-ID: <1571144412.68.0.203444435956.issue34688@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This has an issue in GitHub and pandas is also tested with 3.8 from https://github.com/pandas-dev/pandas/pull/28730. I am closing this as third party. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 09:00:43 2019 From: report at bugs.python.org (Cooper Lees) Date: Tue, 15 Oct 2019 13:00:43 +0000 Subject: [issue38483] [venv] Add ~/.venvrc to change module defaults In-Reply-To: <1571136700.53.0.3102397559.issue38483@roundup.psfhosted.org> Message-ID: <1571144443.64.0.9183378196.issue38483@roundup.psfhosted.org> Change by Cooper Lees : ---------- keywords: +patch pull_requests: +16358 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16802 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 09:05:03 2019 From: report at bugs.python.org (Cooper Lees) Date: Tue, 15 Oct 2019 13:05:03 +0000 Subject: [issue38483] [venv] Add ~/.venvrc to change module defaults In-Reply-To: <1571136700.53.0.3102397559.issue38483@roundup.psfhosted.org> Message-ID: <1571144703.79.0.84231196145.issue38483@roundup.psfhosted.org> Change by Cooper Lees : ---------- pull_requests: +16359 pull_request: https://github.com/python/cpython/pull/168 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 09:10:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Oct 2019 13:10:34 +0000 Subject: [issue37961] Tracemalloc traces do not include original stack trace length In-Reply-To: <1566894205.32.0.427554502238.issue37961@roundup.psfhosted.org> Message-ID: <1571145034.38.0.479528410545.issue37961@roundup.psfhosted.org> STINNER Victor added the comment: Thanks for your contribution Julien, I merged your PR. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 09:13:57 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 15 Oct 2019 13:13:57 +0000 Subject: [issue38483] [venv] Add ~/.venvrc to change module defaults In-Reply-To: <1571136700.53.0.3102397559.issue38483@roundup.psfhosted.org> Message-ID: <1571145237.05.0.816077068898.issue38483@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 09:14:08 2019 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 15 Oct 2019 13:14:08 +0000 Subject: [issue17477] update the bsddb module do build with db 5.x versions In-Reply-To: <1363671295.4.0.641867038298.issue17477@psf.upfronthosting.co.za> Message-ID: <1571145248.74.0.305988374681.issue17477@roundup.psfhosted.org> Jes?s Cea Avi?n added the comment: Time to die. ---------- resolution: -> wont fix stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 09:14:16 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 15 Oct 2019 13:14:16 +0000 Subject: [issue38483] [venv] Add ~/.venvrc to change module defaults In-Reply-To: <1571136700.53.0.3102397559.issue38483@roundup.psfhosted.org> Message-ID: <1571145256.86.0.595365016131.issue38483@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- pull_requests: -16359 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 09:15:06 2019 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 15 Oct 2019 13:15:06 +0000 Subject: [issue18734] Berkeley DB versions 4.4-4.9 are not discovered by setup.py In-Reply-To: <1376450123.08.0.865805118992.issue18734@psf.upfronthosting.co.za> Message-ID: <1571145306.2.0.298346035536.issue18734@roundup.psfhosted.org> Jes?s Cea Avi?n added the comment: Time to die. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 09:17:58 2019 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 15 Oct 2019 13:17:58 +0000 Subject: [issue6462] bsddb3 intermittent test failures In-Reply-To: <1247329933.16.0.47150397.issue6462@psf.upfronthosting.co.za> Message-ID: <1571145478.25.0.211889824435.issue6462@roundup.psfhosted.org> Jes?s Cea Avi?n added the comment: Time to die. ---------- resolution: -> wont fix stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 09:34:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Oct 2019 13:34:27 +0000 Subject: [issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29 In-Reply-To: <1550225538.04.0.738886867119.issue35998@roundup.psfhosted.org> Message-ID: <1571146467.18.0.0398799427872.issue35998@roundup.psfhosted.org> STINNER Victor added the comment: Zachary Ware commented the new failures on the x86 Gentoo worker: "My worker was updated to OpenSSL v1.1.1d with sslv3 disabled today, which seems like a likely source of these failures." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 09:36:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Oct 2019 13:36:27 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1571146587.5.0.733494502675.issue38006@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 09:40:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Oct 2019 13:40:03 +0000 Subject: [issue38112] Compileall improvements In-Reply-To: <1568210479.53.0.901531773072.issue38112@roundup.psfhosted.org> Message-ID: <1571146803.45.0.319045413708.issue38112@roundup.psfhosted.org> STINNER Victor added the comment: Should be fixed by: New changeset eb1dda2b56f67f09352c303588c28880c471ae87 by Petr Viktorin (Victor Stinner) in branch 'master': bpo-38470: Fix test_compileall.test_compile_dir_maxlevels() (GH-16789) https://github.com/python/cpython/commit/eb1dda2b56f67f09352c303588c28880c471ae87 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 09:42:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Oct 2019 13:42:59 +0000 Subject: [issue38470] test_compileall fails in AMD64 Windows7 SP1 3.x In-Reply-To: <1571013936.71.0.668005842061.issue38470@roundup.psfhosted.org> Message-ID: <1571146979.49.0.682208456752.issue38470@roundup.psfhosted.org> STINNER Victor added the comment: > create_long_path isn't taking into account _write_atomic in Lib/importlib/_bootstrap_external.py. Yeah, I found the same issue: https://github.com/python/cpython/pull/16778#issuecomment-541764285 I began to write a complex change to take _write_atomic() in account, but the test became super complex. I don't think that it's worth it. So I wrote a much simpler PR. https://github.com/python/cpython/pull/16789#issuecomment-541918432 Anyway, the issue should now be fixed. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 09:44:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Oct 2019 13:44:30 +0000 Subject: [issue38470] test_compileall fails in AMD64 Windows7 SP1 3.x In-Reply-To: <1571013936.71.0.668005842061.issue38470@roundup.psfhosted.org> Message-ID: <1571147070.78.0.5930631169.issue38470@roundup.psfhosted.org> STINNER Victor added the comment: It seems like test_compileall now pass on the 4 Windows workers: * https://buildbot.python.org/all/#/builders/3 * https://buildbot.python.org/all/#/builders/12 * https://buildbot.python.org/all/#/builders/40 * https://buildbot.python.org/all/#/builders/58 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 10:04:43 2019 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Tue, 15 Oct 2019 14:04:43 +0000 Subject: [issue38482] BUG in codecs.BufferedIncrementalDecoder In-Reply-To: <1571127690.05.0.477916235895.issue38482@roundup.psfhosted.org> Message-ID: <1571148283.89.0.752256063936.issue38482@roundup.psfhosted.org> Walter D?rwald added the comment: The documentation might be unclear here. But the argument iterator of iterdecode(iterator, encoding, errors='strict', **kwargs) *is* supposed to be an iterable over bytes objects. In fact iterencode() transforms an iterator over strings into an iterator over bytes and iterdecode() transforms an iterator over bytes into an iterator over strings. Since iterating over strings iterates over the characters, it's possible to pass a string to iterencode(). However it's not possible to pass a bytes object to iterdecode() since iterating over a bytes object yields integers: >>> import codecs >>> list(codecs.iterencode(['spam'], 'utf-8')) [b'spam'] >>> list(codecs.iterencode('spam', 'utf-8')) [b's', b'p', b'a', b'm'] >>> list(codecs.iterdecode([b'spam'], 'utf-8')) ['spam'] >>> list(codecs.iterdecode(b'spam', 'utf-8')) Traceback (most recent call last): File "", line 1, in File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/codecs.py", line 1048, in iterdecode output = decoder.decode(input) File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/codecs.py", line 321, in decode data = self.buffer + input TypeError: can't concat int to bytes ---------- nosy: +doerwalter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 10:18:53 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Tue, 15 Oct 2019 14:18:53 +0000 Subject: [issue38468] Refactor python-config.in - use getvar() In-Reply-To: <1570983225.71.0.166757825145.issue38468@roundup.psfhosted.org> Message-ID: <1571149133.18.0.0250135539995.issue38468@roundup.psfhosted.org> Joannah Nanjekye added the comment: New changeset 3cd21aa6a1467723ccc85e6411a6cbe7fa81ef76 by Joannah Nanjekye in branch 'master': bpo-38468 : Refactor python-config (#16749) https://github.com/python/cpython/commit/3cd21aa6a1467723ccc85e6411a6cbe7fa81ef76 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 10:22:34 2019 From: report at bugs.python.org (Jim Carroll) Date: Tue, 15 Oct 2019 14:22:34 +0000 Subject: [issue38485] BUG Modules/_io/texio.c Message-ID: <1571149354.19.0.486917734419.issue38485@roundup.psfhosted.org> New submission from Jim Carroll : The io.TextIOWrapper class initializes a codec.IncrementalEncoder and uses it to encode str, but it never calls the encoder's encode('', final=True). According to the docs https://docs.python.org/3.5/library/codecs.html#codecs.IncrementalEncoder.encode: ``If this is the last call to encode() final must be true (the default is false).`` Without a call to encode('', final=True), codecs cannot be created that use codecs.BufferedIncrementalEncoder which depend on being called with final=True to flush any internal buffers. Platform: Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32 ---------- messages: 354733 nosy: jamercee priority: normal severity: normal status: open title: BUG Modules/_io/texio.c versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 10:46:58 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Tue, 15 Oct 2019 14:46:58 +0000 Subject: [issue38468] Refactor python-config.in - use getvar() In-Reply-To: <1570983225.71.0.166757825145.issue38468@roundup.psfhosted.org> Message-ID: <1571150818.11.0.199045757278.issue38468@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 11:20:04 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 15 Oct 2019 15:20:04 +0000 Subject: [issue33604] HMAC default to MD5 marked as to be removed in 3.6 In-Reply-To: <1527014760.1.0.682650639539.issue33604@psf.upfronthosting.co.za> Message-ID: <1571152804.57.0.844723965796.issue33604@roundup.psfhosted.org> Raymond Hettinger added the comment: The docs still make it look like *digestmod* is an optional argument: https://docs.python.org/3/library/hmac.html#hmac.new The help output does as well: >>> help(hmac.new) Help on function new in module hmac: new(key, msg=None, digestmod=None) Create a new hashing object and return it. key: The starting key for the hash. msg: if available, will immediately be hashed into the object's starting state. You can now feed arbitrary strings into the object using its update() method, and can ask for the hash value at any time by calling its digest() method. Also, it is well outside the Python norms to have a required argument default to None and having that default value be invalid. Presumably, the type annotation for this would be, "digestmod: Optional[str]=None". That would further add to the confusion with a required Optional argument. Another thought: The usual exception for a missing argument is a TypeError, not a ValueError Lastly, I'm curious why another algorithm wasn't used (perhaps sha256) as a default rather than removing the default altogether. This doesn't seems like good API design. FWIW, this removal broke the third-party package, Bottle: Bottle v0.12.17 server starting up (using WSGIRefServer())... Listening on http://localhost:8081/ Hit Ctrl-C to quit. 127.0.0.1 - - [15/Oct/2019 07:53:10] "GET / HTTP/1.1" 200 1471 Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/bottle.py", line 862, in _handle return route.call(**args) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/bottle.py", line 1742, in wrapper rv = callback(*a, **ka) File "webapp.py", line 32, in check_credentials response.set_cookie('token', token, max_age=3600, secret=secret) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/bottle.py", line 1626, in set_cookie value = touni(cookie_encode((name, value), secret)) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/bottle.py", line 2600, in cookie_encode sig = base64.b64encode(hmac.new(tob(key), msg).digest()) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/hmac.py", line 146, in new return HMAC(key, msg, digestmod) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/hmac.py", line 49, in __init__ raise ValueError('`digestmod` is required.') ValueError: `digestmod` is required. ---------- nosy: +rhettinger status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 11:42:43 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 Oct 2019 15:42:43 +0000 Subject: [issue38485] BUG Modules/_io/texio.c In-Reply-To: <1571149354.19.0.486917734419.issue38485@roundup.psfhosted.org> Message-ID: <1571154163.71.0.252768730139.issue38485@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- components: +IO nosy: +benjamin.peterson, stutzbach type: -> behavior versions: +Python 2.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 11:50:02 2019 From: report at bugs.python.org (Caris Moses) Date: Tue, 15 Oct 2019 15:50:02 +0000 Subject: [issue21478] mock calls don't propagate to parent (autospec) In-Reply-To: <1399899394.81.0.714942512868.issue21478@psf.upfronthosting.co.za> Message-ID: <1571154602.76.0.00892690071699.issue21478@roundup.psfhosted.org> Caris Moses added the comment: I am having some trouble figuring out how to use CPython to get the exact PR you tested on since I've never used CPython before. However, when I just install Python 3.7.5RC1 and 3.8.0RC1 from the binaries and run your code I do get the AttributeError. And when I run your code with Python3.7.4 from binaries I get an empty list. Can you point me to a good source that will tell me how to get the patch for issue38473? I built and ran cpython from source on my Mac successfully. However when I checkout a different branch or version, rebuild, and run ./python.exe I always get the same Python version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 11:57:47 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 Oct 2019 15:57:47 +0000 Subject: [issue38474] digit check logic can be replaced by Py_ISDIGIT on prepare_s In-Reply-To: <1571077834.59.0.937971525821.issue38474@roundup.psfhosted.org> Message-ID: <1571155067.94.0.880858415894.issue38474@roundup.psfhosted.org> Serhiy Storchaka added the comment: It was added as a replacement of locale aware isdigit(). It was initially used only for implementing bytes.isdigit() and in PyOS_ascii_strtod(). isdigit() is not used in Modules/_struct.c, so there is nothing to replace with Py_ISDIGIT(). Currently hardcoded '0' and '9' are used in more places than Py_ISDIGIT(). Rewriting all this code just because we have Py_ISDIGIT() is a code churn. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 12:00:48 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 15 Oct 2019 16:00:48 +0000 Subject: [issue21478] mock calls don't propagate to parent (autospec) In-Reply-To: <1399899394.81.0.714942512868.issue21478@psf.upfronthosting.co.za> Message-ID: <1571155248.04.0.0238227538583.issue21478@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks for the confirmation. You can download the patch for the PR by appending .diff/.patch to the PR URL. The patch can be applied to your source locally with "git apply patch_file" to run my example. Reverting patch would cause AttributeError Diff URL : https://github.com/python/cpython/pull/16784.diff The PR also includes regression test so reverting the patch to mock.py and running below command would cause error in test. ./python -m test test_unittest Checking out a different branch and doing below command should do a clean rebuild with a different version of python. Also for reference : https://devguide.python.org/ git clean -xdf && ./configure && make -j4 Hope it helps ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 12:02:16 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 15 Oct 2019 16:02:16 +0000 Subject: [issue38486] Dead links in mailbox doc Message-ID: <1571155336.35.0.351516835001.issue38486@roundup.psfhosted.org> New submission from Inada Naoki : Reported on mailing list: https://mail.python.org/archives/list/docs at python.org/thread/NIXFQMWFNSNO6RXPINY56CQQ5L7QIRUV/ qmail.org is dead. The mailbox doc [1] contains two links to man pages in qmail.org. Can we just remove them? [1] https://docs.python.org/3/library/mailbox.html ---------- assignee: docs at python components: Documentation messages: 354738 nosy: docs at python, inada.naoki priority: normal severity: normal status: open title: Dead links in mailbox doc versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 12:03:55 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 Oct 2019 16:03:55 +0000 Subject: [issue38474] digit check logic can be replaced by Py_ISDIGIT on prepare_s In-Reply-To: <1571077834.59.0.937971525821.issue38474@roundup.psfhosted.org> Message-ID: <1571155435.34.0.367503387734.issue38474@roundup.psfhosted.org> Serhiy Storchaka added the comment: I left this on to the struct module maintainers. ---------- nosy: +mark.dickinson, meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 12:11:08 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 15 Oct 2019 16:11:08 +0000 Subject: [issue38480] resource.setrlimit() should raise PermissionError In-Reply-To: <1571124860.16.0.598909630124.issue38480@roundup.psfhosted.org> Message-ID: <1571155868.55.0.668252976548.issue38480@roundup.psfhosted.org> Change by Giampaolo Rodola' : ---------- keywords: +patch pull_requests: +16360 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16804 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 12:12:16 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 15 Oct 2019 16:12:16 +0000 Subject: [issue38480] resource.setrlimit() should raise PermissionError In-Reply-To: <1571124860.16.0.598909630124.issue38480@roundup.psfhosted.org> Message-ID: <1571155936.23.0.177010407059.issue38480@roundup.psfhosted.org> Giampaolo Rodola' added the comment: It turns out there is a similar precedent which was solved in the same way: issue18787. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 12:22:16 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 15 Oct 2019 16:22:16 +0000 Subject: [issue38486] Dead links in mailbox doc In-Reply-To: <1571155336.35.0.351516835001.issue38486@roundup.psfhosted.org> Message-ID: <1571156536.35.0.796500950889.issue38486@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- components: +email nosy: +barry, maxking, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 12:24:08 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 15 Oct 2019 16:24:08 +0000 Subject: [issue33342] urllib IPv6 parsing fails with special characters in passwords In-Reply-To: <1524491070.85.0.682650639539.issue33342@psf.upfronthosting.co.za> Message-ID: <1571156648.63.0.811878372139.issue33342@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 12:37:24 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 15 Oct 2019 16:37:24 +0000 Subject: [issue33604] HMAC default to MD5 marked as to be removed in 3.6 In-Reply-To: <1527014760.1.0.682650639539.issue33604@psf.upfronthosting.co.za> Message-ID: <1571157444.17.0.415165713597.issue33604@roundup.psfhosted.org> Christian Heimes added the comment: The weird argument style of a required digestmod with None as default is an unfortunate outcome of the old API. The msg and digestmod argument can be passed in as keyword and as positional argument. I studied existing code and have considered to make digestmod a required keyword-only argument, but that would have broken too much code. The current style is backwards compatible with all code except for code that must be changed any way. Only code that depends on implicit default digestmod="md5" breaks. The code must adjusted for the deprecation no matter the argument style. The required change is fully backwards compatible with Python 2.7 to 3.7. Bottle is such a case that got broken by the deprecation. It does not make sense to default to another hashing algorithm: * This would also break software. Applications would suddenly get a different MAC for the same function call and arguments. * In cryptography the HMAC algorithm is an operation on a key, message, and PRF. Defaulting to MD5 didn't make sense in the first place. * Cryptographic primitives have a 'best before' date. SHA256 might become broken in a decade -- maybe 9 years and 364 days earlier, maybe 20 years later. I don't want to do another deprecation cycle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 12:38:55 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 15 Oct 2019 16:38:55 +0000 Subject: [issue33604] HMAC default to MD5 marked as to be removed in 3.6 In-Reply-To: <1527014760.1.0.682650639539.issue33604@psf.upfronthosting.co.za> Message-ID: <1571157535.69.0.288687646809.issue33604@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +16362 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/16805 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 12:43:50 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 15 Oct 2019 16:43:50 +0000 Subject: [issue33604] HMAC default to MD5 marked as to be removed in 3.6 In-Reply-To: <1527014760.1.0.682650639539.issue33604@psf.upfronthosting.co.za> Message-ID: <1571157830.02.0.572682656765.issue33604@roundup.psfhosted.org> Gregory P. Smith added the comment: Thanks for the feedback. Better late than never. :) A default algorithm is a bad thing when it comes to authentication. Explicit is better than implicit. A default regularly becomes obsolete as math and cryptanalysis methods move forward and need to be changed every unpredictable N years. MD5 was _already_ a bad choice of default when hmac was added in 2.2. That said, we managed this deprecation and API evolution poorly. As it has shipped this way in 3.8, I'm first going to fix the documentation and the exception type (both suitable for 3.8). First PR sent. In 3.9 we could introduce a better named keyword only digest parameter, leaving digestmod supported as a legacy positional & alternate name for backwards incompatibility. (minor code gymnastics required to do that, but within reason) i wouldn't want to remove the digestmod positional/name support until after 3.8 is no longer relevant in the world. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 12:45:14 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 15 Oct 2019 16:45:14 +0000 Subject: [issue33604] HMAC default to MD5 marked as to be removed in 3.6 In-Reply-To: <1527014760.1.0.682650639539.issue33604@psf.upfronthosting.co.za> Message-ID: <1571157914.02.0.930389327713.issue33604@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- assignee: -> gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 12:52:23 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 15 Oct 2019 16:52:23 +0000 Subject: [issue33604] HMAC default to MD5 marked as to be removed in 3.6 In-Reply-To: <1527014760.1.0.682650639539.issue33604@psf.upfronthosting.co.za> Message-ID: <1571158343.93.0.100786510712.issue33604@roundup.psfhosted.org> Gregory P. Smith added the comment: BTW, if you want the type annotation that'd be used for this, 3.8 effectively removes the Optional[] from the one listed in: https://github.com/python/typeshed/blob/master/stdlib/2and3/hmac.pyi#L16 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 13:08:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Oct 2019 17:08:55 +0000 Subject: [issue33342] urllib IPv6 parsing fails with special characters in passwords In-Reply-To: <1524491070.85.0.682650639539.issue33342@psf.upfronthosting.co.za> Message-ID: <1571159335.26.0.288738443785.issue33342@roundup.psfhosted.org> STINNER Victor added the comment: I modified my PR 16780 to also fix this issue, my PR was written for bpo-36338. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 13:08:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Oct 2019 17:08:57 +0000 Subject: [issue36338] urlparse of urllib returns wrong hostname In-Reply-To: <1552896371.92.0.122580708995.issue36338@roundup.psfhosted.org> Message-ID: <1571159337.65.0.0445830916076.issue36338@roundup.psfhosted.org> STINNER Victor added the comment: I modified my PR 16780 to also fix bpo-33342: "urllib IPv6 parsing fails with special characters in passwords". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 13:12:40 2019 From: report at bugs.python.org (Marcos Dione) Date: Tue, 15 Oct 2019 17:12:40 +0000 Subject: [issue38487] expat infinite loop Message-ID: <1571159560.58.0.207422547054.issue38487@roundup.psfhosted.org> New submission from Marcos Dione : I'm trying to add external entities support to xmltodict[1]. For that I extended the handler to have a ExternalEntityRefHandler handler. After reading a couple of files, the script lock in a tight loop. I ran the script with gdb (!!) and found that expat think that two of the parsers are parent of each other. I setup a breakpoint in XML_ExternalEntityParserCreate() (yes, this is expat, I know) right after the new parser uses the old parser as parent (xmlparse.c:1279 in my system). Here are the backtraces and values I found: --- >8 --- landuse-lowzoom None styles-otm/landuse-lowzoom.xml None #0 XML_ExternalEntityParserCreate (oldParser=0xadc4d0, context=context at entry=0x7ffff6c871e0 "landuse-lowzoom", encodingName=encodingName at entry=0x0) at ../../src/lib/xmlparse.c:1281 #1 0x000000000044ec90 in pyexpat_xmlparser_ExternalEntityParserCreate_impl (encoding=0x0, context=0x7ffff6c871e0 "landuse-lowzoom", self=0x7ffff6d556e0) at ../Modules/pyexpat.c:943 #2 pyexpat_xmlparser_ExternalEntityParserCreate (self=0x7ffff6d556e0, args=, nargs=) at ../Modules/clinic/pyexpat.c.h:137 [...] #15 0x000000000044d80d in my_ExternalEntityRefHandler (parser=, context=0xae1d2c "landuse-lowzoom", base=, systemId=, publicId=) at ../Modules/pyexpat.c:659 #16 0x00007ffff7d990c8 in doContent (parser=parser at entry=0xadc4d0, startTagLevel=startTagLevel at entry=0, enc=, s=s at entry=0xae08dd "\n\t `Py_XDECREF(c.c_normalize);` ---------- components: Interpreter Core messages: 355545 nosy: shihai1991 priority: normal severity: normal status: open title: Using Py_XDECREF to replace Py_DECREF in PyAST_FromNodeObject() type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 10:43:22 2019 From: report at bugs.python.org (hai shi) Date: Mon, 28 Oct 2019 14:43:22 +0000 Subject: [issue38616] Using Py_XDECREF to replace Py_DECREF in PyAST_FromNodeObject() In-Reply-To: <1572273667.46.0.78113656156.issue38616@roundup.psfhosted.org> Message-ID: <1572273802.68.0.55547361056.issue38616@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +16490 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16962 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 10:43:52 2019 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 28 Oct 2019 14:43:52 +0000 Subject: [issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default before Python 4.0 In-Reply-To: <1572192430.43.0.755831692199.issue38605@roundup.psfhosted.org> Message-ID: <1572273832.2.0.0244986353243.issue38605@roundup.psfhosted.org> Guido van Rossum added the comment: You can bring the deprecation schedule up on discourse or python-dev so more folks can let us know whether they'd be okay with 3.9 or 3.10. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 10:56:23 2019 From: report at bugs.python.org (hai shi) Date: Mon, 28 Oct 2019 14:56:23 +0000 Subject: [issue38617] Using Py_XINCREF to replace Py_INCREF in PyAST_CompileObject Message-ID: <1572274583.69.0.135811249474.issue38617@roundup.psfhosted.org> New submission from hai shi : 1) param is unpredictable; 2) the compiler_free() use Py_XDECREF(c->c_filename) in PyAST_CompileObject(); ---------- components: Interpreter Core messages: 355547 nosy: shihai1991 priority: normal severity: normal status: open title: Using Py_XINCREF to replace Py_INCREF in PyAST_CompileObject type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 10:59:12 2019 From: report at bugs.python.org (hai shi) Date: Mon, 28 Oct 2019 14:59:12 +0000 Subject: [issue38617] Using Py_XINCREF to replace Py_INCREF in PyAST_CompileObject In-Reply-To: <1572274583.69.0.135811249474.issue38617@roundup.psfhosted.org> Message-ID: <1572274752.79.0.0806699934841.issue38617@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +16491 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16963 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 11:03:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2019 15:03:25 +0000 Subject: [issue38614] test_asyncio: test_communicate() failed on AMD64 FreeBSD Shared 3.8 In-Reply-To: <1572265095.84.0.80833057987.issue38614@roundup.psfhosted.org> Message-ID: <1572275005.44.0.328179801772.issue38614@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +16492 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16964 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 11:08:30 2019 From: report at bugs.python.org (hai shi) Date: Mon, 28 Oct 2019 15:08:30 +0000 Subject: [issue38618] Why not use refcount of c.c_filename in PyAST_FromNodeObject() Message-ID: <1572275310.19.0.141379413528.issue38618@roundup.psfhosted.org> New submission from hai shi : I don't know why don't use refcount ` /* borrowed reference */ c.c_filename = filename; ` in https://github.com/python/cpython/blob/master/Python/ast.c#L786-L787 like ` Py_INCREF(filename); c.c_filename = filename; ` in https://github.com/python/cpython/blob/master/Python/compile.c#L333 ---------- components: Interpreter Core messages: 355548 nosy: shihai1991 priority: normal severity: normal status: open title: Why not use refcount of c.c_filename in PyAST_FromNodeObject() type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 11:11:37 2019 From: report at bugs.python.org (hai shi) Date: Mon, 28 Oct 2019 15:11:37 +0000 Subject: [issue38618] Why not use refcount of c.c_filename in PyAST_FromNodeObject() In-Reply-To: <1572275310.19.0.141379413528.issue38618@roundup.psfhosted.org> Message-ID: <1572275497.31.0.888977568363.issue38618@roundup.psfhosted.org> hai shi added the comment: Due to victor add the desc(`/* borrowed reference */`) so noisy+ victor ;) ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 11:32:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2019 15:32:03 +0000 Subject: [issue38618] Why not use refcount of c.c_filename in PyAST_FromNodeObject() In-Reply-To: <1572275310.19.0.141379413528.issue38618@roundup.psfhosted.org> Message-ID: <1572276723.36.0.91051821254.issue38618@roundup.psfhosted.org> STINNER Victor added the comment: > Due to victor add the desc(`/* borrowed reference */`) I added the comment, but the code was always like that. In short, borrowed references are used to simply the implementation (avoid the need to DECREF on error) and/or for efficiency. I don't understand the purpose of this issue. The bug tracker is not the right place to ask question. If you think that it's a bug, please explain how to trigger the bug. I suggest to close the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 11:38:40 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Oct 2019 15:38:40 +0000 Subject: [issue38618] Why not use refcount of c.c_filename in PyAST_FromNodeObject() In-Reply-To: <1572275310.19.0.141379413528.issue38618@roundup.psfhosted.org> Message-ID: <1572277120.61.0.946653007239.issue38618@roundup.psfhosted.org> Serhiy Storchaka added the comment: Because there is no need to use refcount. And there is no need to use refcount in compile.c too. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 11:46:29 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Oct 2019 15:46:29 +0000 Subject: [issue38617] Using Py_XINCREF to replace Py_INCREF in PyAST_CompileObject In-Reply-To: <1572274583.69.0.135811249474.issue38617@roundup.psfhosted.org> Message-ID: <1572277589.7.0.858485704694.issue38617@roundup.psfhosted.org> Serhiy Storchaka added the comment: The filename argument must be non-NULL. The code that uses c_filename requires this. Py_XDECREF in compiler_free() could be replaced with Py_DECREF. But this is too tiny change which does not have significant effect. Actually both Py_INCREF and Py_XDECREF could be removed. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 11:50:18 2019 From: report at bugs.python.org (Felipe) Date: Mon, 28 Oct 2019 15:50:18 +0000 Subject: [issue38619] [Doc] UUID.hex is lowercase Message-ID: <1572277818.51.0.346216542748.issue38619@roundup.psfhosted.org> New submission from Felipe : The hex property of `UUID` is implemented as `'%032x' % self.int` Is it specified that this will always be lowercase? If so, can we add a note to the documentation indicating so? ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 355553 nosy: docs at python, fov priority: normal severity: normal status: open title: [Doc] UUID.hex is lowercase type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 11:53:30 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Oct 2019 15:53:30 +0000 Subject: [issue38616] Using Py_XDECREF to replace Py_DECREF in PyAST_FromNodeObject() In-Reply-To: <1572273667.46.0.78113656156.issue38616@roundup.psfhosted.org> Message-ID: <1572278010.24.0.132329890936.issue38616@roundup.psfhosted.org> Serhiy Storchaka added the comment: Both code are equivalent. There is reason to rewrite this. It would just increase code churn. ---------- nosy: +serhiy.storchaka resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 11:58:09 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Oct 2019 15:58:09 +0000 Subject: [issue38619] [Doc] UUID.hex is lowercase In-Reply-To: <1572277818.51.0.346216542748.issue38619@roundup.psfhosted.org> Message-ID: <1572278289.87.0.386584277102.issue38619@roundup.psfhosted.org> Serhiy Storchaka added the comment: There are examples which show the hex is lowercase. I do not think a special note is needed. All conversions to hex are lowercase by default. If you need uppercase, you can use str.upper(). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 11:58:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2019 15:58:59 +0000 Subject: [issue28029] Replace and empty strings In-Reply-To: <1473366641.62.0.989746465638.issue28029@psf.upfronthosting.co.za> Message-ID: <1572278339.52.0.223235128078.issue28029@roundup.psfhosted.org> STINNER Victor added the comment: The current behavior is really surprising. >>> "".replace("", "|") '|' >>> "".replace("", "|", -1) '|' vs >>> "".replace("", "|", 0) '' >>> "".replace("", "|", 1) '' >>> "".replace("", "|", 1000) '' I always expect "|". --- This behavior makes sense to me: >>> "abc".replace("", "|") '|a|b|c|' >>> "abc".replace("", "|", -1) '|a|b|c|' >>> "abc".replace("", "|", 0) 'abc' >>> "abc".replace("", "|", 1) '|abc' >>> "abc".replace("", "|", 100) '|a|b|c|' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 11:59:23 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Oct 2019 15:59:23 +0000 Subject: [issue38617] Using Py_XINCREF to replace Py_INCREF in PyAST_CompileObject In-Reply-To: <1572274583.69.0.135811249474.issue38617@roundup.psfhosted.org> Message-ID: <1572278363.6.0.681157776189.issue38617@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 12:04:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2019 16:04:27 +0000 Subject: [issue35448] ConfigParser .read() - handling of nonexistent files In-Reply-To: <1544373330.85.0.788709270274.issue35448@psf.upfronthosting.co.za> Message-ID: <1572278667.74.0.298450691583.issue35448@roundup.psfhosted.org> STINNER Victor added the comment: > I would expect that this basic usage is very popular. If the file doesn't exist, the normal usage pattern fails in a confusing way: (...) Well, the configparser is well defined. As you wrote: "If a file named in filenames cannot be opened, that file will be ignored." You can check if the file exists or not by checking read() result: "read(): (...) returning a list of filenames which were successfully parsed." https://docs.python.org/dev/library/configparser.html#configparser.ConfigParser.read I suggest to close this issue as "not a bug". -- For me, a better option would be to be able to pass an open file to configparser. So the caller can decide how to handle the open() error. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 12:07:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2019 16:07:24 +0000 Subject: [issue28029] Replace and empty strings In-Reply-To: <1473366641.62.0.989746465638.issue28029@psf.upfronthosting.co.za> Message-ID: <1572278844.54.0.116520895743.issue28029@roundup.psfhosted.org> STINNER Victor added the comment: Well, in fact, I would expect that "".replace(...) would always return "": for any argument passed to replace(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 12:16:57 2019 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 28 Oct 2019 16:16:57 +0000 Subject: [issue37948] get_type_hints fails if there are un-annotated fields in a dataclass In-Reply-To: <1566800952.19.0.982220665774.issue37948@roundup.psfhosted.org> Message-ID: <1572279417.21.0.734134208431.issue37948@roundup.psfhosted.org> Eric V. Smith added the comment: I'm not sure what can be done with this. The problem is that the decorator doesn't know what's in the caller's namespace. The type being added is "typing.Any". If the caller doesn't import typing, then get_type_hints will fail (as demonstrated here). The only thing I can think of is using a type that's in builtins. "object" springs to mine, but of course that's semantically incorrect. Or, maybe I could use "dataclasses.sys.modules['typing'].Any". I don't currently import sys (I don't think), but this should be a cheap import. Then if typing.get_type_hints() is called, we know typing will have already been importing. But what if "dataclasses" isn't in the caller's namespace? I guess if I could find some way to navigate to sys.modules from __builtins__, that would largely work, absent playing games with builtins. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 12:17:21 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Oct 2019 16:17:21 +0000 Subject: [issue35448] ConfigParser .read() - handling of nonexistent files In-Reply-To: <1544373330.85.0.788709270274.issue35448@psf.upfronthosting.co.za> Message-ID: <1572279441.56.0.278766979231.issue35448@roundup.psfhosted.org> Serhiy Storchaka added the comment: > There is a use case of this (which some of tools depends) about checking if configuration exists and if not, raising an error. Now, they can solve this by just adding check_exist argument. No, it can be solved by using open() and read_file(). It can also be solved by checking the result of read(), as Victor suggested. Your proposition adds third way, but unlike to the first two it could be used only in new Python versions. > Can you give an example of how this feature can/could break existing code? You pass a list containing user configuration path, system-wide configuration path, and default configuration path (it can contain also per-directory configuration path). At first run of your program there is no user configuration file. > For me, a better option would be to be able to pass an open file to configparser. So the caller can decide how to handle the open() error. There is the read_file() method which accept an open file. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 12:17:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2019 16:17:26 +0000 Subject: [issue38620] Shell python-config --includes returns the same path twice Message-ID: <1572279446.17.0.15456686003.issue38620@roundup.psfhosted.org> New submission from STINNER Victor : When the shell script implementation of python-config was introduced, $PLATINCDIR variable was added: commit 874211978c8097b8e747c90fa3ff41aacabe340f Author: doko at python.org Date: Sat Jan 26 11:39:31 2013 +0100 - Issue #16235: Implement python-config as a shell script. ... +INCDIR="-I$includedir/python${VERSION}${ABIFLAGS}" +PLATINCDIR="-I$includedir/python${VERSION}${ABIFLAGS}" ... + --includes) + echo "$INCDIR $PLATINCDIR" + ;; + --cflags) + echo "$INCDIR $PLATINCDIR $BASECFLAGS $CFLAGS $OPT" + ;; ... But this variable is always equal to $INCDIR: it doesn't seem possible to change its value. What is the purpose of emitting the same path twice? Example on Fedora 30: $ file /usr/bin/python3.8-x86_64-config /usr/bin/python3.8-x86_64-config: a /usr/bin/sh script, .. $ /usr/bin/python3.8-x86_64-config --includes -I/usr/include/python3.8 -I/usr/include/python3.8 => /usr/include/python3.8 is giving twice ---------- components: Build messages: 355561 nosy: doko, vstinner priority: normal severity: normal status: open title: Shell python-config --includes returns the same path twice versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 12:19:29 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Oct 2019 16:19:29 +0000 Subject: [issue28029] Replace and empty strings In-Reply-To: <1473366641.62.0.989746465638.issue28029@psf.upfronthosting.co.za> Message-ID: <1572279569.41.0.736136089817.issue28029@roundup.psfhosted.org> Serhiy Storchaka added the comment: What result would you expect of `"" in ""` and `"".count("")`? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 12:24:43 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Mon, 28 Oct 2019 16:24:43 +0000 Subject: [issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence In-Reply-To: <1569930991.59.0.212656372364.issue38336@roundup.psfhosted.org> Message-ID: <1572279883.09.0.46815141336.issue38336@roundup.psfhosted.org> Change by G?ry : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 12:42:22 2019 From: report at bugs.python.org (hai shi) Date: Mon, 28 Oct 2019 16:42:22 +0000 Subject: [issue38617] Using Py_XINCREF to replace Py_INCREF in PyAST_CompileObject In-Reply-To: <1572274583.69.0.135811249474.issue38617@roundup.psfhosted.org> Message-ID: <1572280942.63.0.850312740823.issue38617@roundup.psfhosted.org> hai shi added the comment: Got it, thanks, Serhiy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 12:47:43 2019 From: report at bugs.python.org (Fred Drake) Date: Mon, 28 Oct 2019 16:47:43 +0000 Subject: [issue38621] Bad decoding of encoded-words in unstructured email headers Message-ID: <1572281263.86.0.289924184677.issue38621@roundup.psfhosted.org> New submission from Fred Drake : I've encountered a problem parsing an email with this Subject: header: Subject: Be sure to redeem your =?utf-8?Q?$?=201.71 credit card reward certificate by the end of the year email._header_value_parser.get_unstructured defers to get_encoded_word, passing the argument '=?utf-8?Q?$?=201.71 credit card reward certificate by the end of the year' get_encoded_word eventually calls email._encoded_words.decode with the argument '=?utf-8?Q?$?=201.71 credit card reward certificate by the end of the year?=' This doesn't seem right, but I'm unsure of the syntactic priority of =XX and ?= in this case. The policy for this is email.policy.SMTP + email.policy.strict (not sure if that's ideal; I'm retrieving messages from mbox files and over IMAP). ---------- assignee: r.david.murray messages: 355564 nosy: barry, fdrake, r.david.murray priority: normal severity: normal status: open title: Bad decoding of encoded-words in unstructured email headers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 12:49:11 2019 From: report at bugs.python.org (Fred Drake) Date: Mon, 28 Oct 2019 16:49:11 +0000 Subject: [issue38621] Bad decoding of encoded-words in unstructured email headers In-Reply-To: <1572281263.86.0.289924184677.issue38621@roundup.psfhosted.org> Message-ID: <1572281351.95.0.840110786703.issue38621@roundup.psfhosted.org> Fred Drake added the comment: It's worth noting that dealing with this header eventually causes the header parser to enter an infinite loop. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 12:50:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2019 16:50:02 +0000 Subject: [issue28029] Replace and empty strings In-Reply-To: <1473366641.62.0.989746465638.issue28029@psf.upfronthosting.co.za> Message-ID: <1572281402.72.0.915493421409.issue28029@roundup.psfhosted.org> STINNER Victor added the comment: > What result would you expect of `"" in ""` and `"".count("")`? I don't suggest to change these operator and method: >>> "" in "" True >>> "".count("") 1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 12:51:07 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 28 Oct 2019 16:51:07 +0000 Subject: [issue38621] Bad decoding of encoded-words in unstructured email headers In-Reply-To: <1572281263.86.0.289924184677.issue38621@roundup.psfhosted.org> Message-ID: <1572281467.13.0.736031558631.issue38621@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +maxking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 12:55:30 2019 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 28 Oct 2019 16:55:30 +0000 Subject: [issue38619] [Doc] UUID.hex is lowercase In-Reply-To: <1572277818.51.0.346216542748.issue38619@roundup.psfhosted.org> Message-ID: <1572281730.29.0.718848220449.issue38619@roundup.psfhosted.org> Eric V. Smith added the comment: Yes, it's always guaranteed to be lowercase. I don't think it would hurt to mention lowercase briefly (like add just one word!). ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:03:37 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 Oct 2019 17:03:37 +0000 Subject: [issue38519] Internal include files missing on Windows In-Reply-To: <1571423438.26.0.118785392888.issue38519@roundup.psfhosted.org> Message-ID: <1572282217.21.0.419643301949.issue38519@roundup.psfhosted.org> Steve Dower added the comment: New changeset edb172a87296d9359593a23cd9a09f5867ea1f0e by Steve Dower (Zackery Spytz) in branch 'master': bpo-38519: Internal include files missing on Windows (GH-16921) https://github.com/python/cpython/commit/edb172a87296d9359593a23cd9a09f5867ea1f0e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:04:04 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 28 Oct 2019 17:04:04 +0000 Subject: [issue38519] Internal include files missing on Windows In-Reply-To: <1571423438.26.0.118785392888.issue38519@roundup.psfhosted.org> Message-ID: <1572282244.15.0.534713251271.issue38519@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16493 pull_request: https://github.com/python/cpython/pull/16966 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:06:14 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 28 Oct 2019 17:06:14 +0000 Subject: [issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default before Python 4.0 In-Reply-To: <1572192430.43.0.755831692199.issue38605@roundup.psfhosted.org> Message-ID: <1572282374.49.0.310286917953.issue38605@roundup.psfhosted.org> Change by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:06:36 2019 From: report at bugs.python.org (hai shi) Date: Mon, 28 Oct 2019 17:06:36 +0000 Subject: [issue38618] Why not use refcount of c.c_filename in PyAST_FromNodeObject() In-Reply-To: <1572275310.19.0.141379413528.issue38618@roundup.psfhosted.org> Message-ID: <1572282396.81.0.703155482715.issue38618@roundup.psfhosted.org> hai shi added the comment: > I don't understand the purpose of this issue. The bug tracker is not the right place to ask question. If you think that it's a bug, please explain how to trigger the bug. Hi, victor. What i want to express is that the refcount operation of filename should be same between ast.c and compile.c. I am not sure i express it clearly. If the refcount of filename in ast.c is redundant as Serhiy said, maybe we should remove it? Hm, If we think it's fine, just keep it, i will close it soon. And pls forgive me adding a noisy bpo again ;( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:15:46 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 28 Oct 2019 17:15:46 +0000 Subject: [issue38593] Python 3.7 does not catch infinite recursion for some values of sys.getrecursionlimit() In-Reply-To: <1572040268.11.0.31838216135.issue38593@roundup.psfhosted.org> Message-ID: <1572282946.54.0.430921592884.issue38593@roundup.psfhosted.org> Brett Cannon added the comment: Can you provide a small reproducer? Otherwise the recursion check is mostly best effort if you have recursion in C code which never goes out to Python code where the recursion check is implemented. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:17:46 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 28 Oct 2019 17:17:46 +0000 Subject: [issue38611] ElementTree.ParseError does not implement SyntaxError interface as expected In-Reply-To: <1572253875.02.0.816082787085.issue38611@roundup.psfhosted.org> Message-ID: <1572283066.42.0.549290371107.issue38611@roundup.psfhosted.org> Change by Brett Cannon : ---------- title: Bug in traceback.py -> ElementTree.ParseError does not implement SyntaxError interface as expected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:23:13 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 28 Oct 2019 17:23:13 +0000 Subject: [issue38519] Internal include files missing on Windows In-Reply-To: <1571423438.26.0.118785392888.issue38519@roundup.psfhosted.org> Message-ID: <1572283393.26.0.571224958602.issue38519@roundup.psfhosted.org> miss-islington added the comment: New changeset 07eee640cb3a4eaf1df942bc31a891e7517de763 by Miss Skeleton (bot) in branch '3.8': bpo-38519: Internal include files missing on Windows (GH-16921) https://github.com/python/cpython/commit/07eee640cb3a4eaf1df942bc31a891e7517de763 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:25:43 2019 From: report at bugs.python.org (daniel hahler) Date: Mon, 28 Oct 2019 17:25:43 +0000 Subject: [issue17446] doctest test finder doesnt find line numbers of properties In-Reply-To: <1363536507.07.0.43500928967.issue17446@psf.upfronthosting.co.za> Message-ID: <1572283543.16.0.159161563283.issue17446@roundup.psfhosted.org> daniel hahler added the comment: The PR appears to need a better test according to https://github.com/python/cpython/pull/3419#issuecomment-350570083. ---------- nosy: +blueyed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:28:33 2019 From: report at bugs.python.org (Anthony Sottile) Date: Mon, 28 Oct 2019 17:28:33 +0000 Subject: [issue37330] open(): remove 'U' mode, deprecated since Python 3.3 In-Reply-To: <1560872905.7.0.609892598407.issue37330@roundup.psfhosted.org> Message-ID: <1572283713.08.0.936670861873.issue37330@roundup.psfhosted.org> Anthony Sottile added the comment: should we backport a documentation change for this? (the deprecatedremoved says 4.0 currently) ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:33:52 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 Oct 2019 17:33:52 +0000 Subject: [issue38453] ntpath.realpath() does not fully resolve relative paths In-Reply-To: <1570832840.2.0.910161330311.issue38453@roundup.psfhosted.org> Message-ID: <1572284032.4.0.857388959357.issue38453@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +16494 pull_request: https://github.com/python/cpython/pull/16967 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:35:38 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 Oct 2019 17:35:38 +0000 Subject: [issue38453] ntpath.realpath() does not fully resolve relative paths In-Reply-To: <1570832840.2.0.910161330311.issue38453@roundup.psfhosted.org> Message-ID: <1572284138.42.0.184152586025.issue38453@roundup.psfhosted.org> Steve Dower added the comment: PR 16967 should fix the relative path resolution property, by joining with cwd if the original path is unprefixed and not absolute, and then joining with any symlink directories if their link is not absolute. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:44:02 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 Oct 2019 17:44:02 +0000 Subject: [issue38453] ntpath.realpath() does not fully resolve relative paths In-Reply-To: <1570832840.2.0.910161330311.issue38453@roundup.psfhosted.org> Message-ID: <1572284642.64.0.270587416668.issue38453@roundup.psfhosted.org> Steve Dower added the comment: I also had to special-case "realpath('nul')" to maintain the behaviour that we deliberately maintained in another bug, and I think isabs() should always return true for "\\?\" prefixed paths (given that join() will promote a "\\?\" prefixed path to the root). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:49:28 2019 From: report at bugs.python.org (Fred Drake) Date: Mon, 28 Oct 2019 17:49:28 +0000 Subject: [issue38619] [Doc] UUID.hex is lowercase In-Reply-To: <1572277818.51.0.346216542748.issue38619@roundup.psfhosted.org> Message-ID: <1572284968.82.0.156074096824.issue38619@roundup.psfhosted.org> Fred Drake added the comment: While I don't know Felipe's use case, I would expect the documentation to be clear that the representation won't change in the future so users will know that this can be relied on to generate keys into some other persistent structure. ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:49:33 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 Oct 2019 17:49:33 +0000 Subject: [issue38589] Bad target address assigned in Python Manuals shortcut on Python installation In-Reply-To: <1572010579.06.0.155387350533.issue38589@roundup.psfhosted.org> Message-ID: <1572284973.14.0.610771086542.issue38589@roundup.psfhosted.org> Steve Dower added the comment: Thanks. Turns out it's a typo that's been around forever, but is really not obvious until you install Windows somewhere other than C:\Windows. Apparently that's far less common than it used to be :) We'll get it fixed in the next round of releases. ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:50:37 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 Oct 2019 17:50:37 +0000 Subject: [issue38589] Bad target address assigned in Python Manuals shortcut on Python installation In-Reply-To: <1572010579.06.0.155387350533.issue38589@roundup.psfhosted.org> Message-ID: <1572285037.82.0.685815566087.issue38589@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +16495 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16968 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:52:12 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 Oct 2019 17:52:12 +0000 Subject: [issue38597] C Extension import limit In-Reply-To: <1572119300.64.0.0138111717141.issue38597@roundup.psfhosted.org> Message-ID: <1572285132.58.0.428157491474.issue38597@roundup.psfhosted.org> Steve Dower added the comment: There is an implicit cap due to the C runtime (specifically vcruntime140.dll) allocating fibre local storage on load, which seems like the one you are hitting. However, we discovered this before the first 3.5 release and fixed it. How are you compiling your packages? Or where are you getting them from? It's possible that someone else is building and statically linking the C runtime, which will cause this, but distutils (and hence CPython) should not be doing it by default. ---------- components: +Distutils nosy: +dstufft, eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:53:54 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 Oct 2019 17:53:54 +0000 Subject: [issue38534] Version 3.8.0 has released with a wrong MS KB number reference In-Reply-To: <1571558364.86.0.253246786334.issue38534@roundup.psfhosted.org> Message-ID: <1572285234.43.0.875105531065.issue38534@roundup.psfhosted.org> Steve Dower added the comment: New changeset 794616f837c254c68d8384ab48fb78123a3c8a8b by Steve Dower (benedwards14) in branch 'master': bpo-38534: Replace wrong KB number references (GH-16955) https://github.com/python/cpython/commit/794616f837c254c68d8384ab48fb78123a3c8a8b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:54:10 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 28 Oct 2019 17:54:10 +0000 Subject: [issue38534] Version 3.8.0 has released with a wrong MS KB number reference In-Reply-To: <1571558364.86.0.253246786334.issue38534@roundup.psfhosted.org> Message-ID: <1572285250.69.0.733408313103.issue38534@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16496 pull_request: https://github.com/python/cpython/pull/16969 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 13:54:55 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 Oct 2019 17:54:55 +0000 Subject: [issue38534] Version 3.8.0 has released with a wrong MS KB number reference In-Reply-To: <1571558364.86.0.253246786334.issue38534@roundup.psfhosted.org> Message-ID: <1572285295.37.0.910323980411.issue38534@roundup.psfhosted.org> Steve Dower added the comment: Thanks for the fix! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 14:00:37 2019 From: report at bugs.python.org (Ashley Whetter) Date: Mon, 28 Oct 2019 18:00:37 +0000 Subject: [issue34938] Fix mimetype.init() to account for from import In-Reply-To: <1539036789.21.0.545547206417.issue34938@psf.upfronthosting.co.za> Message-ID: <1572285637.29.0.702469430805.issue34938@roundup.psfhosted.org> Ashley Whetter added the comment: Maybe updating the dictionaries isn't right at all. I think if you were experienced enough you would have the intuition that mutable attributes like this are not going to change in your local scope if you import them into it. But relying on this knowledge makes it difficult for newer users. Plus we all make mistakes ;) So a note in the docs sounds like a good idea to me. I think `init` does rebuild when `files` is `None` (https://github.com/python/cpython/blob/edb172a87296d9359593a23cd9a09f5867ea1f0e/Lib/mimetypes.py#L350) but it's not clear to me whether rebuilding should include any additional types registered with `add_type`. At the moment it says `the mapping will be added to the official MIME types`, but I think an additional note that this means that it will persist after subsequent calls to `init` would make that clear. As for importing `init` into the local scope, I think ideally we wouldn't use `global` at all. We should be able to make `init` import `mimetypes` locally and explicitly access attributes on the module? Another option is we make the module attributes accessible through a module level `__getattr__` which gets the attributes off of the global `Mimetypes` object stored in `mimetypes._db`. But that would still require usage of a `global _db`. ---------- nosy: +AWhetter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 14:15:27 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 28 Oct 2019 18:15:27 +0000 Subject: [issue38534] Version 3.8.0 has released with a wrong MS KB number reference In-Reply-To: <1571558364.86.0.253246786334.issue38534@roundup.psfhosted.org> Message-ID: <1572286527.11.0.312024245292.issue38534@roundup.psfhosted.org> miss-islington added the comment: New changeset a4ee7abd2056c4956df45125fcf451a531247017 by Miss Skeleton (bot) in branch '3.8': bpo-38534: Replace wrong KB number references (GH-16955) https://github.com/python/cpython/commit/a4ee7abd2056c4956df45125fcf451a531247017 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 14:18:57 2019 From: report at bugs.python.org (tholl) Date: Mon, 28 Oct 2019 18:18:57 +0000 Subject: [issue38622] _ctypes.dlsym (py_dl_sym) does not trigger audit hooks Message-ID: <1572286737.48.0.245277798688.issue38622@roundup.psfhosted.org> New submission from tholl : The dlsym operation generally (e.g. when done through a ctypes.CDLL object) triggers the "ctypes.dlsym" audit event. However, using _ctypes.dlsym directly does not trigger this event. This appears to be an oversight, given that _ctypes.dlopen *does* trigger the "ctypes.dlopen" audit event. A (very minimal) patch is attached. I was not entirely sure what format the DLL handle should take when it is passed to the audit function, so for now it just turns it back into a number via PyLong_FromVoidPtr (i.e. into the same format in which it is passed into _ctypes.dlsym in the first place). ---------- components: Extension Modules files: audit.patch keywords: patch messages: 355583 nosy: tholl priority: normal severity: normal status: open title: _ctypes.dlsym (py_dl_sym) does not trigger audit hooks versions: Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48684/audit.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 14:30:27 2019 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 28 Oct 2019 18:30:27 +0000 Subject: [issue38615] imaplib has no timeout setting In-Reply-To: <1572271081.51.0.380114547236.issue38615@roundup.psfhosted.org> Message-ID: <1572287427.65.0.324469645734.issue38615@roundup.psfhosted.org> Eric V. Smith added the comment: I think this is a reasonable request. It would have to be a 3.9 feature. Perhaps some code (and tests) can be stolen from poplib. ---------- nosy: +eric.smith stage: -> needs patch versions: -Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 14:34:18 2019 From: report at bugs.python.org (Netzeband) Date: Mon, 28 Oct 2019 18:34:18 +0000 Subject: [issue37838] typing.get_type_hints not working with forward-declaration and decorated functions In-Reply-To: <1565692979.16.0.678723196671.issue37838@roundup.psfhosted.org> Message-ID: <1572287658.32.0.774347193333.issue37838@roundup.psfhosted.org> Netzeband added the comment: Hello, I'm very sorry, I was not able to find the time to finish the patch in the quality I wanted to have. So @benedwards14 please feel free to provide a pull request. Best regards, Andr? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 14:35:53 2019 From: report at bugs.python.org (Ian Good) Date: Mon, 28 Oct 2019 18:35:53 +0000 Subject: [issue34975] start_tls() difficult when using asyncio.start_server() In-Reply-To: <1539460993.6.0.788709270274.issue34975@psf.upfronthosting.co.za> Message-ID: <1572287753.85.0.579357906586.issue34975@roundup.psfhosted.org> Ian Good added the comment: #36889 was reverted, so this is not resolved. I'm guessing this needs to be moved to 3.9 now too. Is my original PR worth revisiting? https://github.com/python/cpython/pull/13143/files ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 14:49:42 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 28 Oct 2019 18:49:42 +0000 Subject: [issue34975] start_tls() difficult when using asyncio.start_server() In-Reply-To: <1539460993.6.0.788709270274.issue34975@psf.upfronthosting.co.za> Message-ID: <1572288582.36.0.178398540619.issue34975@roundup.psfhosted.org> Andrew Svetlov added the comment: I think it should be closed; Yuri thinks that current streams API is frozen for the sake of shiny brand new streams (don't exist yet). ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 14:54:43 2019 From: report at bugs.python.org (Berry Schoenmakers) Date: Mon, 28 Oct 2019 18:54:43 +0000 Subject: [issue38599] Deprecate creation of asyncio object when the loop is not running In-Reply-To: <1572160085.79.0.39835517746.issue38599@roundup.psfhosted.org> Message-ID: <1572288883.03.0.566974288324.issue38599@roundup.psfhosted.org> Berry Schoenmakers added the comment: The current implementation of asyncio.run() is focused quite a bit on one-shot use. After the call returns, the default event loop is even gone: calling asyncio.get_event_loop() gives "RuntimeError: There is no current event loop in thread 'MainThread'." It would be nice if asyncio.run() uses the default loop if it's available (and not running), and that the default loop remains intact after the call returns. This way multiple calls to asyncio.run() that all use the default loop are supported, maybe using an asyncio.Queue (or whatever) across these calls---attaching everything to the same (default) loop. I find this very useful, for instance when writing unit tests. ---------- nosy: +lschoe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 15:07:49 2019 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 Oct 2019 19:07:49 +0000 Subject: [issue38599] Deprecate creation of asyncio object when the loop is not running In-Reply-To: <1572160085.79.0.39835517746.issue38599@roundup.psfhosted.org> Message-ID: <1572289669.74.0.542530747409.issue38599@roundup.psfhosted.org> Yury Selivanov added the comment: > It would be nice if asyncio.run() uses the default loop if it's available (and not running), and that the default loop remains intact after the call returns. Unfortunately it's not possible to implement that reliably and without a bunch of surprising behaviors. Also, if you want the loop to be intact after asyncio.run, it means that you would not want to close it;that would defeat the purpose of asyncio.run. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 15:29:55 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 28 Oct 2019 19:29:55 +0000 Subject: [issue35448] ConfigParser .read() - handling of nonexistent files In-Reply-To: <1544373330.85.0.788709270274.issue35448@psf.upfronthosting.co.za> Message-ID: <1572290995.23.0.568961321225.issue35448@roundup.psfhosted.org> Terry J. Reedy added the comment: FWIW, I agree with closing this. I already changed my mind from my earlier comment and decided that IDLE should maybe switch to using open and read_file in different places, for the reasons given above. It might make testing without depending on a local config, which does not exist on buildbots, easier. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 16:13:04 2019 From: report at bugs.python.org (Larry Hastings) Date: Mon, 28 Oct 2019 20:13:04 +0000 Subject: [issue31026] test_dbm fails when run directly In-Reply-To: <1500984617.08.0.739686632306.issue31026@psf.upfronthosting.co.za> Message-ID: <1572293584.84.0.881731683905.issue31026@roundup.psfhosted.org> Larry Hastings added the comment: For what it's worth, I'm cherry-picking this back into 3.5 for 3.5.8 final. I (finally?) got bit by this, and since the patch is literally only changes in the Lib/test directory I consider it safe to merge even after 3.5.8rc2. (I was in a bit of a hurry, I didn't use the Python cherry picker technology, I just used "git cherry-pick".) ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 16:20:33 2019 From: report at bugs.python.org (Cooper Lees) Date: Mon, 28 Oct 2019 20:20:33 +0000 Subject: [issue38483] [venv] Add ~/.venvrc to change module defaults In-Reply-To: <1571136700.53.0.3102397559.issue38483@roundup.psfhosted.org> Message-ID: <1572294033.33.0.0672827750554.issue38483@roundup.psfhosted.org> Cooper Lees added the comment: Updated PR to use venv.ini. Will fix any CI errors encountered. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 16:46:16 2019 From: report at bugs.python.org (Phil Connell) Date: Mon, 28 Oct 2019 20:46:16 +0000 Subject: [issue32092] mock.patch with autospec does not consume self / cls argument In-Reply-To: <1511193021.31.0.213398074469.issue32092@psf.upfronthosting.co.za> Message-ID: <1572295576.26.0.711385757982.issue32092@roundup.psfhosted.org> Change by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 16:47:46 2019 From: report at bugs.python.org (Phil Connell) Date: Mon, 28 Oct 2019 20:47:46 +0000 Subject: [issue38091] Import deadlock detection causes deadlock In-Reply-To: <1568122000.74.0.240735069302.issue38091@roundup.psfhosted.org> Message-ID: <1572295666.02.0.305221173927.issue38091@roundup.psfhosted.org> Change by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 16:47:39 2019 From: report at bugs.python.org (Phil Connell) Date: Mon, 28 Oct 2019 20:47:39 +0000 Subject: [issue7897] Support parametrized tests in unittest In-Reply-To: <1265768482.24.0.694001982317.issue7897@psf.upfronthosting.co.za> Message-ID: <1572295659.89.0.636641870989.issue7897@roundup.psfhosted.org> Change by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 16:47:42 2019 From: report at bugs.python.org (Phil Connell) Date: Mon, 28 Oct 2019 20:47:42 +0000 Subject: [issue38384] An assertion failure in test_pickle In-Reply-To: <1570369149.47.0.841206648458.issue38384@roundup.psfhosted.org> Message-ID: <1572295662.79.0.811247088692.issue38384@roundup.psfhosted.org> Change by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 16:47:37 2019 From: report at bugs.python.org (Phil Connell) Date: Mon, 28 Oct 2019 20:47:37 +0000 Subject: [issue38122] AsyncMock force always creating an AsyncMock for child mocks In-Reply-To: <1568222694.73.0.217906468671.issue38122@roundup.psfhosted.org> Message-ID: <1572295657.26.0.909571910966.issue38122@roundup.psfhosted.org> Change by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 16:48:21 2019 From: report at bugs.python.org (Phil Connell) Date: Mon, 28 Oct 2019 20:48:21 +0000 Subject: [issue18108] shutil.chown should support dir_fd and follow_symlinks keyword arguments In-Reply-To: <1370005797.04.0.715885093574.issue18108@psf.upfronthosting.co.za> Message-ID: <1572295701.7.0.608018075286.issue18108@roundup.psfhosted.org> Change by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 16:48:12 2019 From: report at bugs.python.org (Phil Connell) Date: Mon, 28 Oct 2019 20:48:12 +0000 Subject: [issue30587] Mock with spec object does not ensure method call signatures In-Reply-To: <1496837046.98.0.920527641247.issue30587@psf.upfronthosting.co.za> Message-ID: <1572295692.52.0.293132995402.issue30587@roundup.psfhosted.org> Change by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 16:47:49 2019 From: report at bugs.python.org (Phil Connell) Date: Mon, 28 Oct 2019 20:47:49 +0000 Subject: [issue38505] Mock.call_args and Mock.call_args_list not propagated to parent Mock In-Reply-To: <1571315034.98.0.296986686038.issue38505@roundup.psfhosted.org> Message-ID: <1572295669.34.0.499528936731.issue38505@roundup.psfhosted.org> Change by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 16:48:16 2019 From: report at bugs.python.org (Phil Connell) Date: Mon, 28 Oct 2019 20:48:16 +0000 Subject: [issue37052] Add examples for mocking async for and async context manager in unittest.mock docs In-Reply-To: <1558857063.08.0.951093658338.issue37052@roundup.psfhosted.org> Message-ID: <1572295696.35.0.796008227417.issue37052@roundup.psfhosted.org> Change by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 16:48:08 2019 From: report at bugs.python.org (Phil Connell) Date: Mon, 28 Oct 2019 20:48:08 +0000 Subject: [issue38494] Add assert_not_called_with In-Reply-To: <1571206970.26.0.707248566898.issue38494@roundup.psfhosted.org> Message-ID: <1572295688.44.0.631161841214.issue38494@roundup.psfhosted.org> Change by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 16:48:25 2019 From: report at bugs.python.org (Phil Connell) Date: Mon, 28 Oct 2019 20:48:25 +0000 Subject: [issue23882] unittest discovery doesn't detect namespace packages when given no parameters In-Reply-To: <1428406596.02.0.0629964312505.issue23882@psf.upfronthosting.co.za> Message-ID: <1572295705.83.0.41608881317.issue23882@roundup.psfhosted.org> Change by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 16:48:31 2019 From: report at bugs.python.org (Phil Connell) Date: Mon, 28 Oct 2019 20:48:31 +0000 Subject: [issue25299] argparse: TypeError: __init__() takes at least 4 arguments (4 given) In-Reply-To: <1443785146.27.0.85852377889.issue25299@psf.upfronthosting.co.za> Message-ID: <1572295711.12.0.427284914817.issue25299@roundup.psfhosted.org> Change by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 16:48:34 2019 From: report at bugs.python.org (Phil Connell) Date: Mon, 28 Oct 2019 20:48:34 +0000 Subject: [issue35617] unittest discover does not work with implicit namespaces In-Reply-To: <1546162337.0.0.646769357962.issue35617@roundup.psfhosted.org> Message-ID: <1572295714.58.0.299490103359.issue35617@roundup.psfhosted.org> Change by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 16:48:40 2019 From: report at bugs.python.org (Phil Connell) Date: Mon, 28 Oct 2019 20:48:40 +0000 Subject: [issue36723] Unittest Discovery for namespace subpackages dot notation fails In-Reply-To: <1556219043.29.0.793780129066.issue36723@roundup.psfhosted.org> Message-ID: <1572295720.2.0.136796967772.issue36723@roundup.psfhosted.org> Change by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 16:48:53 2019 From: report at bugs.python.org (Phil Connell) Date: Mon, 28 Oct 2019 20:48:53 +0000 Subject: [issue25597] unittest.mock does not wrap dunder methods (__getitem__ etc) In-Reply-To: <1447174958.96.0.448093662654.issue25597@psf.upfronthosting.co.za> Message-ID: <1572295733.98.0.783930463985.issue25597@roundup.psfhosted.org> Change by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 17:27:58 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Oct 2019 21:27:58 +0000 Subject: [issue38494] Add assert_not_called_with In-Reply-To: <1571206970.26.0.707248566898.issue38494@roundup.psfhosted.org> Message-ID: <1572298078.52.0.893596759351.issue38494@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 17:34:31 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 Oct 2019 21:34:31 +0000 Subject: [issue38589] Bad target address assigned in Python Manuals shortcut on Python installation In-Reply-To: <1572010579.06.0.155387350533.issue38589@roundup.psfhosted.org> Message-ID: <1572298471.51.0.956852862056.issue38589@roundup.psfhosted.org> Steve Dower added the comment: New changeset 0ac6137dd3d1e2c8f9558153ad63021f57e05e73 by Steve Dower in branch 'master': bpo-38589: Fixes HTML Help shortcut when Windows is not installed to C drive (GH-16968) https://github.com/python/cpython/commit/0ac6137dd3d1e2c8f9558153ad63021f57e05e73 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 17:34:43 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 28 Oct 2019 21:34:43 +0000 Subject: [issue38589] Bad target address assigned in Python Manuals shortcut on Python installation In-Reply-To: <1572010579.06.0.155387350533.issue38589@roundup.psfhosted.org> Message-ID: <1572298483.03.0.754779405411.issue38589@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16497 pull_request: https://github.com/python/cpython/pull/16970 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 17:34:52 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 28 Oct 2019 21:34:52 +0000 Subject: [issue38589] Bad target address assigned in Python Manuals shortcut on Python installation In-Reply-To: <1572010579.06.0.155387350533.issue38589@roundup.psfhosted.org> Message-ID: <1572298492.42.0.72466344063.issue38589@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16498 pull_request: https://github.com/python/cpython/pull/16971 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 17:35:40 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Oct 2019 21:35:40 +0000 Subject: [issue38618] Why not use refcount of c.c_filename in PyAST_FromNodeObject() In-Reply-To: <1572275310.19.0.141379413528.issue38618@roundup.psfhosted.org> Message-ID: <1572298540.19.0.442266796863.issue38618@roundup.psfhosted.org> Serhiy Storchaka added the comment: There is no bug. We can add Py_INCREF/Py_DECREF in ast.c. We can remove Py_INCREF/Py_DECREF from compile.c. But all this would just add code churn. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 17:35:48 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 Oct 2019 21:35:48 +0000 Subject: [issue38589] Bad target address assigned in Python Manuals shortcut on Python installation In-Reply-To: <1572010579.06.0.155387350533.issue38589@roundup.psfhosted.org> Message-ID: <1572298548.48.0.0677773979663.issue38589@roundup.psfhosted.org> Change by Steve Dower : ---------- assignee: -> steve.dower resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 17:47:48 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 28 Oct 2019 21:47:48 +0000 Subject: [issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence In-Reply-To: <1569930991.59.0.212656372364.issue38336@roundup.psfhosted.org> Message-ID: <1572299268.15.0.210047831601.issue38336@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 17:52:03 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 28 Oct 2019 21:52:03 +0000 Subject: [issue38589] Bad target address assigned in Python Manuals shortcut on Python installation In-Reply-To: <1572010579.06.0.155387350533.issue38589@roundup.psfhosted.org> Message-ID: <1572299523.9.0.391407633278.issue38589@roundup.psfhosted.org> miss-islington added the comment: New changeset 379b55b526a04e6db40c7070fd70f0d7d37bba64 by Miss Skeleton (bot) in branch '3.7': bpo-38589: Fixes HTML Help shortcut when Windows is not installed to C drive (GH-16968) https://github.com/python/cpython/commit/379b55b526a04e6db40c7070fd70f0d7d37bba64 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 17:52:39 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 28 Oct 2019 21:52:39 +0000 Subject: [issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence In-Reply-To: <1569930991.59.0.212656372364.issue38336@roundup.psfhosted.org> Message-ID: <1572299559.44.0.403308015173.issue38336@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 17:55:13 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 28 Oct 2019 21:55:13 +0000 Subject: [issue38589] Bad target address assigned in Python Manuals shortcut on Python installation In-Reply-To: <1572010579.06.0.155387350533.issue38589@roundup.psfhosted.org> Message-ID: <1572299713.84.0.0983197818903.issue38589@roundup.psfhosted.org> miss-islington added the comment: New changeset 2267cb9da4a1fd8bb4962beb893e1f69a37909a7 by Miss Skeleton (bot) in branch '3.8': bpo-38589: Fixes HTML Help shortcut when Windows is not installed to C drive (GH-16968) https://github.com/python/cpython/commit/2267cb9da4a1fd8bb4962beb893e1f69a37909a7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 18:09:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2019 22:09:45 +0000 Subject: [issue37330] open(): remove 'U' mode, deprecated since Python 3.3 In-Reply-To: <1560872905.7.0.609892598407.issue37330@roundup.psfhosted.org> Message-ID: <1572300585.01.0.448259809912.issue37330@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16499 pull_request: https://github.com/python/cpython/pull/16972 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 18:19:49 2019 From: report at bugs.python.org (Berry Schoenmakers) Date: Mon, 28 Oct 2019 22:19:49 +0000 Subject: [issue38599] Deprecate creation of asyncio object when the loop is not running In-Reply-To: <1572160085.79.0.39835517746.issue38599@roundup.psfhosted.org> Message-ID: <1572301189.56.0.622024761127.issue38599@roundup.psfhosted.org> Berry Schoenmakers added the comment: Well, I'm basically using a run method defined as a shorthand for self.loop.run_until_complete (without closing loop, reusing it throughout). It would be nice if asyncio.run could simply be used instead, but I understand you're saying this is easier said than done, which is fine with me. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 18:23:41 2019 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 28 Oct 2019 22:23:41 +0000 Subject: [issue38599] Deprecate creation of asyncio object when the loop is not running In-Reply-To: <1572160085.79.0.39835517746.issue38599@roundup.psfhosted.org> Message-ID: <1572301421.26.0.421336657332.issue38599@roundup.psfhosted.org> Yury Selivanov added the comment: > Well, I'm basically using a run method defined as a shorthand for self.loop.run_until_complete (without closing loop, reusing it throughout). It would be nice if asyncio.run could simply be used instead, but I understand you're saying this is easier said than done, which is fine with me. Thanks. Yes. `asyncio.run()` is similar to `loop.run_until_complete()` but adds some guarantees + sane setup/cleanup. If we strip proper cleanup then there's no point in `asyncio.run()`. So using `loop.run_until_complete()` is totally fine when you want to preserve the event loop between runs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 18:39:25 2019 From: report at bugs.python.org (Peter Bittner) Date: Mon, 28 Oct 2019 22:39:25 +0000 Subject: [issue38623] Python documentation should mention how to find site-packages Message-ID: <1572302365.38.0.0160311403424.issue38623@roundup.psfhosted.org> New submission from Peter Bittner : A popular question on StackOverflow is, "How do I find the location of my Python site-packages directory?" [1] While this may hint at a deeper problem that needs to be solved, a user suggested [2] the accepted answer to be added to Python's official documentation. The most appropriate place I could find to add related information is ``Doc/tutorial/modules.rst``. [1] https://stackoverflow.com/questions/122327/how-do-i-find-the-location-of-my-python-site-packages-directory/46071447 [2] https://stackoverflow.com/questions/122327/how-do-i-find-the-location-of-my-python-site-packages-directory/46071447#comment103247041_46071447 ---------- assignee: docs at python components: Documentation messages: 355599 nosy: bittner, docs at python priority: normal severity: normal status: open title: Python documentation should mention how to find site-packages type: enhancement versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 18:45:51 2019 From: report at bugs.python.org (Peter Bittner) Date: Mon, 28 Oct 2019 22:45:51 +0000 Subject: [issue38623] Python documentation should mention how to find site-packages In-Reply-To: <1572302365.38.0.0160311403424.issue38623@roundup.psfhosted.org> Message-ID: <1572302751.44.0.303855272068.issue38623@roundup.psfhosted.org> Change by Peter Bittner : ---------- keywords: +patch pull_requests: +16500 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16974 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 18:54:26 2019 From: report at bugs.python.org (Inyeol Lee) Date: Mon, 28 Oct 2019 22:54:26 +0000 Subject: [issue38624] pathlib .suffix, .suffixes, .stem unexpected behavior for pathname with trailing dot Message-ID: <1572303266.25.0.298826612475.issue38624@roundup.psfhosted.org> New submission from Inyeol Lee : Python3.8 pathlib treats dot between path stem and suffix as part of suffix in general: >>> a = pathlib.Path('foo.txt') >>> a.stem, a.suffix ('foo', '.txt') >>> a.with_suffix('') PosixPath('foo') However, if pathname ends with dot, it treats the trailing dot as part of stem, not part of suffix: >>> b = pathlib.Path('bar.') >>> b.stem, b.suffix ('bar.', '') This looks like a bug. It should return ('bar', '.'). There are couple of unexpected behavior related to this: >>> pathlib.Path('foo.txt').with_suffix('.') ... ValueError: Invalid suffix '.' <== Why not PosixPath('foo.') ? >>> c = pathlib.Path('foo..') >>> c.stem, c.suffix, c.suffixes ('foo..', '', []) I think above should return ('foo.', '.', ['.', '.']) Tested with macOS 10.15 and Python3.8. Python3.7 behaves the same. ---------- components: Library (Lib) messages: 355600 nosy: inyeollee priority: normal severity: normal status: open title: pathlib .suffix, .suffixes, .stem unexpected behavior for pathname with trailing dot type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 18:59:07 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 28 Oct 2019 22:59:07 +0000 Subject: [issue38599] Deprecate creation of asyncio object when the loop is not running In-Reply-To: <1572160085.79.0.39835517746.issue38599@roundup.psfhosted.org> Message-ID: <1572303547.74.0.351673328652.issue38599@roundup.psfhosted.org> Andrew Svetlov added the comment: I'm pretty happy with asyncio.run() functionalit. I used run() for the bug demonstration, but the example can be rewritten easily without this function. The problem is not in run() but in an object lifecycle. Implicit loop creation plus module-level initialization provides a pretty big set of ways to shoot in the foot :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 19:25:13 2019 From: report at bugs.python.org (Graham Coster) Date: Mon, 28 Oct 2019 23:25:13 +0000 Subject: [issue38625] SpooledTemporaryFile does not seek correctly after being rolled over Message-ID: <1572305113.57.0.424265086892.issue38625@roundup.psfhosted.org> Change by Graham Coster : ---------- components: Library (Lib) files: spooled-temp-file-does-not-seek-correctly-after-being-rolled.py nosy: Gary Fernie, James Hennessy, graham.coster, inada.naoki, martin.panter, nubirstein, r.david.murray, serhiy.storchaka, terry.reedy priority: normal severity: normal status: open title: SpooledTemporaryFile does not seek correctly after being rolled over type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48685/spooled-temp-file-does-not-seek-correctly-after-being-rolled.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 19:46:46 2019 From: report at bugs.python.org (Graham Coster) Date: Mon, 28 Oct 2019 23:46:46 +0000 Subject: [issue38625] SpooledTemporaryFile does not seek correctly after being rolled over Message-ID: <1572306406.72.0.0542092082155.issue38625@roundup.psfhosted.org> New submission from Graham Coster : Hi there, As demonstrated in the attached script, I found that a StopIteration exception occurs once a SpooledTemporaryFile has been rolled over from memory to disk, even though seek(0) had move the file position to the top of the file. I had previously been using a TemporaryFile, which wrote directly to disk, without any issues. However, once I swapped to a SpooledTemporaryFile, the StopIteration exception started to appear. I'm guessing the problem relates to the csv reader having an Iterator that is no longer looking at the correct file after the SpooledTemporaryFile is rolled-over. I found that instantiating a new csv reader post roll-over works around the problem. I had expected that I could just swap from a TemporaryFile to a SpooledTemporaryFile with no change to behaviour. However, if this is not the case, perhaps the SpooledTemporaryFile documentation should explicitly state this. Cheers, Graham. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 20:07:13 2019 From: report at bugs.python.org (Kyle Stanley) Date: Tue, 29 Oct 2019 00:07:13 +0000 Subject: [issue34790] Deprecate passing coroutine objects to asyncio.wait() In-Reply-To: <1537807353.36.0.956365154283.issue34790@psf.upfronthosting.co.za> Message-ID: <1572307633.3.0.503179691667.issue34790@roundup.psfhosted.org> Change by Kyle Stanley : ---------- pull_requests: +16502 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16975 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 20:10:28 2019 From: report at bugs.python.org (Kyle Stanley) Date: Tue, 29 Oct 2019 00:10:28 +0000 Subject: [issue34790] Deprecate passing coroutine objects to asyncio.wait() In-Reply-To: <1537807353.36.0.956365154283.issue34790@psf.upfronthosting.co.za> Message-ID: <1572307828.03.0.936936259391.issue34790@roundup.psfhosted.org> Kyle Stanley added the comment: GH-16975 Is a simple fix for the asyncio.wait() whatsnew entry for 3.8. I'll implement the deprecation warning and add a 3.9 whatsnew entry in a separate PR, since those changes won't be backported. ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 20:13:04 2019 From: report at bugs.python.org (Daniel Hillier) Date: Tue, 29 Oct 2019 00:13:04 +0000 Subject: [issue38334] zipfile: Seeking encrypted file breaks after seeking backwards In-Reply-To: <1569917842.05.0.044912868688.issue38334@roundup.psfhosted.org> Message-ID: <1572307984.4.0.71159624525.issue38334@roundup.psfhosted.org> Daniel Hillier added the comment: Thanks for your help! Good point, I'll create a new change for the refactoring. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 21:56:30 2019 From: report at bugs.python.org (Kyle Stanley) Date: Tue, 29 Oct 2019 01:56:30 +0000 Subject: [issue34790] Deprecate passing coroutine objects to asyncio.wait() In-Reply-To: <1537807353.36.0.956365154283.issue34790@psf.upfronthosting.co.za> Message-ID: <1572314190.46.0.278742124571.issue34790@roundup.psfhosted.org> Change by Kyle Stanley : ---------- pull_requests: +16503 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16977 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 21:59:29 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 29 Oct 2019 01:59:29 +0000 Subject: [issue38624] pathlib .suffix, .suffixes, .stem unexpected behavior for pathname with trailing dot In-Reply-To: <1572303266.25.0.298826612475.issue38624@roundup.psfhosted.org> Message-ID: <1572314369.33.0.389932414986.issue38624@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 21:59:34 2019 From: report at bugs.python.org (Kyle Stanley) Date: Tue, 29 Oct 2019 01:59:34 +0000 Subject: [issue34790] Deprecate passing coroutine objects to asyncio.wait() In-Reply-To: <1537807353.36.0.956365154283.issue34790@psf.upfronthosting.co.za> Message-ID: <1572314374.33.0.654785851965.issue34790@roundup.psfhosted.org> Kyle Stanley added the comment: GH-16977 Implements the deprecation warning, adds tests, and adds the 3.9 whatsnew entry. Once this PR is finalized, I think this issue can be closed. ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 22:44:07 2019 From: report at bugs.python.org (Windson Yang) Date: Tue, 29 Oct 2019 02:44:07 +0000 Subject: [issue38125] Can' build document in Sphinx v2.2.0 In-Reply-To: <1568246312.85.0.271143869481.issue38125@roundup.psfhosted.org> Message-ID: <1572317047.32.0.822656868797.issue38125@roundup.psfhosted.org> Change by Windson Yang : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 23:03:16 2019 From: report at bugs.python.org (Windson Yang) Date: Tue, 29 Oct 2019 03:03:16 +0000 Subject: [issue38626] small change at bisect_left function for easy understanding Message-ID: <1572318196.84.0.0964323507502.issue38626@roundup.psfhosted.org> New submission from Windson Yang : bisect_left should be similar to bisect_right. However, the current implement didn't reflect it. A little bit update for the bisect_left function could make the user easy to understand their relation. def bisect_left(a, x, lo=0, hi=None): if lo < 0: raise ValueError('lo must be non-negative') if hi is None: hi = len(a) while lo < hi: mid = (lo+hi)//2 # <= should be the only difference between bisect_left and bisect_right if x <= a[mid]: hi = mid else: lo = mid+1 return lo ---------- components: Library (Lib) messages: 355606 nosy: Windson Yang priority: normal severity: normal status: open title: small change at bisect_left function for easy understanding versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 23:26:53 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 29 Oct 2019 03:26:53 +0000 Subject: [issue38626] small change at bisect_left function for easy understanding In-Reply-To: <1572318196.84.0.0964323507502.issue38626@roundup.psfhosted.org> Message-ID: <1572319613.94.0.640454383627.issue38626@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 23:27:53 2019 From: report at bugs.python.org (Tim Peters) Date: Tue, 29 Oct 2019 03:27:53 +0000 Subject: [issue38626] small change at bisect_left function for easy understanding In-Reply-To: <1572318196.84.0.0964323507502.issue38626@roundup.psfhosted.org> Message-ID: <1572319673.55.0.716322154278.issue38626@roundup.psfhosted.org> Tim Peters added the comment: So as far as possible, CPython only uses __lt__ ("<") element comparisons for its order-sensitive algorithms. This is documented for list.sort(), but the bisect and heapq modules strive to do the same. The point is to minimize the number of comparison methods a new type needs to implement to participate (and "just one: __lt__" is ideal). Your change would require they implement "__le__" too, so is unlikely to be accepted for CPython. ---------- assignee: rhettinger -> nosy: +tim.peters -rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 23:30:28 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 29 Oct 2019 03:30:28 +0000 Subject: [issue38626] small change at bisect_left function for easy understanding In-Reply-To: <1572318196.84.0.0964323507502.issue38626@roundup.psfhosted.org> Message-ID: <1572319828.86.0.767404501973.issue38626@roundup.psfhosted.org> Raymond Hettinger added the comment: I concur with Tim. Thank you for the suggestion though. ---------- nosy: +rhettinger resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 23:43:04 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 29 Oct 2019 03:43:04 +0000 Subject: [issue34790] Deprecate passing coroutine objects to asyncio.wait() In-Reply-To: <1537807353.36.0.956365154283.issue34790@psf.upfronthosting.co.za> Message-ID: <1572320584.69.0.398647561916.issue34790@roundup.psfhosted.org> Raymond Hettinger added the comment: Is this whatsnew/3.8.rst entry correct and complete? ''' The :func:`asyncio.coroutine` :term:`decorator` is deprecated and will be removed in version 3.10. Instead of ``@asyncio.coroutine``, use :keyword:`async def` instead. (Contributed by Andrew Svetlov in :issue:`36921`.) ''' ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 00:06:36 2019 From: report at bugs.python.org (hai shi) Date: Tue, 29 Oct 2019 04:06:36 +0000 Subject: [issue38618] Why not use refcount of c.c_filename in PyAST_FromNodeObject() In-Reply-To: <1572275310.19.0.141379413528.issue38618@roundup.psfhosted.org> Message-ID: <1572321996.24.0.192352267574.issue38618@roundup.psfhosted.org> hai shi added the comment: Thanks for your patience, Serhiy. IMHO, i called the moving operation `clean code`: Consistent understanding, Consistent code. And the `clean code` should be a part of `enhancement`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 00:19:32 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 29 Oct 2019 04:19:32 +0000 Subject: [issue38626] small change at bisect_left function for easy understanding In-Reply-To: <1572318196.84.0.0964323507502.issue38626@roundup.psfhosted.org> Message-ID: <1572322772.86.0.505774781131.issue38626@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +16504 pull_request: https://github.com/python/cpython/pull/16978 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 00:32:44 2019 From: report at bugs.python.org (Kyle Stanley) Date: Tue, 29 Oct 2019 04:32:44 +0000 Subject: [issue34790] Deprecate passing coroutine objects to asyncio.wait() In-Reply-To: <1537807353.36.0.956365154283.issue34790@psf.upfronthosting.co.za> Message-ID: <1572323564.28.0.622542129885.issue34790@roundup.psfhosted.org> Kyle Stanley added the comment: > Is this whatsnew/3.8.rst entry correct and complete? > The :func:`asyncio.coroutine` :term:`decorator` is deprecated and will be removed in version 3.10. Instead of ``@asyncio.coroutine``, use :keyword:`async def` instead. (Contributed by Andrew Svetlov in :issue:`36921`.) It looks to be fully consistent with the asyncio docs: https://docs.python.org/3/library/asyncio-task.html#generator-based-coroutines. From the blame of the documentation, it seems like Yury added the deprecation notice (GH-9314) to that section with the listed release for removal as 4.0, and then changed it to 3.10 (GH-9579). At a later date, Andrew implemented the actual deprecation (GH-13346). So as far as I can tell, yes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 00:38:56 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 29 Oct 2019 04:38:56 +0000 Subject: [issue38626] small change at bisect_left function for easy understanding In-Reply-To: <1572318196.84.0.0964323507502.issue38626@roundup.psfhosted.org> Message-ID: <1572323936.5.0.0758073080522.issue38626@roundup.psfhosted.org> miss-islington added the comment: New changeset 3c88199e0be352c0813f145d7c4c83af044268aa by Miss Skeleton (bot) (Raymond Hettinger) in branch 'master': bpo-38626: Add comment explaining why __lt__ is used. (GH-16978) https://github.com/python/cpython/commit/3c88199e0be352c0813f145d7c4c83af044268aa ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 01:37:09 2019 From: report at bugs.python.org (Wei-Cheng Pan) Date: Tue, 29 Oct 2019 05:37:09 +0000 Subject: [issue38608] Undocumented behavior that IsolatedAsyncioTestCase would enable event loop debug mode In-Reply-To: <1572227413.17.0.184690601558.issue38608@roundup.psfhosted.org> Message-ID: <1572327429.65.0.75102531081.issue38608@roundup.psfhosted.org> Wei-Cheng Pan added the comment: > Usually, it is a sign of a problem in user code, e.g. something should be pushed into executor. Sometimes also happens on low-end CI machines. And the message is somewhat unclear to me. I have to grep cpython sources to understand that it is coming from debug mode and it means there is a slow awaitable ... in somewhere, because the displayed file:line is not always the right position. > A test case is executed in debug mode. I think it is reasonable for the test run, isn't it? Probably. > The mode can be disabled by `asyncio.get_running_loop().set_debug(False)` in `asyncSetUp()` method. Glad to know that. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 01:40:18 2019 From: report at bugs.python.org (Larry Hastings) Date: Tue, 29 Oct 2019 05:40:18 +0000 Subject: [issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py In-Reply-To: <1569032250.18.0.545337961077.issue38243@roundup.psfhosted.org> Message-ID: <1572327618.63.0.0615071165989.issue38243@roundup.psfhosted.org> Larry Hastings added the comment: New changeset 3fe1b19265b55c290fc956e9aafcf661803782de by larryhastings (Victor Stinner) in branch '3.5': bpo-38243, xmlrpc.server: Escape the server_title (GH-16373) (GH-16441) (#16516) https://github.com/python/cpython/commit/3fe1b19265b55c290fc956e9aafcf661803782de ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 01:43:00 2019 From: report at bugs.python.org (Larry Hastings) Date: Tue, 29 Oct 2019 05:43:00 +0000 Subject: [issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py In-Reply-To: <1569032250.18.0.545337961077.issue38243@roundup.psfhosted.org> Message-ID: <1572327780.69.0.981087928686.issue38243@roundup.psfhosted.org> Change by Larry Hastings : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 01:46:54 2019 From: report at bugs.python.org (Daniel Hillier) Date: Tue, 29 Oct 2019 05:46:54 +0000 Subject: [issue37523] zipfile: Raise ValueError for i/o operations on closed zipfile.ZipExtFile In-Reply-To: <1562656011.62.0.508019848995.issue37523@roundup.psfhosted.org> Message-ID: <1572328014.34.0.723678747799.issue37523@roundup.psfhosted.org> Daniel Hillier added the comment: Here's the script I used for profiling and the results I observed with and without the closed check in read: import zipfile test_zip = "time_test.zip" test_name = "test_name.txt" with zipfile.ZipFile(test_zip, "w") as zf: zf.writestr(test_name, "Hi there! " * 300) with zipfile.ZipFile(test_zip) as zf: for i in range(100000): zf.read(test_name) # Current code (no closed check), three different profiling sessions: # ncalls tottime percall cumtime percall filename:lineno(function) # 100000 0.612 0.000 6.638 0.000 zipfile.py:884(read) # 100000 0.598 0.000 6.489 0.000 zipfile.py:884(read) # 100000 0.600 0.000 6.485 0.000 zipfile.py:884(read) # With closed check, three different profiling sessions: # ncalls tottime percall cumtime percall filename:lineno(function) # 100000 0.632 0.000 6.587 0.000 zipfile.py:884(read) # 100000 0.623 0.000 6.564 0.000 zipfile.py:884(read) # 100000 0.638 0.000 6.700 0.000 zipfile.py:884(read) ------- I based this change on the what BytesIO does: https://github.com/python/cpython/blob/master/Lib/_pyio.py#L912 Let me know if you want me to make any changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 01:55:17 2019 From: report at bugs.python.org (Sebastian Linke) Date: Tue, 29 Oct 2019 05:55:17 +0000 Subject: [issue38627] Add copy() method to pathlib Message-ID: <1572328517.33.0.0527318368455.issue38627@roundup.psfhosted.org> New submission from Sebastian Linke : pathlib.Path() could wrap shutil.copy() with something like this: def copy(self, target): if not self.is_file(): # No support for directories here raise ValueError("Path must point to a regular file") # copy() appends filename when Path is copied to a directory # see shutil.copy() docstring and source for details target = shutil.copy(self, target) return self.__class__(target) ---------- components: Library (Lib) messages: 355616 nosy: seblin priority: normal severity: normal status: open title: Add copy() method to pathlib type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 02:04:06 2019 From: report at bugs.python.org (Sebastian Linke) Date: Tue, 29 Oct 2019 06:04:06 +0000 Subject: [issue38627] Add copy() method to pathlib In-Reply-To: <1572328517.33.0.0527318368455.issue38627@roundup.psfhosted.org> Message-ID: <1572329046.66.0.654237403291.issue38627@roundup.psfhosted.org> Sebastian Linke added the comment: Docstring could be: Copy file content and permission bits of this path to the target path and return a new Path instance pointing to the target path. If target is a directory, the base filename of this path is added to the target and a new file corresponding to the target is created. If target points to an existing file, that file is overwritten. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 02:20:01 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 29 Oct 2019 06:20:01 +0000 Subject: [issue38613] Optimize some set operations in dictkeys object In-Reply-To: <1572263745.15.0.0692968844895.issue38613@roundup.psfhosted.org> Message-ID: <1572330001.19.0.181131545221.issue38613@roundup.psfhosted.org> Inada Naoki added the comment: > How does it work with dict subclasses? PySet_New(iterable) uses fast path only when `PyDict_CheckExact(iterable)` is true. So there is no change for dict subclasses. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 02:45:21 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Oct 2019 06:45:21 +0000 Subject: [issue38613] Optimize some set operations in dictkeys object In-Reply-To: <1572263745.15.0.0692968844895.issue38613@roundup.psfhosted.org> Message-ID: <1572331521.05.0.849202729717.issue38613@roundup.psfhosted.org> Serhiy Storchaka added the comment: But what if a dict subclass overrides __iter__? You can get different result if set(d) != set(d.keys()). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 02:52:53 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Oct 2019 06:52:53 +0000 Subject: [issue38627] Add copy() method to pathlib In-Reply-To: <1572328517.33.0.0527318368455.issue38627@roundup.psfhosted.org> Message-ID: <1572331973.22.0.905013081203.issue38627@roundup.psfhosted.org> Serhiy Storchaka added the comment: Since shutil.copy() accepts path-like object, I do not think there is a need to add the copy method to Path. As for additional limitation, it looks arbitrary and application specific. You can easy implement a simple helper function as you just demonstrated. And you can easily modify it if your needs change (for example if you decide to not copy links). Not every three lines of code should be added as a function to the stdlib. ---------- nosy: +serhiy.storchaka resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 03:01:37 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Oct 2019 07:01:37 +0000 Subject: [issue37523] zipfile: Raise ValueError for i/o operations on closed zipfile.ZipExtFile In-Reply-To: <1562656011.62.0.508019848995.issue37523@roundup.psfhosted.org> Message-ID: <1572332497.45.0.439587820519.issue37523@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you Daniel. But profiling is not good for benchmarking, it adds too much overhead. It can help to find narrow places, but for measuring effect of optimization you need to measure the raw time on non-debug build. Semantically your changes are correct. I just want to know whether this adds a significant overhead. If it is, we should consider some kind of optimizations. It does not matter for Python implementation of BytesIO because in normal we use the C implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 03:04:07 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 29 Oct 2019 07:04:07 +0000 Subject: [issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence In-Reply-To: <1569930991.59.0.212656372364.issue38336@roundup.psfhosted.org> Message-ID: <1572332647.21.0.270400081295.issue38336@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 4c155f738dc2e70ccb574f5169ad89c01753c6f7 by Raymond Hettinger (G?ry Ogam) in branch 'master': bpo-38336: Remove the __set__ method restriction on data descriptors for attribute lookup precedence (GH-16520) https://github.com/python/cpython/commit/4c155f738dc2e70ccb574f5169ad89c01753c6f7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 03:04:33 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 29 Oct 2019 07:04:33 +0000 Subject: [issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence In-Reply-To: <1569930991.59.0.212656372364.issue38336@roundup.psfhosted.org> Message-ID: <1572332673.91.0.409089496315.issue38336@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 03:24:21 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Oct 2019 07:24:21 +0000 Subject: [issue36993] zipfile: tuple IndexError on extract In-Reply-To: <1558441969.28.0.928640082083.issue36993@roundup.psfhosted.org> Message-ID: <1572333861.81.0.863921736139.issue36993@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset da6ce58dd5ac109485af45878fca6bfd265b43e9 by Serhiy Storchaka (Daniel Hillier) in branch 'master': bpo-36993: Improve error reporting for zipfiles with bad zip64 extra data. (GH-14656) https://github.com/python/cpython/commit/da6ce58dd5ac109485af45878fca6bfd265b43e9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 03:25:54 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 29 Oct 2019 07:25:54 +0000 Subject: [issue36993] zipfile: tuple IndexError on extract In-Reply-To: <1558441969.28.0.928640082083.issue36993@roundup.psfhosted.org> Message-ID: <1572333954.66.0.852786426145.issue36993@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16505 pull_request: https://github.com/python/cpython/pull/16979 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 03:26:02 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 29 Oct 2019 07:26:02 +0000 Subject: [issue36993] zipfile: tuple IndexError on extract In-Reply-To: <1558441969.28.0.928640082083.issue36993@roundup.psfhosted.org> Message-ID: <1572333962.28.0.449215356716.issue36993@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16506 pull_request: https://github.com/python/cpython/pull/16980 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 03:34:04 2019 From: report at bugs.python.org (ttrd) Date: Tue, 29 Oct 2019 07:34:04 +0000 Subject: [issue38541] Performance degradation of attribute accesses in Python 3.7.4 In-Reply-To: <1571645744.43.0.285485842632.issue38541@roundup.psfhosted.org> Message-ID: <1572334444.97.0.934977363245.issue38541@roundup.psfhosted.org> ttrd added the comment: I just ran the test with Python 3.7.5: As expected, I got the same results as in Python 3.7.4. Nevertheless, thanks for the response. So we will stay with Python 3.7.3 for now and switch to Python 3.8 as soon as possible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 03:40:26 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Oct 2019 07:40:26 +0000 Subject: [issue28029] Replace and empty strings In-Reply-To: <1473366641.62.0.989746465638.issue28029@psf.upfronthosting.co.za> Message-ID: <1572334826.88.0.896710728956.issue28029@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +16507 pull_request: https://github.com/python/cpython/pull/16981 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 03:43:40 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 29 Oct 2019 07:43:40 +0000 Subject: [issue36993] zipfile: tuple IndexError on extract In-Reply-To: <1558441969.28.0.928640082083.issue36993@roundup.psfhosted.org> Message-ID: <1572335020.7.0.0554033758006.issue36993@roundup.psfhosted.org> miss-islington added the comment: New changeset f7d50f8f997fbfce1556991a3700826536871fe7 by Miss Skeleton (bot) in branch '3.7': bpo-36993: Improve error reporting for zipfiles with bad zip64 extra data. (GH-14656) https://github.com/python/cpython/commit/f7d50f8f997fbfce1556991a3700826536871fe7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 03:44:10 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 29 Oct 2019 07:44:10 +0000 Subject: [issue36993] zipfile: tuple IndexError on extract In-Reply-To: <1558441969.28.0.928640082083.issue36993@roundup.psfhosted.org> Message-ID: <1572335050.38.0.380097826281.issue36993@roundup.psfhosted.org> miss-islington added the comment: New changeset 3801b2699eb9441ca31c6ec8fa956fc0fe755ef7 by Miss Skeleton (bot) in branch '3.8': bpo-36993: Improve error reporting for zipfiles with bad zip64 extra data. (GH-14656) https://github.com/python/cpython/commit/3801b2699eb9441ca31c6ec8fa956fc0fe755ef7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 03:56:20 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Oct 2019 07:56:20 +0000 Subject: [issue28029] Replace and empty strings In-Reply-To: <1473366641.62.0.989746465638.issue28029@psf.upfronthosting.co.za> Message-ID: <1572335780.0.0.310767073177.issue28029@roundup.psfhosted.org> Serhiy Storchaka added the comment: There are expected some relations between str methods. For example, s.replace(a, b, n) == s.replace(a, b) if n >= s.count(a) len(s.replace(a, b, n)) == len(s) + (len(b)-len(a)) * n if 0 <= n <= s.count(a) len(s.replace(a, b, n)) == len(s) + (len(b)-len(a)) * s.count(a) if n >= s.count(a) Inconsistency between "".replace("", s, n) and "".replace("", s) is just a bug, and it should be fixed in the most consistent way. There are precedences, the behavior of replace() already was changed 3 times in the past. I think that chances to break some code are tiny, we just fix inconsistency why can puzzle users. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 03:57:37 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Oct 2019 07:57:37 +0000 Subject: [issue28029] Replace and empty strings In-Reply-To: <1473366641.62.0.989746465638.issue28029@psf.upfronthosting.co.za> Message-ID: <1572335857.9.0.348917020328.issue28029@roundup.psfhosted.org> Serhiy Storchaka added the comment: Note that no tests were affected by this change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 04:00:50 2019 From: report at bugs.python.org (Larry Hastings) Date: Tue, 29 Oct 2019 08:00:50 +0000 Subject: [issue31026] test_dbm fails when run directly In-Reply-To: <1500984617.08.0.739686632306.issue31026@psf.upfronthosting.co.za> Message-ID: <1572336050.79.0.787771708165.issue31026@roundup.psfhosted.org> Larry Hastings added the comment: New changeset d7b336fe5d54f73c758802df426e06e8a674bd63 by Larry Hastings (Serhiy Storchaka) in branch '3.5': [3.5] bpo-31026: Fix test_dbm if dbm.ndbm is build with Berkeley DB. (GH-6632) https://github.com/python/cpython/commit/d7b336fe5d54f73c758802df426e06e8a674bd63 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 04:12:07 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Oct 2019 08:12:07 +0000 Subject: [issue36993] zipfile: tuple IndexError on extract In-Reply-To: <1558441969.28.0.928640082083.issue36993@roundup.psfhosted.org> Message-ID: <1572336727.31.0.00754505935638.issue36993@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you for your contribution Daniel. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 04:45:45 2019 From: report at bugs.python.org (Daniel Hillier) Date: Tue, 29 Oct 2019 08:45:45 +0000 Subject: [issue37523] zipfile: Raise ValueError for i/o operations on closed zipfile.ZipExtFile In-Reply-To: <1562656011.62.0.508019848995.issue37523@roundup.psfhosted.org> Message-ID: <1572338745.23.0.435465032692.issue37523@roundup.psfhosted.org> Daniel Hillier added the comment: Good point. Thanks for the advice. I've updated it to use timeit. Does that give a better indication? import zipfile test_zip = "time_test.zip" test_name = "test_name.txt" # with zipfile.ZipFile(test_zip, "w") as zf: # zf.writestr(test_name, "Hi there! " * 300) def test(): with zipfile.ZipFile(test_zip) as zf: for i in range(100000): zf.read(test_name) if __name__ == "__main__": import timeit print(timeit.repeat("test()", setup="from __main__ import test", number=1, repeat=10)) On my machine (running a usual workload) the best of 10 was: master: 3.812s check closed: 3.874s But I think my machine had a quite a bit of variance between runs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 05:17:23 2019 From: report at bugs.python.org (Ayappan) Date: Tue, 29 Oct 2019 09:17:23 +0000 Subject: [issue38628] Issue with ctypes in AIX Message-ID: <1572340643.38.0.935669039099.issue38628@roundup.psfhosted.org> New submission from Ayappan : There seems to be a behavioral issue with ctypes in AIX. The specific symptom is that passing structures containing arrays to a C function by value appears to be broken. Consider the below program., #!/usr/bin/env python3 from ctypes import * libc = CDLL('libc.a(shr_64.o)') class MemchrArgsHack(Structure): _fields_ = [("s", c_char_p), ("c", c_ulong), ("n", c_ulong)] memchr_args_hack = MemchrArgsHack() memchr_args_hack.s = b"abcdef" memchr_args_hack.c = ord('d') memchr_args_hack.n = 7 class MemchrArgsHack2(Structure): _fields_ = [("s", c_char_p), ("c_n", c_ulong * 2)] memchr_args_hack2 = MemchrArgsHack2() memchr_args_hack2.s = b"abcdef" memchr_args_hack2.c_n[0] = ord('d') memchr_args_hack2.c_n[1] = 7 print( CFUNCTYPE(c_char_p, c_char_p, c_uint, c_ulong, c_void_p)(('memchr', libc))(b"abcdef", c_uint(ord('d')), c_ulong(7), None)) print( CFUNCTYPE(c_char_p, MemchrArgsHack, c_void_p)(('memchr', libc))(memchr_args_hack, None)) print( CFUNCTYPE(c_char_p, MemchrArgsHack2, c_void_p)(('memchr', libc))(memchr_args_hack2, None)) This one uses memchr from the C library and passing it structures that would map to the registers that correspond to the arguments of memchr. This works for the first structure type in the reproducer; however, using the second structure type (which should be treated the same way) does not work. In the failing case, the last register that should be used for the structure is not populated from the structure. The reproducer passes an extra argument so that the register is instead populated from that argument for the failing case (instead of working because the register still contains the correct value from a previous call). The output should be the same for all three calls, but we get: b'def' b'def' None The last line is None, because memchr got 0 (the None passed on the call) for its length argument. ---------- components: ctypes messages: 355632 nosy: Ayappan priority: normal severity: normal status: open title: Issue with ctypes in AIX type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 05:32:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2019 09:32:51 +0000 Subject: [issue37330] open(): remove 'U' mode, deprecated since Python 3.3 In-Reply-To: <1560872905.7.0.609892598407.issue37330@roundup.psfhosted.org> Message-ID: <1572341571.94.0.65549203496.issue37330@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 1d2862a323ae1387e306942253b1e487018e2b7f by Victor Stinner in branch '3.8': bpo-37330: open(): "U" mode is removed in Python 3.9 (GH-16972) https://github.com/python/cpython/commit/1d2862a323ae1387e306942253b1e487018e2b7f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 05:33:08 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 29 Oct 2019 09:33:08 +0000 Subject: [issue37330] open(): remove 'U' mode, deprecated since Python 3.3 In-Reply-To: <1560872905.7.0.609892598407.issue37330@roundup.psfhosted.org> Message-ID: <1572341588.71.0.189232527184.issue37330@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16508 pull_request: https://github.com/python/cpython/pull/16982 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 05:34:31 2019 From: report at bugs.python.org (Batuhan) Date: Tue, 29 Oct 2019 09:34:31 +0000 Subject: [issue14196] Unhandled exceptions in pdb return value display In-Reply-To: <1330906516.74.0.432612109172.issue14196@psf.upfronthosting.co.za> Message-ID: <1572341671.18.0.849147725778.issue14196@roundup.psfhosted.org> Batuhan added the comment: Can't reproducible in py3 (3.8), IMHO can be closed. ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 05:38:41 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 29 Oct 2019 09:38:41 +0000 Subject: [issue37330] open(): remove 'U' mode, deprecated since Python 3.3 In-Reply-To: <1560872905.7.0.609892598407.issue37330@roundup.psfhosted.org> Message-ID: <1572341921.33.0.0701475656859.issue37330@roundup.psfhosted.org> miss-islington added the comment: New changeset 4cb08b6c0ae6989d169dd48c2b24087941f6d0b0 by Miss Skeleton (bot) in branch '3.7': bpo-37330: open(): "U" mode is removed in Python 3.9 (GH-16972) https://github.com/python/cpython/commit/4cb08b6c0ae6989d169dd48c2b24087941f6d0b0 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 05:40:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2019 09:40:22 +0000 Subject: [issue37330] open(): remove 'U' mode, deprecated since Python 3.3 In-Reply-To: <1560872905.7.0.609892598407.issue37330@roundup.psfhosted.org> Message-ID: <1572342022.05.0.671522506694.issue37330@roundup.psfhosted.org> STINNER Victor added the comment: > should we backport a documentation change for this? (the deprecatedremoved says 4.0 currently) Done. Thanks for the reminder. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 05:46:15 2019 From: report at bugs.python.org (Batuhan) Date: Tue, 29 Oct 2019 09:46:15 +0000 Subject: [issue19510] lib2to3.fixes.fix_import gets confused if implicit relative imports and absolute imports are on the same line In-Reply-To: <1383697659.1.0.717023788788.issue19510@psf.upfronthosting.co.za> Message-ID: <1572342375.75.0.482421783209.issue19510@roundup.psfhosted.org> Batuhan added the comment: > It?s still a bug though :) It gives a warning about this though RefactoringTool: ### In file test/t.py ### RefactoringTool: Line 1: absolute and local imports together If it still counts as a bug, let me know and i'll try to prepare a patch. ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 05:51:21 2019 From: report at bugs.python.org (Batuhan) Date: Tue, 29 Oct 2019 09:51:21 +0000 Subject: [issue21142] Daily/weekly ABI scan? In-Reply-To: <1396515016.38.0.140196375249.issue21142@psf.upfronthosting.co.za> Message-ID: <1572342681.02.0.337232063375.issue21142@roundup.psfhosted.org> Batuhan added the comment: Tools/c-globals moved under Tools/c-analyzer ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 06:02:07 2019 From: report at bugs.python.org (Batuhan) Date: Tue, 29 Oct 2019 10:02:07 +0000 Subject: [issue38316] docs: Code object's "co_stacksize" field is described with mistake In-Reply-To: <1569789294.48.0.284805020981.issue38316@roundup.psfhosted.org> Message-ID: <1572343327.7.0.0639667879041.issue38316@roundup.psfhosted.org> Change by Batuhan : ---------- keywords: +patch pull_requests: +16509 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16983 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 06:02:36 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 29 Oct 2019 10:02:36 +0000 Subject: [issue38608] Undocumented behavior that IsolatedAsyncioTestCase would enable event loop debug mode In-Reply-To: <1572227413.17.0.184690601558.issue38608@roundup.psfhosted.org> Message-ID: <1572343356.14.0.987999474264.issue38608@roundup.psfhosted.org> Andrew Svetlov added the comment: Well, if the reported line is invalid it should be fixed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 06:02:47 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 29 Oct 2019 10:02:47 +0000 Subject: [issue38608] Undocumented behavior that IsolatedAsyncioTestCase would enable event loop debug mode In-Reply-To: <1572227413.17.0.184690601558.issue38608@roundup.psfhosted.org> Message-ID: <1572343367.39.0.315836063719.issue38608@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- components: +asyncio nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 06:07:03 2019 From: report at bugs.python.org (Batuhan) Date: Tue, 29 Oct 2019 10:07:03 +0000 Subject: [issue26669] time.localtime(float("NaN")) does not raise a ValueError on all platforms In-Reply-To: <1459322243.53.0.921219428076.issue26669@psf.upfronthosting.co.za> Message-ID: <1572343623.01.0.447764572557.issue26669@roundup.psfhosted.org> Batuhan added the comment: Victor's PR 11507 is closed, what actions are going to be taken next? Close the issue as Mariatta said? ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 06:12:32 2019 From: report at bugs.python.org (Batuhan) Date: Tue, 29 Oct 2019 10:12:32 +0000 Subject: [issue32081] ipaddress should support fast IP lookups In-Reply-To: <1511168238.6.0.213398074469.issue32081@psf.upfronthosting.co.za> Message-ID: <1572343952.83.0.000343984036962.issue32081@roundup.psfhosted.org> Change by Batuhan : ---------- nosy: +BTaskaya, pmoody _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 06:14:49 2019 From: report at bugs.python.org (Batuhan) Date: Tue, 29 Oct 2019 10:14:49 +0000 Subject: [issue30533] missing feature in inspect module: getmembers_static In-Reply-To: <1496271168.24.0.639482608296.issue30533@psf.upfronthosting.co.za> Message-ID: <1572344089.8.0.582065891946.issue30533@roundup.psfhosted.org> Change by Batuhan : ---------- nosy: +BTaskaya versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 06:15:51 2019 From: report at bugs.python.org (Batuhan) Date: Tue, 29 Oct 2019 10:15:51 +0000 Subject: [issue36971] Add subsections in C API "Common Object Structures" page In-Reply-To: <1558365249.02.0.267009483185.issue36971@roundup.psfhosted.org> Message-ID: <1572344151.0.0.22656886316.issue36971@roundup.psfhosted.org> Batuhan added the comment: PR 13446 is merged, anything else is needed or can this issue be closed? ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 06:18:17 2019 From: report at bugs.python.org (Ran Benita) Date: Tue, 29 Oct 2019 10:18:17 +0000 Subject: [issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real Message-ID: <1572344297.94.0.916739375163.issue38629@roundup.psfhosted.org> New submission from Ran Benita : The numbers.Real ABC requires the __ceil__ and __floor__ methods (https://github.com/python/cpython/blob/v3.8.0/Lib/numbers.py#L178-L186), however, the float type does not have them. In regular Python, this is not a problem, because math.ceil() and math.floor() special-case float and work on it directly, and numbers.Real is implemented on float by explicitly registering it (so it's not checked that all required methods are implemented). Where it becomes a (minor) problem is in typeshed, where the type checker *does* check that all abstract methods are implemented. So, because float is missing these two, typeshed cannot have float implement numbers.Real. Refs: https://github.com/python/typeshed/issues/3195 ---------- components: Interpreter Core, Library (Lib) messages: 355642 nosy: bluetech priority: normal severity: normal status: open title: float is missing __ceil__() and __floor__(), required by numbers.Real type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 06:39:32 2019 From: report at bugs.python.org (Benjamin Edwards) Date: Tue, 29 Oct 2019 10:39:32 +0000 Subject: [issue37838] typing.get_type_hints not working with forward-declaration and decorated functions In-Reply-To: <1565692979.16.0.678723196671.issue37838@roundup.psfhosted.org> Message-ID: <1572345572.81.0.820177376617.issue37838@roundup.psfhosted.org> Benjamin Edwards added the comment: Thanks Netzeband, Will get on this. Ben ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 07:12:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2019 11:12:36 +0000 Subject: [issue26669] time.localtime(float("NaN")) does not raise a ValueError on all platforms In-Reply-To: <1459322243.53.0.921219428076.issue26669@psf.upfronthosting.co.za> Message-ID: <1572347556.41.0.278336468784.issue26669@roundup.psfhosted.org> STINNER Victor added the comment: Python 2 users have this bug since 2010, I think that it's fine to not fix it. Python 2 support ends at the end of the year. I close the issue. The issue has been fixed in Python 3.6 and newer. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 07:18:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2019 11:18:26 +0000 Subject: [issue38630] subprocess.Popen.send_signal() should poll the process Message-ID: <1572347906.82.0.50492662575.issue38630@roundup.psfhosted.org> New submission from STINNER Victor : subprocess.Popen.send_signal() doesn't check if the process exited since the poll() method has been called for the last time. If the process exit just before os.kill() is called, the signal can be sent to the wrong process if the process identified is recycled. Attached PR simply calls poll() once to reduce the time window when this race condition can occur, but it doesn't fully kill the race condition. -- See also the new "pidfd" API which only landed very recently in the Linux kernel to prevent this issue: * https://lwn.net/Articles/773459/ "Toward race-free process signaling" (this articles describes this issue) * https://lwn.net/Articles/789023/ "New system calls: pidfd_open() and close_range()" * https://kernel-recipes.org/en/2019/talks/pidfds-process-file-descriptors-on-linux/ "pidfds: Process file descriptors on Linux" by Chrisitan Brauner Illumos, OpenBSD, NetBSD and FreeBSD have similar concepts. I don't propose to use pidfd here, but it's just to highlight that it's a real issue and that kernels are evolving to provide more reliable solutions against the kill(pid, sig) race condition ;-) ---------- components: Library (Lib) messages: 355645 nosy: vstinner priority: normal severity: normal status: open title: subprocess.Popen.send_signal() should poll the process versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 07:18:52 2019 From: report at bugs.python.org (Lewis Gaul) Date: Tue, 29 Oct 2019 11:18:52 +0000 Subject: [issue23692] Undocumented feature prevents re module from finding certain matches In-Reply-To: <1426618184.57.0.811463464384.issue23692@psf.upfronthosting.co.za> Message-ID: <1572347932.05.0.988491408876.issue23692@roundup.psfhosted.org> Lewis Gaul added the comment: Thanks for the explanation Matthew, I'll take a further look at some point in the coming weeks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 07:37:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2019 11:37:07 +0000 Subject: [issue38630] subprocess.Popen.send_signal() should poll the process In-Reply-To: <1572347906.82.0.50492662575.issue38630@roundup.psfhosted.org> Message-ID: <1572349027.15.0.317474893392.issue38630@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +16510 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16984 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 07:41:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2019 11:41:10 +0000 Subject: [issue38630] subprocess.Popen.send_signal() should poll the process In-Reply-To: <1572347906.82.0.50492662575.issue38630@roundup.psfhosted.org> Message-ID: <1572349270.21.0.912435474628.issue38630@roundup.psfhosted.org> STINNER Victor added the comment: I noticed this issue by reading subprocess code while working on bpo-38207 ("subprocess: Popen.kill() + Popen.communicate() is blocking until all processes using the pipe close the pipe") and bpo-38502 ("regrtest: use process groups"). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 08:29:14 2019 From: report at bugs.python.org (Batuhan) Date: Tue, 29 Oct 2019 12:29:14 +0000 Subject: [issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real In-Reply-To: <1572344297.94.0.916739375163.issue38629@roundup.psfhosted.org> Message-ID: <1572352154.28.0.582376003069.issue38629@roundup.psfhosted.org> Batuhan added the comment: Ran, do you want to work on this or can i take it? ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 08:29:57 2019 From: report at bugs.python.org (Mark Borgerding) Date: Tue, 29 Oct 2019 12:29:57 +0000 Subject: [issue36666] threading.Thread should have way to catch an exception thrown within In-Reply-To: <1555637775.9.0.13238688405.issue36666@roundup.psfhosted.org> Message-ID: <1572352197.15.0.811124481934.issue36666@roundup.psfhosted.org> Mark Borgerding added the comment: @pitrou I don't necessarily agree that "current behavior can't be changed". One major selling point of exceptions is that they cannot be accidentally ignored. The exception is how the current threading.Thread ignores them. You are correct that changing Thread.join() so it propagates exceptions by default may break code that relies on the implicit behavior of a thread dying when the target/run method raises. I'd argue such code deserves to be broken -- "explicit is better than implicit". I suspect there is more code that will be fixed by such a change than broken. ---------- nosy: +Mark Borgerding _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 08:31:59 2019 From: report at bugs.python.org (Ran Benita) Date: Tue, 29 Oct 2019 12:31:59 +0000 Subject: [issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real In-Reply-To: <1572344297.94.0.916739375163.issue38629@roundup.psfhosted.org> Message-ID: <1572352318.99.0.862733086038.issue38629@roundup.psfhosted.org> Ran Benita added the comment: You can take it - thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 08:32:07 2019 From: report at bugs.python.org (pmp-p) Date: Tue, 29 Oct 2019 12:32:07 +0000 Subject: [issue36666] threading.Thread should have way to catch an exception thrown within In-Reply-To: <1555637775.9.0.13238688405.issue36666@roundup.psfhosted.org> Message-ID: <1572352327.96.0.680167160011.issue36666@roundup.psfhosted.org> Change by pmp-p : ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 08:38:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2019 12:38:55 +0000 Subject: [issue38631] Replace Py_FatalError() with regular Python exceptions Message-ID: <1572352735.51.0.915792481752.issue38631@roundup.psfhosted.org> New submission from STINNER Victor : I replaced dozens of Py_FatalError() calls with better error reporting, but there are still many places calling Py_FatalError(). The problem of Py_FatalError() is when Python is embedded into an application: Python must not kill the whole process. Well, even in the "regular" Python (/usr/bin/python3), Python should not exit immediately on an error. For example, the readline module calls Py_FatalError() on memory allocation failure, whereas PyErr_NoMemory() could be used: PyErr_NoMemory() should work since it should not allocate memory. ---------- components: Interpreter Core messages: 355651 nosy: vstinner priority: normal severity: normal status: open title: Replace Py_FatalError() with regular Python exceptions versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 08:58:55 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 29 Oct 2019 12:58:55 +0000 Subject: [issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real In-Reply-To: <1572344297.94.0.916739375163.issue38629@roundup.psfhosted.org> Message-ID: <1572353935.76.0.858992821004.issue38629@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 09:03:17 2019 From: report at bugs.python.org (Zack Weinberg) Date: Tue, 29 Oct 2019 13:03:17 +0000 Subject: [issue38632] setup.py sdist should honor SOURCE_DATE_EPOCH Message-ID: <1572354197.87.0.67466678891.issue38632@roundup.psfhosted.org> New submission from Zack Weinberg : Reproducibility has so far been concerned primarily with binary packages, but it's also desirable for source tarballs to be reproducible starting from a version-control checkout. This is particularly important for Python, where 'setup.py sdist' can run arbitrary code and generated files (e.g. Cython-generated C) are often included in sdists. As a small step toward this goal, please add support for the SOURCE_DATE_EPOCH environment variable to distutils.command.sdist. The most natural way to implement this would be with an additional user option, perhaps called 'timestamp_limit', which takes a date and time argument. File modification timestamps in the generated tarball or zipfile will be adjusted to be no later than that time. If 'timestamp_limit' is not set, it defaults to the value of os.environ['SOURCE_DATE_EPOCH']. The specification for SOURCE_DATE_EPOCH may be found at https://reproducible-builds.org/specs/source-date-epoch/ . ---------- components: Distutils messages: 355652 nosy: dstufft, eric.araujo, zwol priority: normal severity: normal status: open title: setup.py sdist should honor SOURCE_DATE_EPOCH _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 09:36:08 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 29 Oct 2019 13:36:08 +0000 Subject: [issue35745] Add import statement in dataclass code snippet In-Reply-To: <1547566391.87.0.956827047672.issue35745@roundup.psfhosted.org> Message-ID: <1572356168.73.0.868093372623.issue35745@roundup.psfhosted.org> Eric V. Smith added the comment: Closed in favor of issue 36661 (which I realize was opened later, but has more discussion, so I'm using it going forward). ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 09:43:32 2019 From: report at bugs.python.org (Fred Drake) Date: Tue, 29 Oct 2019 13:43:32 +0000 Subject: [issue38621] Bad decoding of encoded-words in unstructured email headers In-Reply-To: <1572281263.86.0.289924184677.issue38621@roundup.psfhosted.org> Message-ID: <1572356612.57.0.6006630759.issue38621@roundup.psfhosted.org> Fred Drake added the comment: This problem does not exist in Python 3.6 or Python 3.8; it appears to only exist in Python 3.7. ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 10:17:13 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 29 Oct 2019 14:17:13 +0000 Subject: [issue38621] Bad decoding of encoded-words in unstructured email headers In-Reply-To: <1572281263.86.0.289924184677.issue38621@roundup.psfhosted.org> Message-ID: <1572358633.86.0.648603787543.issue38621@roundup.psfhosted.org> Change by Ned Deily : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 10:34:38 2019 From: report at bugs.python.org (Peter) Date: Tue, 29 Oct 2019 14:34:38 +0000 Subject: [issue38633] shutil.copystat fails with PermissionError in WSL Message-ID: <1572359678.82.0.846153471805.issue38633@roundup.psfhosted.org> New submission from Peter : Using shutil.copystat (and therefore also shutil.copytree) in WSL on any directories from a mounted Windows drive (i.e. /mnt/c/...) raises an shutil.Error "[Errno 13] Permission denied". It seems to fail when copying the extended filesystem attribute "system.wsl_case_sensitive" using os.setxattr() here: https://github.com/python/cpython/blob/da6ce58dd5ac109485af45878fca6bfd265b43e9/Lib/shutil.py#L322 Note that this only happens when both src and dst are on the mounted drive. If only one is on the drive and the other is e.g. in the home directory /home/username/, it will not raise an error. Quick way to test: cd /mnt/c/ && mkdir test1 && mkdir test2 && python -c "import shutil; shutil.copystat('test1', 'test2')" ---------- components: Library (Lib), Windows messages: 355655 nosy: paul.moore, pspeter, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: shutil.copystat fails with PermissionError in WSL type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 10:37:08 2019 From: report at bugs.python.org (Batuhan) Date: Tue, 29 Oct 2019 14:37:08 +0000 Subject: [issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real In-Reply-To: <1572344297.94.0.916739375163.issue38629@roundup.psfhosted.org> Message-ID: <1572359828.27.0.448305866025.issue38629@roundup.psfhosted.org> Change by Batuhan : ---------- keywords: +patch pull_requests: +16511 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16985 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 11:17:05 2019 From: report at bugs.python.org (serge-sans-paille) Date: Tue, 29 Oct 2019 15:17:05 +0000 Subject: [issue38634] Symbol resolution conflict when embeding python in an application using libedit Message-ID: <1572362225.21.0.644355885677.issue38634@roundup.psfhosted.org> New submission from serge-sans-paille : See https://bugs.llvm.org/show_bug.cgi?id=43830, but basically the follwing code: ``` // a.c #include int main() { Py_Initialize(); PyRun_SimpleString("import readline; print(readline.__doc__)"); return 0; } ``` compiled like this: ``` % gcc a.c `./install/bin/python3-config --cflags --ldflags --libs` -lpython3.9 ``` runs fine: ``` % ./a.out Importing this module enables command line editing using GNU readline. ``` However the following: ``` % gcc a.c `./install/bin/python3-config --cflags --ldflags --libs` -ledit -lpython3.9 ``` compiles but segfaults at runtime. ---------- messages: 355656 nosy: serge-sans-paille priority: normal severity: normal status: open title: Symbol resolution conflict when embeding python in an application using libedit type: crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 11:17:41 2019 From: report at bugs.python.org (serge-sans-paille) Date: Tue, 29 Oct 2019 15:17:41 +0000 Subject: [issue38634] Symbol resolution conflict when embeding python in an application using libedit In-Reply-To: <1572362225.21.0.644355885677.issue38634@roundup.psfhosted.org> Message-ID: <1572362261.16.0.175087474994.issue38634@roundup.psfhosted.org> Change by serge-sans-paille : ---------- keywords: +patch pull_requests: +16512 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16986 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 11:19:40 2019 From: report at bugs.python.org (Fred Drake) Date: Tue, 29 Oct 2019 15:19:40 +0000 Subject: [issue38621] Bad decoding of encoded-words in unstructured email headers In-Reply-To: <1572281263.86.0.289924184677.issue38621@roundup.psfhosted.org> Message-ID: <1572362380.69.0.0948477116924.issue38621@roundup.psfhosted.org> Fred Drake added the comment: It turns out this was a problem in 3.7.4; Python 3.7.5 seems to have fixed this. Sorry for the noise. Guess it's time to update my application to use 3.7.5! ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 11:28:37 2019 From: report at bugs.python.org (pmp-p) Date: Tue, 29 Oct 2019 15:28:37 +0000 Subject: [issue38634] Symbol resolution conflict when embeding python in an application using libedit In-Reply-To: <1572362225.21.0.644355885677.issue38634@roundup.psfhosted.org> Message-ID: <1572362917.94.0.51028597443.issue38634@roundup.psfhosted.org> Change by pmp-p : ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 11:45:28 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 29 Oct 2019 15:45:28 +0000 Subject: [issue30548] typo in documentation for create_autospec In-Reply-To: <1496394381.09.0.91116482689.issue30548@psf.upfronthosting.co.za> Message-ID: <1572363928.33.0.10646331015.issue30548@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 11:48:29 2019 From: report at bugs.python.org (Brandt Bucher) Date: Tue, 29 Oct 2019 15:48:29 +0000 Subject: [issue38560] Disallow iterable argument unpacking after a keyword argument? In-Reply-To: <1571790042.34.0.496395652559.issue38560@roundup.psfhosted.org> Message-ID: <1572364109.35.0.137043160421.issue38560@roundup.psfhosted.org> Brandt Bucher added the comment: I?ve thought about it and I?m +1 on DeprecationWarning in 3.9 and SyntaxError in 3.10. Removing any type of legal function call is tricky, but this is such obscure, sneaky syntax that it?s likely an accident/bug if it does pop up (that?s how I discovered it). And every instance can be trivially refactored. ---------- title: Allow iterable argument unpacking after a keyword argument? -> Disallow iterable argument unpacking after a keyword argument? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 11:58:17 2019 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Tue, 29 Oct 2019 15:58:17 +0000 Subject: [issue38620] Shell python-config --includes returns the same path twice In-Reply-To: <1572279446.17.0.15456686003.issue38620@roundup.psfhosted.org> Message-ID: <1572364697.63.0.787558620286.issue38620@roundup.psfhosted.org> Change by Miro Hron?ok : ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 12:09:10 2019 From: report at bugs.python.org (Matthias Klose) Date: Tue, 29 Oct 2019 16:09:10 +0000 Subject: [issue38620] Shell python-config --includes returns the same path twice In-Reply-To: <1572279446.17.0.15456686003.issue38620@roundup.psfhosted.org> Message-ID: <1572365350.73.0.331138765457.issue38620@roundup.psfhosted.org> Matthias Klose added the comment: Some distros have two include directories in the path, /usr/include /usr/include/ The latter for architecture specific files, so on these distributions the python config file is installed there. Then you'll need to have both include directories. Unfortunately most third party only expect one, and because the config file is installed in a subdir, then fail to build. So the solution is to provide a rather arch specific ugly wrapper file to get away with one include directory. https://salsa.debian.org/cpython-team/python3/blob/master/debian/multiarch.h.in Also done on other distros like https://src.fedoraproject.org/rpms/gmp/blob/master/f/gmp.h I still think the two directories should be emitted, maybe check in the script if they are different. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 12:16:20 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 29 Oct 2019 16:16:20 +0000 Subject: [issue38560] Disallow iterable argument unpacking after a keyword argument? In-Reply-To: <1571790042.34.0.496395652559.issue38560@roundup.psfhosted.org> Message-ID: <1572365780.33.0.216473540752.issue38560@roundup.psfhosted.org> Raymond Hettinger added the comment: Changes to the grammar of the language need to be discussed on python-dev (especially ones that can break existing code and ones that change syntax that has worked for many years). Arguably, this is something that should just go into a lint tool. ---------- nosy: +gvanrossum, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 12:28:00 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 29 Oct 2019 16:28:00 +0000 Subject: [issue36666] threading.Thread should have way to catch an exception thrown within In-Reply-To: <1555637775.9.0.13238688405.issue36666@roundup.psfhosted.org> Message-ID: <1572366480.37.0.141245320131.issue36666@roundup.psfhosted.org> Raymond Hettinger added the comment: > I'd argue such code deserves to be broken That argument falls flat with me and it doesn't show respect for our users. The proposal would be a major change to the "rules of the game" and would likely require discussion and buy-in on python-dev and perhaps a PEP. Please heed Antoine's advice. This is his area of expertise, and he has suggested a plausible way to go forward. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 12:29:45 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 29 Oct 2019 16:29:45 +0000 Subject: [issue38613] Optimize some set operations in dictkeys object In-Reply-To: <1572263745.15.0.0692968844895.issue38613@roundup.psfhosted.org> Message-ID: <1572366585.88.0.456633169717.issue38613@roundup.psfhosted.org> Raymond Hettinger added the comment: Consider testing PyDict_CheckExact. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 13:28:43 2019 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 29 Oct 2019 17:28:43 +0000 Subject: [issue38560] Disallow iterable argument unpacking after a keyword argument? In-Reply-To: <1571790042.34.0.496395652559.issue38560@roundup.psfhosted.org> Message-ID: <1572370123.43.0.575679890212.issue38560@roundup.psfhosted.org> Guido van Rossum added the comment: Well, as you point out, f(z=0, *(1, 2)) is legal, and the parser doesn't know what the names of the keyword arguments are. SO this cannot be changed. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 13:56:00 2019 From: report at bugs.python.org (Mark Borgerding) Date: Tue, 29 Oct 2019 17:56:00 +0000 Subject: [issue36666] threading.Thread should have way to catch an exception thrown within In-Reply-To: <1555637775.9.0.13238688405.issue36666@roundup.psfhosted.org> Message-ID: <1572371760.91.0.822704066847.issue36666@roundup.psfhosted.org> Mark Borgerding added the comment: I'm not trying to disrespect anyone: not users nor certainly Python developers. I have loved Python since I learned it in 2001. I was merely trying to respond to what seemed like an automatic rejection of changing legacy behavior. I certainly agree changes to default behavior should not be made lightly, but sometimes they *should* be made. This may be such a case: a) A user writing a thread function either consciously thinks about exceptions while they write function or they do not. Sure, we should always do the former; just like we should always eat our veggies and get lots of exercise, but .... b) If they *do* think about exceptions, they will either b.1) write exception handlers within that function, or b.2) rely on default behavior that simply prints out the exception string to stderr and lets the thread quietly die. c) If they did not explicitly think about exceptions while they wrote the function, they may have in the back of their mind the reasonable expectation that an exception will not be ignored. Changing `join()` to propagate unhandled exceptions would admittedly break b.2 code, but provides absolution for all sinners who have written case c. This is what I meant by, "I suspect there is more code that will be fixed by such a change than broken." I'll confess I only just now became aware of `threading.excepthook` added in python 3.8. Does it change this problem? ---------- Added file: https://bugs.python.org/file48686/ignored_thread_exc.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 14:12:48 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 29 Oct 2019 18:12:48 +0000 Subject: [issue14196] Unhandled exceptions in pdb return value display In-Reply-To: <1330906516.74.0.432612109172.issue14196@psf.upfronthosting.co.za> Message-ID: <1572372768.41.0.308607852532.issue14196@roundup.psfhosted.org> Terry J. Reedy added the comment: Batuhan, thanks for the nudge. For the record ... If __new__ were a normal instance method, then 'some_class.__new__()' would be a correct call, as 'some_class' would be passed to '__new__' as its first and perhaps only argument. But " __new__() is a static method (special-cased so you need not declare it as such)". https://docs.python.org/3/reference/datamodel.html#object.__new__ Its special-casing makes it easy to forget that its first argument, a class, must be passed explicitly. Hence Xavier's comment. In current 2.7.17 and 3.8 (for instance), with pdb left out of the picture, the missing cls argument results in TypeError: object.__new__(): not enough arguments When I pdb.run('A()') new and step, it catches the error and refuses to advance. > (3)__new__() (Pdb) s TypeError: object.__new__(): not enough arguments > (3)__new__() ---------- resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 14:21:51 2019 From: report at bugs.python.org (Joel Croteau) Date: Tue, 29 Oct 2019 18:21:51 +0000 Subject: [issue36666] threading.Thread should have way to catch an exception thrown within In-Reply-To: <1555637775.9.0.13238688405.issue36666@roundup.psfhosted.org> Message-ID: <1572373311.75.0.200258436688.issue36666@roundup.psfhosted.org> Joel Croteau added the comment: I'm kind of in agreement with Mark on this, actually. I came across this problem when examining some threaded code that was clearly not working as intended, but was reporting success. Figuring out why that was was not easy. The code had been hastily ported to a multi-threaded version from an iterative version by my predecessor, and neither of us had enough familiarity with Python threads to realize what the problem was. The whole point of having exceptions is that it gives you a way of knowing when errors happen without having to add a bunch of extra error checking to your own code. It rather defeats the purpose if code can silently fail while still throwing exceptions, and we have to add extra code to handle special cases like this where they are ignored. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 14:39:15 2019 From: report at bugs.python.org (=?utf-8?q?Rapha=C3=ABl_M?=) Date: Tue, 29 Oct 2019 18:39:15 +0000 Subject: [issue35459] Use PyDict_GetItemWithError() instead of PyDict_GetItem() In-Reply-To: <1544525657.6.0.788709270274.issue35459@psf.upfronthosting.co.za> Message-ID: <1572374355.12.0.839842234444.issue35459@roundup.psfhosted.org> Rapha?l M added the comment: I stumbled upon this issue while reading Python 3.8 and this made me curious. I've tried writing some Python code to reproduce this bug, but I'm unable to -- I should be missing something. Is there a simple snippet showing the issue? Also, the changelog states that "The CPython interpreter can swallow exceptions in some circumstances". Are there other documented cases of those circumstances? ---------- nosy: +raphaelm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 14:48:02 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Oct 2019 18:48:02 +0000 Subject: [issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real In-Reply-To: <1572344297.94.0.916739375163.issue38629@roundup.psfhosted.org> Message-ID: <1572374882.4.0.622343490316.issue38629@roundup.psfhosted.org> Serhiy Storchaka added the comment: If float.__ceil__ is only needed for typeshed, maybe add a special case for typeshed? I have doubts about adding a C code which is never even executed. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 14:59:18 2019 From: report at bugs.python.org (Tal Einat) Date: Tue, 29 Oct 2019 18:59:18 +0000 Subject: [issue38598] IDLE: Disable F5, etc, in Shell and Output windows. In-Reply-To: <1572123836.51.0.5425055858.issue38598@roundup.psfhosted.org> Message-ID: <1572375558.44.0.418291049957.issue38598@roundup.psfhosted.org> Tal Einat added the comment: As a better design for a long-term fix, I suggest: * Avoiding isinstance() checks by instead using a dedicated class attribute and checking that. (I've recently used this pattern for line numbers.) * Instead of baling out inside the "check module" and "run" handlers, don't include the related items in the menus in the first place. (Make them conditional on the above-mentioned class attribute's value.) ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 15:01:24 2019 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 29 Oct 2019 19:01:24 +0000 Subject: [issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real In-Reply-To: <1572344297.94.0.916739375163.issue38629@roundup.psfhosted.org> Message-ID: <1572375684.43.0.474502374543.issue38629@roundup.psfhosted.org> Mark Dickinson added the comment: > I have doubts about adding a C code which is never even executed. My reading of the PR is that it *would* be executed: the math module first looks for the __floor__ special method, then falls back to using the libm floor if that doesn't exist. Am I missing something? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 15:07:13 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 29 Oct 2019 19:07:13 +0000 Subject: [issue38627] Add copy() method to pathlib In-Reply-To: <1572328517.33.0.0527318368455.issue38627@roundup.psfhosted.org> Message-ID: <1572376033.67.0.95580293587.issue38627@roundup.psfhosted.org> Brett Cannon added the comment: And just to add Serhiy's logic, think of pathlib more as an equivalent to os.path than a be-all solution to anything path-related. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 15:40:16 2019 From: report at bugs.python.org (serge-sans-paille) Date: Tue, 29 Oct 2019 19:40:16 +0000 Subject: [issue13501] Make libedit support more generic; port readline / libedit to FreeBSD In-Reply-To: <1322579942.3.0.601983912656.issue13501@psf.upfronthosting.co.za> Message-ID: <1572378016.1.0.14828219558.issue13501@roundup.psfhosted.org> Change by serge-sans-paille : ---------- pull_requests: +16513 pull_request: https://github.com/python/cpython/pull/16986 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 15:42:04 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 29 Oct 2019 19:42:04 +0000 Subject: [issue38634] Symbol resolution conflict when embeding python in an application using libedit In-Reply-To: <1572362225.21.0.644355885677.issue38634@roundup.psfhosted.org> Message-ID: <1572378124.33.0.163799254536.issue38634@roundup.psfhosted.org> Ned Deily added the comment: This appears to be essentially a duplicate of Issue13631 which has long proposed full support of libedit. ---------- assignee: -> gregory.p.smith nosy: +gregory.p.smith, ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 15:42:34 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Oct 2019 19:42:34 +0000 Subject: [issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real In-Reply-To: <1572344297.94.0.916739375163.issue38629@roundup.psfhosted.org> Message-ID: <1572378154.38.0.427955887222.issue38629@roundup.psfhosted.org> Serhiy Storchaka added the comment: Oh, you are right. I misunderstood the original issue and thought that the code first checks PyFloat_Check() or PyFloat_CheckExact(). If float.__ceil__ will be executed it will add significant overhead for creating and executing the method object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 16:16:13 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Oct 2019 20:16:13 +0000 Subject: [issue24686] zipfile is intolerant of extra bytes In-Reply-To: <1437585382.21.0.339790988945.issue24686@psf.upfronthosting.co.za> Message-ID: <1572380173.86.0.818171028277.issue24686@roundup.psfhosted.org> Serhiy Storchaka added the comment: Interesting, but all extra after the Extended Timestamp field is a UTF-8 encoded text: b"\n\x00 \x00\x00\x00\x00\x00\x01\x00\x18\x00\x00\xeb\x93\x91'\xef\xbf\xbd\xef\xbf\xbd\x01\x00\xde\xa8\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\x01\x00\xde\xa8\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\x01" == "\n\x00 \x00\x00\x00\x00\x00\x01\x00\x18\x00\x00\ub4d1'\ufffd\ufffd\x01\x00\u07a8\ufffd\ufffd\ufffd\x01\x00\u07a8\ufffd\ufffd\ufffd\x01".encode() The chance that random binary data is a UTF-8 encoded text is small, so it looks like garbage text encoded with UTF-8 was appended to the extra. It is definitely not Python issue. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 16:24:55 2019 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 29 Oct 2019 20:24:55 +0000 Subject: [issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real In-Reply-To: <1572344297.94.0.916739375163.issue38629@roundup.psfhosted.org> Message-ID: <1572380695.93.0.069482948598.issue38629@roundup.psfhosted.org> Mark Dickinson added the comment: > If float.__ceil__ will be executed it will add significant overhead for creating and executing the method object. Yes, I'd definitely like to see timings; I think Victor already asked for those on the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 16:35:00 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Oct 2019 20:35:00 +0000 Subject: [issue38635] Simplify decoding the ZIP64 extra field and make it tolerant to extra data Message-ID: <1572381300.43.0.604148893279.issue38635@roundup.psfhosted.org> New submission from Serhiy Storchaka : The decoding code can be much shorter and efficient. Also, the Info-ZIP unzip utility is tolerant to extra bytes. We can be too. ---------- components: Library (Lib) messages: 355676 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Simplify decoding the ZIP64 extra field and make it tolerant to extra data type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 16:36:29 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Oct 2019 20:36:29 +0000 Subject: [issue38635] Simplify decoding the ZIP64 extra field and make it tolerant to extra data In-Reply-To: <1572381300.43.0.604148893279.issue38635@roundup.psfhosted.org> Message-ID: <1572381389.9.0.826842535732.issue38635@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +16514 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16988 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 16:46:45 2019 From: report at bugs.python.org (will rogers) Date: Tue, 29 Oct 2019 20:46:45 +0000 Subject: [issue36702] test_dtrace failed In-Reply-To: <1556002133.06.0.696794109378.issue36702@roundup.psfhosted.org> Message-ID: <1572382005.93.0.1675545516.issue36702@roundup.psfhosted.org> will rogers added the comment: I also encountered this on Scientific Linux 7.4 (Linux 3.10.0-693.11.6.el7.x86_64) while trying to build Python 3.8.0. I think it is due to differences in versions of 'dtrace' on different platforms. On my MacOS-X v10.14.6 (Mojave) system, the 'dtrace' command has a -q (quiet the output) option. On SL 7.4, it does not. The options are quite different. This is output and versions from my test run: ./python ./Tools/scripts/run_tests.py == CPython 3.8.0 (default, Oct 29 2019, 14:37:09) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] == Linux-3.10.0-693.11.6.el7.x86_64-x86_64-with-glibc2.17 little-endian == cwd: /opt/Python-3.8.0/build/test_python_30482 == CPU count: 2 == encodings: locale=UTF-8, FS=utf-8 Below is an error from the test log that shows the 'q' option being rejected from 'dtrace' (linux'): 0:10:16 load avg: 1.79 Re-running test_dtrace in verbose mode skipped "dtrace(1) failed: ('/usr/bin/dtrace', 'invalid option', '-q')\nUsage /usr/bin/dtrace [--help] [-h | -G] [-C [-I]] -s File.d [-o ]" Assuming 'dtrace' is run as a sub-process, the different versions could be producing very different results. I attached a (clipped) version of my 'make test' output, it is essentially the same as sayno996's results. There are also some error from 'test_nis" which can be ignoed for this issue. I hope this helps. ---------- nosy: +willrogers3 versions: +Python 3.8 Added file: https://bugs.python.org/file48687/make_test-clipped.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 17:14:08 2019 From: report at bugs.python.org (Stephen Paul Chappell) Date: Tue, 29 Oct 2019 21:14:08 +0000 Subject: [issue38636] "Alt + T" and "Alt + U" Broken in IDLE on Windows Message-ID: <1572383648.52.0.228001978432.issue38636@roundup.psfhosted.org> New submission from Stephen Paul Chappell : In the latest Python 3.8.0 installation when running IDLE on Windows, pressing "Alt + T" generates the following error: Exception in Tkinter callback Traceback (most recent call last): File "C:\Program Files\Python38\Lib\tkinter\__init__.py", line 1883, in __call__ return self.func(*args) File "C:\Program Files\Python38\Lib\idlelib\multicall.py", line 176, in handler r = l[i](event) TypeError: toggle_tabs_event() missing 1 required positional argument: 'event' Similarly, pressing "Alt + U" will generate a very similar error: Exception in Tkinter callback Traceback (most recent call last): File "C:\Program Files\Python38\Lib\tkinter\__init__.py", line 1883, in __call__ return self.func(*args) File "C:\Program Files\Python38\Lib\idlelib\multicall.py", line 176, in handler r = l[i](event) TypeError: change_indentwidth_event() missing 1 required positional argument: 'event' ---------- assignee: terry.reedy components: IDLE, Windows messages: 355678 nosy: Zero, paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware priority: normal severity: normal status: open title: "Alt + T" and "Alt + U" Broken in IDLE on Windows type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 17:31:18 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 29 Oct 2019 21:31:18 +0000 Subject: [issue28029] Replace and empty strings In-Reply-To: <1473366641.62.0.989746465638.issue28029@psf.upfronthosting.co.za> Message-ID: <1572384678.86.0.795613160841.issue28029@roundup.psfhosted.org> Raymond Hettinger added the comment: The current docs could certainly use clarification. FWIW, here is a link to my explanation for the existing logic in str.replace(): https://stackoverflow.com/questions/16645083 Perhaps some of that wording may be helpful. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 17:33:26 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 29 Oct 2019 21:33:26 +0000 Subject: [issue38453] ntpath.realpath() does not fully resolve relative paths In-Reply-To: <1570832840.2.0.910161330311.issue38453@roundup.psfhosted.org> Message-ID: <1572384806.58.0.764210223804.issue38453@roundup.psfhosted.org> Steve Dower added the comment: The discussion on the PR has raised one scenario where our algorithm conflicts with what we can reasonably emulate from the IO manager (which is itself not entirely self-consistent): If you call ntpath.realpath(r"C:\spam\eggs") where "spam" is a symlink/junction to "D:\foo\baz" and "D:\foo\baz\eggs" is a relative symlink to "..\bar" and "D:\foo\bar" does not exist, we will incorrectly return "C:\bar". Note that if "D:\foo\bar" *does* exist, we will return the correct result. And if "C:\spam" is *not* a symlink/junction, we will return the correct result. Essentially, we fail in the case where ntpath.exists(X) fails and realpath(dirname(X)) != dirname(X) and readlink(X).startswith("..\\") is True. Considering it's taken months of patient explanation from Eryk Sun for me to understand this, and nobody has ever complained about it, I'm prepared to call it a known limitation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 17:34:36 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Oct 2019 21:34:36 +0000 Subject: [issue28029] Replace and empty strings In-Reply-To: <1473366641.62.0.989746465638.issue28029@psf.upfronthosting.co.za> Message-ID: <1572384876.46.0.965565007609.issue28029@roundup.psfhosted.org> Serhiy Storchaka added the comment: Raymond, the link is about str.split(), not str.replace(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 17:40:45 2019 From: report at bugs.python.org (Jamie Bliss) Date: Tue, 29 Oct 2019 21:40:45 +0000 Subject: [issue37839] makesetup Doesn't Handle Defines with Equal Sign In-Reply-To: <1565694009.91.0.692452487744.issue37839@roundup.psfhosted.org> Message-ID: <1572385245.58.0.692775302288.issue37839@roundup.psfhosted.org> Jamie Bliss added the comment: Similarly, stumbled across this working on https://github.com/pyz-dispenser/cpython-static This is particularly problematic because of the SQLite module's MODULE_NAME macro. ---------- nosy: +astronouth7303 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 18:00:41 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Oct 2019 22:00:41 +0000 Subject: [issue38312] curses: add `set_tabsize` and `set_escdelay` In-Reply-To: <1569721208.44.0.258918770799.issue38312@roundup.psfhosted.org> Message-ID: <1572386441.04.0.898624952233.issue38312@roundup.psfhosted.org> Serhiy Storchaka added the comment: There are also ncurses functions get_tabsize() and get_escdelay(). In other implementations they can be modeled by returning the TABSIZE and ESCDELAY global variables. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 18:03:15 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 29 Oct 2019 22:03:15 +0000 Subject: [issue38568] [3.7.5 x86_64 Linux] f-string parsing results in EOL In-Reply-To: <1571857754.85.0.698050163763.issue38568@roundup.psfhosted.org> Message-ID: <1572386595.82.0.688661449255.issue38568@roundup.psfhosted.org> Eric V. Smith added the comment: > It is a limitation of f-strings, though. We're not allowed to use > backslashes within the f-string expression in curly braces. I've considered relaxing these restrictions, although it's very complicated. The parser would need to become aware of what's inside an f-string (the braces, the expressions, the optional format spec, the doubled braces, escaped characters, etc.). See PEP 536 for a rough outline. The = format for "debugging" with f-strings (see issue 36817) also makes this more complicated. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 18:09:41 2019 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 29 Oct 2019 22:09:41 +0000 Subject: [issue38312] curses: add `set_tabsize` and `set_escdelay` In-Reply-To: <1569721208.44.0.258918770799.issue38312@roundup.psfhosted.org> Message-ID: <1572386981.54.0.465290048905.issue38312@roundup.psfhosted.org> Anthony Sottile added the comment: ah, I'll add those too -- I can do that in the current PR ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 18:13:50 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 29 Oct 2019 22:13:50 +0000 Subject: [issue28029] Replace and empty strings In-Reply-To: <1473366641.62.0.989746465638.issue28029@psf.upfronthosting.co.za> Message-ID: <1572387230.11.0.298141449097.issue28029@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- Removed message: https://bugs.python.org/msg355679 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 18:14:00 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 29 Oct 2019 22:14:00 +0000 Subject: [issue28029] Replace and empty strings In-Reply-To: <1473366641.62.0.989746465638.issue28029@psf.upfronthosting.co.za> Message-ID: <1572387240.75.0.958040938109.issue28029@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- Removed message: https://bugs.python.org/msg355681 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 18:46:43 2019 From: report at bugs.python.org (Jim Carroll) Date: Tue, 29 Oct 2019 22:46:43 +0000 Subject: [issue38611] ElementTree.ParseError does not implement SyntaxError interface as expected In-Reply-To: <1572253875.02.0.816082787085.issue38611@roundup.psfhosted.org> Message-ID: <1572389203.57.0.35979259068.issue38611@roundup.psfhosted.org> Jim Carroll added the comment: This patch solves the issue diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c index c3f30c9339..d265021f75 100644 --- a/Modules/_elementtree.c +++ b/Modules/_elementtree.c @@ -2782,6 +2782,7 @@ treebuilder_handle_start(TreeBuilderObject* self, PyObject* tag, st->parseerror_obj, "multiple elements on top level" ); + PyErr_SyntaxLocationEx("xml.etree.ElementTree", 0, 0); goto error; } Py_INCREF(node); @@ -3267,6 +3268,7 @@ expat_set_error(enum XML_Error error_code, Py_ssize_t line, Py_ssize_t column, Py_DECREF(position); PyErr_SetObject(st->parseerror_obj, error); + PyErr_SyntaxLocationEx("xml.etree.ElementTree", (int)line, (int)column); Py_DECREF(error); } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 20:02:34 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 30 Oct 2019 00:02:34 +0000 Subject: [issue37957] Allow regrtest to receive a file with test (and subtests) to ignore In-Reply-To: <1566864234.54.0.166621143796.issue37957@roundup.psfhosted.org> Message-ID: <1572393754.81.0.802059972512.issue37957@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +16515 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16989 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 20:42:20 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 30 Oct 2019 00:42:20 +0000 Subject: [issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0 In-Reply-To: <1570326378.93.0.0728676630318.issue38382@roundup.psfhosted.org> Message-ID: <1572396140.59.0.565683325533.issue38382@roundup.psfhosted.org> Raymond Hettinger added the comment: Maybe we should hold-off on adding negative number support unless a compelling use case arises. It is telling that scipy.stats.hmean() and that MS Excel's harmean() haven't found justification to add negative number support. In all likelihood, a negative input is an error in the input and users would be better-off seeing an exception raised. In a number of contexts, the negative input wouldn't make sense all: * a 10 ohm resistor wired in parallel with a negative 5 ohm resistor * travel 1 km at 5 kph then another 1 km at -10 kph We really don't have to go down this route just because we can. The usual rule is to keep the API minimal unless real use cases arise to inform the design. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 22:05:46 2019 From: report at bugs.python.org (toywei) Date: Wed, 30 Oct 2019 02:05:46 +0000 Subject: [issue38637] fix GROWTH_RATE comments bug Message-ID: <1572401146.1.0.358314054297.issue38637@roundup.psfhosted.org> New submission from toywei : It also exists in 3.7/3.6/3.3. ---------- assignee: docs at python components: Documentation messages: 355688 nosy: docs at python, toywei priority: normal pull_requests: 16516 severity: normal status: open title: fix GROWTH_RATE comments bug type: resource usage versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 22:12:26 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 30 Oct 2019 02:12:26 +0000 Subject: [issue38611] ElementTree.ParseError does not implement SyntaxError interface as expected In-Reply-To: <1572253875.02.0.816082787085.issue38611@roundup.psfhosted.org> Message-ID: <1572401546.5.0.575629305546.issue38611@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 22:22:50 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 30 Oct 2019 02:22:50 +0000 Subject: [issue38637] fix GROWTH_RATE comments bug In-Reply-To: <1572401146.1.0.358314054297.issue38637@roundup.psfhosted.org> Message-ID: <1572402170.93.0.8199614117.issue38637@roundup.psfhosted.org> Steven D'Aprano added the comment: Please explain the bug here on the bug tracker, people shouldn't have to drill down into the PR to find out what it means. Before fixing the bug, you should find out whether or not it actually is a bug. In my testing, the comment is approximately correct: py> from random import random py> d = dict((random(), None) for i in range(20)) py> sys.getsizeof(d) 432 py> while sys.getsizeof(d) == 432: ... d[random()] = None ... py> sys.getsizeof(d) 816 That looks closer to double than triple to me. Try a larger dict: py> for i in range(10000): ... d[random()] = None ... py> sys.getsizeof(d) 196656 py> while sys.getsizeof(d) == 196656: ... d[random()] = None ... py> sys.getsizeof(d) 393264 Still looks like double to me. Unless an expert on the dict internals agrees with you, the comment is correct, it is not a bug, and this issue should be closed. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 23:06:29 2019 From: report at bugs.python.org (gaoxinge) Date: Wed, 30 Oct 2019 03:06:29 +0000 Subject: [issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0 In-Reply-To: <1570326378.93.0.0728676630318.issue38382@roundup.psfhosted.org> Message-ID: <1572404789.15.0.0456001767678.issue38382@roundup.psfhosted.org> gaoxinge added the comment: I think that three kinds of mean should behave like: - `geometric mean`: input should be float, finite and positive - `harmonic mean`: input should be float, finite and nonzero - `mean` or `fmean`: input should be float, finite Otherwise these mean functions should raise a `StatisticsError`. Two points that we should pay attention to: - Why every input should be float? Because it is a statstics library, we should focus on the float instead of complex number or string or `math.nan`. - Why every input shoud be finite? Becuse we should get rid of `math.inf`. ---------- nosy: +gaoxinge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 23:10:26 2019 From: report at bugs.python.org (gaoxinge) Date: Wed, 30 Oct 2019 03:10:26 +0000 Subject: [issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0 In-Reply-To: <1570326378.93.0.0728676630318.issue38382@roundup.psfhosted.org> Message-ID: <1572405026.43.0.699499740487.issue38382@roundup.psfhosted.org> gaoxinge added the comment: The document https://github.com/WarrenWeckesser/cpython/blob/master/Lib/statistics.py#L389 in `harmonic_mean` is out-dated. I think we can simply follow the wiki: - [arithemic mean](https://en.wikipedia.org/wiki/Arithmetic_mean) - [geometric mean](https://en.wikipedia.org/wiki/Geometric_mean) - [harmonic mean](https://en.wikipedia.org/wiki/Harmonic_mean) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 01:21:25 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 30 Oct 2019 05:21:25 +0000 Subject: [issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0 In-Reply-To: <1572404789.15.0.0456001767678.issue38382@roundup.psfhosted.org> Message-ID: <20191030052117.GM3574@ando.pearwood.info> Steven D'Aprano added the comment: Thank you for your comments, but accepting non-floats like Decimal and Fraction (and int, of course!) is a hard requirement for the statistics module. fmean will naturally convert any data to float for speed, but the other means will attempt to keep the original data type if possible, so that the mean() of Decimals will be a Decimal, the mean of Fractions will be a Fraction, etc. The median_low and median_high functions don't require numbers at all, the data points just need to be ordinal data and support sorting. The mode function doesn't even require ordinal data, it can work with nominal data. That is part of the definition of median and mode, and will not change. http://intellspot.com/nominal-vs-ordinal-data/ So long as Python support IEEE-754 floating point arithmetic, which is the most common standard for floating point, there will be NANs and INFs. We should not reject them unnecessarily. You can always pre-filter your data before passing it the statistics module. Why do you object to float INF? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 01:50:10 2019 From: report at bugs.python.org (Dino Viehland) Date: Wed, 30 Oct 2019 05:50:10 +0000 Subject: [issue36971] Add subsections in C API "Common Object Structures" page In-Reply-To: <1558365249.02.0.267009483185.issue36971@roundup.psfhosted.org> Message-ID: <1572414610.89.0.420277765269.issue36971@roundup.psfhosted.org> Dino Viehland added the comment: @BTaskaya Seems done, I'll go ahead and close it ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 02:06:20 2019 From: report at bugs.python.org (gaoxinge) Date: Wed, 30 Oct 2019 06:06:20 +0000 Subject: [issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0 In-Reply-To: <1570326378.93.0.0728676630318.issue38382@roundup.psfhosted.org> Message-ID: <1572415580.11.0.561866986665.issue38382@roundup.psfhosted.org> gaoxinge added the comment: Your point makes sense. We should still also consider the `int`, `Decimal`, `Fraction`, `math.nan`, `math.inf`, `np.int` and so on. So - `geometric mean`: input should be positive (>= 0) - `harmonic mean`: input should be nonzero (!= 0) - `mean` or `fmean`: no input restriction ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 03:39:49 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 30 Oct 2019 07:39:49 +0000 Subject: [issue38613] Optimize some set operations in dictkeys object In-Reply-To: <1572263745.15.0.0692968844895.issue38613@roundup.psfhosted.org> Message-ID: <1572421189.21.0.584722518422.issue38613@roundup.psfhosted.org> Inada Naoki added the comment: done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 04:09:46 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 30 Oct 2019 08:09:46 +0000 Subject: [issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0 In-Reply-To: <1572415580.11.0.561866986665.issue38382@roundup.psfhosted.org> Message-ID: <20191030080939.GN3574@ando.pearwood.info> Steven D'Aprano added the comment: Have you read the rest of the thread? There is a compelling reason to support harmonic mean including zero (resistors in parallel) but not yet any compelling reason to support negative values. If you have a good use-case for harmonic mean of negative values, please tell us. Until then, I agree with Raymond: negative values should be treated as an error, as documented. Can we go back to the original issue? Should we just document the "early out" behaviour on hitting zero, or should we follow the suggestion to check for bad data and raise? I'm currently undecided which I would prefer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 04:35:30 2019 From: report at bugs.python.org (=?utf-8?q?Erik_Bystr=C3=B6m?=) Date: Wed, 30 Oct 2019 08:35:30 +0000 Subject: [issue30548] typo in documentation for create_autospec In-Reply-To: <1496394381.09.0.91116482689.issue30548@psf.upfronthosting.co.za> Message-ID: <1572424530.47.0.461248894344.issue30548@roundup.psfhosted.org> Erik Bystr?m added the comment: Yes, you're right. I do think the docs are a bit misleading. Maybe something like this would make it more clear? "If a class is used as a spec then the returned object will be a mock of that class. When the constructor of the returned mock class is invoked an instance object is returned that has the same spec as a normal instance object would have. By passing instance=True you can directly create a mock instance of the class." If not, feel free to close this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 05:21:06 2019 From: report at bugs.python.org (Alexander Kurakin) Date: Wed, 30 Oct 2019 09:21:06 +0000 Subject: [issue38638] Backtrace of exit phase of context managers Message-ID: <1572427266.54.0.98752253476.issue38638@roundup.psfhosted.org> New submission from Alexander Kurakin : class CM: def __init__(self): pass def __enter__(self): return self def __exit__(self, exc_type, exc_val, exc_tb): raise RuntimeError() if __name__ == '__main__': with CM() as cm: print('Hello') $ python3 cm.py Hello Traceback (most recent call last): File "cm.py", line 14, in print('Hello') # <-- File "cm.py", line 10, in __exit__ raise RuntimeError() RuntimeError Is it correct that print presents in backtrace? Well it's the last line but... Thanks. ---------- components: Interpreter Core messages: 355698 nosy: kuraga priority: normal severity: normal status: open title: Backtrace of exit phase of context managers type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 05:29:36 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Oct 2019 09:29:36 +0000 Subject: [issue38639] Optimize floor() and ceil() for floats Message-ID: <1572427776.81.0.21510885347.issue38639@roundup.psfhosted.org> New submission from Serhiy Storchaka : Currently math.floor(), math.ceil() and math.trunc() look up special methods __floor__, __ceil__ and __trunc__ correspondingly and execute them if found. Otherwise they execute common code for floats. There are no special slots for these methods, so looking up these names in type dicts takes some time. It is a waste of time for most common case -- float objects. The proposed PR adds checks PyFloat_CheckExact() before looking up the special method. Some microbenchmarks: $ ./python -m pyperf timeit -s "from math import floor" --duplicate 100 "floor(12345.6)" Before: Mean +- std dev: 63.2 ns +- 1.7 ns After: Mean +- std dev: 51.8 ns +- 1.3 ns $ ./python -m pyperf timeit -s "from math import ceil" --duplicate 100 "ceil(12345.6)" Before: Mean +- std dev: 61.1 ns +- 1.5 ns After: Mean +- std dev: 51.9 ns +- 1.1 ns $ ./python -m pyperf timeit -s "from math import trunc" --duplicate 100 "trunc(12345.6)" Before: Mean +- std dev: 72.0 ns +- 1.5 ns After: Mean +- std dev: 34.7 ns +- 1.4 ns We should also check how this optimization affects other types: $ ./python -m pyperf timeit -s "from math import floor" --duplicate 100 "floor(12345)" Before: Mean +- std dev: 56.3 ns +- 1.3 ns After: Mean +- std dev: 56.3 ns +- 1.4 ns $ ./python -m pyperf timeit -s "from math import ceil" --duplicate 100 "ceil(12345)" Before: Mean +- std dev: 55.7 ns +- 1.6 ns After: Mean +- std dev: 56.8 ns +- 1.6 ns $ ./python -m pyperf timeit -s "from math import trunc" --duplicate 100 "trunc(12345)" Before: Mean +- std dev: 54.7 ns +- 1.3 ns After: Mean +- std dev: 56.7 ns +- 1.5 ns ---------- components: Interpreter Core messages: 355699 nosy: mark.dickinson, serhiy.storchaka priority: normal severity: normal status: open title: Optimize floor() and ceil() for floats type: performance versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 05:30:46 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Oct 2019 09:30:46 +0000 Subject: [issue38639] Optimize floor(), ceil() and trunc() for floats In-Reply-To: <1572427776.81.0.21510885347.issue38639@roundup.psfhosted.org> Message-ID: <1572427846.81.0.112548009931.issue38639@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- title: Optimize floor() and ceil() for floats -> Optimize floor(), ceil() and trunc() for floats _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 05:33:44 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Oct 2019 09:33:44 +0000 Subject: [issue38639] Optimize floor(), ceil() and trunc() for floats In-Reply-To: <1572427776.81.0.21510885347.issue38639@roundup.psfhosted.org> Message-ID: <1572428024.9.0.0907237301403.issue38639@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +16517 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 05:48:06 2019 From: report at bugs.python.org (Hugo Dupras) Date: Wed, 30 Oct 2019 09:48:06 +0000 Subject: [issue38640] while False: break => SyntaxError: 'break' outside loop Message-ID: <1572428886.51.0.45563670991.issue38640@roundup.psfhosted.org> New submission from Hugo Dupras : In python 3.8 the following code raises an exception, which was not the case with previous python. ``` while False: ... break ``` It raises the following exception: SyntaxError: 'break' outside loop. This `while False` loop was used to temporary disable a while loop in our code base. Workaround to fix this: ``` enable=False while enable: ... break ``` (or use the walrus operator) ---------- components: Interpreter Core messages: 355700 nosy: jabesq priority: normal severity: normal status: open title: while False: break => SyntaxError: 'break' outside loop type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 05:52:41 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 30 Oct 2019 09:52:41 +0000 Subject: [issue38636] IDLE regression: toggle tabs and change indent width functions In-Reply-To: <1572383648.52.0.228001978432.issue38636@roundup.psfhosted.org> Message-ID: <1572429161.23.0.126341441419.issue38636@roundup.psfhosted.org> Terry J. Reedy added the comment: Both the menu items and the short cuts for these two functions on the Format menu give these call errors. They are only visible if IDLE is started from a console. They work in 3.6; the regression is due to #36390. These 2 functions were moved separately from the others in the 3rd PR, PR 14827, changeset 1b3892243433da7eae7f5f3a4f98f13d309c8926. I found the mistake and believe I have one possible version of a working fix on a new branch. The diff contains this comment: # With mixed indents not allowed, these are semi-useless and not unittested. I was thinking that they should be removed, but regardless, they should have been manually tested. However, in one test with 3.6, a mixed indent -- tab + 4 spaces following a 4 space tab -- did work, so I am not sure of the rule. I will try to add a unittest along with the fix. ---------- components: -Windows nosy: -paul.moore, steve.dower, tim.golden, zach.ware stage: -> test needed title: "Alt + T" and "Alt + U" Broken in IDLE on Windows -> IDLE regression: toggle tabs and change indent width functions versions: +Python 3.7, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 06:03:27 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Oct 2019 10:03:27 +0000 Subject: [issue38600] Change the mark up of NULL In-Reply-To: <1572164169.73.0.860465695362.issue38600@roundup.psfhosted.org> Message-ID: <1572429807.33.0.67110934637.issue38600@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 25fc088607c855060ed142296dc1bd0125fad1af by Serhiy Storchaka in branch 'master': bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) https://github.com/python/cpython/commit/25fc088607c855060ed142296dc1bd0125fad1af ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 06:03:56 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Oct 2019 10:03:56 +0000 Subject: [issue28029] Replace and empty strings In-Reply-To: <1473366641.62.0.989746465638.issue28029@psf.upfronthosting.co.za> Message-ID: <1572429836.78.0.861892648995.issue28029@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 865c3b257fe38154a4320c7ee6afb416f665b9c2 by Serhiy Storchaka in branch 'master': bpo-28029: Make "".replace("", s, n) returning s for any n != 0. (GH-16981) https://github.com/python/cpython/commit/865c3b257fe38154a4320c7ee6afb416f665b9c2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 06:06:16 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Oct 2019 10:06:16 +0000 Subject: [issue28029] Replace and empty strings In-Reply-To: <1473366641.62.0.989746465638.issue28029@psf.upfronthosting.co.za> Message-ID: <1572429976.3.0.629023156874.issue28029@roundup.psfhosted.org> Serhiy Storchaka added the comment: Because of possible compatibility issue (very unlikely) this change is done only in master and will not be backported. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 06:10:22 2019 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 30 Oct 2019 10:10:22 +0000 Subject: [issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0 In-Reply-To: <1570326378.93.0.0728676630318.issue38382@roundup.psfhosted.org> Message-ID: <1572430222.67.0.921169980418.issue38382@roundup.psfhosted.org> Mark Dickinson added the comment: > Maybe we should hold-off on adding negative number support unless a compelling use case arises. +100. It makes little sense mathematically, and I'm sceptical that such use cases exist in real life. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 06:17:43 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Oct 2019 10:17:43 +0000 Subject: [issue38640] while False: break => SyntaxError: 'break' outside loop In-Reply-To: <1572428886.51.0.45563670991.issue38640@roundup.psfhosted.org> Message-ID: <1572430663.03.0.344391879287.issue38640@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +3.8regression nosy: +pablogsal, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 07:24:15 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 30 Oct 2019 11:24:15 +0000 Subject: [issue38640] while False: break => SyntaxError: 'break' outside loop In-Reply-To: <1572428886.51.0.45563670991.issue38640@roundup.psfhosted.org> Message-ID: <1572434655.82.0.170550498598.issue38640@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +16518 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16992 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 07:26:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 Oct 2019 11:26:26 +0000 Subject: [issue38630] subprocess.Popen.send_signal() should poll the process In-Reply-To: <1572347906.82.0.50492662575.issue38630@roundup.psfhosted.org> Message-ID: <1572434786.13.0.290284945735.issue38630@roundup.psfhosted.org> STINNER Victor added the comment: > subprocess.Popen.send_signal() doesn't check if the process exited since the poll() method has been called for the last time. If the process exit just before os.kill() is called, the signal can be sent to the wrong process if the process identified is recycled. I'm not sure under which conditions this case happens. I understood that the pid is released (and so can be reused) as soon as the child process completes *and* waitpid() has been called. Two cases: * os.waitpid(pid, 0) can be called directly ("raw call") * Popen API used, but called from a different thread: thread A calls send_signal(), thread B calls waitpid() I'm mostly concerned by the multithreading case. I noticed the race condition while working on regrtest which uses 2 threads. One thread which is responsible for the process (call .communicate(), call .wait(), etc.), and one "main" thread which sends a signal to every child processes to interrupt them. My first implementation called .wait() after calling .send_signal() in the main thread. But it seems like Popen is not "fully" thread safe: the "waitpid lock" only protects the os.waitpid() call, it doesn't protect the self.returncode attribute. I modified regrtest to only call .waitpid() in the thread responsible of the process, to avoid such race condition. It seems like the new design is more reliable. The main thread only calls .send_signal(): it doesn't call .wait() (which calls os.waitpid()) anymore. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 07:32:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 Oct 2019 11:32:55 +0000 Subject: [issue28029] Replace and empty strings In-Reply-To: <1473366641.62.0.989746465638.issue28029@psf.upfronthosting.co.za> Message-ID: <1572435175.2.0.13542247683.issue28029@roundup.psfhosted.org> STINNER Victor added the comment: > Because of possible compatibility issue (very unlikely) this change is done only in master and will not be backported. Yeah, I agree. It would be a mistake to change the Python behavior in a minor release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 07:41:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 Oct 2019 11:41:46 +0000 Subject: [issue38614] test_asyncio: test_communicate() failed on AMD64 FreeBSD Shared 3.8 In-Reply-To: <1572265095.84.0.80833057987.issue38614@roundup.psfhosted.org> Message-ID: <1572435706.29.0.187090716751.issue38614@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 24c6258269acd842914450f55491690ba87dded9 by Victor Stinner in branch 'master': bpo-38614: Add timeout constants to test.support (GH-16964) https://github.com/python/cpython/commit/24c6258269acd842914450f55491690ba87dded9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 07:53:29 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 30 Oct 2019 11:53:29 +0000 Subject: [issue38640] while False: break => SyntaxError: 'break' outside loop In-Reply-To: <1572428886.51.0.45563670991.issue38640@roundup.psfhosted.org> Message-ID: <1572436409.48.0.770069141134.issue38640@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 6c3e66a34b95fff07df0ad5086104dd637a091ce by Pablo Galindo in branch 'master': bpo-38640: Allow break and continue in always false while loops (GH-16992) https://github.com/python/cpython/commit/6c3e66a34b95fff07df0ad5086104dd637a091ce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 07:53:39 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 30 Oct 2019 11:53:39 +0000 Subject: [issue38640] while False: break => SyntaxError: 'break' outside loop In-Reply-To: <1572428886.51.0.45563670991.issue38640@roundup.psfhosted.org> Message-ID: <1572436419.08.0.488306425279.issue38640@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +16519 pull_request: https://github.com/python/cpython/pull/16993 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 07:57:25 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 30 Oct 2019 11:57:25 +0000 Subject: [issue38640] while False: break => SyntaxError: 'break' outside loop In-Reply-To: <1572428886.51.0.45563670991.issue38640@roundup.psfhosted.org> Message-ID: <1572436645.56.0.249178414657.issue38640@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thanks, Hugo Dupras for the report! :) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 08:11:44 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 30 Oct 2019 12:11:44 +0000 Subject: [issue38640] while False: break => SyntaxError: 'break' outside loop In-Reply-To: <1572428886.51.0.45563670991.issue38640@roundup.psfhosted.org> Message-ID: <1572437504.16.0.747848835168.issue38640@roundup.psfhosted.org> miss-islington added the comment: New changeset dcb338ea1b8f14e21dde3564658b9040df996349 by Miss Skeleton (bot) in branch '3.8': bpo-38640: Allow break and continue in always false while loops (GH-16992) https://github.com/python/cpython/commit/dcb338ea1b8f14e21dde3564658b9040df996349 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 08:18:45 2019 From: report at bugs.python.org (Stephen Paul Chappell) Date: Wed, 30 Oct 2019 12:18:45 +0000 Subject: [issue38636] IDLE regression: toggle tabs and change indent width functions In-Reply-To: <1572383648.52.0.228001978432.issue38636@roundup.psfhosted.org> Message-ID: <1572437925.43.0.393151656577.issue38636@roundup.psfhosted.org> Stephen Paul Chappell added the comment: When I start IDLE and the shell window appears, my first task is to press "Alt + T" to change from using tabs to spaces and then "Alt + U" to change from using 8 spaces to 4. This allows code pasted from the shell into an editor window or other IDE to not require reformatting since those settings seem to be common for Python code. If the defaults for these settings were to be exposed in IDLE's settings under the General tab (maybe near the new "Show line numbers in new windows" checkbox), would it be best to make that request here or to open a new bug with an enhancement suggestion? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 09:06:24 2019 From: report at bugs.python.org (Roundup Robot) Date: Wed, 30 Oct 2019 13:06:24 +0000 Subject: [issue32117] Tuple unpacking in return and yield statements In-Reply-To: <1511393509.38.0.213398074469.issue32117@psf.upfronthosting.co.za> Message-ID: <1572440784.6.0.662688628951.issue32117@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +16520 pull_request: https://github.com/python/cpython/pull/16994 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 09:19:43 2019 From: report at bugs.python.org (Vlad Emelianov) Date: Wed, 30 Oct 2019 13:19:43 +0000 Subject: [issue38641] lib2to3 does not support py38 return/yield syntax with starred expressions Message-ID: <1572441583.83.0.896942127015.issue38641@roundup.psfhosted.org> New submission from Vlad Emelianov : Lib2to3 does not support changes made in https://bugs.python.org/issue32117 ```python def test(): my_list = ["value2", "value3"] yield "value1", *my_list return "value1", *my_list ``` The idea is to use `testlist_star_expr` instead of `testlist`. This is a backwards compatible change, because testlist_star_expr supports test as well like testlist does. ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 355713 nosy: Vlad Emelianov priority: normal pull_requests: 16521 severity: normal status: open title: lib2to3 does not support py38 return/yield syntax with starred expressions type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 09:24:33 2019 From: report at bugs.python.org (Vlad Emelianov) Date: Wed, 30 Oct 2019 13:24:33 +0000 Subject: [issue38641] lib2to3 does not support py38 return/yield syntax with starred expressions In-Reply-To: <1572441583.83.0.896942127015.issue38641@roundup.psfhosted.org> Message-ID: <1572441873.64.0.513018681242.issue38641@roundup.psfhosted.org> Change by Vlad Emelianov : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 10:06:00 2019 From: report at bugs.python.org (Marco Ippolito) Date: Wed, 30 Oct 2019 14:06:00 +0000 Subject: [issue38642] python3.7.3 seems to cause add-apt-repository to rejct or not find gi library Message-ID: <1572444360.24.0.26930433052.issue38642@roundup.psfhosted.org> New submission from Marco Ippolito : Following the indications found here: https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-repository I was trying to install Docker Engine in Ubuntu 18.04.02 Server Edition. The first installation's steps went fine but I encountered this error message: (base) marco at pc:~$ sudo add-apt-repository \ > "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ > $(lsb_release -cs) \ > stable" Traceback (most recent call last): File "/usr/bin/add-apt-repository", line 11, in from softwareproperties.SoftwareProperties import SoftwareProperties, shortcut_handler File "/usr/lib/python3/dist-packages/softwareproperties /SoftwareProperties.py", line 67, in from gi.repository import Gio File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in from . import _gi ImportError: cannot import name '_gi' from 'gi' (/usr/lib/python3/dist- packages/gi/__init__.py) But import gi in python3 works fine: (base) marco at pc:~$ python3 Python 3.7.3 (default, Mar 27 2019, 22:11:17) [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information. >>> import gi >>> After changing the first line of /usr/bin/add-apt-repository in order to point to 3.6 version : #!/usr/bin/python3.6 everything went fine: (base) marco at pc:~$ sudo add-apt-repository \ > "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ > $(lsb_release -cs) \ > stable" Hit:1 http://gb.archive.ubuntu.com/ubuntu bionic InRelease Get:2 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB] Get:3 http://gb.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Get:4 http://gb.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB] Get:5 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages [9594 B] Get:6 http://gb.archive.ubuntu.com/ubuntu bionic-updates/universe i386 Packages [985 kB] Get:7 http://gb.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1017 kB] Hit:8 http://apt.postgresql.org/pub/repos/apt bionic-pgdg InRelease Hit:9 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease Get:10 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] Fetched 2328 kB in 11s (217 kB/s) Reading package lists... Done (base) marco at pc:~$ sudo apt-get update Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease Hit:2 http://apt.postgresql.org/pub/repos/apt bionic-pgdg InRelease Hit:3 http://gb.archive.ubuntu.com/ubuntu bionic InRelease Hit:4 http://gb.archive.ubuntu.com/ubuntu bionic-updates InRelease Hit:5 http://gb.archive.ubuntu.com/ubuntu bionic-backports InRelease Hit:6 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease Hit:7 https://download.docker.com/linux/ubuntu bionic InRelease Reading package lists... Done (base) marco at pc:~$ sudo apt-get install docker-ce docker-ce-cli containerd.io Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: aufs-tools cgroupfs-mount pigz The following NEW packages will be installed aufs-tools cgroupfs-mount containerd.io docker-ce docker-ce-cli pigz 0 to upgrade, 6 to newly install, 0 to remove and 0 not to upgrade. Need to get 85.6 MB of archives. After this operation, 384 MB of additional disk space will be used. Do you want to continue? [Y/n] Y So it seems that python3.7.3 has something which causes add-apt-repository to reject/not find gi library ---------- messages: 355714 nosy: Marco Ippolito priority: normal severity: normal status: open title: python3.7.3 seems to cause add-apt-repository to rejct or not find gi library type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 10:13:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 Oct 2019 14:13:00 +0000 Subject: [issue38614] test_asyncio: test_communicate() failed on AMD64 FreeBSD Shared 3.8 In-Reply-To: <1572265095.84.0.80833057987.issue38614@roundup.psfhosted.org> Message-ID: <1572444780.3.0.0367764200688.issue38614@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +16522 pull_request: https://github.com/python/cpython/pull/16995 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 10:20:36 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 30 Oct 2019 14:20:36 +0000 Subject: [issue38643] Assertion failures when calling PyNumber_ToBase() with an invalid base Message-ID: <1572445236.44.0.527192204316.issue38643@roundup.psfhosted.org> New submission from Zackery Spytz : If a base other than 2, 8, or 16 is passed to PyNumber_ToBase(), an assertion failure will occur. An exception should be raised instead. This was mentioned in bpo-38249 (msg353039). ---------- components: Interpreter Core messages: 355715 nosy: ZackerySpytz priority: normal severity: normal status: open title: Assertion failures when calling PyNumber_ToBase() with an invalid base type: crash versions: Python 2.7, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 10:24:53 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 30 Oct 2019 14:24:53 +0000 Subject: [issue38643] Assertion failures when calling PyNumber_ToBase() with an invalid base In-Reply-To: <1572445236.44.0.527192204316.issue38643@roundup.psfhosted.org> Message-ID: <1572445493.49.0.689071149479.issue38643@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +16523 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16996 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 10:31:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 Oct 2019 14:31:24 +0000 Subject: [issue38644] Pass explicitly tstate to function calls Message-ID: <1572445884.39.0.966254854932.issue38644@roundup.psfhosted.org> New submission from STINNER Victor : Follow-up of bpo-36710 for function calls. ---------- components: Interpreter Core messages: 355716 nosy: vstinner priority: normal severity: normal status: open title: Pass explicitly tstate to function calls versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 10:46:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 Oct 2019 14:46:20 +0000 Subject: [issue38644] Pass explicitly tstate to function calls In-Reply-To: <1572445884.39.0.966254854932.issue38644@roundup.psfhosted.org> Message-ID: <1572446780.21.0.796178664497.issue38644@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +16524 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16997 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 11:00:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 Oct 2019 15:00:20 +0000 Subject: [issue38644] Pass explicitly tstate to function calls In-Reply-To: <1572445884.39.0.966254854932.issue38644@roundup.psfhosted.org> Message-ID: <1572447620.48.0.543290634624.issue38644@roundup.psfhosted.org> STINNER Victor added the comment: PR 16997 is a first step. The second step will be to pass tstate to: * _PyObject_Vectorcall() * _PyObject_MakeTpCall() * _Py_CheckFunctionResult() (I have a local branch that I have to rewrite on top of PR 16997.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 11:00:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 Oct 2019 15:00:47 +0000 Subject: [issue38614] test_asyncio: test_communicate() failed on AMD64 FreeBSD Shared 3.8 In-Reply-To: <1572265095.84.0.80833057987.issue38614@roundup.psfhosted.org> Message-ID: <1572447647.89.0.648505682578.issue38614@roundup.psfhosted.org> STINNER Victor added the comment: New changeset a4ed6ed9f3779b6eda41bb65f5c09004a2b937ef by Victor Stinner in branch 'master': bpo-38614: Increase asyncio test_communicate() timeout (GH-16995) https://github.com/python/cpython/commit/a4ed6ed9f3779b6eda41bb65f5c09004a2b937ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 11:01:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 Oct 2019 15:01:34 +0000 Subject: [issue38614] test_asyncio: test_communicate() failed on AMD64 FreeBSD Shared 3.8 In-Reply-To: <1572265095.84.0.80833057987.issue38614@roundup.psfhosted.org> Message-ID: <1572447694.35.0.228945883276.issue38614@roundup.psfhosted.org> STINNER Victor added the comment: PR 16995 should be backported to 3.7 and 3.8, but I will backport it once PR 16964 will be backported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 11:03:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 Oct 2019 15:03:02 +0000 Subject: [issue38631] Replace Py_FatalError() with regular Python exceptions In-Reply-To: <1572352735.51.0.915792481752.issue38631@roundup.psfhosted.org> Message-ID: <1572447782.96.0.528323968271.issue38631@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +16525 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16998 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 11:07:25 2019 From: report at bugs.python.org (Michael Zhang) Date: Wed, 30 Oct 2019 15:07:25 +0000 Subject: [issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error Message-ID: <1572448045.56.0.183251608823.issue38645@roundup.psfhosted.org> New submission from Michael Zhang : Discovered this while trying to use a function in `boto3`. Seems like when tzlocal() is passed with a 0 to datetime.datetime.fromtimestamp(), it throws an "[Errno 22] Invalid argument" error. Using 3.7.4 via Anaconda on Windows 10, and tzlocal().tznames's local timezone for me is EST/EDT. Can replicate through this: ``` import datetime from dateutil.tz import tzlocal print(datetime.datetime.fromtimestamp(0, tzlocal())) ``` ---------- messages: 355720 nosy: mzhang13 priority: normal severity: normal status: open title: datetime.datetime.fromtimestamp(0, tzlocal()) throws error type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 11:09:43 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 30 Oct 2019 15:09:43 +0000 Subject: [issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error In-Reply-To: <1572448045.56.0.183251608823.issue38645@roundup.psfhosted.org> Message-ID: <1572448183.13.0.601517684634.issue38645@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +belopolsky, p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 11:39:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 Oct 2019 15:39:30 +0000 Subject: [issue38631] Replace Py_FatalError() with regular Python exceptions In-Reply-To: <1572352735.51.0.915792481752.issue38631@roundup.psfhosted.org> Message-ID: <1572449970.7.0.739262622439.issue38631@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 1d8da61f5ad26274556e0bbce260ce292d0402a1 by Victor Stinner in branch 'master': bpo-38631: Avoid Py_FatalError() in readline (GH-16998) https://github.com/python/cpython/commit/1d8da61f5ad26274556e0bbce260ce292d0402a1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 12:12:03 2019 From: report at bugs.python.org (Batuhan) Date: Wed, 30 Oct 2019 16:12:03 +0000 Subject: [issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real In-Reply-To: <1572344297.94.0.916739375163.issue38629@roundup.psfhosted.org> Message-ID: <1572451923.56.0.921073493829.issue38629@roundup.psfhosted.org> Batuhan added the comment: $ ./python -m pyperf timeit -s "from math import floor" --duplicate 100 "floor(12345.6)" Before: Mean +- std dev: 52.5 ns +- 2.6 ns After: Mean +- std dev: 71.0 ns +- 1.7 ns $ ./python -m pyperf timeit -s "from math import ceil" --duplicate 100 "ceil(12345.6)" Before: Mean +- std dev: 51.2 ns +- 1.5 ns After: Mean +- std dev: 74.4 ns +- 2.2 ns ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 12:32:09 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Oct 2019 16:32:09 +0000 Subject: [issue38600] Change the mark up of NULL In-Reply-To: <1572164169.73.0.860465695362.issue38600@roundup.psfhosted.org> Message-ID: <1572453129.75.0.185430475153.issue38600@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +16526 pull_request: https://github.com/python/cpython/pull/16999 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 12:32:28 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Oct 2019 16:32:28 +0000 Subject: [issue38600] Change the mark up of NULL In-Reply-To: <1572164169.73.0.860465695362.issue38600@roundup.psfhosted.org> Message-ID: <1572453148.09.0.13093734105.issue38600@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +16527 pull_request: https://github.com/python/cpython/pull/17000 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 13:29:23 2019 From: report at bugs.python.org (Tom Lane) Date: Wed, 30 Oct 2019 17:29:23 +0000 Subject: [issue38646] Invalid check on the result of pthread_self() leads to libpython startup failure Message-ID: <1572456563.05.0.622338652634.issue38646@roundup.psfhosted.org> New submission from Tom Lane : Assorted code in the Python core supposes that the result of pthread_self() cannot be equal to PYTHREAD_INVALID_THREAD_ID, ie (void *) -1. If it is, you get a crash at interpreter startup. Unfortunately, this supposition is directly contrary to the POSIX specification for pthread_self(), which defines no failure return value; and it is violated by NetBSD's implementation in some circumstances. In particular, we (the Postgres project) are observing that libpython.so fails when dynamically loaded into a host executable that does not itself link libpthread. NetBSD's code always returns -1 if libpthread was not present at main program start, as they do not support forking new threads in that case. They assert (and I can't disagree) that their implementation conforms to POSIX. A lazy man's solution might be to change PYTHREAD_INVALID_THREAD_ID to some other value like -3, but that's not fixing the core problem that you're violating POSIX by testing for any specific value at all. Details and background info can be found in this email thread: https://www.postgresql.org/message-id/flat/25662.1560896200%40sss.pgh.pa.us ---------- components: Interpreter Core messages: 355723 nosy: tgl priority: normal severity: normal status: open title: Invalid check on the result of pthread_self() leads to libpython startup failure type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 13:30:53 2019 From: report at bugs.python.org (Brandt Bucher) Date: Wed, 30 Oct 2019 17:30:53 +0000 Subject: [issue38637] fix GROWTH_RATE comments bug In-Reply-To: <1572401146.1.0.358314054297.issue38637@roundup.psfhosted.org> Message-ID: <1572456653.58.0.0977230224702.issue38637@roundup.psfhosted.org> Brandt Bucher added the comment: This PR was closed as invalid for the same reasons Steven mentioned above. ---------- nosy: +brandtbucher resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 13:32:47 2019 From: report at bugs.python.org (Yoshihiro Nagano) Date: Wed, 30 Oct 2019 17:32:47 +0000 Subject: [issue38647] Why only the MacOSXOSAScript in webbrowser does not have the name property? Message-ID: <1572456767.92.0.8897291562.issue38647@roundup.psfhosted.org> New submission from Yoshihiro Nagano : Hello. I am using the webbrowser library in macOS and just found that only the MacOSXOSAScript object has `_name` property instead of `name.` All of the other class, which is inherited from the BaseBrowser, has `name` property. Are there any specific reasons for this API? Or, are there any ways to access the name of the browser object independent from the browser type? The corresponding implementation is shown below: https://github.com/python/cpython/blob/4cb08b6c0ae6989d169dd48c2b24087941f6d0b0/Lib/webbrowser.py#L641-L643 Thank you. ---------- components: Library (Lib), macOS messages: 355725 nosy: Yoshihiro Nagano, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Why only the MacOSXOSAScript in webbrowser does not have the name property? type: behavior versions: Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 13:57:18 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Oct 2019 17:57:18 +0000 Subject: [issue38600] Change the mark up of NULL In-Reply-To: <1572164169.73.0.860465695362.issue38600@roundup.psfhosted.org> Message-ID: <1572458238.3.0.0391517784409.issue38600@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +16528 pull_request: https://github.com/python/cpython/pull/17001 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 14:27:32 2019 From: report at bugs.python.org (Maxwell Bernstein) Date: Wed, 30 Oct 2019 18:27:32 +0000 Subject: [issue38648] Py_tp_free is specified twice in Python-ast.c Message-ID: <1572460052.6.0.456691292805.issue38648@roundup.psfhosted.org> New submission from Maxwell Bernstein : This looks like a typo due to copy-paste. ---------- messages: 355726 nosy: tekknolagi priority: normal severity: normal status: open title: Py_tp_free is specified twice in Python-ast.c versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 14:27:56 2019 From: report at bugs.python.org (Maxwell Bernstein) Date: Wed, 30 Oct 2019 18:27:56 +0000 Subject: [issue38648] Py_tp_free is specified twice in Python-ast.c In-Reply-To: <1572460052.6.0.456691292805.issue38648@roundup.psfhosted.org> Message-ID: <1572460076.53.0.176656845281.issue38648@roundup.psfhosted.org> Change by Maxwell Bernstein : ---------- keywords: +patch pull_requests: +16529 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17002 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 15:36:33 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Oct 2019 19:36:33 +0000 Subject: [issue38600] Change the mark up of NULL In-Reply-To: <1572164169.73.0.860465695362.issue38600@roundup.psfhosted.org> Message-ID: <1572464193.94.0.00156242579854.issue38600@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 7f7f986cc485c40d80bae504333e3946ce9e96ba by Serhiy Storchaka in branch '3.7': [3.7] bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) (GH-17000) https://github.com/python/cpython/commit/7f7f986cc485c40d80bae504333e3946ce9e96ba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 15:36:38 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Oct 2019 19:36:38 +0000 Subject: [issue38600] Change the mark up of NULL In-Reply-To: <1572164169.73.0.860465695362.issue38600@roundup.psfhosted.org> Message-ID: <1572464198.98.0.284337385639.issue38600@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset f2ba17be2aec873741c2d8a55b1342afa360aec2 by Serhiy Storchaka in branch '3.8': [3.8] bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) (GH-16999) https://github.com/python/cpython/commit/f2ba17be2aec873741c2d8a55b1342afa360aec2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 15:37:05 2019 From: report at bugs.python.org (David Lambert) Date: Wed, 30 Oct 2019 19:37:05 +0000 Subject: [issue38649] tkinter messagebox is sloppy Message-ID: <1572464225.7.0.112082789313.issue38649@roundup.psfhosted.org> New submission from David Lambert : Does aksokcancel return "true" or True ? The docstring should say True This is pervasive throughout the module. tkinter has such a mishmash of numbers supplied as strings, strings supplied as constants making this carelessness egregious. On the topic of constants, the messagebox module redefines OK. You might argue that the definition didn't change. I suspect this issue applies to all versions of tkinter or Tkinter having the messagebox. # types ABORTRETRYIGNORE = "abortretryignore" OK = "ok" ... # replies ... OK = "ok" def askokcancel(title=None, message=None, **options): "Ask if operation should proceed; return true if the answer is ok" s = _show(title, message, QUESTION, OKCANCEL, **options) return s == OK ---------- assignee: docs at python components: Documentation messages: 355729 nosy: David Lambert, docs at python priority: normal severity: normal status: open title: tkinter messagebox is sloppy type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 15:37:21 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Oct 2019 19:37:21 +0000 Subject: [issue38600] Change the mark up of NULL In-Reply-To: <1572164169.73.0.860465695362.issue38600@roundup.psfhosted.org> Message-ID: <1572464241.57.0.10416070985.issue38600@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset e835b31d2b212c3c7820364398979cae2a9740b2 by Serhiy Storchaka in branch 'master': bpo-38600: NULL -> ``NULL``. (GH-17001) https://github.com/python/cpython/commit/e835b31d2b212c3c7820364398979cae2a9740b2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 15:40:24 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Oct 2019 19:40:24 +0000 Subject: [issue38600] Change the mark up of NULL In-Reply-To: <1572164169.73.0.860465695362.issue38600@roundup.psfhosted.org> Message-ID: <1572464424.97.0.715918477038.issue38600@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +16530 pull_request: https://github.com/python/cpython/pull/17003 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 15:44:35 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Oct 2019 19:44:35 +0000 Subject: [issue38600] Change the mark up of NULL In-Reply-To: <1572164169.73.0.860465695362.issue38600@roundup.psfhosted.org> Message-ID: <1572464675.88.0.0666133819988.issue38600@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +16531 pull_request: https://github.com/python/cpython/pull/17004 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 16:01:43 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Oct 2019 20:01:43 +0000 Subject: [issue38650] Add constantness to PyStructSequence_UnnamedField Message-ID: <1572465703.12.0.701099038847.issue38650@roundup.psfhosted.org> New submission from Serhiy Storchaka : Currently the variable PyStructSequence_UnnamedField has type "char *". It is used as a special value for setting to the name field of PyStructSequence_Field. But the type of the name field is "const char *". I propose to change the declaration of PyStructSequence_UnnamedField to "const char * const". Makes it referring to immutable character string and make it itself immutable. It is binary compatible change, but some user code can complain at compilation time if it uses PyStructSequence_UnnamedField in unusual way (assigns to the "char *" variable, etc). It is very unlikely. ---------- components: Interpreter Core messages: 355731 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Add constantness to PyStructSequence_UnnamedField versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 16:05:36 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Oct 2019 20:05:36 +0000 Subject: [issue38650] Add constantness to PyStructSequence_UnnamedField In-Reply-To: <1572465703.12.0.701099038847.issue38650@roundup.psfhosted.org> Message-ID: <1572465936.34.0.0902366673836.issue38650@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +16532 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17005 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 16:17:36 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 30 Oct 2019 20:17:36 +0000 Subject: [issue23903] Generate PC/python3.def by scraping headers In-Reply-To: <1428637761.13.0.348463350169.issue23903@psf.upfronthosting.co.za> Message-ID: <1572466656.24.0.786537349478.issue23903@roundup.psfhosted.org> Steve Dower added the comment: Reawakening this issue so we can finish it off - the stable ABI has been declared "clean" on python-dev, so there shouldn't be any more concerns about APIs leaking in now. We can assume that everything accessible from the header files should be included in python3.def. If it has been cleaned up though, we might need to go through and restore anything that used to be in python3.def but wasn't meant to be. Those are stable. ---------- versions: +Python 3.8, Python 3.9 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 16:39:55 2019 From: report at bugs.python.org (Daniel Johnson) Date: Wed, 30 Oct 2019 20:39:55 +0000 Subject: [issue38651] Add WolfSSL support Message-ID: <1572467995.9.0.965883938595.issue38651@roundup.psfhosted.org> New submission from Daniel Johnson : WolfSSL is an SSL library targeted at embedded development that focuses on size and speed. It's also FIPS certified which is is important for anyone working with federal agencies. WolfSSL website: https://www.wolfssl.com/ WolfSSL github: https://github.com/wolfSSL/wolfssl I have two ideas currently on how Python could support WolfSSL: 1.) Shim WolfSSL's OpenSSL compatibility layer in. They don't provide a complete shim for OpenSSL and I'm not sure if they provide all the symbols Python would care about. 2.) Provide an optional configuration to use WolfSSL and it's API instead of OpenSSL. Would either options be something the Python maintainers would be interested in? I'm testing the waters to see if this is something anyone is interested in. Thank you for the time! ---------- assignee: christian.heimes components: SSL messages: 355733 nosy: Daniel Johnson, christian.heimes priority: normal severity: normal status: open title: Add WolfSSL support versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 16:45:00 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Oct 2019 20:45:00 +0000 Subject: [issue38600] Change the mark up of NULL In-Reply-To: <1572164169.73.0.860465695362.issue38600@roundup.psfhosted.org> Message-ID: <1572468300.5.0.477343435223.issue38600@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 2c921c65e9d0aa7e3a38c96a22d5eec56724da72 by Serhiy Storchaka in branch '3.8': [3.8] bpo-38600: NULL -> ``NULL``. (GH-17001) (GH-17003) https://github.com/python/cpython/commit/2c921c65e9d0aa7e3a38c96a22d5eec56724da72 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 16:45:17 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Oct 2019 20:45:17 +0000 Subject: [issue38600] Change the mark up of NULL In-Reply-To: <1572164169.73.0.860465695362.issue38600@roundup.psfhosted.org> Message-ID: <1572468317.86.0.977613844032.issue38600@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 951b6c314a8567be3b5d901059fde866c79f5ff0 by Serhiy Storchaka in branch '3.7': [3.7] bpo-38600: NULL -> ``NULL``. (GH-17001) (GH-17004) https://github.com/python/cpython/commit/951b6c314a8567be3b5d901059fde866c79f5ff0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 18:11:08 2019 From: report at bugs.python.org (Anselmo Melo) Date: Wed, 30 Oct 2019 22:11:08 +0000 Subject: [issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen() In-Reply-To: <1571903478.88.0.753943817426.issue38576@roundup.psfhosted.org> Message-ID: <1572473468.11.0.551617880868.issue38576@roundup.psfhosted.org> Change by Anselmo Melo : ---------- nosy: +Anselmo Melo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 21:08:20 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 31 Oct 2019 01:08:20 +0000 Subject: [issue38648] Py_tp_free is specified twice in Python-ast.c In-Reply-To: <1572460052.6.0.456691292805.issue38648@roundup.psfhosted.org> Message-ID: <1572484100.83.0.557313414355.issue38648@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset bdac32e9fe25fdb97a7172a93aabd1ffead89462 by Benjamin Peterson (Max Bernstein) in branch 'master': closes bpo-38648: Remove double tp_free slot in Python-ast.c. (GH-17002) https://github.com/python/cpython/commit/bdac32e9fe25fdb97a7172a93aabd1ffead89462 ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 21:58:11 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 31 Oct 2019 01:58:11 +0000 Subject: [issue38636] IDLE regression: toggle tabs and change indent width functions In-Reply-To: <1572383648.52.0.228001978432.issue38636@roundup.psfhosted.org> Message-ID: <1572487091.52.0.942734149147.issue38636@roundup.psfhosted.org> Terry J. Reedy added the comment: Interesting. The result of making these changes is legal code looking like >>> if a: if b: c = 3 This has been proposed as the way Shell should work, but rejected as likely too confusing to beginners as the indented code does not look indented compared to the line above. The use of tabs for indents in Shell has long been considered a wart that is a 'least bad solution'. Please hold your proposals. I intend to solve the issue by moving the prompt to a shell sidebar and use the same indent in shell as in editors. #37903 has a PR under review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 22:13:22 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 31 Oct 2019 02:13:22 +0000 Subject: [issue38636] IDLE regression: toggle tabs and change indent width functions In-Reply-To: <1572383648.52.0.228001978432.issue38636@roundup.psfhosted.org> Message-ID: <1572488002.4.0.867743528448.issue38636@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +16533 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/17008 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 22:20:17 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 31 Oct 2019 02:20:17 +0000 Subject: [issue38636] IDLE regression: toggle tabs and change indent width functions In-Reply-To: <1572383648.52.0.228001978432.issue38636@roundup.psfhosted.org> Message-ID: <1572488417.82.0.437955718015.issue38636@roundup.psfhosted.org> Terry J. Reedy added the comment: The old, long discussion of Shell indents is #7676 and a preceding issue reference therein. My replacement is #37892. The PR patch is simple enough to apply by to existing 3.7.5 and 3.8.0 installs. ---------- stage: patch review -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 02:14:41 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 31 Oct 2019 06:14:41 +0000 Subject: [issue38652] Remove/update provisional note for asyncio.BufferedProtocol Message-ID: <1572502481.2.0.695475270667.issue38652@roundup.psfhosted.org> New submission from Kyle Stanley : In the documentation (https://docs.python.org/3.9/library/asyncio-protocol.html#buffered-streaming-protocols) for asyncio.BufferedProtocol there is a provisional API note. This should be updated/removed for 3.8 and 3.9 since it became a part of the stable API in 3.8. Current: > New in version 3.7: Important: this has been added to asyncio in Python 3.7 on a provisional basis! This is as an experimental API that might be changed or removed completely in Python 3.8. I would propose to changing it to: > New in version 3.7. ---------- assignee: docs at python components: Documentation messages: 355739 nosy: aeros, asvetlov, docs at python, yselivanov priority: normal severity: normal status: open title: Remove/update provisional note for asyncio.BufferedProtocol versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 02:20:16 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 31 Oct 2019 06:20:16 +0000 Subject: [issue38652] Remove/update provisional note for asyncio.BufferedProtocol In-Reply-To: <1572502481.2.0.695475270667.issue38652@roundup.psfhosted.org> Message-ID: <1572502816.48.0.848474386251.issue38652@roundup.psfhosted.org> Kyle Stanley added the comment: > I would propose to changing it to: propose changing it to* Also, I think this issue would be a good candidate for "newcomer friendly", since it's a simple and well-defined documentation update. It could provide a decent introduction for contributing to CPython. ---------- keywords: +newcomer friendly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 02:22:02 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 31 Oct 2019 06:22:02 +0000 Subject: [issue38652] Remove/update provisional note for asyncio.BufferedProtocol In-Reply-To: <1572502481.2.0.695475270667.issue38652@roundup.psfhosted.org> Message-ID: <1572502922.71.0.627093416085.issue38652@roundup.psfhosted.org> Change by Kyle Stanley : ---------- components: +asyncio _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 02:50:51 2019 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 31 Oct 2019 06:50:51 +0000 Subject: [issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag) In-Reply-To: <1410207529.54.0.778133775349.issue22367@psf.upfronthosting.co.za> Message-ID: <1572504650.99.0.495628437949.issue22367@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +16534 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17010 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 04:04:02 2019 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 31 Oct 2019 08:04:02 +0000 Subject: [issue16575] ctypes: unions as arguments In-Reply-To: <1354163044.21.0.431588472559.issue16575@psf.upfronthosting.co.za> Message-ID: <1572509042.56.0.719610086376.issue16575@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 79d4ed102a5069c6cebaed2627cb1645637f0429 by Vinay Sajip in branch 'master': bpo-16575: Add checks for unions passed by value to functions. (GH-16799) https://github.com/python/cpython/commit/79d4ed102a5069c6cebaed2627cb1645637f0429 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 04:06:29 2019 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 31 Oct 2019 08:06:29 +0000 Subject: [issue38586] logging: handlers names are not set when using fileConfig In-Reply-To: <1571930163.44.0.759260613385.issue38586@roundup.psfhosted.org> Message-ID: <1572509189.03.0.794432369872.issue38586@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset b15100fe7def8580c78ed16f0bb4b72b2ae7af3f by Vinay Sajip (Lucas Cimon) in branch 'master': bpo-38586: setting logging.Handler .name property in fileConfig (GH-16918) https://github.com/python/cpython/commit/b15100fe7def8580c78ed16f0bb4b72b2ae7af3f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 04:07:24 2019 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 31 Oct 2019 08:07:24 +0000 Subject: [issue38586] logging: handlers names are not set when using fileConfig In-Reply-To: <1571930163.44.0.759260613385.issue38586@roundup.psfhosted.org> Message-ID: <1572509244.64.0.561440920401.issue38586@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 05:13:54 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 Oct 2019 09:13:54 +0000 Subject: [issue38312] curses: add `set_tabsize` and `set_escdelay` In-Reply-To: <1569721208.44.0.258918770799.issue38312@roundup.psfhosted.org> Message-ID: <1572513234.84.0.512230551196.issue38312@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset b32cb97bce472dad337c6b2f071883f6234e21d8 by Serhiy Storchaka (Anthony Sottile) in branch 'master': bpo-38312: Add curses.{get,set}_escdelay and curses.{get,set}_tabsize. (GH-16938) https://github.com/python/cpython/commit/b32cb97bce472dad337c6b2f071883f6234e21d8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 05:14:27 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 Oct 2019 09:14:27 +0000 Subject: [issue38312] curses: add `set_tabsize` and `set_escdelay` In-Reply-To: <1569721208.44.0.258918770799.issue38312@roundup.psfhosted.org> Message-ID: <1572513267.6.0.604890544456.issue38312@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 06:41:40 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 Oct 2019 10:41:40 +0000 Subject: [issue38600] Change the mark up of NULL In-Reply-To: <1572164169.73.0.860465695362.issue38600@roundup.psfhosted.org> Message-ID: <1572518500.69.0.245197290487.issue38600@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 06:54:54 2019 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Thu, 31 Oct 2019 10:54:54 +0000 Subject: [issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real In-Reply-To: <1572344297.94.0.916739375163.issue38629@roundup.psfhosted.org> Message-ID: <1572519294.13.0.338887270849.issue38629@roundup.psfhosted.org> Vedran ?a?i? added the comment: However, this is an instance of a general problem: whenever we want to strongly type (via dunders) protocols that specialcase builtin types, we will have to choose between three options: * special case them also in typing engine, complicating the typing engine * implement dummy dunders, puzzling readers of the code * implement dunders that do the right thing but never actually execute, puzzling Serhiy (and probably others) * implement dunders that are actually called (un-specialcasing builtin types), slowing down the common path Do we have a preference for a "default" position when we encounter such problems in the future? Of course, we can override it on a case-by-case basis in the presence of good arguments, but still, a default would be nice to have. I don't know much about static typing (which is why I loved Python until this typing craze happened:), but it seems to me that we might have another option: we can currently say that a type might be a virtual subclass of an abstract class in more than one way, right? For example, we still support old-style iterators (via __getitem__ and IndexError), IIRC. So, can we say that a type can implement numbers.Real also in two ways: by having some dunders, or by being (a literal or a subtype of) float? ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 07:28:28 2019 From: report at bugs.python.org (Hartmut Goebel) Date: Thu, 31 Oct 2019 11:28:28 +0000 Subject: [issue38653] pkgutil.extend_path fails with zipped eggs if not at first place Message-ID: <1572521308.12.0.490608170281.issue38653@roundup.psfhosted.org> New submission from Hartmut Goebel : I have a test site containing nested namespace packages in zipped and unzipped eggs_ - nspkg3_aaa.egg - unzipped egg, namespaces: nspkg3 - nspkg3_bbb.egg - zipped egg , namespaces: nspkg3, nspkg3.bbb - nspkg3_ccc.egg - unzipped egg, namespaces: nspkg3 When using order "aaa, bbb, ccc" in PYTHONPATH, importing "nspkg3.bbb" FAILS, whereas when using order "bbb, aaa, ccc" in PYTHONPATH, importing "nspkg3.bbb" PASSES, I would expect "nspk3.bbb" to ba importable 8as a namespace package) no matter which possition it has in PYTHONPATH. How to reproduce Preperation: get hands on the eggs in question: $ wget https://github.com/pyinstaller/pyinstaller/archive/v3.5.zip $ unzip v3.5.zip $ cd pyinstaller-3.5/tests/functional/modules/nspkg3-pkg/ Order "aaa, bbb, ccc": fails $ PYTHONPATH=nspkg3_aaa.egg:nspkg3_bbb.egg:nspkg3_ccc.egg python3.7 -c "import nspkg3.bbb.zzz" Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'nspkg3.bbb' Order "bbb, aaa, ccc": passes: $ PYTHONPATH=nspkg3_bbb.egg:nspkg3_aaa.egg:nspkg3_ccc.egg python3.7 -c "import nspkg3.bbb.zzz" this is module nspkg3.bbb.zzz Further information I did some research and found that the zipped egg (bbb) is *not added* to the package path when using order "aaa, bbb, ccc": Order "aaa, bbb, ccc": bbb is missing here $ PYTHONPATH=nspkg3_aaa.egg:nspkg3_bbb.egg:nspkg3_ccc.egg \ python3.7 -c "import nspkg3 ; print(nspkg3.__path__)" ['?/nspkg3_aaa.egg/nspkg3', '?/nspkg3_ccc.egg/nspkg3'] Order "bbb, aaa, ccc": bbb is included $ PYTHONPATH=nspkg3_bbb.egg:nspkg3_aaa.egg:nspkg3_ccc.egg \ python3.7 -c "import nspkg3 ; print(nspkg3.__path__)" ['?/nspkg3_bbb.egg/nspkg3', '?/nspkg3_aaa.egg/nspkg3', '?/nspkg3_ccc.egg/nspkg3'] Also tested with Python 2.7: Same results ---------- components: Library (Lib) messages: 355745 nosy: htgoebel priority: normal severity: normal status: open title: pkgutil.extend_path fails with zipped eggs if not at first place type: behavior versions: Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 07:55:13 2019 From: report at bugs.python.org (Benjamin Edwards) Date: Thu, 31 Oct 2019 11:55:13 +0000 Subject: [issue38652] Remove/update provisional note for asyncio.BufferedProtocol In-Reply-To: <1572502481.2.0.695475270667.issue38652@roundup.psfhosted.org> Message-ID: <1572522913.09.0.506399821886.issue38652@roundup.psfhosted.org> Benjamin Edwards added the comment: Hey Kyle, I'm a newcomer, would it be ok for me to take on this propsal? Ben ---------- nosy: +benedwards14 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 08:28:33 2019 From: report at bugs.python.org (Netzeband) Date: Thu, 31 Oct 2019 12:28:33 +0000 Subject: [issue37838] typing.get_type_hints not working with forward-declaration and decorated functions In-Reply-To: <1565692979.16.0.678723196671.issue37838@roundup.psfhosted.org> Message-ID: <1572524913.68.0.0281472975593.issue37838@roundup.psfhosted.org> Netzeband added the comment: Thanks a lot! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 08:52:24 2019 From: report at bugs.python.org (Jackson Riley) Date: Thu, 31 Oct 2019 12:52:24 +0000 Subject: [issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals In-Reply-To: <1279881989.28.0.725806934086.issue9338@psf.upfronthosting.co.za> Message-ID: <1572526344.48.0.625142489927.issue9338@roundup.psfhosted.org> Jackson Riley added the comment: I'm a newcomer and thought about trying to follow up on this and potentially update existing patches, would this be a good idea? ---------- nosy: +jacksonriley _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 08:53:31 2019 From: report at bugs.python.org (Jackson Riley) Date: Thu, 31 Oct 2019 12:53:31 +0000 Subject: =?utf-8?q?=5Bissue9182=5D_document_=E2=80=9C--=E2=80=9D_as_a_way_to_disti?= =?utf-8?q?nguish_option_w/_narg=3D=27+=27_from_positional_argument_in_arg?= =?utf-8?q?parse?= In-Reply-To: <1278433481.81.0.201692715302.issue9182@psf.upfronthosting.co.za> Message-ID: <1572526411.62.0.0749248845539.issue9182@roundup.psfhosted.org> Jackson Riley added the comment: Hi all, I'm a newcomer and wanted to try to make this change, is it still wanted/needed? ---------- nosy: +jacksonriley _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 09:01:34 2019 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 31 Oct 2019 13:01:34 +0000 Subject: [issue16575] ctypes: unions as arguments In-Reply-To: <1354163044.21.0.431588472559.issue16575@psf.upfronthosting.co.za> Message-ID: <1572526894.68.0.205560544364.issue16575@roundup.psfhosted.org> Change by Vinay Sajip : ---------- pull_requests: +16535 pull_request: https://github.com/python/cpython/pull/17016 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 09:09:54 2019 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 31 Oct 2019 13:09:54 +0000 Subject: [issue16575] ctypes: unions as arguments In-Reply-To: <1354163044.21.0.431588472559.issue16575@psf.upfronthosting.co.za> Message-ID: <1572527394.25.0.710072973355.issue16575@roundup.psfhosted.org> Change by Vinay Sajip : ---------- pull_requests: +16536 pull_request: https://github.com/python/cpython/pull/17017 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 09:17:53 2019 From: report at bugs.python.org (Efanzh) Date: Thu, 31 Oct 2019 13:17:53 +0000 Subject: [issue38654] `urllib.request.Request` uses mutable value as default value Message-ID: <1572527873.7.0.615539123104.issue38654@roundup.psfhosted.org> New submission from Efanzh : The `headers` argument of the `__init__` method of `urllib.request.Request` class uses `{}` as default value, which is mutable. It is not a good idea. ---------- components: Library (Lib) messages: 355750 nosy: EFanZh priority: normal pull_requests: 16537 severity: normal status: open title: `urllib.request.Request` uses mutable value as default value type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 09:34:11 2019 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 31 Oct 2019 13:34:11 +0000 Subject: [issue16575] ctypes: unions as arguments In-Reply-To: <1354163044.21.0.431588472559.issue16575@psf.upfronthosting.co.za> Message-ID: <1572528851.84.0.0784510274078.issue16575@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 952899704800a5aa438e84d50f0b6fc498c72e89 by Vinay Sajip in branch '3.8': [3.8] bpo-16575: Add checks for unions passed by value to functions. (GH-16799) (GH-17016) https://github.com/python/cpython/commit/952899704800a5aa438e84d50f0b6fc498c72e89 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 09:58:26 2019 From: report at bugs.python.org (Stephen Paul Chappell) Date: Thu, 31 Oct 2019 13:58:26 +0000 Subject: [issue37903] IDLE Shell sidebar. In-Reply-To: <1566370033.98.0.615651298891.issue37903@roundup.psfhosted.org> Message-ID: <1572530306.56.0.503593621523.issue37903@roundup.psfhosted.org> Stephen Paul Chappell added the comment: The documentation for sys.ps1 and sys.ps2 states that they "are only defined if the interpreter is in interactive mode." Since the IDLE shell is meant to be interactive (and to reduce the differences between the shell and running Python directly), would it be helpful if ps1 and ps2 were defined when running IDLE? The shell could then honor their values. If such a direction was explored, one issue may be that the sidebar could not simply be 3 char wide. The documentation also states that non-strings are evaluated each time they are needed by the interpreter. This allows for such interesting possibilities as shown with the code below but may not be desired functionality for the IDLE shell window. import sys from datetime import datetime class TimePrompt: def __init__(self, prefix, suffix): self.prefix, self.suffix = prefix, suffix def __str__(self): return f'{self.prefix}{datetime.now()}{self.suffix}' sys.ps1, sys.ps2 = TimePrompt('', ' >>> '), TimePrompt('', ' ... ') ---------- nosy: +Zero _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 10:04:51 2019 From: report at bugs.python.org (pascalhofmann) Date: Thu, 31 Oct 2019 14:04:51 +0000 Subject: [issue38655] ipaddress.ip_network('0.0.0.0/0').is_private == True Message-ID: <1572530691.84.0.462430681921.issue38655@roundup.psfhosted.org> New submission from pascalhofmann : ipaddress.ip_network('0.0.0.0/0').is_private returns True, even though 0.0.0.0/0 clearly is no private network. ---------- components: Library (Lib) messages: 355753 nosy: pascalhofmann priority: normal severity: normal status: open title: ipaddress.ip_network('0.0.0.0/0').is_private == True type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 10:15:18 2019 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 31 Oct 2019 14:15:18 +0000 Subject: [issue16575] ctypes: unions as arguments In-Reply-To: <1354163044.21.0.431588472559.issue16575@psf.upfronthosting.co.za> Message-ID: <1572531318.12.0.94554290926.issue16575@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 0118d109d54bf75c99a8b0fa9aeae1a478ac4b7e by Vinay Sajip in branch '3.7': [3.7] bpo-16575: Add checks for unions passed by value to functions. (GH-16799) (GH-17017) https://github.com/python/cpython/commit/0118d109d54bf75c99a8b0fa9aeae1a478ac4b7e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 10:17:04 2019 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 31 Oct 2019 14:17:04 +0000 Subject: [issue16575] ctypes: unions as arguments In-Reply-To: <1354163044.21.0.431588472559.issue16575@psf.upfronthosting.co.za> Message-ID: <1572531424.26.0.420065272761.issue16575@roundup.psfhosted.org> Change by Vinay Sajip : ---------- assignee: docs at python -> vinay.sajip resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 10:17:46 2019 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 31 Oct 2019 14:17:46 +0000 Subject: [issue11410] Use GCC visibility attrs in PyAPI_* In-Reply-To: <1299391945.72.0.037942723875.issue11410@psf.upfronthosting.co.za> Message-ID: <1572531466.44.0.123303367396.issue11410@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 10:19:46 2019 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 31 Oct 2019 14:19:46 +0000 Subject: [issue35328] Set a environment variable for venv prompt In-Reply-To: <1543335149.71.0.788709270274.issue35328@psf.upfronthosting.co.za> Message-ID: <1572531586.55.0.741902051184.issue35328@roundup.psfhosted.org> Change by Vinay Sajip : ---------- versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 10:21:44 2019 From: report at bugs.python.org (Stephen Paul Chappell) Date: Thu, 31 Oct 2019 14:21:44 +0000 Subject: [issue7676] IDLE shell shouldn't use TABs In-Reply-To: <1263213381.47.0.181451927584.issue7676@psf.upfronthosting.co.za> Message-ID: <1572531704.48.0.429080188993.issue7676@roundup.psfhosted.org> Change by Stephen Paul Chappell : ---------- nosy: -Zero _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 10:22:00 2019 From: report at bugs.python.org (Stephen Paul Chappell) Date: Thu, 31 Oct 2019 14:22:00 +0000 Subject: [issue31476] Stdlib source files not installed In-Reply-To: <1505418617.55.0.339159278979.issue31476@psf.upfronthosting.co.za> Message-ID: <1572531720.65.0.765726384261.issue31476@roundup.psfhosted.org> Change by Stephen Paul Chappell : ---------- nosy: -Zero _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 10:22:13 2019 From: report at bugs.python.org (Stephen Paul Chappell) Date: Thu, 31 Oct 2019 14:22:13 +0000 Subject: [issue31848] "aifc" module does not always initialize "Aifc_read._ssnd_chunk" In-Reply-To: <1508765581.06.0.213398074469.issue31848@psf.upfronthosting.co.za> Message-ID: <1572531733.17.0.854687832836.issue31848@roundup.psfhosted.org> Change by Stephen Paul Chappell : ---------- nosy: -Zero _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 10:22:25 2019 From: report at bugs.python.org (Stephen Paul Chappell) Date: Thu, 31 Oct 2019 14:22:25 +0000 Subject: [issue18558] Iterable glossary entry needs clarification In-Reply-To: <1374796651.89.0.668716719647.issue18558@psf.upfronthosting.co.za> Message-ID: <1572531745.91.0.373607392291.issue18558@roundup.psfhosted.org> Change by Stephen Paul Chappell : ---------- nosy: -Zero _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 10:22:37 2019 From: report at bugs.python.org (Stephen Paul Chappell) Date: Thu, 31 Oct 2019 14:22:37 +0000 Subject: [issue21537] functools.lru_cache does not cache exceptions In-Reply-To: <1400525939.56.0.613557499448.issue21537@psf.upfronthosting.co.za> Message-ID: <1572531757.36.0.31731973777.issue21537@roundup.psfhosted.org> Change by Stephen Paul Chappell : ---------- nosy: -Zero _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 10:22:49 2019 From: report at bugs.python.org (Stephen Paul Chappell) Date: Thu, 31 Oct 2019 14:22:49 +0000 Subject: [issue24185] Add Function for Sending File to Trash (or Recycling Bin) In-Reply-To: <1431574601.59.0.7462724115.issue24185@psf.upfronthosting.co.za> Message-ID: <1572531769.44.0.465310450218.issue24185@roundup.psfhosted.org> Change by Stephen Paul Chappell : ---------- nosy: -Zero _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 10:22:57 2019 From: report at bugs.python.org (Stephen Paul Chappell) Date: Thu, 31 Oct 2019 14:22:57 +0000 Subject: [issue21957] ASCII Formfeed (FF) & ASCII Vertical Tab (VT) Have Hexadecimal Representation In-Reply-To: <1405088980.95.0.801380317459.issue21957@psf.upfronthosting.co.za> Message-ID: <1572531777.56.0.702427496271.issue21957@roundup.psfhosted.org> Change by Stephen Paul Chappell : ---------- nosy: -Zero _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 10:23:06 2019 From: report at bugs.python.org (Stephen Paul Chappell) Date: Thu, 31 Oct 2019 14:23:06 +0000 Subject: [issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists In-Reply-To: <1398885763.19.0.937315925175.issue21402@psf.upfronthosting.co.za> Message-ID: <1572531786.24.0.161476536278.issue21402@roundup.psfhosted.org> Change by Stephen Paul Chappell : ---------- nosy: -Zero _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 10:23:16 2019 From: report at bugs.python.org (Stephen Paul Chappell) Date: Thu, 31 Oct 2019 14:23:16 +0000 Subject: [issue18601] Example "command-line interface to difflib" has typographical error In-Reply-To: <1375211246.29.0.527231910426.issue18601@psf.upfronthosting.co.za> Message-ID: <1572531796.39.0.15131546476.issue18601@roundup.psfhosted.org> Change by Stephen Paul Chappell : ---------- nosy: -Zero _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 10:23:36 2019 From: report at bugs.python.org (Stephen Paul Chappell) Date: Thu, 31 Oct 2019 14:23:36 +0000 Subject: [issue6188] Error Evaluating float(x) ** float(y) In-Reply-To: <1244035203.68.0.223995405838.issue6188@psf.upfronthosting.co.za> Message-ID: <1572531816.94.0.731316284084.issue6188@roundup.psfhosted.org> Change by Stephen Paul Chappell : ---------- nosy: -Zero _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 11:03:59 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 31 Oct 2019 15:03:59 +0000 Subject: [issue37903] IDLE Shell sidebar. In-Reply-To: <1566370033.98.0.615651298891.issue37903@roundup.psfhosted.org> Message-ID: <1572534239.07.0.239216240514.issue37903@roundup.psfhosted.org> Raymond Hettinger added the comment: Will the current interactive shell continue to be available? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 11:10:29 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 31 Oct 2019 15:10:29 +0000 Subject: [issue37903] IDLE Shell sidebar. In-Reply-To: <1566370033.98.0.615651298891.issue37903@roundup.psfhosted.org> Message-ID: <1572534629.25.0.125129503942.issue37903@roundup.psfhosted.org> Tal Einat added the comment: Stehpen, I'm not sure what your use-case is... To me it seems that sys.ps1 (and ps2?) aren't quite relevant any more when using a sidebar, since there are no longer inline prompts. Raymond, with the current PR, this replaces the inline prompts. Making it toggle-able could be very awkward. Is this a deal-breaker in your opinion? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 11:10:41 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 Oct 2019 15:10:41 +0000 Subject: [issue38654] `urllib.request.Request` uses mutable value as default value In-Reply-To: <1572527873.7.0.615539123104.issue38654@roundup.psfhosted.org> Message-ID: <1572534641.22.0.739948217862.issue38654@roundup.psfhosted.org> Serhiy Storchaka added the comment: There is nothing wrong with using {} as default value. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 11:37:22 2019 From: report at bugs.python.org (Stephen Paul Chappell) Date: Thu, 31 Oct 2019 15:37:22 +0000 Subject: [issue37903] IDLE Shell sidebar. In-Reply-To: <1566370033.98.0.615651298891.issue37903@roundup.psfhosted.org> Message-ID: <1572536242.34.0.534435700768.issue37903@roundup.psfhosted.org> Stephen Paul Chappell added the comment: Maybe my impression has been false this whole time, but the Python interactive interpreter seems to be very similar to the IDLE shell window. My question is, "Why not make them even more so?" Having IDLE react to sys.ps1 and sys.ps2 opens up the shell to similar use cases as having them defined in the interactive interpreter. My suggestion is not to have them added as text as is usual in a terminal window but to print the values of ps1 and ps2 in the proposed ShellIO subclass. That would make label customization possible in a way that is already documented and standard. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 12:08:45 2019 From: report at bugs.python.org (=?utf-8?q?D=C3=A1vid_Nemeskey?=) Date: Thu, 31 Oct 2019 16:08:45 +0000 Subject: [issue36664] argparse: parser aliases in subparsers stores alias in dest variable In-Reply-To: <1555630232.08.0.518571967107.issue36664@roundup.psfhosted.org> Message-ID: <1572538125.91.0.658116976344.issue36664@roundup.psfhosted.org> D?vid Nemeskey added the comment: I ran into the same problem. I know of the set_defaults() method, in fact, that is what I have always been using. But why was dest added if not to provide a better solution? I agree that changing it would _perhaps_ break some code, so I agree that this issue cannot be "fixed" for Python 3.7 (and probably 3.8). But what about 3.9 or 4.0? BTW much higher profile backward-incompatible changes do happen in Python; take PEP 563 (https://www.python.org/dev/peps/pep-0563/), for instance. ---------- nosy: +nemeskeyd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 12:18:01 2019 From: report at bugs.python.org (Ronan Lamy) Date: Thu, 31 Oct 2019 16:18:01 +0000 Subject: [issue37645] Replace PyEval_GetFuncName/PyEval_GetFuncDesc In-Reply-To: <1563731175.2.0.136240000148.issue37645@roundup.psfhosted.org> Message-ID: <1572538681.44.0.164659392061.issue37645@roundup.psfhosted.org> Change by Ronan Lamy : ---------- nosy: +Ronan.Lamy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 12:59:47 2019 From: report at bugs.python.org (Andriy Maletsky) Date: Thu, 31 Oct 2019 16:59:47 +0000 Subject: [issue35182] Popen.communicate() breaks when child closes its side of pipe but not exits In-Reply-To: <1541586210.62.0.788709270274.issue35182@psf.upfronthosting.co.za> Message-ID: <1572541187.64.0.135477150936.issue35182@roundup.psfhosted.org> Andriy Maletsky added the comment: @josh.r but you?re correct regarding cached data that isn?t sent on subsequent communicate() calls. If the child consumes the input too slowly, and timeout occurs before sending all input, the remaining part will be lost. Maybe it is not a bug, but it?s quite a confusing behavior, and I think it should be mentioned in the doc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 13:01:01 2019 From: report at bugs.python.org (Andriy Maletsky) Date: Thu, 31 Oct 2019 17:01:01 +0000 Subject: [issue35182] Popen.communicate() breaks when child closes its side of pipe but not exits In-Reply-To: <1541586210.62.0.788709270274.issue35182@psf.upfronthosting.co.za> Message-ID: <1572541261.52.0.949389100885.issue35182@roundup.psfhosted.org> Change by Andriy Maletsky : ---------- keywords: +patch pull_requests: +16538 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17020 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 13:10:22 2019 From: report at bugs.python.org (Brett Cannon) Date: Thu, 31 Oct 2019 17:10:22 +0000 Subject: [issue38651] Add WolfSSL support In-Reply-To: <1572467995.9.0.965883938595.issue38651@roundup.psfhosted.org> Message-ID: <1572541822.56.0.975366808395.issue38651@roundup.psfhosted.org> Brett Cannon added the comment: My guess is we won't want to take code specific to WolfSSL due to maintenance overhead of trying to support another SSL library. There has been talk about trying to move away from our OpenSSL dependency and switch to using the OS's native secure sockets library which may make this easier to handle for third-parties. But I'm personally going to leave it up to Christian to comment in case I got something wrong. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 13:14:52 2019 From: report at bugs.python.org (Brett Cannon) Date: Thu, 31 Oct 2019 17:14:52 +0000 Subject: [issue38649] tkinter messagebox is sloppy In-Reply-To: <1572464225.7.0.112082789313.issue38649@roundup.psfhosted.org> Message-ID: <1572542092.42.0.770202652778.issue38649@roundup.psfhosted.org> Brett Cannon added the comment: Please note that calling something "sloppy" and that somehow its development was done in some "carelessness" fashion to the point of being "egregious" is not motivating to others to try and help. Trying to support all of this code for free in one's spare time is not easy, so I would ask you try to be more understanding and nicer in your comments. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 15:05:11 2019 From: report at bugs.python.org (toonn) Date: Thu, 31 Oct 2019 19:05:11 +0000 Subject: [issue38656] mimetypes for python 3.7.5 fails to detect matroska video Message-ID: <1572548711.23.0.824957089431.issue38656@roundup.psfhosted.org> New submission from toonn : A user reported an error to us which seems to derive from the ``mimetypes`` library failing to guess the mime type for ``.mkv`` matroska video files: https://github.com/ranger/ranger/issues/1744#issuecomment-548514373 This is a regression because the same query successfully identifies the filename as being of the ``video/x-mastroska`` mime type. ---------- components: Library (Lib) messages: 355763 nosy: toonn priority: normal severity: normal status: open title: mimetypes for python 3.7.5 fails to detect matroska video type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 15:28:19 2019 From: report at bugs.python.org (Jake Tesler) Date: Thu, 31 Oct 2019 19:28:19 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1572550099.67.0.495834366824.issue36084@roundup.psfhosted.org> Jake Tesler added the comment: I have encountered a minor bug with this new feature. The bug occurs when creating a new multiprocessing.Process object on Unix (or on any platform where the multiprocessing start_method is 'fork' or 'forkserver'). When creating a new process via fork, the Native ID in the new MainThread is incorrect. The new forked process' threading.MainThread object inherits the Native ID from the parent process' MainThread instead of capturing/updating its own (new) Native ID. See the following snippet: >>> import threading, multiprocessing >>> multiprocessing.set_start_method('fork') # or 'forkserver' >>> def proc(): print(threading.get_native_id(), threading.main_thread().native_id) # get_native_id(), mainthread.native_id >>> proc() 22605 22605 # get_native_id(), mainthread.native_id >>> p = multiprocessing.Process(target=proc) >>> p.start() 22648 22605 # get_native_id(), mainthread.native_id >>> >>> def update(): threading.main_thread()._set_native_id() >>> def print_and_update(): proc(); update(); proc() >>> print_and_update() 22605 22605 # get_native_id(), mainthread.native_id 22605 22605 >>> p2=multiprocessing.Process(target=print_and_update); p2.start() 22724 22605 # get_native_id(), mainthread.native_id 22724 22724 >>> print_and_update() 22605 22605 # get_native_id(), mainthread.native_id 22605 22605 As you can see, the new Process object's MainThread.native_id attribute matches that of the MainThread of its parent process. Unfortunately, I'm not too familiar with the underlying mechanisms that Multiprocessing uses to create forked processes. I believe this behavior occurs because (AFAIK) a forked multiprocessing.Process copies the MainThread object from its parent process, rather than reinitializing a new one. Looking further into the multiprocessing code, it appears the right spot to fix this would be in the multiprocessing.Process.bootstrap() function. I've created a branch containing a working fix - I'm also open to suggestions of how a fix might otherwise be implemented. If it looks correct I'll create a PR against the CPython 3.8 branch. See the branch here: https://github.com/jaketesler/cpython/tree/fix-mp-native-id Thanks all! -Jake ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 16:14:45 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 31 Oct 2019 20:14:45 +0000 Subject: [issue38654] `urllib.request.Request` uses mutable value as default value In-Reply-To: <1572527873.7.0.615539123104.issue38654@roundup.psfhosted.org> Message-ID: <1572552885.58.0.968686315561.issue38654@roundup.psfhosted.org> Steven D'Aprano added the comment: I agree with Serhiy that using mutable defaults is not automatically a bad idea. This is unnecessary code churn that fixes no bugs and adds no new functionality and doesn't make the code "better". The PR removes one harmless use of a mutable default but adds the "code smell" that assumes that None is the only possible falsey value. This means that the ``__init__`` method will accept any falsey value without complaint: Request(url, headers=0.0) which is worse than the current code. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 16:34:16 2019 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 31 Oct 2019 20:34:16 +0000 Subject: [issue38610] use-after-free in list object function In-Reply-To: <1572241758.28.0.0734328499539.issue38610@roundup.psfhosted.org> Message-ID: <1572554056.26.0.13640464116.issue38610@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +16539 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17022 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 16:35:48 2019 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 31 Oct 2019 20:35:48 +0000 Subject: [issue38610] use-after-free in list object function In-Reply-To: <1572241758.28.0.0734328499539.issue38610@roundup.psfhosted.org> Message-ID: <1572554148.4.0.296148089293.issue38610@roundup.psfhosted.org> Zackery Spytz added the comment: I have created a patch to fix these crashes. Please consider taking a look. ---------- nosy: +ZackerySpytz versions: +Python 2.7, Python 3.7, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 16:36:00 2019 From: report at bugs.python.org (Pete Wicken) Date: Thu, 31 Oct 2019 20:36:00 +0000 Subject: [issue38657] String format for hexadecimal notation breaks padding with alternative form Message-ID: <1572554160.44.0.882070489525.issue38657@roundup.psfhosted.org> New submission from Pete Wicken : When formatting an integer as a hexadecimal value, the '#' alternate form modifier inserts a preceding '0x'. If this is used in combination with padding modifiers, the '0x' is counted as part of the overall width, which does not feel like the natural behaviour as extra calculation is required to get the correct post '0x' precision. Example: In [7]: f'{num:04x}' Out[7]: '0800' In [8]: f'{num:#04x}' Out[8]: '0x800' To get the hexadecimal representation padded to 4 digits, you have to account for the preceding 0x: In [10]: f'{num:#06x}' Out[10]: '0x0800' ---------- messages: 355767 nosy: Wicken priority: normal severity: normal status: open title: String format for hexadecimal notation breaks padding with alternative form type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 17:24:08 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 31 Oct 2019 21:24:08 +0000 Subject: [issue38652] Remove/update provisional note for asyncio.BufferedProtocol In-Reply-To: <1572502481.2.0.695475270667.issue38652@roundup.psfhosted.org> Message-ID: <1572557048.98.0.0636332544829.issue38652@roundup.psfhosted.org> Kyle Stanley added the comment: > I'm a newcomer, would it be ok for me to take on this propsal? It will need approval from Yury and/or Andrew before it can be merged, but I think this is relatively uncontroversial. You can definitely work on it though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 17:38:53 2019 From: report at bugs.python.org (ThePokestarFan) Date: Thu, 31 Oct 2019 21:38:53 +0000 Subject: [issue38658] Python Program crashes when running in fore and back ground Message-ID: <1572557933.17.0.948616559199.issue38658@roundup.psfhosted.org> New submission from ThePokestarFan : I have a Python process that should not die that is multiprocessed. I have a queue process that feeds the queue every so often, but my program should use up queue items faster than the queue adds them. I have four worker threads that make requests to an API and update an SQL table with the results. However, if I use nohup and run it, it crashes. Even if I directly run it, it crashes. It used to run forever when I loaded it in PyCharm, but even that crashes it. ---------- components: macOS files: crash.txt messages: 355769 nosy: ThePokestarFan, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Python Program crashes when running in fore and back ground type: crash versions: Python 3.8 Added file: https://bugs.python.org/file48688/crash.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 17:42:58 2019 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 31 Oct 2019 21:42:58 +0000 Subject: [issue38652] Remove/update provisional note for asyncio.BufferedProtocol In-Reply-To: <1572502481.2.0.695475270667.issue38652@roundup.psfhosted.org> Message-ID: <1572558178.84.0.426116459439.issue38652@roundup.psfhosted.org> Yury Selivanov added the comment: Yeah, please do the change! Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 17:46:48 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 31 Oct 2019 21:46:48 +0000 Subject: [issue32309] Implement asyncio.run_in_executor shortcut In-Reply-To: <1513194861.88.0.213398074469.issue32309@psf.upfronthosting.co.za> Message-ID: <1572558408.76.0.295752768805.issue32309@roundup.psfhosted.org> Kyle Stanley added the comment: > I don't like the low-level API of run_in_executor. "executor" being the first argument, the inability to pass **kwargs, etc. > I mean it's great that we can use 'concurrent.futures' in asyncio, but having native asyncio pools implementation would be way more convenient to the users. I agree that there's an issue with this, but I think for the high level API it can be an asynchronous context manager that makes use of concurrent.futures.ThreadPoolExecutor, since that one seems to fit the majority of asyncio use cases. If users want to utilize concurrent.futures.ProcessPoolExecutor or a customized one, they can use loop.run_in_executor() instead. Unless there's something I'm missing with regards to concurrent.futures.ThreadPoolExecutor that specifically makes it less usable. Can't asyncio.ThreadPool make use of concurrent.futures.ThreadPoolExecutor in the internal details while providing a better API? > I'd expect to see a more high-level API, perhaps the one that supports 'async with': > asyncio.ThreadPool() sounds great. Maybe thread group can provide better api. I'd be willing to work on implementing the asyncio.ThreadPool API as Yury described it. > But for Python 3.8 adding `run_in_executor` top-level function looks the only easy and obvious way to help people getting rid of explicit loop usage. I can see your point Andrew, but I think that if we implement asyncio.run_in_executor() and then later add asyncio.ThreadPool(), it's going to be against "one obvious way" and we'll end up adding two high-level functions for the same purpose. This principle can't always be adhered to, but I think we should try to when it's possible. Personally, I think the API for asyncio.ThreadPool would be much more robust, so it seems worthwhile to try implementing this one first. If there are a number of unforeseen complications, asyncio.run_in_executor() might still be a decent fallback. ---------- nosy: +aeros _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 17:46:53 2019 From: report at bugs.python.org (ThePokestarFan) Date: Thu, 31 Oct 2019 21:46:53 +0000 Subject: [issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error In-Reply-To: <1572448045.56.0.183251608823.issue38645@roundup.psfhosted.org> Message-ID: <1572558413.22.0.39365452188.issue38645@roundup.psfhosted.org> ThePokestarFan added the comment: For me, it seems that dateutil is not a standard Python library module. When I run `import dateutil` it reports that there is no module called dateutil. ``` >>> import dateutil Traceback (most recent call last): File "", line 1, in ImportError: No module named dateutil ``` ---------- nosy: +ThePokestarFan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 17:49:19 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 31 Oct 2019 21:49:19 +0000 Subject: [issue32309] Implement asyncio.run_in_executor shortcut In-Reply-To: <1513194861.88.0.213398074469.issue32309@psf.upfronthosting.co.za> Message-ID: <1572558559.76.0.221146637206.issue32309@roundup.psfhosted.org> Kyle Stanley added the comment: > end up adding two high-level functions Clarification: asyncio.run_in_executor() would be a function, but asyncio.ThreadPool would be a context manager class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 19:10:14 2019 From: report at bugs.python.org (Efanzh) Date: Thu, 31 Oct 2019 23:10:14 +0000 Subject: [issue38654] `urllib.request.Request` uses mutable value as default value In-Reply-To: <1572527873.7.0.615539123104.issue38654@roundup.psfhosted.org> Message-ID: <1572563414.64.0.50605698029.issue38654@roundup.psfhosted.org> Efanzh added the comment: How about changing `if headers` to `if headers is not None`? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 19:11:32 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 Oct 2019 23:11:32 +0000 Subject: [issue38654] `urllib.request.Request` uses mutable value as default value In-Reply-To: <1572527873.7.0.615539123104.issue38654@roundup.psfhosted.org> Message-ID: <1572563492.43.0.0861233536498.issue38654@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is not needed. There is no bug. Nothing to change. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 19:40:22 2019 From: report at bugs.python.org (Andriy Maletsky) Date: Thu, 31 Oct 2019 23:40:22 +0000 Subject: [issue35182] Popen.communicate() breaks when child closes its side of pipe but not exits In-Reply-To: <1541586210.62.0.788709270274.issue35182@psf.upfronthosting.co.za> Message-ID: <1572565222.65.0.954808522242.issue35182@roundup.psfhosted.org> Change by Andriy Maletsky : ---------- pull_requests: +16540 pull_request: https://github.com/python/cpython/pull/17023 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 19:52:30 2019 From: report at bugs.python.org (tholl) Date: Thu, 31 Oct 2019 23:52:30 +0000 Subject: [issue38622] _ctypes.dlsym (py_dl_sym) does not trigger audit hooks In-Reply-To: <1572286737.48.0.245277798688.issue38622@roundup.psfhosted.org> Message-ID: <1572565950.26.0.141543321507.issue38622@roundup.psfhosted.org> tholl added the comment: I probably should have done this earlier, but here's a small test case that reproduces the issue. The assert fails in vanilla Python 3.8, but passes with the patch. ---------- type: -> behavior Added file: https://bugs.python.org/file48689/audit-test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 21:12:48 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 01 Nov 2019 01:12:48 +0000 Subject: [issue38659] enum classes cause slow startup time Message-ID: <1572570768.69.0.355804772721.issue38659@roundup.psfhosted.org> New submission from Gregory P. Smith : Creating an enum subclass (ie: defining an enum) is slow. This dramatically impacts startup time of Python programs that import a bunch of potentially needed constant definitions at startup before any proper code executes. How slow? So slow that a module defining a ~300 enums takes nearly 100ms just to import from its pyc file. Example code: https://github.com/googleads/google-ads-python/blob/96fd08bb62435f1930df4871033ba8689333b67f/google/ads/google_ads/v2/services/enums.py We've known this, we should do something about it. (Even if it means implementing the guts of the magic enum machinery in C.) ie, it came up in https://bugs.python.org/issue28637 as a stdlib startup time regression and is likely to come up in similar contexts elsewhere. ---------- components: Library (Lib) messages: 355777 nosy: gregory.p.smith priority: normal severity: normal stage: needs patch status: open title: enum classes cause slow startup time type: performance versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 21:46:44 2019 From: report at bugs.python.org (Efanzh) Date: Fri, 01 Nov 2019 01:46:44 +0000 Subject: [issue38654] `urllib.request.Request` uses mutable value as default value In-Reply-To: <1572527873.7.0.615539123104.issue38654@roundup.psfhosted.org> Message-ID: <1572572804.38.0.904283083718.issue38654@roundup.psfhosted.org> Efanzh added the comment: I agree that this doesn?t fix any bug. But is is easy to make mistakes by using mutable default values (See https://docs.python-guide.org/writing/gotchas/#mutable-default-arguments). Both PyCharm and pylint show warnings about mutable default arguments even there is no bug in the code. Using `{}` as default value, by looking at the function signature, I might wonder whether this argument stays the same on each function call, since it is mutable. But by using `None` as default value, I am know this argument will always be `None` on each function call. Using `None` as default value makes the function interface more easy to understand. Also, if some new Python coders saw `[]` or `{}` being used as default values in the standard library, they might think ?I?ll do it too since the standard library does it?. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 21:51:18 2019 From: report at bugs.python.org (paul j3) Date: Fri, 01 Nov 2019 01:51:18 +0000 Subject: [issue36664] argparse: parser aliases in subparsers stores alias in dest variable In-Reply-To: <1555630232.08.0.518571967107.issue36664@roundup.psfhosted.org> Message-ID: <1572573078.16.0.192410872328.issue36664@roundup.psfhosted.org> paul j3 added the comment: Just clarify how the code currently works. `subparsers` is a positional Action of subclass _SubParsersAction. It has a nargs='+...', requiring at least one string, and taking all remaining strings. Its __call__ has the standard signature. So everything that's special about subparsers is embodied in this Action subclass. def __call__(self, parser, namespace, values, option_string=None): parser_name = values[0] arg_strings = values[1:] # set the parser name if requested if self.dest is not SUPPRESS: setattr(namespace, self.dest, parser_name) # select the parser try: parser = self._name_parser_map[parser_name] ... So the `parser_name` is first string, the actual alias that user provided. It is added to the namespace if a `dest` was provided (the default `dest` is SUPPRESS). That's all of the relevant code - the alias is simply added to to Namespace. As mentioned before `parser_name` is used find the actual sub parser, which is called with the remaining `arg_strings`. Earlier in the subclasses `add_parser` method, the 'name' and 'alias' list are used to populate the '_name_parser_map' mapping, and also create the metavar that's used in the help display. But neither is saved as an attribute. --- I still think 'set_defaults' is the cleanest way of saving a unique name for a sub parser. parser_foo.set_defaults(func=foo, name='foo') --- One further note - if you make subparsers required, you should also set a dest name: parser.add_subparsers(dest='cmd', required=True) otherwise the missing-subparsers error message will raise an error. It needs to identify the missing action in some way. Functionally, this might be the most important reason to set the 'dest'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 21:56:14 2019 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 01 Nov 2019 01:56:14 +0000 Subject: [issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error In-Reply-To: <1572448045.56.0.183251608823.issue38645@roundup.psfhosted.org> Message-ID: <1572573374.76.0.693902177941.issue38645@roundup.psfhosted.org> Dong-hee Na added the comment: Python 3.9.0a0 (heads/master:112f2b805b, Nov 1 2019, 10:48:20) [GCC 7.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import datetime >>> utc_tzinfo = datetime.timezone.utc >>> print(datetime.datetime.fromtimestamp(0, utc_tzinfo)) 1970-01-01 00:00:00+00:00 works properly on my Linux machine. Can you gave me which can reproduce based on stdlib library? ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 21:58:49 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 01 Nov 2019 01:58:49 +0000 Subject: [issue38659] enum classes cause slow startup time In-Reply-To: <1572570768.69.0.355804772721.issue38659@roundup.psfhosted.org> Message-ID: <1572573529.77.0.413564742401.issue38659@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 22:18:13 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 01 Nov 2019 02:18:13 +0000 Subject: [issue38656] mimetypes for python 3.7.5 fails to detect matroska video In-Reply-To: <1572548711.23.0.824957089431.issue38656@roundup.psfhosted.org> Message-ID: <1572574693.0.0.686322508061.issue38656@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 22:23:32 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 01 Nov 2019 02:23:32 +0000 Subject: [issue38656] mimetypes for python 3.7.5 fails to detect matroska video In-Reply-To: <1572548711.23.0.824957089431.issue38656@roundup.psfhosted.org> Message-ID: <1572575012.88.0.352757397381.issue38656@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I couldn't find mkv in mimetypes with search. Can you please post the output of the mimetypes query in 3.7.4 and 3.7.5 for the regression? In the attached GitHub issue the user reports mkv returns None and mp4 is detected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 22:38:42 2019 From: report at bugs.python.org (Ammar Askar) Date: Fri, 01 Nov 2019 02:38:42 +0000 Subject: [issue38656] mimetypes for python 3.7.5 fails to detect matroska video In-Reply-To: <1572548711.23.0.824957089431.issue38656@roundup.psfhosted.org> Message-ID: <1572575922.25.0.26979538525.issue38656@roundup.psfhosted.org> Ammar Askar added the comment: This is what I get on master, will try 3.7.5+ as noted in the Github issue: Python 3.9.0a0 (heads/noopt-dirty:f3b170812d, Oct 1 2019, 20:15:53) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import mimetypes >>> print(mimetypes.guess_type('E01.mkv')) ('video/x-matroska', None) ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 22:53:46 2019 From: report at bugs.python.org (Michael Zhang) Date: Fri, 01 Nov 2019 02:53:46 +0000 Subject: [issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error In-Reply-To: <1572448045.56.0.183251608823.issue38645@roundup.psfhosted.org> Message-ID: <1572576826.25.0.119222578354.issue38645@roundup.psfhosted.org> Michael Zhang added the comment: I think it might be something Windows specific; the original comment includes the version and code to reproduce. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 22:59:08 2019 From: report at bugs.python.org (ThePokestarFan) Date: Fri, 01 Nov 2019 02:59:08 +0000 Subject: [issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error In-Reply-To: <1572448045.56.0.183251608823.issue38645@roundup.psfhosted.org> Message-ID: <1572577148.19.0.343869300653.issue38645@roundup.psfhosted.org> ThePokestarFan added the comment: Can you run >>>import dateutil >>>print(repr(dateutil)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 23:00:30 2019 From: report at bugs.python.org (Ammar Askar) Date: Fri, 01 Nov 2019 03:00:30 +0000 Subject: [issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error In-Reply-To: <1572448045.56.0.183251608823.issue38645@roundup.psfhosted.org> Message-ID: <1572577230.6.0.907220632477.issue38645@roundup.psfhosted.org> Ammar Askar added the comment: It is windows specific, but I don't think this is a dateutil bug rather than the python stdlib: Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import datetime >>> from dateutil.tz import tzlocal >>> print(datetime.datetime.fromtimestamp(0, tzlocal())) Traceback (most recent call last): File "", line 1, in File "D:\Python365\lib\site-packages\dateutil\tz\_common.py", line 144, in fromutc return f(self, dt) File "D:\Python365\lib\site-packages\dateutil\tz\_common.py", line 258, in fromutc dt_wall = self._fromutc(dt) File "D:\Python365\lib\site-packages\dateutil\tz\_common.py", line 238, in _fromutc dtdst = enfold(dt, fold=1).dst() File "D:\Python365\lib\site-packages\dateutil\tz\tz.py", line 225, in dst if self._isdst(dt): File "D:\Python365\lib\site-packages\dateutil\tz\tz.py", line 288, in _isdst if self.is_ambiguous(dt): File "D:\Python365\lib\site-packages\dateutil\tz\tz.py", line 250, in is_ambiguous (naive_dst != self._naive_is_dst(dt - self._dst_saved))) File "D:\Python365\lib\site-packages\dateutil\tz\tz.py", line 254, in _naive_is_dst return time.localtime(timestamp + time.timezone).tm_isdst OSError: [Errno 22] Invalid argument As you can see, none of that backtrace is within Python, it's all inside dateutil code. More than likely they are calling `time.localtime` with a value of less than 0 which throws an error on Windows. (see also issue29097) ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 23:01:19 2019 From: report at bugs.python.org (Ammar Askar) Date: Fri, 01 Nov 2019 03:01:19 +0000 Subject: [issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error In-Reply-To: <1572448045.56.0.183251608823.issue38645@roundup.psfhosted.org> Message-ID: <1572577279.68.0.552156453627.issue38645@roundup.psfhosted.org> Ammar Askar added the comment: Err...I mean I think this is a dateutil bug rather than in the Python stdlib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 23:03:01 2019 From: report at bugs.python.org (Michael Zhang) Date: Fri, 01 Nov 2019 03:03:01 +0000 Subject: [issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error In-Reply-To: <1572448045.56.0.183251608823.issue38645@roundup.psfhosted.org> Message-ID: <1572577381.91.0.825454302944.issue38645@roundup.psfhosted.org> Michael Zhang added the comment: Yeah, seconded with my own tracing as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 23:11:09 2019 From: report at bugs.python.org (Ammar Askar) Date: Fri, 01 Nov 2019 03:11:09 +0000 Subject: [issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error In-Reply-To: <1572448045.56.0.183251608823.issue38645@roundup.psfhosted.org> Message-ID: <1572577869.22.0.202247674061.issue38645@roundup.psfhosted.org> Ammar Askar added the comment: Closing, here's the bug in dateutil's repo: https://github.com/dateutil/dateutil/issues/197 ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 23:31:39 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 01 Nov 2019 03:31:39 +0000 Subject: [issue38642] python3.7.3 seems to cause add-apt-repository to rejct or not find gi library In-Reply-To: <1572444360.24.0.26930433052.issue38642@roundup.psfhosted.org> Message-ID: <1572579099.38.0.0986406250797.issue38642@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +doko -Marco Ippolito _______________________________________ Python tracker _______________________________________