From report at bugs.python.org Fri May 1 00:05:16 2020 From: report at bugs.python.org (wy7305e) Date: Fri, 01 May 2020 04:05:16 +0000 Subject: [issue40463] csv.reader split error Message-ID: <1588305916.81.0.836923186676.issue40463@roundup.psfhosted.org> New submission from wy7305e : #python 3.6 or python 3.8 csv.reader delimiter=',' quotechar='"' split this sentence: "A word of encouragement and explanation, of pity for my childish ignorance, of welcome home, of reassurance to me that it was home, might have made me dutiful to him in my heart henceforth, instead of in my hypocritical<eword w=\"hypocritical\"></eword> outside, and might have made me respect instead of hate him. ","Part 1/CHAPTER 4. I FALL INTO DISGRACE/","David Copperfield" return 4 columns, but it should return 3 columns. ---------- components: Library (Lib) files: 01_test_code.py messages: 367823 nosy: wy7305e priority: normal severity: normal status: open title: csv.reader split error type: enhancement versions: Python 3.6 Added file: https://bugs.python.org/file49104/01_test_code.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 01:50:04 2020 From: report at bugs.python.org (SilentGhost) Date: Fri, 01 May 2020 05:50:04 +0000 Subject: [issue40463] csv.reader split error In-Reply-To: <1588305916.81.0.836923186676.issue40463@roundup.psfhosted.org> Message-ID: <1588312204.19.0.776947121366.issue40463@roundup.psfhosted.org> Change by SilentGhost : ---------- type: enhancement -> behavior versions: +Python 3.7, Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 03:04:01 2020 From: report at bugs.python.org (Dutcho) Date: Fri, 01 May 2020 07:04:01 +0000 Subject: [issue40464] functools.singledispatch doesn't verify annotation is on FIRST parameter Message-ID: <1588316641.36.0.617194746525.issue40464@roundup.psfhosted.org> New submission from Dutcho : >From Python 3.7, `functools.singledispatch` makes the `register()` attribute of the generic function infer the type of the first argument automatically for functions annotated with types. That's great for DRY. However, in 3.7 and 3.8, no check is made that the *first* parameter of the registered function is actually annotated; *any* annotation suffices, even the *return* one. Example: ``` >>> @functools.singledispatch ... def func(arg):... >>> @func.register ... def _int(arg) -> int:... >>> @func.register ... def _str(arg) -> str:... ``` No errors happen, although the return type, *not* `arg`, is annotated. This results in: ``` >>> func.registry mappingproxy({: , : , : }) ``` Obviously, that doesn't dispatch correctly. Note that un-annotated functions *are* caught: ``` >>> @func.register ... def _no_annotation(arg): ... Traceback (most recent call last): ... TypeError: Invalid first argument to `register()`: . Use either `@register(some_class)` or plain `@register` on an annotated function. ``` ---------- components: Library (Lib) messages: 367824 nosy: Dutcho priority: normal severity: normal status: open title: functools.singledispatch doesn't verify annotation is on FIRST parameter type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 03:40:16 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 01 May 2020 07:40:16 +0000 Subject: [issue40463] csv.reader split error In-Reply-To: <1588305916.81.0.836923186676.issue40463@roundup.psfhosted.org> Message-ID: <1588318816.96.0.224976432279.issue40463@roundup.psfhosted.org> Eric V. Smith added the comment: You should tell us what you're seeing, and what you're expecting. I'm adding the rest of this not because it solves your problem, but because it might help you or someone else troubleshoot this further. Here's a simpler reproducer: import csv lst = ['"A,"h"e, ","E","DC"'] csv_list = csv.reader(lst) for idx, col in enumerate(next(csv_list)): print(idx, repr(col)) Which produces: 0 'A,h"e' 1 ' "' 2 'E' 3 'DC' Although true to its word, this is using the default dialect='excel', and my version of Excel gives these same 4 columns, including the space starting the second column. Dropping the space after the "e," gives 3 columns: lst = ['"A,"h"e,","E","DC"'] Produces: 0 'A,h"e' 1 ',E"' 2 'DC' Again, this is exactly what Excel gives, as odd as it seems. It might be worth playing around with the dialect parameters to see if you can achieve what you want. In your example: delimiter=',', quotechar='"' are the default values for the "excel" dialect, which is why I dropped them above. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 04:31:41 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 01 May 2020 08:31:41 +0000 Subject: [issue40465] Deprecate the optional *random* argument to random.shuffle() Message-ID: <1588321901.81.0.617278241299.issue40465@roundup.psfhosted.org> New submission from Raymond Hettinger : shuffle(x, random=None) ? shuffle(x) AFAICT, no one ever uses the optional parameter, nor would they have a valid reason to do so. It is an ancient API oddity and is inconsistent with the other methods in the module. I've long been annoyed by it and would like to see it cleaned-up before I retire ;-) https://docs.python.org/3/library/random.html#random.shuffle ---------- components: Library (Lib) messages: 367826 nosy: rhettinger, tim.peters priority: normal severity: normal status: open title: Deprecate the optional *random* argument to random.shuffle() type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 04:56:38 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 01 May 2020 08:56:38 +0000 Subject: [issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad In-Reply-To: <1487329309.81.0.182915384821.issue29587@psf.upfronthosting.co.za> Message-ID: <1588323398.44.0.0253354461519.issue29587@roundup.psfhosted.org> Chris Jerdonek added the comment: Okay, I was able to get the tests passing on the other platforms. I'm still not sure why Mac and Fedora behaved differently with my original PR. I was able to come up with a simple script that isolated the behavior difference (posted in the PR comments). It's very strange. Maybe it signals an issue elsewhere in the Python code base. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 05:20:39 2020 From: report at bugs.python.org (Furkan Onder) Date: Fri, 01 May 2020 09:20:39 +0000 Subject: [issue40462] [easy] undefined name in Lib/test/mock_socket.py In-Reply-To: <1588290630.2.0.182306583677.issue40462@roundup.psfhosted.org> Message-ID: <1588324839.29.0.182740844036.issue40462@roundup.psfhosted.org> Change by Furkan Onder : ---------- keywords: +patch nosy: +furkanonder nosy_count: 1.0 -> 2.0 pull_requests: +19151 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19832 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 05:22:58 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 01 May 2020 09:22:58 +0000 Subject: [issue40465] Deprecate the optional *random* argument to random.shuffle() In-Reply-To: <1588321901.81.0.617278241299.issue40465@roundup.psfhosted.org> Message-ID: <1588324978.75.0.787449512741.issue40465@roundup.psfhosted.org> Serhiy Storchaka added the comment: +1 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 05:27:06 2020 From: report at bugs.python.org (Furkan Onder) Date: Fri, 01 May 2020 09:27:06 +0000 Subject: [issue40462] [easy] undefined name in Lib/test/mock_socket.py In-Reply-To: <1588290630.2.0.182306583677.issue40462@roundup.psfhosted.org> Message-ID: <1588325226.09.0.666908106293.issue40462@roundup.psfhosted.org> Furkan Onder added the comment: Hello, I sent a PR that corrects variable and function names. I'm not sure how to fix it for Lib/test/test_json/test_recursion.py:55:24 so I didn't make any changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 05:33:51 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 May 2020 09:33:51 +0000 Subject: [issue40453] Add PyConfig._isolated_interpreter: isolated subinterpreters In-Reply-To: <1588276857.13.0.360538290387.issue40453@roundup.psfhosted.org> Message-ID: <1588325631.67.0.220098327414.issue40453@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 252346acd937ddba4845331994b8ff4f90349625 by Victor Stinner in branch 'master': bpo-40453: Add PyConfig._isolated_subinterpreter (GH-19820) https://github.com/python/cpython/commit/252346acd937ddba4845331994b8ff4f90349625 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 05:34:43 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 May 2020 09:34:43 +0000 Subject: [issue40453] Add PyConfig._isolated_interpreter: isolated subinterpreters In-Reply-To: <1588276857.13.0.360538290387.issue40453@roundup.psfhosted.org> Message-ID: <1588325683.77.0.619586682716.issue40453@roundup.psfhosted.org> STINNER Victor added the comment: TODO * check that spawning a thread is blocked in isolated subinterpreter * block loading C extensions which don't implement PEP 489 in isolated subinterpreter (see https://github.com/python/cpython/pull/19820 comments) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 05:57:11 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 01 May 2020 09:57:11 +0000 Subject: [issue40466] asyncio.ensure_future() breaks implicit exception chaining Message-ID: <1588327031.68.0.391066617052.issue40466@roundup.psfhosted.org> New submission from Chris Jerdonek : This issue is about how if a coroutine is wrapped in a Task with asyncio.ensure_future(), then portions of the exception chain can be lost. Specifically, if you run the following code, then ValueError will be raised with exc.__context__ equal to the KeyError: import asyncio async def raise_error(): raise ValueError async def main(): try: raise KeyError except Exception as exc: future = raise_error() # Uncommenting the next line makes exc.__context__ None below. # future = asyncio.ensure_future(future) try: await future except Exception as exc: print(f'error: {exc!r}, context: {exc.__context__!r}') raise asyncio.get_event_loop().run_until_complete(main()) However, if you uncomment the `asyncio.ensure_future()` line, then the ValueError will be raised with no __context__. I originally raised this issue a couple years ago here: https://mail.python.org/pipermail/async-sig/2017-November/000403.html There it was suggested that this was a special case of this issue: https://bugs.python.org/issue29587 However, after writing code to fix that, this issue still exists. ---------- components: asyncio messages: 367832 nosy: asvetlov, chris.jerdonek, yselivanov priority: normal severity: normal status: open title: asyncio.ensure_future() breaks implicit exception chaining type: behavior versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 06:03:18 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 01 May 2020 10:03:18 +0000 Subject: [issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad In-Reply-To: <1487329309.81.0.182915384821.issue29587@psf.upfronthosting.co.za> Message-ID: <1588327398.16.0.269322872724.issue29587@roundup.psfhosted.org> Chris Jerdonek added the comment: By the way, I just posted a new issue about exception chaining getting suppressed, but this time in an asyncio setting with ensure_future(): https://bugs.python.org/issue40466 I first noticed this issue two or three years ago and raised it on the async-sig list. It was suggested there that this was a special case of the current issue. Having written code to fix the current issue, though, the ensure_future() issue still exists. So I filed a separate issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 06:10:57 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 May 2020 10:10:57 +0000 Subject: [issue40460] [easy] undefined name in Lib/idlelib/zzdummy.py In-Reply-To: <1588290497.54.0.985175585062.issue40460@roundup.psfhosted.org> Message-ID: <1588327857.99.0.539024215497.issue40460@roundup.psfhosted.org> Terry J. Reedy added the comment: Yes, simple typo. I need to look at test_Zzdummy.py to see if it should have been failing with the typo. If this is executed, the end index must be 1 so that the loop never executes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 06:12:02 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 01 May 2020 10:12:02 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588327922.54.0.880765092151.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Warnings found by pyflakes: Hummmm, "Lib/test/test_tools/test_c_analyzer/test_parser" has nothing to do with this PR. This looks like Eric Snow's c analyzer for avoiding globals and other stuff for sub interpreters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 06:55:18 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 01 May 2020 10:55:18 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588330518.6.0.881466793456.issue40334@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +19152 pull_request: https://github.com/python/cpython/pull/19833 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 06:56:40 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 01 May 2020 10:56:40 +0000 Subject: [issue40453] Add PyConfig._isolated_interpreter: isolated subinterpreters In-Reply-To: <1588276857.13.0.360538290387.issue40453@roundup.psfhosted.org> Message-ID: <1588330600.83.0.227519001601.issue40453@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 07:32:30 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 01 May 2020 11:32:30 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588332750.9.0.0260366693617.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset b796b3fb48283412d3caf52323c69690e5818d3d by Pablo Galindo in branch 'master': bpo-40334: Simplify type handling in the PEG c_generator (GH-19818) https://github.com/python/cpython/commit/b796b3fb48283412d3caf52323c69690e5818d3d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 07:42:54 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 01 May 2020 11:42:54 +0000 Subject: [issue39562] Asynchronous comprehensions don't work in asyncio REPL In-Reply-To: <1580923705.71.0.29233909242.issue39562@roundup.psfhosted.org> Message-ID: <1588333374.4.0.197895808466.issue39562@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +19153 pull_request: https://github.com/python/cpython/pull/19835 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 08:15:38 2020 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 May 2020 12:15:38 +0000 Subject: [issue32494] Use gdbm_count if possible In-Reply-To: <1515102093.85.0.467229070634.issue32494@psf.upfronthosting.co.za> Message-ID: <1588335338.76.0.71651620927.issue32494@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset 8727664557cd44dcd00612ccba816942e8f885ab by Dong-hee Na in branch 'master': bpo-32494: Use gdbm_count for dbm_length if possible (GH-19814) https://github.com/python/cpython/commit/8727664557cd44dcd00612ccba816942e8f885ab ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 08:15:54 2020 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 May 2020 12:15:54 +0000 Subject: [issue32494] Use gdbm_count if possible In-Reply-To: <1515102093.85.0.467229070634.issue32494@psf.upfronthosting.co.za> Message-ID: <1588335354.99.0.732730879422.issue32494@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 08:26:40 2020 From: report at bugs.python.org (Ama Aje My Fren) Date: Fri, 01 May 2020 12:26:40 +0000 Subject: [issue40434] Update of reasoning why there is no case statement In-Reply-To: <1588148867.59.0.249886730635.issue40434@roundup.psfhosted.org> Message-ID: <1588336000.5.0.139797353889.issue40434@roundup.psfhosted.org> Ama Aje My Fren added the comment: the statement initially said that there was _no consensus yet on how to do range tests_. This is not true because there is now a decision to not do range tests - that decision is only in PEP 3103 and not in PEP 275 (PEP 275 actually links to PEP 3103 to explain why it is rejected). My feeling is that putting two references complicates the goal of explaining it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 08:38:24 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 01 May 2020 12:38:24 +0000 Subject: [issue40408] GenericAlias does not support nested type variables In-Reply-To: <1588003077.18.0.979842098769.issue40408@roundup.psfhosted.org> Message-ID: <1588336704.09.0.764388485085.issue40408@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +19154 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19836 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 08:43:17 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 01 May 2020 12:43:17 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588336997.48.0.927611009527.issue40334@roundup.psfhosted.org> Serhiy Storchaka added the comment: While PR 19786 makes the PEG generator working on 3.6, it fails on 3.7. Seems there are more dependencies on wrong tokenizer. Please don't forget to fix this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 08:46:51 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 May 2020 12:46:51 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588337211.67.0.494864223417.issue40334@roundup.psfhosted.org> STINNER Victor added the comment: > Hummmm, "Lib/test/test_tools/test_c_analyzer/test_parser" has nothing to do with this PR. This looks like Eric Snow's c analyzer for avoiding globals and other stuff for sub interpreters. Oh sorry. I analyzed dozens of pyflakes warning. When I saw "parser", I expected the issue to be new and so introduced by this bpo. Sorry about that ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 08:49:39 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 01 May 2020 12:49:39 +0000 Subject: [issue40462] [easy] undefined name in Lib/test/mock_socket.py In-Reply-To: <1588290630.2.0.182306583677.issue40462@roundup.psfhosted.org> Message-ID: <1588337379.4.0.934568380727.issue40462@roundup.psfhosted.org> miss-islington added the comment: New changeset 719e14d2837520c18398a3e22a36f20c1fe76edf by Furkan ?nder in branch 'master': bpo-40462: fix variable and function names (GH-19832) https://github.com/python/cpython/commit/719e14d2837520c18398a3e22a36f20c1fe76edf ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 09:10:04 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 01 May 2020 13:10:04 +0000 Subject: [issue40462] [easy] undefined name in Lib/test/mock_socket.py In-Reply-To: <1588290630.2.0.182306583677.issue40462@roundup.psfhosted.org> Message-ID: <1588338604.1.0.665990265449.issue40462@roundup.psfhosted.org> Dong-hee Na added the comment: @vstinner IMHO we should create backport patch for 3.8 and 3.7 3.8 and 3.7 has same codes for this. https://github.com/python/cpython/blob/3.8/Lib/test/mock_socket.py#L95 ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 09:13:55 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 01 May 2020 13:13:55 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588338835.9.0.964838420439.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 76c1b4d5c5a610c09943e1ee7ae18f1957804730 by Batuhan Taskaya in branch 'master': bpo-40334: Improve column offsets for thrown syntax errors by Pegen (GH-19782) https://github.com/python/cpython/commit/76c1b4d5c5a610c09943e1ee7ae18f1957804730 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 09:34:17 2020 From: report at bugs.python.org (Anish Athalye) Date: Fri, 01 May 2020 13:34:17 +0000 Subject: [issue40467] subprocess: replacement shell on windows with executable="..." arg Message-ID: <1588340057.85.0.281023369912.issue40467@roundup.psfhosted.org> New submission from Anish Athalye : On Windows, using subprocess.call() and specifying both shell=True and the executable='...' keyword arguments produces an undesirable result when the specified shell is a POSIX-like shell rather than the standard cmd.exe. I think the documentation is unclear on the semantics of Popen() when both shell=True and executable= are specified on Windows. It does say the following about POSIX systems: > If shell=True, on POSIX the executable argument specifies a replacement shell > for the default /bin/sh. But the documentation doesn't say anything about Windows in this scenario, so I'm not sure if this is a bug, or if it's undefined behavior. Concretely, here's an example program that fails due to this: import subprocess bash = 'C:\\Program Files\\Git\\usr\\bin\\bash.exe' subprocess.call('f() { echo test; }; f', shell=True, executable=bash) It prints out this mysterious-looking error: /c: /c: Is a directory Tracing this into subprocess.py, it looks like it's because the executable bash (as specified) is being called with the argv that's approximately ['cmd.exe', '/c', 'f() { echo test; }; f'] (and the program being launched is indeed bash). Bash doesn't expect a '/c' argument, it wants a '-c' there. The problematic code in subprocess.py is here: https://github.com/python/cpython/blob/1def7754b7a41fe57efafaf5eff24cfa15353444/Lib/subprocess.py#L1407 If the '/c' is replaced with a '-c', the example program above works (bash doesn't seem to care that it's called with an argv[0] that doesn't make sense, though presumably that should be fixed too). I'm not sure how this could be fixed. It's unclear when '/c' should be used, as opposed to '-c'. Doing it based on the contents of the executable= argument or the SHELL environment variable or COMSPEC might be fragile? I couldn't find much about this online, but I did find one project (in Ruby) that seems to have run into a similar problem. See https://github.com/kimmobrunfeldt/chokidar-cli/issues/15 and https://github.com/kimmobrunfeldt/chokidar-cli/pull/16. At the very least, even if this isn't fixed / can't be fixed, it might be nice if it's possible to give some sort of useful warning/error when this happens -- perhaps say that specifying both shell=True and executable="..." isn't supported on Windows? I ran into this issue while while debugging an issue in a project of mine. In case the additional context is useful, here is the discussion: https://github.com/anishathalye/dotbot/issues/219 ---------- components: Library (Lib), Windows messages: 367844 nosy: anishathalye, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: subprocess: replacement shell on windows with executable="..." arg type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 09:45:59 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 01 May 2020 13:45:59 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588340759.59.0.470460818382.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Seems there are more dependencies on wrong tokenizer. Please don't forget to fix this. Thanks, Serhiy, will submit a PR soon! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 10:10:10 2020 From: report at bugs.python.org (E. Paine) Date: Fri, 01 May 2020 14:10:10 +0000 Subject: [issue40468] IDLE split "general" into two tabs Message-ID: <1588342210.52.0.776872841323.issue40468@roundup.psfhosted.org> New submission from E. Paine : The proposed change to move some of the content in the "General" tab to a new tab. The need for this has been emphasised As a proof-of-concept, I moved the "Window Preferences" LabelFrame to a new tab titled "Window" (and did the minimum required to get the window to show). The result can be seen in the "general_page.png" & "window_page.png" files. Looking at the new general page, I felt that the "Editor Preferences" & "Shell Preferences" LabelFrames should not expand to fill the newly created space, and this should instead be taken up in the "Additional Help Sources" LabelFrame. The result can be seen in the ?general_page_pady.png? file. Finally, I felt that we could now reduce the height of the window further by decreasing the font page Listbox height to 10 (from 15). The result can be seen in ?font_page_short.png?, ?general_page_short.png? & ?general_page_pady_short.png?. As I said originally, this is just a proof-of-concept and we could easily move other options into a new tab (such as a ?Editor/Shell? tab ? though I think this is too long for a tab title). ---------- assignee: terry.reedy components: IDLE messages: 367846 nosy: epaine, terry.reedy priority: normal severity: normal status: open title: IDLE split "general" into two tabs versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 10:10:22 2020 From: report at bugs.python.org (E. Paine) Date: Fri, 01 May 2020 14:10:22 +0000 Subject: [issue40468] IDLE split "general" into two tabs In-Reply-To: <1588342210.52.0.776872841323.issue40468@roundup.psfhosted.org> Message-ID: <1588342222.77.0.744671608167.issue40468@roundup.psfhosted.org> Change by E. Paine : Added file: https://bugs.python.org/file49105/font_page_short.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 10:10:30 2020 From: report at bugs.python.org (E. Paine) Date: Fri, 01 May 2020 14:10:30 +0000 Subject: [issue40468] IDLE split "general" into two tabs In-Reply-To: <1588342210.52.0.776872841323.issue40468@roundup.psfhosted.org> Message-ID: <1588342230.87.0.558664795424.issue40468@roundup.psfhosted.org> Change by E. Paine : Added file: https://bugs.python.org/file49106/general_page.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 10:10:42 2020 From: report at bugs.python.org (E. Paine) Date: Fri, 01 May 2020 14:10:42 +0000 Subject: [issue40468] IDLE split "general" into two tabs In-Reply-To: <1588342210.52.0.776872841323.issue40468@roundup.psfhosted.org> Message-ID: <1588342242.23.0.649993268045.issue40468@roundup.psfhosted.org> Change by E. Paine : Added file: https://bugs.python.org/file49108/general_page_pady_short.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 10:10:36 2020 From: report at bugs.python.org (E. Paine) Date: Fri, 01 May 2020 14:10:36 +0000 Subject: [issue40468] IDLE split "general" into two tabs In-Reply-To: <1588342210.52.0.776872841323.issue40468@roundup.psfhosted.org> Message-ID: <1588342236.84.0.152937395106.issue40468@roundup.psfhosted.org> Change by E. Paine : Added file: https://bugs.python.org/file49107/general_page_pady.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 10:10:54 2020 From: report at bugs.python.org (E. Paine) Date: Fri, 01 May 2020 14:10:54 +0000 Subject: [issue40468] IDLE split "general" into two tabs In-Reply-To: <1588342210.52.0.776872841323.issue40468@roundup.psfhosted.org> Message-ID: <1588342254.69.0.180594490918.issue40468@roundup.psfhosted.org> Change by E. Paine : Added file: https://bugs.python.org/file49109/general_page_short.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 10:11:03 2020 From: report at bugs.python.org (E. Paine) Date: Fri, 01 May 2020 14:11:03 +0000 Subject: [issue40468] IDLE split "general" into two tabs In-Reply-To: <1588342210.52.0.776872841323.issue40468@roundup.psfhosted.org> Message-ID: <1588342263.27.0.910588592519.issue40468@roundup.psfhosted.org> Change by E. Paine : Added file: https://bugs.python.org/file49110/window_page.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 10:18:30 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 01 May 2020 14:18:30 +0000 Subject: [issue39562] Asynchronous comprehensions don't work in asyncio REPL In-Reply-To: <1580923705.71.0.29233909242.issue39562@roundup.psfhosted.org> Message-ID: <1588342710.68.0.384702089092.issue39562@roundup.psfhosted.org> miss-islington added the comment: New changeset 5055c274c6e4f2bb8025910dedf0ff89f4bdd170 by Pablo Galindo in branch '3.8': [3.8] bpo-39562: Prevent collision of future and compiler flags (GH-19230) (GH-19835) https://github.com/python/cpython/commit/5055c274c6e4f2bb8025910dedf0ff89f4bdd170 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 10:24:47 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Fri, 01 May 2020 14:24:47 +0000 Subject: [issue36825] Make TestCase aware of the command line arguments given to TestProgram In-Reply-To: <1557218149.53.0.915842063513.issue36825@roundup.psfhosted.org> Message-ID: <1588343087.28.0.0584722903796.issue36825@roundup.psfhosted.org> R?mi Lapeyre added the comment: Bumping this issue as issue 37873 that wants to add a new -j argument to unittest got some attention lately. This PR makes the Test Cases aware of the command line arguments given to unittest.main() and is needed to add the --pdb argument proposed in issue 18765 to run pdb.post_mortem() when an exception occurs during a test. Both this issue and #18765 would be very useful to augment unittest. ---------- nosy: +gregory.p.smith, terry.reedy versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 10:24:57 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 01 May 2020 14:24:57 +0000 Subject: [issue39562] Asynchronous comprehensions don't work in asyncio REPL In-Reply-To: <1580923705.71.0.29233909242.issue39562@roundup.psfhosted.org> Message-ID: <1588343097.8.0.578173075038.issue39562@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 Fri May 1 10:34:28 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 01 May 2020 14:34:28 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588343668.41.0.264568219671.issue40334@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +19155 pull_request: https://github.com/python/cpython/pull/19837 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 10:55:45 2020 From: report at bugs.python.org (Eric Snow) Date: Fri, 01 May 2020 14:55:45 +0000 Subject: [issue40453] Add PyConfig._isolated_interpreter: isolated subinterpreters In-Reply-To: <1588276857.13.0.360538290387.issue40453@roundup.psfhosted.org> Message-ID: <1588344945.98.0.381435955035.issue40453@roundup.psfhosted.org> Change by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 11:02:13 2020 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 01 May 2020 15:02:13 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588345333.2.0.486575050854.issue40334@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset ea7297cf8f1aad4df8921a3d81a75118511afe77 by Pablo Galindo in branch 'master': bpo-40334: unskip test_function_type in test_unparse with the new parser (GH-19837) https://github.com/python/cpython/commit/ea7297cf8f1aad4df8921a3d81a75118511afe77 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 11:02:02 2020 From: report at bugs.python.org (Mark Hallett) Date: Fri, 01 May 2020 15:02:02 +0000 Subject: [issue40469] TimedRotatingFileHandler rotating on use not time Message-ID: <1588345322.69.0.523914781015.issue40469@roundup.psfhosted.org> New submission from Mark Hallett : Using the attached confing ymal file, the log file only rolls if the log file is not written to for over a minute, logging regulary (eg every 30s) prevents the correct rolling of the log. ---------- files: logging_config.ymal messages: 367849 nosy: markhallett priority: normal severity: normal status: open title: TimedRotatingFileHandler rotating on use not time versions: Python 3.8 Added file: https://bugs.python.org/file49111/logging_config.ymal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 11:20:26 2020 From: report at bugs.python.org (Eric Snow) Date: Fri, 01 May 2020 15:20:26 +0000 Subject: [issue40417] PyImport_ReloadModule emits deprecation warning In-Reply-To: <1588056055.69.0.268035650537.issue40417@roundup.psfhosted.org> Message-ID: <1588346426.35.0.569181251705.issue40417@roundup.psfhosted.org> Eric Snow added the comment: Yeah, that looks like an oversight. I've approved your PR. Thanks! ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 11:20:47 2020 From: report at bugs.python.org (Antony Lee) Date: Fri, 01 May 2020 15:20:47 +0000 Subject: [issue40470] Make inspect.signature able to parse format strings. Message-ID: <1588346447.38.0.355685422923.issue40470@roundup.psfhosted.org> New submission from Antony Lee : It would be nice if inspect.signature was able to understand bound str.format methods, e.g. `inspect.signature("{a} {b}".format) == inspect.signature(lambda *args, a, b, **kwargs: None)` (`*args, **kwargs` are there because str.format ignores additional arguments). Right now I believe the only way to parse format strings is string.Formatter, which is slightly less discoverable and harder to use (although it certainly also provides more info, e.g. inspect.signature wouldn't be able to tell about format specifiers, but that's fine). ---------- messages: 367852 nosy: Antony.Lee priority: normal severity: normal status: open title: Make inspect.signature able to parse format strings. versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 11:22:33 2020 From: report at bugs.python.org (Eric Snow) Date: Fri, 01 May 2020 15:22:33 +0000 Subject: [issue40417] PyImport_ReloadModule emits deprecation warning In-Reply-To: <1588056055.69.0.268035650537.issue40417@roundup.psfhosted.org> Message-ID: <1588346553.53.0.893493142192.issue40417@roundup.psfhosted.org> Eric Snow added the comment: Did you have a need for this to be fixed in 3.8 or earlier? This seems reasonably and simple enough to backport. I suppose someone could be relying on an implicit import of the "imp" module, but that seems highly unlikely and suspect anyway. :) ---------- nosy: +brett.cannon, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 11:23:45 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 01 May 2020 15:23:45 +0000 Subject: [issue39562] Asynchronous comprehensions don't work in asyncio REPL In-Reply-To: <1580923705.71.0.29233909242.issue39562@roundup.psfhosted.org> Message-ID: <1588346625.45.0.744889857656.issue39562@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +19156 pull_request: https://github.com/python/cpython/pull/19838 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 11:23:46 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 01 May 2020 15:23:46 +0000 Subject: [issue40470] Make inspect.signature able to parse format strings. In-Reply-To: <1588346447.38.0.355685422923.issue40470@roundup.psfhosted.org> Message-ID: <1588346626.29.0.21611767423.issue40470@roundup.psfhosted.org> Change by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 11:32:16 2020 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 01 May 2020 15:32:16 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588347136.75.0.977128460368.issue40334@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset d955241469c18c946924dba79c18a9ef200391ad by Pablo Galindo in branch 'master': bpo-40334: Correct return value of func_type_comment (GH-19833) https://github.com/python/cpython/commit/d955241469c18c946924dba79c18a9ef200391ad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 11:36:59 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 01 May 2020 15:36:59 +0000 Subject: [issue39562] Asynchronous comprehensions don't work in asyncio REPL In-Reply-To: <1580923705.71.0.29233909242.issue39562@roundup.psfhosted.org> Message-ID: <1588347419.43.0.755639484483.issue39562@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 71e6122b4428ae43e868e34db4f072635f58a555 by Pablo Galindo in branch '3.8': bpo-39562: Correctly updated the version section in the what's new document (GH-19838) https://github.com/python/cpython/commit/71e6122b4428ae43e868e34db4f072635f58a555 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 11:41:08 2020 From: report at bugs.python.org (Eric Snow) Date: Fri, 01 May 2020 15:41:08 +0000 Subject: [issue40350] modulefinder chokes on numpy - dereferencing None in spec.loader In-Reply-To: <1587454417.83.0.816569073565.issue40350@roundup.psfhosted.org> Message-ID: <1588347668.56.0.17505901284.issue40350@roundup.psfhosted.org> Change by Eric Snow : ---------- stage: -> test needed versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 11:40:46 2020 From: report at bugs.python.org (Eric Snow) Date: Fri, 01 May 2020 15:40:46 +0000 Subject: [issue40350] modulefinder chokes on numpy - dereferencing None in spec.loader In-Reply-To: <1587454417.83.0.816569073565.issue40350@roundup.psfhosted.org> Message-ID: <1588347646.99.0.153092901688.issue40350@roundup.psfhosted.org> Eric Snow added the comment: Ah, namespace packages. :) Yeah, the code is not taking the "spec.loader is None" case into account. I expect the fix would be to add handling of that case a few lines up in the code, right after handling BuiltinImporter and FrozenImporter. Offhand I'm not sure if the "type" should be _PKG_DIRECTORY or some new one just for namespace packages. How does imp.find_module() (on which modulefinder._find_module() is based) respond to namespace packages? [1] https://docs.python.org/3/library/importlib.html#importlib.machinery.ModuleSpec.loader ---------- nosy: +barry, brett.cannon, eric.smith, eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 11:52:22 2020 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 01 May 2020 15:52:22 +0000 Subject: [issue40455] GCC 10 compiler warnings In-Reply-To: <1588279868.77.0.13865368461.issue40455@roundup.psfhosted.org> Message-ID: <1588348342.67.0.896663702312.issue40455@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 11:57:41 2020 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 01 May 2020 15:57:41 +0000 Subject: [issue40455] GCC 10 compiler warnings In-Reply-To: <1588279868.77.0.13865368461.issue40455@roundup.psfhosted.org> Message-ID: <1588348661.25.0.945201793655.issue40455@roundup.psfhosted.org> Mark Dickinson added the comment: I'm fairly sure that that's a false positive for `longobject.c`. Do you know of a non-intrusive way to silence the warning? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 12:08:41 2020 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 01 May 2020 16:08:41 +0000 Subject: [issue40455] GCC 10 compiler warnings In-Reply-To: <1588279868.77.0.13865368461.issue40455@roundup.psfhosted.org> Message-ID: <1588349321.11.0.468948336038.issue40455@roundup.psfhosted.org> Mark Dickinson added the comment: As to _why_ it's a false positive: at that point in the code, assuming 30-bit limbs and an IEEE 754 binary64 "double", we have (using Python notation for floor division) a_size == 1 + (a_bits - 1) // 30 and shift_digits == (a_bits - 55) // 30 from which it's clear that shift_digits <= (a_bits - 1) // 30 < a_size so a_size - shift_digits is always strictly positive. The above doesn't depend on the precise values 55 and 30 - any other positive values would have worked, so even with 15-bit digits and some other double format with fewer bits, we still have "shift_digits < a_size". And now since the v_rshift call writes "a_size - shift_digits" digits to x, we're guaranteed that at least one digit is written, so `x[0]` is not uninitialised. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 12:12:22 2020 From: report at bugs.python.org (Eric Snow) Date: Fri, 01 May 2020 16:12:22 +0000 Subject: [issue40390] Implement _xxsubinterpreters.channel_send_wait(). In-Reply-To: <1587842364.13.0.0340365069537.issue40390@roundup.psfhosted.org> Message-ID: <1588349542.67.0.29316015794.issue40390@roundup.psfhosted.org> Eric Snow added the comment: Thanks for working on this, Ben! FWIW, I've put up a separate PR to demonstrate how I was thinking we would solve this: https://github.com/python/cpython/pull/19829. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 12:23:56 2020 From: report at bugs.python.org (Eric Snow) Date: Fri, 01 May 2020 16:23:56 +0000 Subject: [issue38880] Subinterpreters: List interpreters associated with a channel end In-Reply-To: <1574352893.51.0.220552171167.issue38880@roundup.psfhosted.org> Message-ID: <1588350236.78.0.66499669559.issue38880@roundup.psfhosted.org> Eric Snow added the comment: Thanks again, Lewis! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 12:26:21 2020 From: report at bugs.python.org (Vismantas) Date: Fri, 01 May 2020 16:26:21 +0000 Subject: [issue40464] functools.singledispatch doesn't verify annotation is on FIRST parameter In-Reply-To: <1588316641.36.0.617194746525.issue40464@roundup.psfhosted.org> Message-ID: <1588350381.86.0.261125778902.issue40464@roundup.psfhosted.org> Change by Vismantas : ---------- nosy: +bim_bam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 12:29:34 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 01 May 2020 16:29:34 +0000 Subject: [issue40470] Make inspect.signature able to parse format strings. In-Reply-To: <1588346447.38.0.355685422923.issue40470@roundup.psfhosted.org> Message-ID: <1588350574.68.0.0483192487045.issue40470@roundup.psfhosted.org> Change by Brett Cannon : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 12:29:40 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 01 May 2020 16:29:40 +0000 Subject: [issue40470] Make inspect.signature able to parse format strings. In-Reply-To: <1588346447.38.0.355685422923.issue40470@roundup.psfhosted.org> Message-ID: <1588350580.39.0.288584087568.issue40470@roundup.psfhosted.org> Change by Brett Cannon : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 12:32:58 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 01 May 2020 16:32:58 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588350778.49.0.231942876468.issue40334@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +19157 pull_request: https://github.com/python/cpython/pull/19839 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 12:35:04 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 01 May 2020 16:35:04 +0000 Subject: [issue39837] Make Azure Pipelines optional on GitHub PRs In-Reply-To: <1583255119.77.0.277327127951.issue39837@roundup.psfhosted.org> Message-ID: <1588350904.54.0.0422420130595.issue39837@roundup.psfhosted.org> Brett Cannon added the comment: > Can't we be more flexible depending on the stability on CIs over the last weeks? No because I'm tired of flipping CI on and off as mandatory based on the whims of CI systems and their stability. Either people need to accept CI is flaky or everyone needs to be careful in how they merge PRs by checking failures are legit. And that's why I flipped off Azure Pipelines: I am not changing any more branch protections until a full discussion is had somewhere and there's consensus on what should be mandatory and stay mandatory for several months barring emergencies. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 12:42:10 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 01 May 2020 16:42:10 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588351330.17.0.460991286898.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 3941d9700b2a272689cb8a8435b5c60a1466ef79 by Guido van Rossum in branch 'master': bpo-40334: Refactor lambda_parameters similar to parameters (GH-19830) https://github.com/python/cpython/commit/3941d9700b2a272689cb8a8435b5c60a1466ef79 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 12:56:51 2020 From: report at bugs.python.org (Robert Rouhani) Date: Fri, 01 May 2020 16:56:51 +0000 Subject: [issue40417] PyImport_ReloadModule emits deprecation warning In-Reply-To: <1588346553.53.0.893493142192.issue40417@roundup.psfhosted.org> Message-ID: Robert Rouhani added the comment: We have a fairly straightforward workaround of using the "warnings" module to redirect to stdout, so we personally don't have a need. Unreal, however, follows the VFX Reference Platform ( https://vfxplatform.com/) which is migrating from 2.7 to 3.7.x this year. They will likely run into this during their migration, so backporting to 3.7 would be useful. On Fri, May 1, 2020 at 8:22 AM Eric Snow wrote: > > Eric Snow added the comment: > > Did you have a need for this to be fixed in 3.8 or earlier? This seems > reasonably and simple enough to backport. I suppose someone could be > relying on an implicit import of the "imp" module, but that seems highly > unlikely and suspect anyway. :) > > ---------- > nosy: +brett.cannon, ncoghlan > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 13:06:24 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 01 May 2020 17:06:24 +0000 Subject: [issue40455] GCC 10 compiler warnings In-Reply-To: <1588279868.77.0.13865368461.issue40455@roundup.psfhosted.org> Message-ID: <1588352784.8.0.562762104283.issue40455@roundup.psfhosted.org> Dong-hee Na added the comment: @mark.dickinson @vstinner I'd like to suggest this change. There was no performance impact on my local machine. --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -2852,7 +2852,8 @@ _PyLong_Frexp(PyLongObject *a, Py_ssize_t *e) { Py_ssize_t a_size, a_bits, shift_digits, shift_bits, x_size; /* See below for why x_digits is always large enough. */ - digit rem, x_digits[2 + (DBL_MANT_DIG + 1) / PyLong_SHIFT]; + digit rem; + digit x_digits[2 + (DBL_MANT_DIG + 1) / PyLong_SHIFT] = {0,}; double dx; /* Correction term for round-half-to-even rounding. For a digit x, "x + half_even_correction[x & 7]" gives x rounded to the nearest @@ -2903,8 +2904,6 @@ _PyLong_Frexp(PyLongObject *a, Py_ssize_t *e) shift_digits = (DBL_MANT_DIG + 2 - a_bits) / PyLong_SHIFT; shift_bits = (DBL_MANT_DIG + 2 - a_bits) % PyLong_SHIFT; x_size = 0; - while (x_size < shift_digits) - x_digits[x_size++] = 0; rem = v_lshift(x_digits + x_size, a->ob_digit, a_size, (int)shift_bits); x_size += a_size; ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 13:23:06 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Fri, 01 May 2020 17:23:06 +0000 Subject: [issue40434] Update of reasoning why there is no case statement In-Reply-To: <1588148867.59.0.249886730635.issue40434@roundup.psfhosted.org> Message-ID: <1588353786.59.0.0271712032857.issue40434@roundup.psfhosted.org> Joannah Nanjekye added the comment: > PEP 275 actually links to PEP 3103 to explain why it is rejected Well, am not very convinced if consensus was reached on range tests so I will refrain for someone else's opinion as it is not as apparent to me yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 13:30:59 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 01 May 2020 17:30:59 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588354259.6.0.940682350724.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 03b7642265e65f198682f22648dbe6cf4fff9835 by Lysandros Nikolaou in branch 'master': bpo-40334: Make the PyPegen* and PyParser* APIs more consistent (GH-19839) https://github.com/python/cpython/commit/03b7642265e65f198682f22648dbe6cf4fff9835 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 13:52:13 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 01 May 2020 17:52:13 +0000 Subject: [issue39691] Allow passing Pathlike objects to io.open_code In-Reply-To: <1582153350.45.0.111444771925.issue39691@roundup.psfhosted.org> Message-ID: <1588355533.97.0.237988162994.issue39691@roundup.psfhosted.org> Steve Dower added the comment: New changeset 831d58d7865cb98fa09227dc614f4f3ce6af968b by Shantanu in branch 'master': bpo-39691: Clarify io.open_code behavior (GH-19824) https://github.com/python/cpython/commit/831d58d7865cb98fa09227dc614f4f3ce6af968b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 13:57:02 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 01 May 2020 17:57:02 +0000 Subject: [issue39691] Allow passing Pathlike objects to io.open_code In-Reply-To: <1582153350.45.0.111444771925.issue39691@roundup.psfhosted.org> Message-ID: <1588355822.91.0.604227639966.issue39691@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +19158 pull_request: https://github.com/python/cpython/pull/19840 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 14:04:32 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 01 May 2020 18:04:32 +0000 Subject: [issue39691] Allow passing Pathlike objects to io.open_code In-Reply-To: <1582153350.45.0.111444771925.issue39691@roundup.psfhosted.org> Message-ID: <1588356272.28.0.160771635409.issue39691@roundup.psfhosted.org> miss-islington added the comment: New changeset c9d7d32b6dc6140f7fcbf1ae1120df6d59fc28d0 by Miss Islington (bot) in branch '3.8': bpo-39691: Clarify io.open_code behavior (GH-19824) https://github.com/python/cpython/commit/c9d7d32b6dc6140f7fcbf1ae1120df6d59fc28d0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 14:07:57 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 01 May 2020 18:07:57 +0000 Subject: [issue40412] inittab_copy not set to NULL after free, can lead to crashes when running multiple interpreters in a single process In-Reply-To: <1588035109.97.0.994346077967.issue40412@roundup.psfhosted.org> Message-ID: <1588356477.79.0.736785251801.issue40412@roundup.psfhosted.org> miss-islington added the comment: New changeset 64224a4727321a8dd33e6f769edda401193ebef0 by Gregory Szorc in branch 'master': bpo-40412: Nullify inittab_copy during finalization (GH-19746) https://github.com/python/cpython/commit/64224a4727321a8dd33e6f769edda401193ebef0 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 14:08:07 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 01 May 2020 18:08:07 +0000 Subject: [issue40412] inittab_copy not set to NULL after free, can lead to crashes when running multiple interpreters in a single process In-Reply-To: <1588035109.97.0.994346077967.issue40412@roundup.psfhosted.org> Message-ID: <1588356487.01.0.792375239654.issue40412@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19159 pull_request: https://github.com/python/cpython/pull/19841 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 14:08:14 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 01 May 2020 18:08:14 +0000 Subject: [issue40412] inittab_copy not set to NULL after free, can lead to crashes when running multiple interpreters in a single process In-Reply-To: <1588035109.97.0.994346077967.issue40412@roundup.psfhosted.org> Message-ID: <1588356494.24.0.452446532743.issue40412@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19160 pull_request: https://github.com/python/cpython/pull/19842 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 14:16:41 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 May 2020 18:16:41 +0000 Subject: [issue40468] IDLE split "general" into two tabs In-Reply-To: <1588342210.52.0.776872841323.issue40468@roundup.psfhosted.org> Message-ID: <1588357001.53.0.534020154455.issue40468@roundup.psfhosted.org> Terry J. Reedy added the comment: 'Windows', not 'Window'. The indentation width should be moved to the Window page after being converted and reduced to a single line with a spinbox or maybe just an entry box. Indent spaces (standard 4) [ 4] # or Convert tab indents to [4] spaces (standard 4) I cannot imagine that anyone would ever want more than 8, certainly not 16. Note that there is another issue that will result in no longer using tabs instead of spaces in Shell, so that this will really be for both (all, including Output). There is at least one issue where this has been discussed, with the thought that something that most people should and will never change is now way too prominent. (My python development system with my list of issues is now being repaired. There has also been discussion about converting size to a spinbox. There is no particular reason for the particular presets.) The problem with General is that the items left other than Help are specific to either editor or shell. I think General with general window preferences and Help followed by Shell/Ed specifics might be a better division. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 14:27:37 2020 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Fri, 01 May 2020 18:27:37 +0000 Subject: [issue5996] abstract class instantiable when subclassing built-in types In-Reply-To: <1242050763.07.0.145569961651.issue5996@psf.upfronthosting.co.za> Message-ID: <1588357657.23.0.692763055797.issue5996@roundup.psfhosted.org> Change by Jim Fasarakis-Hilliard : ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 14:28:34 2020 From: report at bugs.python.org (alexpovel) Date: Fri, 01 May 2020 18:28:34 +0000 Subject: [issue40471] Grammar typo in issubclass docstring Message-ID: <1588357714.64.0.482700195727.issue40471@roundup.psfhosted.org> New submission from alexpovel : Running `python -c "help(issubclass)"` will output: > Help on built-in function issubclass in module builtins: > > issubclass(cls, class_or_tuple, /) > Return whether 'cls' is a derived from another class or is the same class. > > A tuple, as in ``issubclass(x, (A, B, ...))``, may be given as the target to > check against. This is equivalent to ``issubclass(x, A) or issubclass(x, B) > or ...`` etc. where it should probably read: > Return whether 'cls' is derived from another class or is the same class. over the current: > Return whether 'cls' is a derived from another class or is the same class. There are two occurrences of this string, one in `./Python/bltinmodule.c`, the other in `./Python/clinic/bltinmodule.c.h`. I have to admit I cannot safely say which of these is the generated file through Argument Clinic and which is the source. Is `./Python/bltinmodule.c` the source, aka where this would need to be changed? Please let me know and I will create a PR. Thanks! ---------- assignee: docs at python components: Documentation messages: 367871 nosy: alexpovel, docs at python priority: normal severity: normal status: open title: Grammar typo in issubclass docstring versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 14:32:33 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 01 May 2020 18:32:33 +0000 Subject: [issue39691] Allow passing Pathlike objects to io.open_code In-Reply-To: <1582153350.45.0.111444771925.issue39691@roundup.psfhosted.org> Message-ID: <1588357953.47.0.564926245837.issue39691@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 14:38:05 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 May 2020 18:38:05 +0000 Subject: [issue18765] unittest needs a way to launch pdb.post_mortem or other debug hooks In-Reply-To: <1376696752.64.0.473845221037.issue18765@psf.upfronthosting.co.za> Message-ID: <1588358285.95.0.175374594918.issue18765@roundup.psfhosted.org> Terry J. Reedy added the comment: I would be more interested in being able to launch IDLE's visual debugger (likely after some revision) so I would want the hook to be general (as suggested by the current title) and not limited to only pdb. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 14:39:28 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 May 2020 18:39:28 +0000 Subject: [issue18765] unittest needs a way to launch pdb.post_mortem or other debug hooks In-Reply-To: <1376696752.64.0.473845221037.issue18765@psf.upfronthosting.co.za> Message-ID: <1588358368.16.0.883764536325.issue18765@roundup.psfhosted.org> Terry J. Reedy added the comment: See #36825 about making TextCase argument aware. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 14:46:56 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 May 2020 18:46:56 +0000 Subject: [issue36825] Make TestCase aware of the command line arguments given to TestProgram In-Reply-To: <1557218149.53.0.915842063513.issue36825@roundup.psfhosted.org> Message-ID: <1588358816.57.0.475296156607.issue36825@roundup.psfhosted.org> Terry J. Reedy added the comment: Since test modules can already be run in parallel, #37873 does not seem relevant here. (And I agree with the intent of that.) I would be reluctant to add a mechanism with no current use, so I would not apply absent a decision to add one. ---------- nosy: +ezio.melotti, michael.foord, rbcollins _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 15:35:30 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 01 May 2020 19:35:30 +0000 Subject: [issue40472] IDLE Shell not allowing more than two line inputs Message-ID: <1588361730.23.0.0107658134744.issue40472@roundup.psfhosted.org> New submission from Raymond Hettinger : In Python3.8 and prior, you can type this in a shell session ------------------------------------------------------------ Python 3.8.2 (v3.8.2:7b3ab5921f, Feb 24 2020, 17:52:18) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license()" for more information. >>> def square(x): s = x ** 2 return s In Python3.9, the input is terminated prematurely ------------------------------------------------- Python 3.9.0a6 (v3.9.0a6:bc1c8af8ef, Apr 27 2020, 17:05:28) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license()" for more information. >>> def square(x): s = x ** 2 # <-- On first return, the statement evaluates >>> >>> square(5) 25 ---------- assignee: terry.reedy components: IDLE messages: 367875 nosy: rhettinger, terry.reedy priority: high severity: normal status: open title: IDLE Shell not allowing more than two line inputs versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 15:36:12 2020 From: report at bugs.python.org (=?utf-8?q?Gilles_Bassi=C3=A8re?=) Date: Fri, 01 May 2020 19:36:12 +0000 Subject: [issue18319] gettext() cannot find translations with plural forms In-Reply-To: <1372373603.42.0.596981858746.issue18319@psf.upfronthosting.co.za> Message-ID: <1588361772.63.0.172945461086.issue18319@roundup.psfhosted.org> Change by Gilles Bassi?re : ---------- nosy: +Gilles Bassi?re versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 15:46:09 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 01 May 2020 19:46:09 +0000 Subject: [issue39435] pickle: inconsistent arguments pickle.py vs _pickle.c vs docs In-Reply-To: <1579799539.42.0.511265830635.issue39435@roundup.psfhosted.org> Message-ID: <1588362369.12.0.859235630844.issue39435@roundup.psfhosted.org> miss-islington added the comment: New changeset 289842ae820f99908d3a345f1f3b6d4e5b4b97fc by Shantanu in branch 'master': bpo-39435: Fix docs for pickle.loads (GH-18160) https://github.com/python/cpython/commit/289842ae820f99908d3a345f1f3b6d4e5b4b97fc ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 15:47:09 2020 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 May 2020 19:47:09 +0000 Subject: [issue39435] pickle: inconsistent arguments pickle.py vs _pickle.c vs docs In-Reply-To: <1579799539.42.0.511265830635.issue39435@roundup.psfhosted.org> Message-ID: <1588362429.83.0.93971049028.issue39435@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- pull_requests: +19161 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19843 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 15:48:20 2020 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 May 2020 19:48:20 +0000 Subject: [issue39435] pickle: inconsistent arguments pickle.py vs _pickle.c vs docs In-Reply-To: <1579799539.42.0.511265830635.issue39435@roundup.psfhosted.org> Message-ID: <1588362500.63.0.801775636063.issue39435@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- pull_requests: +19162 pull_request: https://github.com/python/cpython/pull/19844 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 15:53:42 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 01 May 2020 19:53:42 +0000 Subject: [issue39435] pickle: inconsistent arguments pickle.py vs _pickle.c vs docs In-Reply-To: <1579799539.42.0.511265830635.issue39435@roundup.psfhosted.org> Message-ID: <1588362822.1.0.998922317238.issue39435@roundup.psfhosted.org> miss-islington added the comment: New changeset 3859b1ac1d7014f8ff673962d94a01a408546e24 by Antoine Pitrou in branch '3.7': [3.7] bpo-39435: Fix docs for pickle.loads (GH-18160). (GH-19844) https://github.com/python/cpython/commit/3859b1ac1d7014f8ff673962d94a01a408546e24 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 15:54:47 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 01 May 2020 19:54:47 +0000 Subject: [issue39435] pickle: inconsistent arguments pickle.py vs _pickle.c vs docs In-Reply-To: <1579799539.42.0.511265830635.issue39435@roundup.psfhosted.org> Message-ID: <1588362887.76.0.12321917545.issue39435@roundup.psfhosted.org> miss-islington added the comment: New changeset e05828055e5165cc7268ea3bea33adc502e054a1 by Antoine Pitrou in branch '3.8': [3.8] bpo-39435: Fix docs for pickle.loads (GH-18160) (GH-19843) https://github.com/python/cpython/commit/e05828055e5165cc7268ea3bea33adc502e054a1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 15:59:37 2020 From: report at bugs.python.org (Davin Potts) Date: Fri, 01 May 2020 19:59:37 +0000 Subject: [issue40440] allow array.array construction from memoryview w/o copy In-Reply-To: <1588186893.13.0.865332377255.issue40440@roundup.psfhosted.org> Message-ID: <1588363177.23.0.274146600229.issue40440@roundup.psfhosted.org> Davin Potts added the comment: Being able to create an array.array without making a copy of a memoryview's contents does sound valuable. We do not always want to modify the size of the array, as evidenced by array.array's existing functionality where its size-changing manipulations (like append) are suppressed when exporting a buffer. So I think it is okay to not require a copy be made when constructing an array.array in this way. Serhiy's example is a good one for demonstrating how different parts of an array.array can be treated as having different types as far as getting and setting items. I have met a number of hardware groups in mostly larger companies that use array.array to expose raw data being read directly from devices. They wastefully make copies of their often large array.array objects, each with a distinct type code, so that they can make use of array.array's index() and count() and other functions, which are not available on a memoryview. Within the core of Python (that is, including the standard library but excluding 3rd party packages), we have a healthy number of examples of objects that expose a buffer via the Buffer Protocol but they lack the symmetry of going the other way to enable creation from an existing buffer. My sense is it would be a welcome thing to see something like array.array, that is designed to work with low-level data types, support creation from an existing buffer without the need for a copy -- this is the explicit purpose of the Buffer Protocol after all but array.array only supports export, not creation, which currently makes array.array feel inconsistent. ---------- nosy: +davin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 15:59:45 2020 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 May 2020 19:59:45 +0000 Subject: [issue39435] pickle: inconsistent arguments pickle.py vs _pickle.c vs docs In-Reply-To: <1579799539.42.0.511265830635.issue39435@roundup.psfhosted.org> Message-ID: <1588363185.02.0.406870595212.issue39435@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 16:00:06 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 01 May 2020 20:00:06 +0000 Subject: [issue40458] test_attribute_name_interning crashes on APPX test In-Reply-To: <1588288227.67.0.928950925895.issue40458@roundup.psfhosted.org> Message-ID: <1588363206.49.0.922376158692.issue40458@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +19163 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19845 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 16:01:39 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 01 May 2020 20:01:39 +0000 Subject: [issue40458] test_attribute_name_interning crashes on APPX test In-Reply-To: <1588288227.67.0.928950925895.issue40458@roundup.psfhosted.org> Message-ID: <1588363299.47.0.488340796462.issue40458@roundup.psfhosted.org> Steve Dower added the comment: Turns out the stack reservation was different, which is why it was crashing. As part of diagnosing it, I added the recursion count to faulthandler's output on Windows, but couldn't see if/where to do it for other platforms - Victor, any suggestions? ---------- nosy: +vstinner type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 16:02:04 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 01 May 2020 20:02:04 +0000 Subject: [issue40458] test_bad_getattr crashes on APPX test In-Reply-To: <1588288227.67.0.928950925895.issue40458@roundup.psfhosted.org> Message-ID: <1588363324.11.0.477633148129.issue40458@roundup.psfhosted.org> Steve Dower added the comment: Also, it was really test_bad_getattr that was crashing. ---------- title: test_attribute_name_interning crashes on APPX test -> test_bad_getattr crashes on APPX test _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 16:02:15 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Fri, 01 May 2020 20:02:15 +0000 Subject: [issue40471] Grammar typo in issubclass docstring In-Reply-To: <1588357714.64.0.482700195727.issue40471@roundup.psfhosted.org> Message-ID: <1588363335.32.0.0108015280339.issue40471@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi Alex, thanks for reporting this. A PR will be needed to fix those indeed. Regarding argument clinic, the file you will need to change is Python/bltinmodule.c and you can run `make regen-all` to regenerate the other file. There is more information about this in the Python dev guide: https://devguide.python.org/ For the Pull Request to be accepted you will need to sign the Contributor License Agreement, the steps to follow are here: https://devguide.python.org/pullrequest/#cla, a bot will reemind you if you forget :) ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 16:02:26 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Fri, 01 May 2020 20:02:26 +0000 Subject: [issue40471] Grammar typo in issubclass docstring In-Reply-To: <1588357714.64.0.482700195727.issue40471@roundup.psfhosted.org> Message-ID: <1588363346.53.0.528423911099.issue40471@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 16:10:57 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 01 May 2020 20:10:57 +0000 Subject: [issue40440] allow array.array construction from memoryview w/o copy In-Reply-To: <1588186893.13.0.865332377255.issue40440@roundup.psfhosted.org> Message-ID: <1588363857.14.0.610814536212.issue40440@roundup.psfhosted.org> Serhiy Storchaka added the comment: > My sense is it would be a welcome thing to see something like array.array, that is designed to work with low-level data types, support creation from an existing buffer without the need for a copy It is called memoryview. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 16:27:10 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 01 May 2020 20:27:10 +0000 Subject: [issue39435] pickle: inconsistent arguments pickle.py vs _pickle.c vs docs In-Reply-To: <1579799539.42.0.511265830635.issue39435@roundup.psfhosted.org> Message-ID: <1588364830.26.0.191868086654.issue39435@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +19164 pull_request: https://github.com/python/cpython/pull/19846 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 16:28:08 2020 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Fri, 01 May 2020 20:28:08 +0000 Subject: [issue40360] Deprecate lib2to3 (and 2to3) for future removal In-Reply-To: <1587530454.25.0.44181585934.issue40360@roundup.psfhosted.org> Message-ID: <1588364888.31.0.979244995818.issue40360@roundup.psfhosted.org> Miro Hron?ok added the comment: Thanks for the explanation. I plan to send a PR to add this to the What's new in 3.9 page early next week. Anyone, feel free to beat me to it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 16:43:05 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 May 2020 20:43:05 +0000 Subject: [issue40382] Make 'rt' the default for open in docs In-Reply-To: <1587759360.28.0.146955814508.issue40382@roundup.psfhosted.org> Message-ID: <1588365785.18.0.833627394769.issue40382@roundup.psfhosted.org> Terry J. Reedy added the comment: The inconsistency might be a residue of the transition from 2.x. But the 'r' versus 'rt' confusion originates in the code and signature. The text 't' default is built into the code, while the read 'r' default is in the 'mode=r' part of the signature. If text 't' were only a signature default, from 'mode=rt', then changing 'read-text' to 'something_else-text' would require including the 't', as in 'wt', etc. But it is not. On the other hand, passing mode as 'b' or using 'mode=b' is a ValueError because one of 'r', 'w', or 'a', optionally followed by '+', is required. I think the doc entry for open might stand a change to make this a bit clearer, but I don't have a specific proposal yet. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 16:50:29 2020 From: report at bugs.python.org (alexpovel) Date: Fri, 01 May 2020 20:50:29 +0000 Subject: [issue40471] Grammar typo in issubclass docstring In-Reply-To: <1588357714.64.0.482700195727.issue40471@roundup.psfhosted.org> Message-ID: <1588366229.36.0.966266305669.issue40471@roundup.psfhosted.org> Change by alexpovel : ---------- keywords: +patch pull_requests: +19165 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19847 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 16:55:00 2020 From: report at bugs.python.org (alexpovel) Date: Fri, 01 May 2020 20:55:00 +0000 Subject: [issue40471] Grammar typo in issubclass docstring In-Reply-To: <1588357714.64.0.482700195727.issue40471@roundup.psfhosted.org> Message-ID: <1588366500.36.0.557954326826.issue40471@roundup.psfhosted.org> alexpovel added the comment: Hi R?mi, thank you very much for the hearty welcome. Your explanations worked perfectly and the PR was created. `make regen-all` created new checksums as well, as intended. I had already signed the CLA, and will now dive into the devguide! Thanks again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 17:07:23 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 May 2020 21:07:23 +0000 Subject: [issue40393] Auto-response from Python Help points to Python 2 reference In-Reply-To: <1587893781.17.0.655976493189.issue40393@roundup.psfhosted.org> Message-ID: <1588367243.47.0.212334434732.issue40393@roundup.psfhosted.org> Terry J. Reedy added the comment: Thank you for noticing. As of this moment, http://www.python.org/about/help/ has 3 links to the https://github.com/python/pydotorg/issue repository and issue tracker, which contains the website. Website issues (as opposed to docs.python.org) should be reported there. As it happens, the page has been updated. "First check the Python FAQs, with answers to many common, general Python questions." links to the url you suggest. 'FAQ' at the bottom of the page has a shorter link that also goes to the /3/ version. ---------- nosy: +terry.reedy resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 17:26:45 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 01 May 2020 21:26:45 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588368405.23.0.516604321992.issue40334@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +19166 pull_request: https://github.com/python/cpython/pull/19849 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 17:26:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 May 2020 21:26:47 +0000 Subject: [issue40458] test_bad_getattr crashes on APPX test In-Reply-To: <1588288227.67.0.928950925895.issue40458@roundup.psfhosted.org> Message-ID: <1588368407.8.0.88711759344.issue40458@roundup.psfhosted.org> STINNER Victor added the comment: > Also, it was really test_bad_getattr that was crashing. Ah, an old friend. It seems like an issue with the maximum stack size. Here are my notes: https://pythondev.readthedocs.io/unstable_tests.html#unlimited-recursion Either reduce Python maximum stack depth, or increase the C stack size. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 17:41:03 2020 From: report at bugs.python.org (Larry Kuhn) Date: Fri, 01 May 2020 21:41:03 +0000 Subject: [issue40473] Universal newline not recognizing Mac newline (CR) when using CSV on Windows 10 Message-ID: <1588369263.41.0.526030000373.issue40473@roundup.psfhosted.org> New submission from Larry Kuhn : Running open with or without rU generates this message when reading a CSV file with CR line endings: DeprecationWarning: 'U' mode is deprecated with open(csvfile, mode='rU', newline='') as cf: Traceback (most recent call last): File "d:/Larry/Desktop/Python/profiler project/csvprofiler/csvpcg.py", line 245, in main() File "d:/Larry/Desktop/Python/profiler project/csvprofiler/csvpcg.py", line 235, in main csv_input() File "d:/Larry/Desktop/Python/profiler project/csvprofiler/csvpcg.py", line 57, in csv_input config_dict['has_header'] = csv.Sniffer().has_header(cf.read(10240)) File "C:\Program Files\Python38\lib\csv.py", line 395, in has_header header = next(rdr) # assume first row is header _csv.Error: new-line character seen in unquoted field - do you need to open the file in universal-newline mode? ---------- components: Windows messages: 367889 nosy: larrykuhn, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Universal newline not recognizing Mac newline (CR) when using CSV on Windows 10 type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 17:44:32 2020 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Fri, 01 May 2020 21:44:32 +0000 Subject: [issue39562] Asynchronous comprehensions don't work in asyncio REPL In-Reply-To: <1580923705.71.0.29233909242.issue39562@roundup.psfhosted.org> Message-ID: <1588369472.42.0.561128822121.issue39562@roundup.psfhosted.org> Miro Hron?ok added the comment: Fedora packagers report that this problem is now showing up in 3.8.3rc1. What can be done to ensure that 3.8.3 final will contain the fix? ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 17:45:23 2020 From: report at bugs.python.org (Larry Kuhn) Date: Fri, 01 May 2020 21:45:23 +0000 Subject: [issue40473] Universal newline not recognizing Mac newline (CR) when using CSV on Windows 10 In-Reply-To: <1588369263.41.0.526030000373.issue40473@roundup.psfhosted.org> Message-ID: <1588369523.27.0.848827608457.issue40473@roundup.psfhosted.org> Change by Larry Kuhn : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 18:07:00 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 May 2020 22:07:00 +0000 Subject: [issue40398] typing.get_args(Callable) fails In-Reply-To: <1587919567.44.0.458722941462.issue40398@roundup.psfhosted.org> Message-ID: <1588370820.27.0.999370029.issue40398@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- title: get_args(Callable) fails -> typing.get_args(Callable) fails _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 18:14:15 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 01 May 2020 22:14:15 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588371255.66.0.879513254833.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 7ba08ff7b41911f972d0750e068a2270e0dbd68f by Pablo Galindo in branch 'master': bpo-40334: use the TOKENS file when checking dangling rules (GH-19849) https://github.com/python/cpython/commit/7ba08ff7b41911f972d0750e068a2270e0dbd68f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 18:42:38 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 01 May 2020 22:42:38 +0000 Subject: [issue39562] Asynchronous comprehensions don't work in asyncio REPL In-Reply-To: <1580923705.71.0.29233909242.issue39562@roundup.psfhosted.org> Message-ID: <1588372958.89.0.275778511266.issue39562@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: The merge is in 3.8 master, so we need to make sure that ?ukasz includes this on the 3.8.3 release. Victor sent an email to python-dev already about this issue. If you want to make absolutely sure this happens, maybe send an email directly to ?ukasz. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 18:44:25 2020 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 01 May 2020 22:44:25 +0000 Subject: [issue39562] Asynchronous comprehensions don't work in asyncio REPL In-Reply-To: <1580923705.71.0.29233909242.issue39562@roundup.psfhosted.org> Message-ID: <1588373065.14.0.169689674528.issue39562@roundup.psfhosted.org> Change by Yury Selivanov : ---------- nosy: -yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 18:59:21 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 May 2020 22:59:21 +0000 Subject: [issue40414] Incorrect mouse and keyboard mapping In-Reply-To: <1588039574.12.0.381855507551.issue40414@roundup.psfhosted.org> Message-ID: <1588373961.89.0.646318798396.issue40414@roundup.psfhosted.org> Terry J. Reedy added the comment: Sequences 'a' and '1' are unambiguously interpreted as abbreviating '' and '', and similarly for any other printable ascii char. '' is interpreted also as '', but there is no reason to add the brackets. In any case, binding a specific printable key is fairly rare. '<1>' is ambiguous is that it could also mean ''. Since '1' is available to abbreviate '', tcl currently chooses the button interpretation, and has AFAIK for at least a decade or more. In any case, what tcl does is not a Python bug, and it does not matter what it might have done in old versions. Note. Buttons 4 and 5 are used on Linux for a mousewheel. On Windows, they correspond to actual buttons, if present. I just tested with a mouse with two side buttons. '<6>', etc, is seen as key-6. ---------- nosy: +terry.reedy resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 19:04:00 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 May 2020 23:04:00 +0000 Subject: [issue40416] Calling TextIOWrapper.tell() in the middle of reading a gb2312-encoded file causes UnicodeDecodeError In-Reply-To: <1588048436.43.0.594940005352.issue40416@roundup.psfhosted.org> Message-ID: <1588374240.92.0.239543851022.issue40416@roundup.psfhosted.org> Terry J. Reedy added the comment: OS? in case it matters ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 19:06:27 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 01 May 2020 23:06:27 +0000 Subject: [issue40412] inittab_copy not set to NULL after free, can lead to crashes when running multiple interpreters in a single process In-Reply-To: <1588035109.97.0.994346077967.issue40412@roundup.psfhosted.org> Message-ID: <1588374387.32.0.987075933519.issue40412@roundup.psfhosted.org> miss-islington added the comment: New changeset 1205afb3e10194fe22fa76385abb7e522144eb29 by Miss Islington (bot) in branch '3.8': bpo-40412: Nullify inittab_copy during finalization (GH-19746) https://github.com/python/cpython/commit/1205afb3e10194fe22fa76385abb7e522144eb29 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 19:07:46 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 May 2020 23:07:46 +0000 Subject: [issue40416] Calling TextIOWrapper.tell() in the middle of reading a gb2312-encoded file causes UnicodeDecodeError In-Reply-To: <1588048436.43.0.594940005352.issue40416@roundup.psfhosted.org> Message-ID: <1588374466.22.0.771838738024.issue40416@roundup.psfhosted.org> Terry J. Reedy added the comment: Change the line to 'print(f.tell())'. Are any lines printed before the error? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 19:21:18 2020 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Fri, 01 May 2020 23:21:18 +0000 Subject: [issue39562] Asynchronous comprehensions don't work in asyncio REPL In-Reply-To: <1580923705.71.0.29233909242.issue39562@roundup.psfhosted.org> Message-ID: <1588375278.94.0.550059150048.issue39562@roundup.psfhosted.org> Miro Hron?ok added the comment: I just did. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 19:23:03 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 May 2020 23:23:03 +0000 Subject: [issue40426] Unable to use lowercase hexadecimal digits for percent encoding In-Reply-To: <1588097651.68.0.271507304283.issue40426@roundup.psfhosted.org> Message-ID: <1588375383.48.0.0414125833718.issue40426@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 19:24:47 2020 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 01 May 2020 23:24:47 +0000 Subject: [issue40398] typing.get_args(Callable) fails In-Reply-To: <1587919567.44.0.458722941462.issue40398@roundup.psfhosted.org> Message-ID: <1588375487.42.0.420819795148.issue40398@roundup.psfhosted.org> Guido van Rossum added the comment: @Serhiy is this fixed by PR 19720? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 19:28:13 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 01 May 2020 23:28:13 +0000 Subject: [issue40417] PyImport_ReloadModule emits deprecation warning In-Reply-To: <1588056055.69.0.268035650537.issue40417@roundup.psfhosted.org> Message-ID: <1588375693.71.0.83225597433.issue40417@roundup.psfhosted.org> miss-islington added the comment: New changeset f40bd466bf14029e2687e36e965875adf9d4be1a by Robert Rouhani in branch 'master': bpo-40417: Fix deprecation warning in PyImport_ReloadModule (GH-19750) https://github.com/python/cpython/commit/f40bd466bf14029e2687e36e965875adf9d4be1a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 19:30:16 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 May 2020 23:30:16 +0000 Subject: [issue40433] Equality operations between lists and arrays In-Reply-To: <1588128737.73.0.376280736154.issue40433@roundup.psfhosted.org> Message-ID: <1588375816.43.0.0353808899037.issue40433@roundup.psfhosted.org> Terry J. Reedy added the comment: This is not clearly a good idea. Lists and tuples with same contents do not compare equal, although set and frozenset do. I suggest that you post this idea to python-ideas list. ---------- nosy: +rhettinger, terry.reedy versions: -Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 19:34:57 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 May 2020 23:34:57 +0000 Subject: [issue40449] multi-line f-string, syntaxerror points to wrong line In-Reply-To: <1588243434.48.0.11950945946.issue40449@roundup.psfhosted.org> Message-ID: <1588376097.82.0.481042186339.issue40449@roundup.psfhosted.org> Terry J. Reedy added the comment: There have been issues about SyntaxError line pointing. Someone should test with 3.9.0xx to see if fixed but not backported (I cannot today), or search for existing error. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 20:12:06 2020 From: report at bugs.python.org (Lewis Ball) Date: Sat, 02 May 2020 00:12:06 +0000 Subject: [issue40394] difflib.SequenceMatcher.find_longest_match default arguments In-Reply-To: <1587910558.56.0.865649390619.issue40394@roundup.psfhosted.org> Message-ID: <1588378326.91.0.588718725756.issue40394@roundup.psfhosted.org> Lewis Ball added the comment: Thanks Tim. Cheers for your support with this :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 20:13:33 2020 From: report at bugs.python.org (Brian Curtin) Date: Sat, 02 May 2020 00:13:33 +0000 Subject: [issue40406] MagicMock __aenter__ should be AsyncMock(return_value=MagicMock()) In-Reply-To: <1587994408.9.0.812209740883.issue40406@roundup.psfhosted.org> Message-ID: <1588378413.64.0.948593803119.issue40406@roundup.psfhosted.org> Brian Curtin added the comment: graingert: Do you have a workaround for this? I'm doing roughly the same thing with an asyncpg connection pool nested with a transaction and am getting nowhere. async with pg_pool.acquire() as conn: async with conn.transaction(): ... ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 20:25:40 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Sat, 02 May 2020 00:25:40 +0000 Subject: [issue29753] Ctypes Packing Bitfields Incorrectly - Linux In-Reply-To: <1488933400.56.0.160685455632.issue29753@psf.upfronthosting.co.za> Message-ID: <1588379140.27.0.584536322348.issue29753@roundup.psfhosted.org> Change by Filipe La?ns : ---------- nosy: +FFY00 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 20:54:50 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Sat, 02 May 2020 00:54:50 +0000 Subject: [issue29753] Ctypes Packing Bitfields Incorrectly - Linux In-Reply-To: <1488933400.56.0.160685455632.issue29753@psf.upfronthosting.co.za> Message-ID: <1588380890.4.0.281462788294.issue29753@roundup.psfhosted.org> Change by Filipe La?ns : ---------- keywords: +patch pull_requests: +19167 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19850 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 21:11:22 2020 From: report at bugs.python.org (Lewis Ball) Date: Sat, 02 May 2020 01:11:22 +0000 Subject: [issue40474] Code coverage report not entirely accurate Message-ID: <1588381882.86.0.0551558198731.issue40474@roundup.psfhosted.org> New submission from Lewis Ball : The current reported code coverage stats on codecov.io miss some global statements of modules imported before coveragepy begins. This is documented in the dev guide, and the suggested fix is here: https://devguide.python.org/coverage/#coverage-results-for-modules-imported-early-on but that recommended fix doesn't seem to be included in the CI. Using the recommended 'hack', the coverage report shows an extra 4k lines are coverage in Lib, increasing coverage percentage by around 3%. Having a more accurate view of the coverage makes it much easier to see which parts of the code need help with tests, without having to go into every individual report to see if global statements are misreported. I'll raise a PR for this shortly ---------- components: Tests messages: 367904 nosy: Lewis Ball priority: normal severity: normal status: open title: Code coverage report not entirely accurate type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 21:14:25 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 02 May 2020 01:14:25 +0000 Subject: [issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad In-Reply-To: <1487329309.81.0.182915384821.issue29587@psf.upfronthosting.co.za> Message-ID: <1588382065.83.0.425741503391.issue29587@roundup.psfhosted.org> Chris Jerdonek added the comment: New changeset 02047265eb83a43ba18cc7fee81756f1a1a1f968 by Chris Jerdonek in branch 'master': bpo-29587: Update gen.throw() to chain exceptions (#19823) https://github.com/python/cpython/commit/02047265eb83a43ba18cc7fee81756f1a1a1f968 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 21:15:24 2020 From: report at bugs.python.org (Lewis Ball) Date: Sat, 02 May 2020 01:15:24 +0000 Subject: [issue40474] Code coverage report not entirely accurate In-Reply-To: <1588381882.86.0.0551558198731.issue40474@roundup.psfhosted.org> Message-ID: <1588382124.8.0.508576788208.issue40474@roundup.psfhosted.org> Change by Lewis Ball : ---------- keywords: +patch pull_requests: +19168 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19851 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 21:26:15 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sat, 02 May 2020 01:26:15 +0000 Subject: [issue40472] IDLE Shell not allowing more than two line inputs In-Reply-To: <1588361730.23.0.0107658134744.issue40472@roundup.psfhosted.org> Message-ID: <1588382775.52.0.0206649106592.issue40472@roundup.psfhosted.org> Dennis Sweeney added the comment: git bisect says that this was fixed here: commit b94dbd7ac34dc0c79512656eb17f6f07e09fca7a Author: Pablo Galindo Date: Mon Apr 27 18:35:58 2020 +0100 bpo-40334: Support PyPARSE_DONT_IMPLY_DEDENT in the new parser (GH-19736) ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 21:26:31 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 02 May 2020 01:26:31 +0000 Subject: [issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad In-Reply-To: <1487329309.81.0.182915384821.issue29587@psf.upfronthosting.co.za> Message-ID: <1588382791.07.0.683709204318.issue29587@roundup.psfhosted.org> Chris Jerdonek added the comment: Okay, thanks everyone. I think I'll take a look at issue 40466 next. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 21:37:54 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 02 May 2020 01:37:54 +0000 Subject: [issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad In-Reply-To: <1588382791.07.0.683709204318.issue29587@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: Wow, thanks all! FWIW I agree that ideally things should work with a NULL value... -- --Guido (mobile) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 22:20:01 2020 From: report at bugs.python.org (jack1142) Date: Sat, 02 May 2020 02:20:01 +0000 Subject: [issue36310] pygettext3.7 Does Not Recognize gettext Calls Within fstrings In-Reply-To: <1552702047.72.0.770409871236.issue36310@roundup.psfhosted.org> Message-ID: <1588386001.16.0.949603863761.issue36310@roundup.psfhosted.org> Change by jack1142 : ---------- nosy: +jack1142 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 22:50:25 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 02 May 2020 02:50:25 +0000 Subject: [issue40455] GCC 10 compiler warnings In-Reply-To: <1588279868.77.0.13865368461.issue40455@roundup.psfhosted.org> Message-ID: <1588387825.46.0.22905157968.issue40455@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +19169 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19852 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 23:15:33 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 02 May 2020 03:15:33 +0000 Subject: [issue40472] PEG parser disables IDLE Shell input > 2 lines In-Reply-To: <1588361730.23.0.0107658134744.issue40472@roundup.psfhosted.org> Message-ID: <1588389333.57.0.780510041021.issue40472@roundup.psfhosted.org> Terry J. Reedy added the comment: Thank you Dennis. I was just about to post that after installing 3.8.3rc1 and 3.9.0a6 in a Macbook Air, with identical idlelib code, I confirmed the problem as specific to 3.9 and that $ python3.9 -X oldparser -m idlelib works around the issue. My python development desktop is currently in a repair shop. I will try to verify the fix on Windows master when I can. idlelib.pyshell.ModifiedInterpreter subclasses code.InteractiveInterpreter. After each 'Enter', something calls compile(current_lines, '','single'). Something changed that makes a difference in one of the files. The only thing I found is that the error for 'if 1:\n' changed from "SyntaxError: unexpected EOF ..." to "IndentationError: expected ...". Since issubclass(IndentationError, SyntaxError), I would not expect that to be a problem, but if Pablo fixed this, good enough for me. So I am closing until someone says otherwise. ---------- assignee: terry.reedy -> components: +Interpreter Core, Library (Lib) nosy: +lukasz.langa, lys.nikolaou, pablogsal -Dennis Sweeney resolution: -> out of date stage: -> resolved status: open -> closed title: IDLE Shell not allowing more than two line inputs -> PEG parser disables IDLE Shell input > 2 lines type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 23:37:15 2020 From: report at bugs.python.org (Ned Deily) Date: Sat, 02 May 2020 03:37:15 +0000 Subject: [issue40461] execution of file with pictures doesn't work in command --onefile in pyinstaller In-Reply-To: <1588290525.38.0.683228123996.issue40461@roundup.psfhosted.org> Message-ID: <1588390635.14.0.303779127242.issue40461@roundup.psfhosted.org> Ned Deily added the comment: PyInstaller is a third-party project, not part of the Python Standard Library. I suggest you start with their documentation here: https://pyinstaller.readthedocs.io/en/stable/when-things-go-wrong.html ---------- nosy: +ned.deily resolution: -> third party stage: -> resolved status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 23:52:58 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 02 May 2020 03:52:58 +0000 Subject: [issue40433] Equality operations between lists and arrays In-Reply-To: <1588128737.73.0.376280736154.issue40433@roundup.psfhosted.org> Message-ID: <1588391578.81.0.574659603635.issue40433@roundup.psfhosted.org> Raymond Hettinger added the comment: I concur with Terry that this would need to be taken to python-ideas. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 1 23:56:27 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 02 May 2020 03:56:27 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588391787.97.0.578743192087.issue40334@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +19170 pull_request: https://github.com/python/cpython/pull/19854 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 00:02:50 2020 From: report at bugs.python.org (xie) Date: Sat, 02 May 2020 04:02:50 +0000 Subject: [issue40475] json.JSONEncoder override default method Message-ID: <1588392170.43.0.455373340888.issue40475@roundup.psfhosted.org> New submission from xie : I see an example from here?https://docs.python.org/3/library/json.html ------It is about custom method from python object to json string:----- import json class ComplexEncoder(json.JSONEncoder): def default(self, obj): print("hi") if isinstance(obj, complex): return [obj.real, obj.imag] # Let the base class default method raise the TypeError return json.JSONEncoder.default(self, obj) s2=json.dumps(2 + 1j, cls=ComplexEncoder) print(s2) -------I wrote an program like it,but not the result I want:------- class MyEncoder(json.JSONEncoder): def default(self,obj): print("hi") if isinstance(obj,dict): print("it is dict!") return obj["name"] return json.JSONEncoder.default(self,obj) print(MyEncoder().encode({"name":"sun","age":40})) jsonStr=json.dumps({"name":"wang","age":30},cls=MyEncoder) print(jsonStr) --------the result of the program is:--------- {"name": "sun", "age": 40} {"name": "wang", "age": 30} --------I think it should be:--------- sun wang what I missed?I am very confused. ---------- messages: 367912 nosy: xsmyqf priority: normal severity: normal status: open title: json.JSONEncoder override default method type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 00:22:07 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 02 May 2020 04:22:07 +0000 Subject: [issue40406] MagicMock __aenter__ should be AsyncMock(return_value=MagicMock()) In-Reply-To: <1587994408.9.0.812209740883.issue40406@roundup.psfhosted.org> Message-ID: <1588393327.69.0.298278070027.issue40406@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: MagicMock object on call returns another MagicMock. AsyncMock object in turn returns a coroutine which has to be awaited. In the report mock.MagicMock().__aenter__() returns an AsyncMock object. Accessing the query attribute will create an AsyncMock object. Calling query() will return a coroutine which will not have a __aexit__. Mock supports configure_mock through which nested calls can be mocked but the return_value has to be accessed to mock the nested attributes. So a workaround could be below. The connection object is mocked such that the __aenter__ returns a MagicMock. That magic mock can have the query attribute to be mocked whose return_value is an AsyncMock if the the query object has to awaited. See also issue37052 regarding adding an example. See also https://github.com/python/cpython/pull/16859 regarding adding an example along similar database mocking that will help. >>> from unittest.mock import MagicMock, AsyncMock >>> AsyncMock()() import asyncio from unittest.mock import MagicMock, AsyncMock, patch class Database: pass async def mock_database(): with patch(f"{__name__}.Database") as db: db.configure_mock( **{ "connection.return_value.__aenter__.return_value": MagicMock( **{ "query.return_value.__aenter__.return_value": AsyncMock( return_value=[1] ) } ) } ) async with db.connection() as conn: async with conn.query() as query: result = await query("select * from people") assert result == [1] print(f"Result : {result}") asyncio.run(mock_database()) Hope it helps. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 00:23:47 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 02 May 2020 04:23:47 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588393427.07.0.22629567746.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset d2baff4301387e232495491f7291903cc1217d21 by Pablo Galindo in branch 'master': bpo-40334: regenerate metaparser as part of regen-all (GH-19854) https://github.com/python/cpython/commit/d2baff4301387e232495491f7291903cc1217d21 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 00:27:22 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sat, 02 May 2020 04:27:22 +0000 Subject: [issue40459] [easy] undefined names in platform.py In-Reply-To: <1588290308.75.0.293273104248.issue40459@roundup.psfhosted.org> Message-ID: <1588393642.59.0.576743318716.issue40459@roundup.psfhosted.org> Change by Dennis Sweeney : ---------- keywords: +patch nosy: +Dennis Sweeney nosy_count: 1.0 -> 2.0 pull_requests: +19171 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19855 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 00:32:09 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 02 May 2020 04:32:09 +0000 Subject: [issue40459] [easy] undefined names in platform.py In-Reply-To: <1588290308.75.0.293273104248.issue40459@roundup.psfhosted.org> Message-ID: <1588393929.29.0.566380619112.issue40459@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 00:56:33 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 02 May 2020 04:56:33 +0000 Subject: [issue40475] json.JSONEncoder override default method In-Reply-To: <1588392170.43.0.455373340888.issue40475@roundup.psfhosted.org> Message-ID: <1588395393.17.0.0547213182078.issue40475@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: https://docs.python.org/3/library/json.html#json.JSONEncoder > To extend this to recognize other objects, subclass and implement a default() method with another method that returns a serializable object for o if possible, otherwise it should call the superclass implementation (to raise TypeError). default is called only when the object cannot be serialized by default. In this case dict is serializable and default won't be called. ---------- nosy: +ezio.melotti, rhettinger, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 01:06:47 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 02 May 2020 05:06:47 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588396007.58.0.435043279975.issue40334@roundup.psfhosted.org> Guido van Rossum added the comment: Easy issue: the Python.gram file still has a comment saying something like # Simplified grammar ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 01:48:19 2020 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 02 May 2020 05:48:19 +0000 Subject: [issue11102] configure doesn't find "major()" on HP-UX v11.31 In-Reply-To: <1296677130.56.0.432506284039.issue11102@psf.upfronthosting.co.za> Message-ID: <1588398499.94.0.494984340989.issue11102@roundup.psfhosted.org> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz nosy_count: 2.0 -> 3.0 pull_requests: +19172 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/19856 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 01:55:06 2020 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 02 May 2020 05:55:06 +0000 Subject: [issue11102] configure doesn't find "major()" on HP-UX v11.31 In-Reply-To: <1296677130.56.0.432506284039.issue11102@psf.upfronthosting.co.za> Message-ID: <1588398906.56.0.606621449158.issue11102@roundup.psfhosted.org> Change by Zackery Spytz : ---------- versions: +Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 02:38:08 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 02 May 2020 06:38:08 +0000 Subject: [issue39435] pickle: inconsistent arguments pickle.py vs _pickle.c vs docs In-Reply-To: <1579799539.42.0.511265830635.issue39435@roundup.psfhosted.org> Message-ID: <1588401488.67.0.403275912691.issue39435@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 531d1e541284bfd7944f8c66a5e8c3c3234afaff by Serhiy Storchaka in branch 'master': bpo-39435: Make the first argument of pickle.loads() positional-only. (GH-19846) https://github.com/python/cpython/commit/531d1e541284bfd7944f8c66a5e8c3c3234afaff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 02:45:51 2020 From: report at bugs.python.org (xie) Date: Sat, 02 May 2020 06:45:51 +0000 Subject: [issue40475] json.JSONEncoder override default method In-Reply-To: <1588392170.43.0.455373340888.issue40475@roundup.psfhosted.org> Message-ID: <1588401951.57.0.298310941101.issue40475@roundup.psfhosted.org> xie added the comment: I got it,Thank you! ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 02:45:55 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 02 May 2020 06:45:55 +0000 Subject: [issue40398] typing.get_args(Callable) fails In-Reply-To: <1587919567.44.0.458722941462.issue40398@roundup.psfhosted.org> Message-ID: <1588401955.69.0.603971377729.issue40398@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +19173 pull_request: https://github.com/python/cpython/pull/19857 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 02:47:42 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 02 May 2020 06:47:42 +0000 Subject: [issue40398] typing.get_args(Callable) fails In-Reply-To: <1587919567.44.0.458722941462.issue40398@roundup.psfhosted.org> Message-ID: <1588402062.66.0.614531364866.issue40398@roundup.psfhosted.org> Serhiy Storchaka added the comment: Yes, I have not closed this issue yet because it required a manual backporting to 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 04:08:04 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 02 May 2020 08:08:04 +0000 Subject: [issue40398] typing.get_args(Callable) fails In-Reply-To: <1587919567.44.0.458722941462.issue40398@roundup.psfhosted.org> Message-ID: <1588406884.16.0.0367626611597.issue40398@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset a629d4c63c55ba36be36ff105dfc103b710c9a2d by Serhiy Storchaka in branch '3.8': [3.8] bpo-40398: Fix typing.get_args() for special generic aliases. (GH-19720) (GH-19857) https://github.com/python/cpython/commit/a629d4c63c55ba36be36ff105dfc103b710c9a2d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 04:08:24 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 02 May 2020 08:08:24 +0000 Subject: [issue40398] typing.get_args(Callable) fails In-Reply-To: <1587919567.44.0.458722941462.issue40398@roundup.psfhosted.org> Message-ID: <1588406904.5.0.102205135349.issue40398@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 05:35:32 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 02 May 2020 09:35:32 +0000 Subject: [issue40466] asyncio.ensure_future() breaks implicit exception chaining In-Reply-To: <1588327031.68.0.391066617052.issue40466@roundup.psfhosted.org> Message-ID: <1588412132.35.0.709476461223.issue40466@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- keywords: +patch pull_requests: +19174 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19858 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 06:00:35 2020 From: report at bugs.python.org (Saaheer Purav) Date: Sat, 02 May 2020 10:00:35 +0000 Subject: [issue40031] IDLE fails trying to inport old idlelib file names for config In-Reply-To: <1584783754.51.0.582471420619.issue40031@roundup.psfhosted.org> Message-ID: <1588413635.56.0.21333792789.issue40031@roundup.psfhosted.org> Saaheer Purav added the comment: In my .idlerc folder, only 1 file is there- 'recent-files.lst'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 06:03:02 2020 From: report at bugs.python.org (Mark Hallett) Date: Sat, 02 May 2020 10:03:02 +0000 Subject: [issue40469] TimedRotatingFileHandler rotating on use not time In-Reply-To: <1588345322.69.0.523914781015.issue40469@roundup.psfhosted.org> Message-ID: <1588413782.39.0.0537052067391.issue40469@roundup.psfhosted.org> Mark Hallett added the comment: Eg code to run is now attached ---------- Added file: https://bugs.python.org/file49112/app.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 06:13:06 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 02 May 2020 10:13:06 +0000 Subject: [issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad In-Reply-To: <1487329309.81.0.182915384821.issue29587@psf.upfronthosting.co.za> Message-ID: <1588414386.22.0.204561841307.issue29587@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- pull_requests: +19175 pull_request: https://github.com/python/cpython/pull/19859 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 06:23:39 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sat, 02 May 2020 10:23:39 +0000 Subject: [issue40449] multi-line f-string, syntaxerror points to wrong line In-Reply-To: <1588243434.48.0.11950945946.issue40449@roundup.psfhosted.org> Message-ID: <1588415019.02.0.164071326953.issue40449@roundup.psfhosted.org> Lysandros Nikolaou added the comment: This has been fixed in 3.9.0a6 due to the new parser: ?? cat a.py s = ("apricot " "pineapple" f"shallot{") ?? ./python.exe a.py File "/Users/lysnikolaou/Repositories/cpython/a.py", line 3 f"shallot{") ^ SyntaxError: f-string: expecting '}' ---------- nosy: +lys.nikolaou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 06:28:27 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 02 May 2020 10:28:27 +0000 Subject: [issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad In-Reply-To: <1487329309.81.0.182915384821.issue29587@psf.upfronthosting.co.za> Message-ID: <1588415307.67.0.0971209616995.issue29587@roundup.psfhosted.org> Chris Jerdonek added the comment: FYI, I just created a PR to add one more test to the prior fix, to test a slightly different aspect. Whereas the test in the first PR checks that exc.__context__ is set after gen.throw() is finished, the new test checks that exc.__context__ is available also from within the generator (while the generator is running). I'm adding this test partly because this behavior is different from the "awaiting on a task" case, which I'm working on next. Both of these tests were failing prior to the fix, which I confirmed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 07:29:03 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 02 May 2020 11:29:03 +0000 Subject: [issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw() In-Reply-To: <1487341428.62.0.272190755105.issue29590@psf.upfronthosting.co.za> Message-ID: <1588418943.68.0.584670276158.issue29590@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 07:34:54 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 02 May 2020 11:34:54 +0000 Subject: [issue40466] asyncio.ensure_future() breaks implicit exception chaining In-Reply-To: <1588327031.68.0.391066617052.issue40466@roundup.psfhosted.org> Message-ID: <1588419294.25.0.529346138028.issue40466@roundup.psfhosted.org> Chris Jerdonek added the comment: My PR is ready for review: https://github.com/python/cpython/pull/19858 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 07:48:24 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 02 May 2020 11:48:24 +0000 Subject: [issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad In-Reply-To: <1487329309.81.0.182915384821.issue29587@psf.upfronthosting.co.za> Message-ID: <1588420104.6.0.399268731152.issue29587@roundup.psfhosted.org> Chris Jerdonek added the comment: FYI, I was able to finish addressing the other exception-chaining cases (the ones covered by the other issue) with a simple change to the fix for this PR. I moved the call to _PyErr_ChainExceptions() a bit deeper: into gen_send_ex() before the call to _PyEval_EvalFrame(), and behind an `if (exc)` check. So I think the tracebacks should improve a lot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 07:49:13 2020 From: report at bugs.python.org (=?utf-8?b?6Z+p5oyv5a6H?=) Date: Sat, 02 May 2020 11:49:13 +0000 Subject: [issue40476] Write file failed on OS X 10.15.4 Message-ID: <1588420153.04.0.272722721403.issue40476@roundup.psfhosted.org> New submission from ??? <0oshowero0 at gmail.com>: When I write a long file using write() function, the resulting file is truncated into some specific level when the file is newly establised. However, when the file is existing, the full length can be achieved. Here is the example code: f = open('test_output','w') length = 195364 for i in range(length): f.write(str(i)+'\r\n') On my macOS 10.15.4 and conda virtual environment conda create -n test python=3.7.4 When the test_output file is not existing, the content of the file is truncated into 195280, while i is 195364 after the writing process. Then I re-run the code without deleting the file, the output is normal. ---------- components: IO messages: 367927 nosy: ??? priority: normal severity: normal status: open title: Write file failed on OS X 10.15.4 versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 07:50:59 2020 From: report at bugs.python.org (=?utf-8?b?6Z+p5oyv5a6H?=) Date: Sat, 02 May 2020 11:50:59 +0000 Subject: [issue40476] Write file failed on OS X 10.15.4 In-Reply-To: <1588420153.04.0.272722721403.issue40476@roundup.psfhosted.org> Message-ID: <1588420259.13.0.297226651138.issue40476@roundup.psfhosted.org> Change by ??? <0oshowero0 at gmail.com>: ---------- components: +macOS nosy: +ned.deily, ronaldoussoren type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 08:09:33 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sat, 02 May 2020 12:09:33 +0000 Subject: [issue40476] Write file failed on OS X 10.15.4 In-Reply-To: <1588420153.04.0.272722721403.issue40476@roundup.psfhosted.org> Message-ID: <1588421373.17.0.517872228856.issue40476@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi, I can't reproduce the issue but the fact that you did not close the file is suspicious. What does with open('test_output','w') as f: length = 195364 for i in range(length): f.write(str(i)+'\r\n') gives? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 08:34:23 2020 From: report at bugs.python.org (=?utf-8?b?6Z+p5oyv5a6H?=) Date: Sat, 02 May 2020 12:34:23 +0000 Subject: [issue40476] Write file failed on OS X 10.15.4 In-Reply-To: <1588420153.04.0.272722721403.issue40476@roundup.psfhosted.org> Message-ID: <1588422863.06.0.858709302189.issue40476@roundup.psfhosted.org> ??? <0oshowero0 at gmail.com> added the comment: After f.close() it apperas. That's my fault. Thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 08:34:32 2020 From: report at bugs.python.org (=?utf-8?b?6Z+p5oyv5a6H?=) Date: Sat, 02 May 2020 12:34:32 +0000 Subject: [issue40476] Write file failed on OS X 10.15.4 In-Reply-To: <1588420153.04.0.272722721403.issue40476@roundup.psfhosted.org> Message-ID: <1588422872.5.0.356729736757.issue40476@roundup.psfhosted.org> Change by ??? <0oshowero0 at gmail.com>: ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 08:43:11 2020 From: report at bugs.python.org (=?utf-8?b?6Z+p5oyv5a6H?=) Date: Sat, 02 May 2020 12:43:11 +0000 Subject: [issue40476] Write file failed on OS X 10.15.4 In-Reply-To: <1588420153.04.0.272722721403.issue40476@roundup.psfhosted.org> Message-ID: <1588423391.55.0.537431571893.issue40476@roundup.psfhosted.org> Change by ??? <0oshowero0 at gmail.com>: ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 09:35:20 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Sat, 02 May 2020 13:35:20 +0000 Subject: [issue40367] ImportError: libffi.so.6 In-Reply-To: <1587589423.16.0.82755935318.issue40367@roundup.psfhosted.org> Message-ID: <1588426520.07.0.950795220383.issue40367@roundup.psfhosted.org> Filipe La?ns added the comment: ?ric's assessment seems correct. libffi-3.2 (which provided libffi.so.6) got dropped as a dependency from libffi a few weeks ago. https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/libffi&id=edbab26c1cbebe62bb9a5ef55a5e0eaf3481a399 Add 2 weeks for the Manjaro repos to pull the change. The timing seems correct. You just need to rebuild your python installation in /opt/python/3.8.1 (although having an installation there seems very odd, does the default installation not worlK). Please let me know if the issue still proceeds after rebuilding, otherwise this should be closed :) ---------- nosy: +FFY00 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 09:36:00 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Sat, 02 May 2020 13:36:00 +0000 Subject: [issue40367] ImportError: libffi.so.6 In-Reply-To: <1587589423.16.0.82755935318.issue40367@roundup.psfhosted.org> Message-ID: <1588426560.34.0.637195690793.issue40367@roundup.psfhosted.org> Filipe La?ns added the comment: typo: does the default installation not worlK *does the default installation not work? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 10:30:06 2020 From: report at bugs.python.org (rmawatson) Date: Sat, 02 May 2020 14:30:06 +0000 Subject: [issue39232] asyncio crashes when tearing down the proactor event loop In-Reply-To: <1578335360.75.0.333919607495.issue39232@roundup.psfhosted.org> Message-ID: <1588429806.96.0.477883528971.issue39232@roundup.psfhosted.org> rmawatson added the comment: This is also happening in other libraries besides aiohttp. Specifically xhttp on windows. There is an open issue at https://github.com/encode/httpx/issues/914 ---------- nosy: +rmawatson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 11:18:57 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sat, 02 May 2020 15:18:57 +0000 Subject: [issue40449] multi-line f-string, syntaxerror points to wrong line In-Reply-To: <1588243434.48.0.11950945946.issue40449@roundup.psfhosted.org> Message-ID: <1588432737.84.0.835934906314.issue40449@roundup.psfhosted.org> Lysandros Nikolaou added the comment: Since this issue is now resolved, I'm closing it, after I consulted with pablogsal. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 11:24:48 2020 From: report at bugs.python.org (Christian Heimes) Date: Sat, 02 May 2020 15:24:48 +0000 Subject: [issue40457] Python fails to compile/load _ssl module if OpenSSL is compiled with no-tls1-method In-Reply-To: <1588286494.27.0.412005858691.issue40457@roundup.psfhosted.org> Message-ID: <1588433088.61.0.706114853998.issue40457@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +19176 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19862 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 11:27:04 2020 From: report at bugs.python.org (Christian Heimes) Date: Sat, 02 May 2020 15:27:04 +0000 Subject: [issue40457] Python fails to compile/load _ssl module if OpenSSL is compiled with no-tls1-method In-Reply-To: <1588286494.27.0.412005858691.issue40457@roundup.psfhosted.org> Message-ID: <1588433224.57.0.631612454141.issue40457@roundup.psfhosted.org> Christian Heimes added the comment: Thanks for the bug report. I've created a PR to check for the correct flags in _ssl__SSLContext_impl(). I'll backport the fix to 3.8 and 3.7. 3.6 and older are in security-only mode. ---------- versions: +Python 3.9 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 12:01:19 2020 From: report at bugs.python.org (Werner) Date: Sat, 02 May 2020 16:01:19 +0000 Subject: [issue40477] Launcher on Catalina Message-ID: <1588435279.1.0.0339863635356.issue40477@roundup.psfhosted.org> New submission from Werner : I can?t figure out how to use Python Launcher on Catalina. Or it is broken. Anyway: It does absolutely nothing. When I double click a scriopt file, I se very shortly the preferences window of Launcher, and this is all. The script is not executed. I made a very simple script which writes a small text file. The script works flawlessly, when I call it in the terminal, but the Launcher seems not even to open it. Is this a bug with Catalina, or what is to be done? ---------- components: macOS messages: 367935 nosy: Auerhahn, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Launcher on Catalina versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 12:12:10 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 02 May 2020 16:12:10 +0000 Subject: [issue40419] timeit CLI docs still mention old power sequence In-Reply-To: <1588071150.59.0.956744642529.issue40419@roundup.psfhosted.org> Message-ID: <1588435930.54.0.563802158086.issue40419@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 766352320fd736e2c8ed545b4cc57563f61a0b9d by Sander in branch 'master': bpo-40419: timeit CLI docs now mention 1,2,5,10,... trials instead of powers of 10 (GH-19752) https://github.com/python/cpython/commit/766352320fd736e2c8ed545b4cc57563f61a0b9d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 12:12:36 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 02 May 2020 16:12:36 +0000 Subject: [issue40419] timeit CLI docs still mention old power sequence In-Reply-To: <1588071150.59.0.956744642529.issue40419@roundup.psfhosted.org> Message-ID: <1588435956.89.0.91702080211.issue40419@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +19177 pull_request: https://github.com/python/cpython/pull/19863 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 12:12:46 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 02 May 2020 16:12:46 +0000 Subject: [issue40419] timeit CLI docs still mention old power sequence In-Reply-To: <1588071150.59.0.956744642529.issue40419@roundup.psfhosted.org> Message-ID: <1588435966.17.0.928782293529.issue40419@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19178 pull_request: https://github.com/python/cpython/pull/19864 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 12:29:56 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 02 May 2020 16:29:56 +0000 Subject: [issue40419] timeit CLI docs still mention old power sequence In-Reply-To: <1588071150.59.0.956744642529.issue40419@roundup.psfhosted.org> Message-ID: <1588436996.26.0.414586630774.issue40419@roundup.psfhosted.org> miss-islington added the comment: New changeset 399b9a4a620f544c1afa3b8c7fd82d093b5cc76d by Miss Islington (bot) in branch '3.8': bpo-40419: timeit CLI docs now mention 1,2,5,10,... trials instead of powers of 10 (GH-19752) https://github.com/python/cpython/commit/399b9a4a620f544c1afa3b8c7fd82d093b5cc76d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 12:29:56 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 02 May 2020 16:29:56 +0000 Subject: [issue40419] timeit CLI docs still mention old power sequence In-Reply-To: <1588071150.59.0.956744642529.issue40419@roundup.psfhosted.org> Message-ID: <1588436996.26.0.414586630774.issue40419@roundup.psfhosted.org> miss-islington added the comment: New changeset 399b9a4a620f544c1afa3b8c7fd82d093b5cc76d by Miss Islington (bot) in branch '3.8': bpo-40419: timeit CLI docs now mention 1,2,5,10,... trials instead of powers of 10 (GH-19752) https://github.com/python/cpython/commit/399b9a4a620f544c1afa3b8c7fd82d093b5cc76d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 12:29:56 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 02 May 2020 16:29:56 +0000 Subject: [issue40419] timeit CLI docs still mention old power sequence In-Reply-To: <1588071150.59.0.956744642529.issue40419@roundup.psfhosted.org> Message-ID: <1588436996.79.0.139817928433.issue40419@roundup.psfhosted.org> miss-islington added the comment: New changeset 4eec39a98c57bc374888b54c34ca11fdffcffc07 by Miss Islington (bot) in branch '3.7': bpo-40419: timeit CLI docs now mention 1,2,5,10,... trials instead of powers of 10 (GH-19752) https://github.com/python/cpython/commit/4eec39a98c57bc374888b54c34ca11fdffcffc07 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 13:10:30 2020 From: report at bugs.python.org (Ned Deily) Date: Sat, 02 May 2020 17:10:30 +0000 Subject: [issue40477] Launcher on Catalina In-Reply-To: <1588435279.1.0.0339863635356.issue40477@roundup.psfhosted.org> Message-ID: <1588439430.38.0.532275670931.issue40477@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the report. At first glance, it does look like it's broken on macOS 10.15. I'll look into it. ---------- assignee: -> ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 13:12:21 2020 From: report at bugs.python.org (Werner) Date: Sat, 02 May 2020 17:12:21 +0000 Subject: [issue40477] Launcher on Catalina In-Reply-To: <1588439430.38.0.532275670931.issue40477@roundup.psfhosted.org> Message-ID: Werner added the comment: Thank you! That?s an Information which Looks bad but has good parts. At least it may be not my fault ;) Best regards Werner Hintze Am 2. Mai 2020, 19:10 +0200 schrieb Ned Deily : > > Ned Deily added the comment: > > Thanks for the report. At first glance, it does look like it's broken on macOS 10.15. I'll look into it. > > ---------- > assignee: -> ned.deily > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 13:26:05 2020 From: report at bugs.python.org (E. Paine) Date: Sat, 02 May 2020 17:26:05 +0000 Subject: [issue40468] IDLE split "general" into two tabs In-Reply-To: <1588342210.52.0.776872841323.issue40468@roundup.psfhosted.org> Message-ID: <1588440365.46.0.263557783084.issue40468@roundup.psfhosted.org> E. Paine added the comment: Would it be helpful to move the additional help sources to the extensions page (and rename it to "Add-ins")? Just throwing ideas out there, we could also add an "Advanced" tab where we put the settings we (really) don't want others changing without good reason (such as the indentation width). However, such a tab could quite possibly mean reorganising the entire settings dialog. While the original intention of this issue wasn't for a complete reorganisation of the dialog, I am more than willing to spend some time if we want to tie several other issues into this one (and it would be helpful to do so). Another random idea is to copy other IDEs and use a tree on the left-side to navigate to different settings, which would allow us to keep the number of settings on a page much lower. I will write a new prototype trying the "Shell/Ed" tab idea you suggested and will upload the relevant screenshots. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 13:30:34 2020 From: report at bugs.python.org (Rob Malouf) Date: Sat, 02 May 2020 17:30:34 +0000 Subject: [issue40416] Calling TextIOWrapper.tell() in the middle of reading a gb2312-encoded file causes UnicodeDecodeError In-Reply-To: <1588048436.43.0.594940005352.issue40416@roundup.psfhosted.org> Message-ID: <1588440634.74.0.628608160347.issue40416@roundup.psfhosted.org> Rob Malouf added the comment: Same results on MacOS 10.15.4 (both the system python and the intel/anaconda version) and on CentOS 7.8 Here's the output with print(...): 13 71 72 392 393 399 536 537 761 762 879 880 933 934 1146 1147 1254 1255 1359 1360 1760 1761 1772 1895 1897 1906 2105 2107 2338 2339 2348 2398 2399 2408 2509 2510 2519 2612 2614 2622 2682 2684 2693 2898 2900 2909 3050 3052 3061 3113 3115 3124 3295 3297 3309 3445 3632 3644 3814 3816 3828 3882 3967 3979 4048 4184 4196 4226 4308 4320 4492 4559 4641 4653 4728 4770 4782 4999 5001 5013 5202 5204 5216 5270 5318 5333 5411 5465 5672 5687 5953 5954 5969 6082 6137 6307 6373 6388 6494 6496 6511 6786 6913 6928 7148 7371 7447 7462 7569 7704 7719 7847 7848 7863 7972 8238 8342 Traceback (most recent call last): File "test.py", line 4, in print(f.tell()) UnicodeDecodeError: 'gb2312' codec can't decode byte 0xb5 in position 0: illegal multibyte sequence ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 13:42:50 2020 From: report at bugs.python.org (Cajetan Rodrigues) Date: Sat, 02 May 2020 17:42:50 +0000 Subject: [issue40350] modulefinder chokes on numpy - dereferencing None in spec.loader In-Reply-To: <1587454417.83.0.816569073565.issue40350@roundup.psfhosted.org> Message-ID: <1588441370.27.0.533030726059.issue40350@roundup.psfhosted.org> Cajetan Rodrigues added the comment: Reproduced on Python3.9.0a5+ imp.find_module() simply raised an ImportError in my tests with an implicitly namespaced package (without an __init__.py) About the "type_", I think it should be consistent with _PKG_DIRECTORY, since PEP 420 states the following[1]: ``` A namespace package is not fundamentally different from a regular package. It is just a different way of creating packages. Once a namespace package is created, there is no functional difference between it and a regular package. ``` I'd be happy to submit a patch if you think this is alright. [1] https://www.python.org/dev/peps/pep-0420/#id24 ---------- nosy: +cajetan.rodrigues _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 14:03:40 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 02 May 2020 18:03:40 +0000 Subject: [issue40408] GenericAlias does not support nested type variables In-Reply-To: <1588003077.18.0.979842098769.issue40408@roundup.psfhosted.org> Message-ID: <1588442620.22.0.102911863717.issue40408@roundup.psfhosted.org> Serhiy Storchaka added the comment: There is a difference between PR 19836 and the typing module in handling nested unsubscribed generic aliases: >>> from typing import * >>> T = TypeVar('T') >>> D1 = Dict[T, List] >>> D2 = dict[T, List] >>> D1.__parameters__ (~T,) >>> D1[int] typing.Dict[int, typing.List[~T]] >>> D1[int].__parameters__ (~T,) >>> D1[int][str] typing.Dict[int, typing.List[str]] >>> D1[int, str] Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython/Lib/typing.py", line 267, in inner return func(*args, **kwds) File "/home/serhiy/py/cpython/Lib/typing.py", line 686, in __getitem__ _check_generic(self, params) File "/home/serhiy/py/cpython/Lib/typing.py", line 221, in _check_generic raise TypeError(f"Too {'many' if alen > elen else 'few'} parameters for {cls};" TypeError: Too many parameters for typing.Dict[~T, typing.List]; actual 2, expected 1 >>> D2.__parameters__ (~T, ~T) >>> D2[int] Traceback (most recent call last): File "", line 1, in TypeError: Too few arguments for dict[~T, typing.List] >>> D2[int, str] dict[int, typing.List[str]] But this behavior is not specified and is not covered by tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 14:04:31 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 02 May 2020 18:04:31 +0000 Subject: [issue40031] IDLE fails trying to inport old idlelib file names for config In-Reply-To: <1584783754.51.0.582471420619.issue40031@roundup.psfhosted.org> Message-ID: <1588442671.22.0.593523673871.issue40031@roundup.psfhosted.org> Terry J. Reedy added the comment: Module 'autoexpand' has a class 'AutoExpand' imported by editor.py near the top. After rechecking the editor and config code, I am sure that the only way editor line 1115 could try to import *module* AutoExpand is if either idlelib/config-extensions.def or .idlerc/config-extensions.cfg contains a section header '[AutoExpand]'. Since the latter does not exist on your machine, it must be the former. Please attach your copy of config-extensions.def. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 14:38:12 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sat, 02 May 2020 18:38:12 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588444692.38.0.63676675114.issue40334@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +19179 pull_request: https://github.com/python/cpython/pull/19865 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 15:03:13 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 02 May 2020 19:03:13 +0000 Subject: [issue40465] Deprecate the optional *random* argument to random.shuffle() In-Reply-To: <1588321901.81.0.617278241299.issue40465@roundup.psfhosted.org> Message-ID: <1588446193.77.0.740231170086.issue40465@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +19180 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19867 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 15:11:48 2020 From: report at bugs.python.org (E. Paine) Date: Sat, 02 May 2020 19:11:48 +0000 Subject: [issue40468] IDLE split "general" into two tabs In-Reply-To: <1588342210.52.0.776872841323.issue40468@roundup.psfhosted.org> Message-ID: <1588446708.98.0.871980052831.issue40468@roundup.psfhosted.org> Change by E. Paine : Added file: https://bugs.python.org/file49113/general_page_se.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 15:12:00 2020 From: report at bugs.python.org (E. Paine) Date: Sat, 02 May 2020 19:12:00 +0000 Subject: [issue40468] IDLE split "general" into two tabs In-Reply-To: <1588342210.52.0.776872841323.issue40468@roundup.psfhosted.org> Message-ID: <1588446720.36.0.164002640868.issue40468@roundup.psfhosted.org> Change by E. Paine : Added file: https://bugs.python.org/file49114/shell_editor_page.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 15:12:08 2020 From: report at bugs.python.org (E. Paine) Date: Sat, 02 May 2020 19:12:08 +0000 Subject: [issue40468] IDLE split "general" into two tabs In-Reply-To: <1588342210.52.0.776872841323.issue40468@roundup.psfhosted.org> Message-ID: <1588446728.53.0.481807679647.issue40468@roundup.psfhosted.org> Change by E. Paine : Added file: https://bugs.python.org/file49115/shell_editor_page_pady.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 15:17:03 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 02 May 2020 19:17:03 +0000 Subject: [issue40468] IDLE split "general" into two tabs In-Reply-To: <1588342210.52.0.776872841323.issue40468@roundup.psfhosted.org> Message-ID: <1588447023.43.0.818629253593.issue40468@roundup.psfhosted.org> Terry J. Reedy added the comment: Since the help sources extend the Help menu, putting them under Extensions makes some sense. But I don't know how many people would think to look at the tab. But something to keep in mind. We can also ask for user opinions on idle-dev list. Notebooks can put tabs on any side. I found one side example. https://stackoverflow.com/questions/46909169/python-tkinter-side-notebook-tabs This would allow more and longer tab names, though I would prefer position='w'or 'wn' (west north) instead of 'ws'. We should try this for the existing extensions pane. When done with General, there are issues about redoing Highlights and Keys pages, with one person's mockups. One problem with making changes has been divergent opinions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 16:03:06 2020 From: report at bugs.python.org (gaborbernat) Date: Sat, 02 May 2020 20:03:06 +0000 Subject: [issue25625] "chdir" Contex manager for pathlib In-Reply-To: <1447523143.32.0.921942004004.issue25625@psf.upfronthosting.co.za> Message-ID: <1588449786.51.0.159547414139.issue25625@roundup.psfhosted.org> gaborbernat added the comment: So moving way from subprocess.Process; what about having this for other use cases? I know there is no thread-safe way to get this working, given it's a process state variable. However, can we have it as a non-thread-safe feature? ---------- nosy: +gaborbernat versions: +Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 16:11:56 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sat, 02 May 2020 20:11:56 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588450316.56.0.753202905584.issue40334@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- type: resource usage -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 16:27:11 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 02 May 2020 20:27:11 +0000 Subject: [issue40419] timeit CLI docs still mention old power sequence In-Reply-To: <1588071150.59.0.956744642529.issue40419@roundup.psfhosted.org> Message-ID: <1588451231.47.0.112209115275.issue40419@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 17:48:12 2020 From: report at bugs.python.org (Curtis Bucher) Date: Sat, 02 May 2020 21:48:12 +0000 Subject: [issue40355] The ast module fails to reject certain malformed nodes In-Reply-To: <1587499162.97.0.267428394248.issue40355@roundup.psfhosted.org> Message-ID: <1588456092.31.0.875758084297.issue40355@roundup.psfhosted.org> Change by Curtis Bucher : ---------- keywords: +patch nosy: +curtisbucher nosy_count: 4.0 -> 5.0 pull_requests: +19181 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19868 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 18:04:02 2020 From: report at bugs.python.org (Roundup Robot) Date: Sat, 02 May 2020 22:04:02 +0000 Subject: [issue18319] gettext() cannot find translations with plural forms In-Reply-To: <1372373603.42.0.596981858746.issue18319@psf.upfronthosting.co.za> Message-ID: <1588457042.86.0.92377626808.issue18319@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 3.0 -> 4.0 pull_requests: +19182 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19869 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 18:45:45 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 02 May 2020 22:45:45 +0000 Subject: [issue40286] Add randbytes() method to random.Random In-Reply-To: <1586903418.02.0.530735802731.issue40286@roundup.psfhosted.org> Message-ID: <1588459545.14.0.526933576877.issue40286@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +19183 pull_request: https://github.com/python/cpython/pull/19870 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 19:44:11 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Sat, 02 May 2020 23:44:11 +0000 Subject: [issue40464] functools.singledispatch doesn't verify annotation is on FIRST parameter In-Reply-To: <1588316641.36.0.617194746525.issue40464@roundup.psfhosted.org> Message-ID: <1588463051.82.0.203302972582.issue40464@roundup.psfhosted.org> Change by Filipe La?ns : ---------- keywords: +patch nosy: +FFY00 nosy_count: 2.0 -> 3.0 pull_requests: +19184 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19871 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 19:45:35 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 02 May 2020 23:45:35 +0000 Subject: [issue40465] Deprecate the optional *random* argument to random.shuffle() In-Reply-To: <1588321901.81.0.617278241299.issue40465@roundup.psfhosted.org> Message-ID: <1588463135.91.0.148054955506.issue40465@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 190fac99c58232f3e0b34891872b91e50ea2f057 by Raymond Hettinger in branch 'master': bpo-40465: Deprecate the optional argument to random.shuffle(). (#19867) https://github.com/python/cpython/commit/190fac99c58232f3e0b34891872b91e50ea2f057 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 19:49:03 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 02 May 2020 23:49:03 +0000 Subject: [issue40465] Deprecate the optional *random* argument to random.shuffle() In-Reply-To: <1588321901.81.0.617278241299.issue40465@roundup.psfhosted.org> Message-ID: <1588463343.59.0.126578771424.issue40465@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 20:05:37 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Sun, 03 May 2020 00:05:37 +0000 Subject: [issue19113] duplicate test names in Lib/ctypes/test/test_functions.py In-Reply-To: <1380385419.52.0.767012097586.issue19113@psf.upfronthosting.co.za> Message-ID: <1588464337.27.0.238307331822.issue19113@roundup.psfhosted.org> Change by Filipe La?ns : ---------- nosy: +FFY00 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 20:15:54 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Sun, 03 May 2020 00:15:54 +0000 Subject: [issue39990] help should evaluate forward reference In-Reply-To: <1584436894.78.0.585396462695.issue39990@roundup.psfhosted.org> Message-ID: <1588464954.87.0.58596047706.issue39990@roundup.psfhosted.org> Filipe La?ns added the comment: typing.get_type_hints can be used for this, it resolves the annotation string. >>> def foo(bar: 'int') -> 'bool': pass ... >>> typing.get_type_hints(foo) {'bar': , 'return': } ---------- nosy: +FFY00 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 20:45:50 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Sun, 03 May 2020 00:45:50 +0000 Subject: [issue39990] help should evaluate forward reference In-Reply-To: <1584436894.78.0.585396462695.issue39990@roundup.psfhosted.org> Message-ID: <1588466750.66.0.377106734453.issue39990@roundup.psfhosted.org> Change by Filipe La?ns : ---------- keywords: +patch pull_requests: +19185 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19874 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 21:23:54 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Sun, 03 May 2020 01:23:54 +0000 Subject: [issue40470] Make inspect.signature able to parse format strings. In-Reply-To: <1588346447.38.0.355685422923.issue40470@roundup.psfhosted.org> Message-ID: <1588469034.25.0.964991185262.issue40470@roundup.psfhosted.org> Change by Filipe La?ns : ---------- nosy: +FFY00 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 21:24:21 2020 From: report at bugs.python.org (jack1142) Date: Sun, 03 May 2020 01:24:21 +0000 Subject: [issue36310] pygettext3.7 Does Not Recognize gettext Calls Within fstrings In-Reply-To: <1552702047.72.0.770409871236.issue36310@roundup.psfhosted.org> Message-ID: <1588469061.25.0.570607584436.issue36310@roundup.psfhosted.org> Change by jack1142 : ---------- keywords: +patch pull_requests: +19186 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19875 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 21:25:29 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Sun, 03 May 2020 01:25:29 +0000 Subject: [issue29753] Ctypes Packing Bitfields Incorrectly - Linux In-Reply-To: <1488933400.56.0.160685455632.issue29753@psf.upfronthosting.co.za> Message-ID: <1588469129.62.0.457674895275.issue29753@roundup.psfhosted.org> Filipe La?ns added the comment: My patches should resolve this fully. Please test it to make sure I did not miss any corner case. https://github.com/python/cpython/pull/19850 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 22:23:39 2020 From: report at bugs.python.org (japm48) Date: Sun, 03 May 2020 02:23:39 +0000 Subject: [issue40478] allow finding nmake.exe executable in MSVCCompiler Message-ID: <1588472619.67.0.562367362064.issue40478@roundup.psfhosted.org> New submission from japm48 : Some toolchains (e.g. calibre) use a custom build system based on distutils to find the compiler tools. For those, it is useful to have the path of nmake.exe easily discoverable. ---------- components: Distutils messages: 367951 nosy: dstufft, eric.araujo, japm48 priority: normal severity: normal status: open title: allow finding nmake.exe executable in MSVCCompiler type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 22:24:43 2020 From: report at bugs.python.org (japm48) Date: Sun, 03 May 2020 02:24:43 +0000 Subject: [issue40478] allow finding nmake.exe executable in MSVCCompiler In-Reply-To: <1588472619.67.0.562367362064.issue40478@roundup.psfhosted.org> Message-ID: <1588472683.19.0.103402169085.issue40478@roundup.psfhosted.org> Change by japm48 : ---------- keywords: +patch pull_requests: +19187 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19876 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 23:00:16 2020 From: report at bugs.python.org (Mitch Lindgren) Date: Sun, 03 May 2020 03:00:16 +0000 Subject: [issue40457] Python fails to compile/load _ssl module if OpenSSL is compiled with no-tls1-method In-Reply-To: <1588286494.27.0.412005858691.issue40457@roundup.psfhosted.org> Message-ID: <1588474816.23.0.912588785637.issue40457@roundup.psfhosted.org> Mitch Lindgren added the comment: Thanks for the quick turnaround! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 2 23:18:53 2020 From: report at bugs.python.org (Ma Lin) Date: Sun, 03 May 2020 03:18:53 +0000 Subject: [issue40416] Calling TextIOWrapper.tell() in the middle of reading a gb2312-encoded file causes UnicodeDecodeError In-Reply-To: <1588048436.43.0.594940005352.issue40416@roundup.psfhosted.org> Message-ID: <1588475933.75.0.798260644698.issue40416@roundup.psfhosted.org> Ma Lin added the comment: On Windows 10, Python 3.7, I get the same message as above reply. If use Python 3.8, it works well. ---------- nosy: +Ma Lin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 00:28:22 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 03 May 2020 04:28:22 +0000 Subject: [issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad In-Reply-To: <1487329309.81.0.182915384821.issue29587@psf.upfronthosting.co.za> Message-ID: <1588480102.32.0.948216784781.issue29587@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- pull_requests: +19189 pull_request: https://github.com/python/cpython/pull/19877 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 00:57:23 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 03 May 2020 04:57:23 +0000 Subject: [issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad In-Reply-To: <1487329309.81.0.182915384821.issue29587@psf.upfronthosting.co.za> Message-ID: <1588481843.79.0.0984798695481.issue29587@roundup.psfhosted.org> Chris Jerdonek added the comment: Okay, I was able to remove the NULL value check and get things working with a NULL exception value. I just posted a second follow-on PR that does this (which Guido approved - thanks, Guido!): https://github.com/python/cpython/pull/19877 I wanted to tell you what I found since it raises some questions. To remove that check I had to add the following new check prior to calling `_PyErr_ChainExceptions()` with the exception info, as a replacement: `gen->gi_exc_state.exc_type != Py_None` Without doing this, code like the following would crash e.g. on Fedora 32 (this is the crash that was happening in the first version of my PR, reduced down): def g(): try: raise KeyError except KeyError: pass try: yield except Exception: # Crash happens here e.g. on Fedora 32 but not Mac. raise RuntimeError gen = g() gen.send(None) gen.throw(ValueError) This raises two questions for me: First, I thought exc_type could only ever be NULL or an exception class. So I'm wondering if this points to a problem elsewhere in the code base. Second, I don't know why it would crash on Fedora but not Mac. (On Mac, you instead see the following exception chained beneath the ValueError: > TypeError: print_exception(): Exception expected for value, NoneType found ) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 01:00:26 2020 From: report at bugs.python.org (Ma Lin) Date: Sun, 03 May 2020 05:00:26 +0000 Subject: [issue40416] Calling TextIOWrapper.tell() in the middle of reading a gb2312-encoded file causes UnicodeDecodeError In-Reply-To: <1588048436.43.0.594940005352.issue40416@roundup.psfhosted.org> Message-ID: <1588482026.1.0.0653701434462.issue40416@roundup.psfhosted.org> Ma Lin added the comment: I did a git bisect, this commit fixed the bug: https://github.com/python/cpython/commit/ac22f6aa989f18c33c12615af1c66c73cf75d5e7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 01:31:01 2020 From: report at bugs.python.org (Mitar) Date: Sun, 03 May 2020 05:31:01 +0000 Subject: [issue22848] Subparser help does not respect SUPPRESS argument In-Reply-To: <1415728297.74.0.809984326992.issue22848@psf.upfronthosting.co.za> Message-ID: <1588483861.35.0.461125802808.issue22848@roundup.psfhosted.org> Change by Mitar : ---------- nosy: +mitar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 03:08:10 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 03 May 2020 07:08:10 +0000 Subject: [issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad In-Reply-To: <1487329309.81.0.182915384821.issue29587@psf.upfronthosting.co.za> Message-ID: <1588489690.04.0.466280091453.issue29587@roundup.psfhosted.org> Chris Jerdonek added the comment: New changeset 21893fbb74e8fde2931fbed9b511e2a41362b1ab by Chris Jerdonek in branch 'master': bpo-29587: allow chaining NULL exceptions in _gen_throw() (GH-19877) https://github.com/python/cpython/commit/21893fbb74e8fde2931fbed9b511e2a41362b1ab ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 04:25:19 2020 From: report at bugs.python.org (Glyph Lefkowitz) Date: Sun, 03 May 2020 08:25:19 +0000 Subject: [issue27035] Cannot set exit code in atexit callback In-Reply-To: <1463385428.15.0.762354704325.issue27035@psf.upfronthosting.co.za> Message-ID: <1588494319.04.0.401467325473.issue27035@roundup.psfhosted.org> Glyph Lefkowitz added the comment: This bug has been filed several times: issue1257 issue11654 and it's tempting to simply close this as a dup, but this ticket mentions the documentation, which is slightly confusing: https://docs.python.org/3.8/library/atexit.html#atexit.register It's not *wrong* exactly; 3.8's behavior matches the letter of the documentation, but "the last exception to be raised is re-raised" *implies* a change in exit code, since that is what would normally happen if an exception were re-raised at the top level. So would it be a good idea to change the documentation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 04:57:48 2020 From: report at bugs.python.org (Inada Naoki) Date: Sun, 03 May 2020 08:57:48 +0000 Subject: [issue40416] Calling TextIOWrapper.tell() in the middle of reading a gb2312-encoded file causes UnicodeDecodeError In-Reply-To: <1588048436.43.0.594940005352.issue40416@roundup.psfhosted.org> Message-ID: <1588496268.93.0.0679599902692.issue40416@roundup.psfhosted.org> Inada Naoki added the comment: I think this is not a bug, but a limitation of Python 3.7, and improvement in 3.8. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 05:05:02 2020 From: report at bugs.python.org (Saaheer Purav) Date: Sun, 03 May 2020 09:05:02 +0000 Subject: [issue40031] IDLE fails trying to inport old idlelib file names for config In-Reply-To: <1584783754.51.0.582471420619.issue40031@roundup.psfhosted.org> Message-ID: <1588496702.74.0.396375328161.issue40031@roundup.psfhosted.org> Saaheer Purav added the comment: Here is the file. ---------- Added file: https://bugs.python.org/file49116/config-extensions.def _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 05:07:26 2020 From: report at bugs.python.org (Christian Heimes) Date: Sun, 03 May 2020 09:07:26 +0000 Subject: [issue9216] FIPS support for hashlib In-Reply-To: <1278721335.16.0.522410247151.issue9216@psf.upfronthosting.co.za> Message-ID: <1588496846.92.0.73069227864.issue9216@roundup.psfhosted.org> Christian Heimes added the comment: _hashlib.get_fips_mode() is not compatible with new FIPS design in OpenSSL 3.0.0: The function calls 'FIPS_mode()' and 'FIPS_mode_set()' are present in OpenSSL 3.0 but always fail. You should rewrite your application to not use them. https://wiki.openssl.org/index.php/OpenSSL_3.0#Upgrading_from_the_OpenSSL_2.0_FIPS_Object_Module ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 05:14:03 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 03 May 2020 09:14:03 +0000 Subject: [issue40416] Calling TextIOWrapper.tell() in the middle of reading a gb2312-encoded file causes UnicodeDecodeError In-Reply-To: <1588048436.43.0.594940005352.issue40416@roundup.psfhosted.org> Message-ID: <1588497243.86.0.360169539038.issue40416@roundup.psfhosted.org> Terry J. Reedy added the comment: The commit referenced above is for #33578. The symptoms for that issue were very similar, including involving a cjk codec. The change was not backported because it was seen an enhancement. Rob, if you try 3.8.2 or 3.8.3 (the release candidate was out Wednesday, the final probably next week or so) and still have the same problem, re-open this. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> cjkcodecs missing getstate and setstate implementations _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 05:23:23 2020 From: report at bugs.python.org (Christian Heimes) Date: Sun, 03 May 2020 09:23:23 +0000 Subject: [issue40479] Port _hashlib to OpenSSL 3.0.0 Message-ID: <1588497803.18.0.937746880221.issue40479@roundup.psfhosted.org> New submission from Christian Heimes : OpenSSL 3.0.0-alpha1 was releases about a week ago. OpenSSL 1.1.x APIs are still functional. However some APIs have been deprecated and FIPS (usedforsecurity flag) is no longer functional. * One shot HMAC() is deprecated and should be replaced with EVP_MAC API calls * ERR_func_error_string() is deprecated * OpenSSL has introduced a new concept of crypto providers (OSSL_PROVIDER), library context (OPENSSL_CTX) and additional flags. A new function EVP_MD_fetch() has been introduced. * FIPS support has been rewritten and is now shipped with OpenSSL 3.0.0. EVP_MD_CTX_FLAG_NON_FIPS_ALLOW is no longer supported. FIPS state is no longer part of EVP_MD_CTX but of EVP_MD. See https://wiki.openssl.org/index.php/OpenSSL_3.0 ---------- assignee: christian.heimes components: SSL messages: 367962 nosy: christian.heimes, gregory.p.smith priority: normal severity: normal status: open title: Port _hashlib to OpenSSL 3.0.0 type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 05:28:19 2020 From: report at bugs.python.org (Christian Heimes) Date: Sun, 03 May 2020 09:28:19 +0000 Subject: [issue40479] Port _hashlib to OpenSSL 3.0.0 In-Reply-To: <1588497803.18.0.937746880221.issue40479@roundup.psfhosted.org> Message-ID: <1588498099.97.0.43390822331.issue40479@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +19190 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19878 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 05:37:07 2020 From: report at bugs.python.org (kleshni) Date: Sun, 03 May 2020 09:37:07 +0000 Subject: [issue40480] "fnmatch" exponential execution time Message-ID: <1588498627.36.0.0280402477391.issue40480@roundup.psfhosted.org> New submission from kleshni : Hello. The following code hangs: import fnmatch fnmatch.fnmatchcase("a" * 32, "*" * 16 + "b") Measurements show that its execution time rises exponentially with the number of asterisks. Bash and SQLite 3 process this glob instantly. This is because "fnmatchcase" generates a regular expression with repeated dots: (?s:.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*b)\\Z It's equivalent to: (?s:.*b)\\Z But works in exponential time. So the solution is to replace multiple asterisks with a single one, so the latter regexp is generated instead. ---------- components: Library (Lib) messages: 367963 nosy: kleshni priority: normal severity: normal status: open title: "fnmatch" exponential execution time type: performance versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 05:37:46 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 03 May 2020 09:37:46 +0000 Subject: [issue40031] IDLE fails trying to inport old idlelib file names for config In-Reply-To: <1584783754.51.0.582471420619.issue40031@roundup.psfhosted.org> Message-ID: <1588498666.02.0.256231705782.issue40031@roundup.psfhosted.org> Terry J. Reedy added the comment: Everything from AutoComplete onwards has been added somehow and must be removed. The preliminary version of 3.8.3 was released last Wednesday. When the final version is released in a week or two, I recommend upgrading and getting the untouched .def files. I am leaving this issue open to revise the comments in the file and explain that except for the 4 back compatibility entries, there must only be sections for currently existing and loadable modules. ---------- stage: test needed -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 06:07:39 2020 From: report at bugs.python.org (=?utf-8?q?Jaros=C5=82aw_Wygoda?=) Date: Sun, 03 May 2020 10:07:39 +0000 Subject: [issue40481] Add include and exclude filters to zipapp cli Message-ID: <1588500459.46.0.573895829132.issue40481@roundup.psfhosted.org> New submission from Jaros?aw Wygoda : Currently I can pass a filter function when creating archive but it's a bit cumbersome so I'd like to do it through cli. Related issue: https://bugs.python.org/issue31072 ---------- components: Library (Lib) messages: 367966 nosy: Jaros?aw Wygoda priority: normal severity: normal status: open title: Add include and exclude filters to zipapp cli type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 06:13:47 2020 From: report at bugs.python.org (=?utf-8?q?Jaros=C5=82aw_Wygoda?=) Date: Sun, 03 May 2020 10:13:47 +0000 Subject: [issue40481] Add include and exclude filters to zipapp cli In-Reply-To: <1588500459.46.0.573895829132.issue40481@roundup.psfhosted.org> Message-ID: <1588500827.1.0.794507455795.issue40481@roundup.psfhosted.org> Change by Jaros?aw Wygoda : ---------- keywords: +patch pull_requests: +19191 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19879 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 06:15:05 2020 From: report at bugs.python.org (Sviatoslav Sydorenko) Date: Sun, 03 May 2020 10:15:05 +0000 Subject: [issue20120] Percent-signs (%) in .pypirc should not be interpolated In-Reply-To: <1388825675.42.0.435893533792.issue20120@psf.upfronthosting.co.za> Message-ID: <1588500905.73.0.122918042792.issue20120@roundup.psfhosted.org> Sviatoslav Sydorenko added the comment: Not sure if it's in the scope of this issue but I thought I'd report it. I've just hit a similar issue with `setup.cfg` under Python 3.8 which is supposed to be parsed by `setuptools` but for some reason, I only see `distutils` in the trace, coming from `pip`. ``` $ python -m pip install --upgrade tox ERROR: Exception: Traceback (most recent call last): File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 186, in _main status = self.run(options, args) File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 253, in run options.use_user_site = decide_user_install( File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 604, in decide_user_install if site_packages_writable(root=root_path, isolated=isolated_mode): File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 549, in site_packages_writable test_writable_dir(d) for d in set(get_lib_location_guesses(**kwargs)) File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 543, in get_lib_location_guesses scheme = distutils_scheme('', *args, **kwargs) File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/pip/_internal/locations.py", line 109, in distutils_scheme d.parse_config_files() File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/distutils/dist.py", line 413, in parse_config_files val = parser.get(section,opt) File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/configparser.py", line 799, in get return self._interpolation.before_get(self, section, option, value, File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/configparser.py", line 395, in before_get self._interpolate_some(parser, option, L, value, section, defaults, 1) File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/configparser.py", line 442, in _interpolate_some raise InterpolationSyntaxError( configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%3Adevel\nCode of Conduct = https://docs.ansible.com/ansible/latest/community/code_of_conduct.html\nSource Code = https://github.com/ansible/pylibssh' ``` (https://github.com/ansible/pylibssh/runs/640262804?check_suite_focus=true#step:7:32) This is caused by ``` diff --git a/setup.cfg b/setup.cfg index 9318235..0455376 100644 --- a/setup.cfg +++ b/setup.cfg @@ -9,7 +9,7 @@ version = 0.0.1.dev1 url = https://github.com/ansible/pylibssh project_urls = Bug Tracker = https://github.com/ansible/pylibssh/issues - CI: Travis = https://travis-ci.com/ansible/pylibssh + CI: GitHub Workflows = https://github.com/ansible/pylibssh/actions?query=branch%3Adevel Code of Conduct = https://docs.ansible.com/ansible/latest/community/code_of_conduct.html Source Code = https://github.com/ansible/pylibssh description = Python bindings for libssh client specific to Ansible use case ``` ---------- nosy: +webknjaz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 06:26:15 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 03 May 2020 10:26:15 +0000 Subject: [issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw() In-Reply-To: <1487341428.62.0.272190755105.issue29590@psf.upfronthosting.co.za> Message-ID: <1588501575.43.0.222067740221.issue29590@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 06:52:09 2020 From: report at bugs.python.org (Christian Heimes) Date: Sun, 03 May 2020 10:52:09 +0000 Subject: [issue40482] _hashlib: register Python names as OpenSSL aliases Message-ID: <1588503129.6.0.253291975104.issue40482@roundup.psfhosted.org> New submission from Christian Heimes : Python uses valid Python identifiers for hashing algorithms while OpenSSL uses slightly different default names. For example OpenSSL uses "SHA3-256" while Python has "sha3_256". The function py_digest_by_name() in _hashopenssl.c maps from Python names to EVP_MD pointer. It's possible to simplify the lookup by registering Python's aliases with OpenSSL, e.g. EVP_add_digest_alias(SN_sha3_512, "sha3_512"). Also see https://github.com/openssl/openssl/issues/11715 ---------- assignee: christian.heimes components: Library (Lib), SSL messages: 367968 nosy: christian.heimes, gregory.p.smith priority: normal severity: normal stage: patch review status: open title: _hashlib: register Python names as OpenSSL aliases type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 06:55:47 2020 From: report at bugs.python.org (Christian Heimes) Date: Sun, 03 May 2020 10:55:47 +0000 Subject: [issue40482] _hashlib: register Python names as OpenSSL aliases In-Reply-To: <1588503129.6.0.253291975104.issue40482@roundup.psfhosted.org> Message-ID: <1588503347.5.0.0369185826248.issue40482@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +19193 pull_request: https://github.com/python/cpython/pull/19880 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 08:15:02 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sun, 03 May 2020 12:15:02 +0000 Subject: [issue40483] Implementing a verifier function to verify integrity of AST nodes Message-ID: <1588508102.78.0.391997005148.issue40483@roundup.psfhosted.org> New submission from Batuhan Taskaya : This is actually a problem that is existing for a long time. A recent example would be the discussion in the GH-19868. Implementation - It should check existence of all fields (like ast.Constant() wont verified) - It should check types of all fields against their declarations in ASDL (this is actually depending on GH-19031) (like ast.List({ast.Constant(1)}, ctx=ast.Load()) wont pass, or the example in GH-19868) After bpo-39981 resolved, I'll submit a patch. ---------- components: Library (Lib) messages: 367969 nosy: BTaskaya, pablogsal, serhiy.storchaka priority: normal severity: normal status: open title: Implementing a verifier function to verify integrity of AST nodes type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 08:15:12 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sun, 03 May 2020 12:15:12 +0000 Subject: [issue40483] Implementing a verifier function to verify integrity of AST nodes In-Reply-To: <1588508102.78.0.391997005148.issue40483@roundup.psfhosted.org> Message-ID: <1588508112.7.0.847271250672.issue40483@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- dependencies: +Default values for AST Nodes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 08:40:35 2020 From: report at bugs.python.org (hai shi) Date: Sun, 03 May 2020 12:40:35 +0000 Subject: [issue39573] [C API] Make PyObject an opaque structure in the limited C API In-Reply-To: <1581030432.16.0.48160379721.issue39573@roundup.psfhosted.org> Message-ID: <1588509635.93.0.858380982923.issue39573@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +19194 pull_request: https://github.com/python/cpython/pull/19882 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 08:55:07 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Sun, 03 May 2020 12:55:07 +0000 Subject: [issue40447] compile_file's stripdir does not accept pathlib.Path In-Reply-To: <1588227495.91.0.144745322662.issue40447@roundup.psfhosted.org> Message-ID: <1588510507.01.0.213517505897.issue40447@roundup.psfhosted.org> Change by Filipe La?ns : ---------- keywords: +patch nosy: +FFY00 nosy_count: 2.0 -> 3.0 pull_requests: +19195 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19883 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 09:49:15 2020 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 03 May 2020 13:49:15 +0000 Subject: [issue14869] imaplib erronously quotes atoms such as flags In-Reply-To: <1337594211.69.0.0102835741934.issue14869@psf.upfronthosting.co.za> Message-ID: <1588513755.55.0.871467220873.issue14869@roundup.psfhosted.org> Zackery Spytz added the comment: Python 2 is EOL. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 10:09:33 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sun, 03 May 2020 14:09:33 +0000 Subject: [issue40484] Document existing compiler flags under ast Message-ID: <1588514973.24.0.132527747949.issue40484@roundup.psfhosted.org> New submission from Batuhan Taskaya : PyCF_ALLOW_TOP_LEVEL_AWAIT, PyCF_TYPE_COMMENTS and PyCF_ONLY_AST should be documented just like CO_ flags under inspect module. ---------- assignee: docs at python components: Documentation messages: 367972 nosy: BTaskaya, docs at python priority: normal severity: normal status: open title: Document existing compiler flags under ast versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 10:00:22 2020 From: report at bugs.python.org (Marius Gedminas) Date: Sun, 03 May 2020 14:00:22 +0000 Subject: [issue14106] Distutils manifest: recursive-(include|exclude) matches suffix instead of full filename In-Reply-To: <1330094795.44.0.467789061974.issue14106@psf.upfronthosting.co.za> Message-ID: <1588514422.09.0.611168643248.issue14106@roundup.psfhosted.org> Marius Gedminas added the comment: For the record, this is still a bug in Python 3.8 distutils (and it affects global-(include|exclude) as well), but it's been fixed in setuptools, so it shouldn't affect people writing MANIFEST.in files in 2020. ---------- nosy: +mgedmin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 10:12:41 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sun, 03 May 2020 14:12:41 +0000 Subject: [issue40484] Document existing compiler flags under ast In-Reply-To: <1588514973.24.0.132527747949.issue40484@roundup.psfhosted.org> Message-ID: <1588515161.49.0.321788103587.issue40484@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch pull_requests: +19196 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19885 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 11:25:56 2020 From: report at bugs.python.org (E. Paine) Date: Sun, 03 May 2020 15:25:56 +0000 Subject: [issue40468] IDLE split "general" into two tabs In-Reply-To: <1588342210.52.0.776872841323.issue40468@roundup.psfhosted.org> Message-ID: <1588519556.54.0.509100242772.issue40468@roundup.psfhosted.org> E. Paine added the comment: Initially, I simply changed the tab position on the settings window notebook to west-north (tabs_wn.png). I didn't like that the tabs were right-sticky and looked at changing this in the following two ways: 1) Changing the tab position to the right-side (tabs_en.png), though I believe they are too easy to miss in this place. 2) Setting the tab minimum width after measuring the titles using the tkinter default font (finding the largest of these and then adding an appropriate padding - for tabs_wn_padx.png, this was 10). This meant that tabs behaved as east-west sticky, and text was centred. I couldn't find how to change this to left-justified, though it is possible this can be done through a ttk layout. Are there any other ideas? If we do change the tab position, I think it would also be helpful to increase the font size to make them more obvious. On a separate point, would it be better for me to upload future screenshots to an image hosting site and just include the link in the descriptor message? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 11:26:04 2020 From: report at bugs.python.org (E. Paine) Date: Sun, 03 May 2020 15:26:04 +0000 Subject: [issue40468] IDLE split "general" into two tabs In-Reply-To: <1588342210.52.0.776872841323.issue40468@roundup.psfhosted.org> Message-ID: <1588519564.22.0.42144887569.issue40468@roundup.psfhosted.org> Change by E. Paine : Added file: https://bugs.python.org/file49117/tabs_en.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 11:26:10 2020 From: report at bugs.python.org (E. Paine) Date: Sun, 03 May 2020 15:26:10 +0000 Subject: [issue40468] IDLE split "general" into two tabs In-Reply-To: <1588342210.52.0.776872841323.issue40468@roundup.psfhosted.org> Message-ID: <1588519570.94.0.414990257492.issue40468@roundup.psfhosted.org> Change by E. Paine : Added file: https://bugs.python.org/file49118/tabs_wn.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 11:26:22 2020 From: report at bugs.python.org (E. Paine) Date: Sun, 03 May 2020 15:26:22 +0000 Subject: [issue40468] IDLE split "general" into two tabs In-Reply-To: <1588342210.52.0.776872841323.issue40468@roundup.psfhosted.org> Message-ID: <1588519582.21.0.682704288524.issue40468@roundup.psfhosted.org> Change by E. Paine : Added file: https://bugs.python.org/file49119/tabs_wn_padx.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 11:29:33 2020 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Sun, 03 May 2020 15:29:33 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588519773.4.0.728004122295.issue40334@roundup.psfhosted.org> Miro Hron?ok added the comment: We also get: File "/usr/lib/python3.9/site-packages/dnf/comps.py", line 111 return'.'.join(lcl) ^ SyntaxError: invalid string prefix ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 11:33:27 2020 From: report at bugs.python.org (Faidon Liambotis) Date: Sun, 03 May 2020 15:33:27 +0000 Subject: [issue40485] Provide an abstraction for a select-able Event Message-ID: <1588520007.12.0.424273214975.issue40485@roundup.psfhosted.org> New submission from Faidon Liambotis : In certain codebases, it's useful to be able to wait for input from one or more file descriptors (e.g. a socket), while at the same time waiting for an event triggered by another thread, or perhaps multiprocessing process. To wait for one or more file descriptors to get ready, the select module can be used. However, neither threading.Event() nor multiprocessing.Event() are select-able, i.e. they provide no fileno() method. The standard way one can implement this on Unix is with os.pipe(), but it can be tricky (forgetting to use non-blocking I/O etc.). It is also limited to a pair of processes at a time. On Linux systems from the past decade, one can also implement this much more efficiently using the eventfd() system calls. I think similar functionality exists in other Unixes with kqueue etc. It'd be great if stdlib provided an abstraction over this mechanism. In fact, multiprocessing.Event() itself could probably be a thin abstraction over eventfd() on Linux? Perhaps even multiprocessing.Semaphore with EFD_SEMAPHORE, although I admit I'm less familiar with how all that works. (Select-able Queues would be even neater, but that's a story for a different issue :) ---------- components: Extension Modules messages: 367975 nosy: paravoid priority: normal severity: normal status: open title: Provide an abstraction for a select-able Event type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 11:37:11 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 03 May 2020 15:37:11 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588520231.93.0.764091258852.issue40334@roundup.psfhosted.org> Lysandros Nikolaou added the comment: This isn't related to this issue, but to bpo-40246. Please report it there as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 11:38:15 2020 From: report at bugs.python.org (E. Paine) Date: Sun, 03 May 2020 15:38:15 +0000 Subject: [issue40468] IDLE split "general" into two tabs In-Reply-To: <1588342210.52.0.776872841323.issue40468@roundup.psfhosted.org> Message-ID: <1588520295.06.0.677964593227.issue40468@roundup.psfhosted.org> Change by E. Paine : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 11:38:40 2020 From: report at bugs.python.org (E. Paine) Date: Sun, 03 May 2020 15:38:40 +0000 Subject: [issue40452] IDLE preserve clipboard on closure (Windows) In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1588520320.64.0.300149619985.issue40452@roundup.psfhosted.org> Change by E. Paine : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 11:47:35 2020 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Sun, 03 May 2020 15:47:35 +0000 Subject: [issue40246] Different error messages for same error - invalid string prefixes In-Reply-To: <1586541958.33.0.891000303304.issue40246@roundup.psfhosted.org> Message-ID: <1588520855.09.0.56108354342.issue40246@roundup.psfhosted.org> Miro Hron?ok added the comment: We also get: File "/usr/lib/python3.9/site-packages/dnf/comps.py", line 111 return'.'.join(lcl) ^ SyntaxError: invalid string prefix ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 11:48:15 2020 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Sun, 03 May 2020 15:48:15 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588520895.31.0.654111119383.issue40334@roundup.psfhosted.org> Miro Hron?ok added the comment: Ah, sorry, I got it mixed up. Reported there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 11:53:30 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 03 May 2020 15:53:30 +0000 Subject: [issue40482] _hashlib: register Python names as OpenSSL aliases In-Reply-To: <1588503347.55.0.546339818822.issue40482@roundup.psfhosted.org> Message-ID: Gregory P. Smith added the comment: Adding aliases in openssl is presumably process global right? Is that wise given it'd mean other openssl using c/c++ code in the process would now see the same aliases and could behave differently when used with python vs without? On Sun, May 3, 2020, 3:55 AM Christian Heimes wrote: > > Change by Christian Heimes : > > > ---------- > keywords: +patch > pull_requests: +19193 > pull_request: https://github.com/python/cpython/pull/19880 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 12:10:24 2020 From: report at bugs.python.org (Christian Heimes) Date: Sun, 03 May 2020 16:10:24 +0000 Subject: [issue40482] _hashlib: register Python names as OpenSSL aliases In-Reply-To: <1588503129.6.0.253291975104.issue40482@roundup.psfhosted.org> Message-ID: <1588522224.69.0.894132532669.issue40482@roundup.psfhosted.org> Christian Heimes added the comment: Yes, it changes the global state of libcrypto. I consider the risk to other application slim to non-existing. Two cases are problematic: 1) an application relies on the fact that EVP_get_digestbyname("sha3_256") fails. 2) an application also uses EVP_add_digest_alias() but registers a different digest algorithm. Both cases seem highly unlikely to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 12:18:20 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Sun, 03 May 2020 16:18:20 +0000 Subject: [issue40485] Provide an abstraction for a select-able Event In-Reply-To: <1588520007.12.0.424273214975.issue40485@roundup.psfhosted.org> Message-ID: <1588522700.82.0.915263651176.issue40485@roundup.psfhosted.org> Change by Filipe La?ns : ---------- nosy: +FFY00 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 12:36:28 2020 From: report at bugs.python.org (Facundo Batista) Date: Sun, 03 May 2020 16:36:28 +0000 Subject: [issue40486] pathlib's iterdir doesn't expecify what happens if directory content change Message-ID: <1588523788.71.0.846056751312.issue40486@roundup.psfhosted.org> New submission from Facundo Batista : Documentation for Path.iterdir ( https://docs.python.org/3/library/pathlib.html#pathlib.Path.iterdir ) doesn't specify what happens when the directory change. This is important, as the function does NOT return a list (which would imply that a "snapshot" of the directory will be returned). Also, it's not only relevant what would happen if somebody else changes the directory after the iteration is started (will that change be reflected?) but also if it's ALLOWED for the same code that iterates the dir content to change it (or problems would arise, like when changing a dictionary while being iterated). ---------- assignee: docs at python components: Documentation messages: 367981 nosy: docs at python, facundobatista priority: normal severity: normal status: open title: pathlib's iterdir doesn't expecify what happens if directory content change versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 12:42:59 2020 From: report at bugs.python.org (kleshni) Date: Sun, 03 May 2020 16:42:59 +0000 Subject: [issue40480] "fnmatch" exponential execution time In-Reply-To: <1588498627.36.0.0280402477391.issue40480@roundup.psfhosted.org> Message-ID: <1588524179.93.0.716806047944.issue40480@roundup.psfhosted.org> kleshni added the comment: >So the solution is to replace multiple asterisks with a single one No, this is not a solution. This glob also hangs: fnmatch.fnmatchcase("a" * 32, "*a" * 16 + "b") And again, Bash and SQLite 3 work perfectly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 12:55:29 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 03 May 2020 16:55:29 +0000 Subject: [issue40486] pathlib's iterdir doesn't specify what happens if directory content change In-Reply-To: <1588523788.71.0.846056751312.issue40486@roundup.psfhosted.org> Message-ID: <1588524929.49.0.423425662142.issue40486@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +pitrou title: pathlib's iterdir doesn't expecify what happens if directory content change -> pathlib's iterdir doesn't specify what happens if directory content change _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 13:06:41 2020 From: report at bugs.python.org (Tim Peters) Date: Sun, 03 May 2020 17:06:41 +0000 Subject: [issue40480] "fnmatch" exponential execution time In-Reply-To: <1588498627.36.0.0280402477391.issue40480@roundup.psfhosted.org> Message-ID: <1588525601.61.0.587377234013.issue40480@roundup.psfhosted.org> Tim Peters added the comment: Note that doctest has the same kind of potential problem with matching ellipsis (0 or more characters) in expected output blocks. Backtracking isn't needed at all to resolve patterns of that limited kind, but I don't think Python's re module supports enough gimmicks to disable backtracking. So instead doctest has its own _ellipsis_match() function to do it in worst-case linear time. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 13:10:48 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Sun, 03 May 2020 17:10:48 +0000 Subject: [issue38715] Regression in compileall ddir parameter when recursing In-Reply-To: <1573024333.47.0.536430294956.issue38715@roundup.psfhosted.org> Message-ID: <1588525848.84.0.632357904219.issue38715@roundup.psfhosted.org> Filipe La?ns added the comment: Can this be closed? I can't reproduce. $ python -c 'from library.a.a import go; go()' Traceback (most recent call last): File "", line 1, in File "/usr/lib/a/a/__init__.py", line 2, in go raise AssertionError('dummy') AssertionError: dummy $ python -c 'from library.a import go; go()' Traceback (most recent call last): File "", line 1, in File "/usr/lib/a/__init__.py", line 2, in go raise AssertionError('dummy') AssertionError: dummy $ python -c 'from library import go; go()' Traceback (most recent call last): File "", line 1, in File "/usr/lib/__init__.py", line 2, in go raise AssertionError('dummy') AssertionError: dummy ---------- nosy: +FFY00 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 13:11:59 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 03 May 2020 17:11:59 +0000 Subject: [issue38870] Expose ast.unparse in the ast module In-Reply-To: <1574289269.61.0.90605518345.issue38870@roundup.psfhosted.org> Message-ID: <1588525919.43.0.994014650924.issue38870@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 493bf1cc316b0b5bd90779ecd1132878c881669e by Batuhan Taskaya in branch 'master': bpo-38870: Don't start generated output with newlines in ast.unparse (GH-19636) https://github.com/python/cpython/commit/493bf1cc316b0b5bd90779ecd1132878c881669e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 13:15:40 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Sun, 03 May 2020 17:15:40 +0000 Subject: [issue38715] Regression in compileall ddir parameter when recursing In-Reply-To: <1573024333.47.0.536430294956.issue38715@roundup.psfhosted.org> Message-ID: <1588526140.13.0.409353446997.issue38715@roundup.psfhosted.org> Filipe La?ns added the comment: Nevermind! I ran it with my system python binary, which is patched to against this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 13:25:39 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 03 May 2020 17:25:39 +0000 Subject: [issue40486] pathlib's iterdir doesn't specify what happens if directory content change In-Reply-To: <1588523788.71.0.846056751312.issue40486@roundup.psfhosted.org> Message-ID: <1588526739.97.0.105892789622.issue40486@roundup.psfhosted.org> Serhiy Storchaka added the comment: There is no principal difference between Path.iterdir() and os.listdir(). Somebody can change the directory during iteration. The only difference is that in the latter case you iterate in C instead of Python, so it is less easy to catch a race condition. What would happen is OS and FS specific. Depending on OS and FS it may be even possible to get the same name several times when somebody quickly creates and removes entities in the directory. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 13:36:41 2020 From: report at bugs.python.org (John Smith) Date: Sun, 03 May 2020 17:36:41 +0000 Subject: [issue40487] Unexpected exception handler behavior in Jupyter when returning task objects created with create_task Message-ID: <1588527401.93.0.870743970124.issue40487@roundup.psfhosted.org> New submission from John Smith : Hi, I'm running the following code in a Jupyter notebook (so there is already a running loop). `run_coro` (non-async function) adds given coroutines to the loop with `loop.create_task`. I want to return the task objects created by `loop.create_task` to check for result later in the code. Adding the task objects to a list and returning the list has the exception handler behave differently than expected. ``` async def test1(): ''' Enumerate numbers from 1 to 9''' n = 0 while (n := n + 1) < 10: print(f'Test 1: {n}') await asyncio.sleep(0.3) return 'Test 1: DONE' async def test2(): ''' Enumerate numbers starting 1, raising exception at 5''' n = 0 while (n := n + 1) < 10: if n == 5: raise ValueError('Test Exception') print(f'Test 2: {n}') await asyncio.sleep(0.2) def handle_exception(loop, context): if context['exception']: print(f'Caught exception <{context["exception"]}> while executing {context["future"]}') def run_coro(loop, coros): loop.set_exception_handler(handle_exception) tasks = deque() for coro in coros: task = loop.create_task(coro) #tasks.append(task) # ^--- if I uncomment, exc handler behaves strangely return tasks # ^-- BUT if I remove the "return" statement, it behaves correctly again loop = asyncio.get_running_loop() # retrieves Jupyter's running loop tasks = run_coro(loop, [test1(), test2()]) ``` Normal (expected output): ``` Test 1: 1 Test 2: 1 Test 2: 2 Test 1: 2 Test 2: 3 Test 1: 3 Test 2: 4 Caught exception while executing :10> exception=ValueError('Test Exception')> Test 1: 4 Test 1: 5 Test 1: 6 Test 1: 7 Test 1: 8 Test 1: 9 ``` If I uncomment `tasks.append(task)` and return the list of task objects, output is: ``` Test 1: 1 Test 2: 1 Test 2: 2 Test 1: 2 Test 2: 3 Test 1: 3 Test 2: 4 Test 1: 4 Test 1: 5 Test 1: 6 Test 1: 7 Test 1: 8 Test 1: 9 ``` If I re-run the code (re-run the Jupyter cell) the exception message would appear at the beginning of the output (as if it had been waiting in a queue somewhere), so for some reason it seems to get eaten-up somewhere. The code works normally again if I remove the return statement from the `run_coro` function. Is this expected behaviour? Am I missing something? ---------- components: asyncio messages: 367988 nosy: asvetlov, jeanmonet, yselivanov priority: normal severity: normal status: open title: Unexpected exception handler behavior in Jupyter when returning task objects created with create_task versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 13:37:33 2020 From: report at bugs.python.org (John Smith) Date: Sun, 03 May 2020 17:37:33 +0000 Subject: [issue40487] Unexpected exception handler behavior in Jupyter when returning task objects created with create_task In-Reply-To: <1588527401.93.0.870743970124.issue40487@roundup.psfhosted.org> Message-ID: <1588527453.18.0.298506008492.issue40487@roundup.psfhosted.org> Change by John Smith : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 14:12:21 2020 From: report at bugs.python.org (John Smith) Date: Sun, 03 May 2020 18:12:21 +0000 Subject: [issue40487] Unexpected exception handler behavior in Jupyter when returning task objects created with create_task In-Reply-To: <1588527401.93.0.870743970124.issue40487@roundup.psfhosted.org> Message-ID: <1588529541.83.0.627288387689.issue40487@roundup.psfhosted.org> John Smith added the comment: Additional note: In a almost identical set-up, the simple fact of assigning the task object to a variable: `task = loop.create_task(coroutine())` instead of just calling: `loop.create_task(coroutine())` ...results in the same unexpected behavior in exception handling, without even attempting to return the task object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 15:54:08 2020 From: report at bugs.python.org (=?utf-8?b?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?=) Date: Sun, 03 May 2020 19:54:08 +0000 Subject: [issue40488] setup.py shall search by default for libffi.so in /usr/local/lib64 Message-ID: <1588535648.17.0.424777794849.issue40488@roundup.psfhosted.org> New submission from ????? ???????? : With libffi 3.3 doing `./configure && make install` puts libffi.so in /usr/local/lib64/ . This can be found by pkgconfig. But setup.py neither uses pkgconfig, nor checks by default /usr/local/lib64 for libffi ---------- components: Build messages: 367990 nosy: dilyan.palauzov priority: normal severity: normal status: open title: setup.py shall search by default for libffi.so in /usr/local/lib64 versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 16:03:58 2020 From: report at bugs.python.org (Ivan Babrou) Date: Sun, 03 May 2020 20:03:58 +0000 Subject: [issue39643] Python calls newfstatat for "" in inspect In-Reply-To: <1581831702.4.0.180608885783.issue39643@roundup.psfhosted.org> Message-ID: <1588536238.31.0.919787576241.issue39643@roundup.psfhosted.org> Ivan Babrou added the comment: The issue in Salt should be fixed by the following PR: * https://github.com/saltstack/salt/pull/57062 Still, I think Python itself could do better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 16:21:23 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 03 May 2020 20:21:23 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588537283.03.0.0781048107938.issue40334@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +19197 pull_request: https://github.com/python/cpython/pull/19887 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 16:26:16 2020 From: report at bugs.python.org (George King) Date: Sun, 03 May 2020 20:26:16 +0000 Subject: [issue27035] Cannot set exit code in atexit callback In-Reply-To: <1463385428.15.0.762354704325.issue27035@psf.upfronthosting.co.za> Message-ID: <1588537576.13.0.196936049732.issue27035@roundup.psfhosted.org> George King added the comment: I think we should change the documentation to expand the parenthetical " (unless SystemExit is raised)" to a complete explanation of that special case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 16:30:32 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 03 May 2020 20:30:32 +0000 Subject: [issue40426] Unable to use lowercase hexadecimal digits for percent encoding In-Reply-To: <1588097651.68.0.271507304283.issue40426@roundup.psfhosted.org> Message-ID: <1588537832.89.0.908931124231.issue40426@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- nosy: +lys.nikolaou nosy_count: 3.0 -> 4.0 pull_requests: +19198 pull_request: https://github.com/python/cpython/pull/19888 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 16:30:50 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 03 May 2020 20:30:50 +0000 Subject: [issue40246] Different error messages for same error - invalid string prefixes In-Reply-To: <1586541958.33.0.891000303304.issue40246@roundup.psfhosted.org> Message-ID: <1588537850.0.0.772295696142.issue40246@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +19199 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/19888 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 16:31:28 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 03 May 2020 20:31:28 +0000 Subject: [issue40426] Unable to use lowercase hexadecimal digits for percent encoding In-Reply-To: <1588097651.68.0.271507304283.issue40426@roundup.psfhosted.org> Message-ID: <1588537888.6.0.422715575396.issue40426@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: -19198 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 16:42:18 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 03 May 2020 20:42:18 +0000 Subject: [issue40426] Unable to use lowercase hexadecimal digits for percent encoding In-Reply-To: <1588097651.68.0.271507304283.issue40426@roundup.psfhosted.org> Message-ID: <1588538538.98.0.155563242299.issue40426@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +19200 pull_request: https://github.com/python/cpython/pull/19888 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 16:45:40 2020 From: report at bugs.python.org (Glyph Lefkowitz) Date: Sun, 03 May 2020 20:45:40 +0000 Subject: [issue27035] Cannot set exit code in atexit callback In-Reply-To: <1463385428.15.0.762354704325.issue27035@psf.upfronthosting.co.za> Message-ID: <1588538740.77.0.160282925207.issue27035@roundup.psfhosted.org> Glyph Lefkowitz added the comment: gwk, I absolutely agree; at this point that's the main thing I'm looking for. But it would be great if whoever adds that documentation could include the rationale for this behavior too. It still seems "obvious" to me that it should change the exit code, and every time I bump into this behavior I am freshly confused and have to re-read these bugs. If I had a better intuition for what the error-handling *model* of atexit was, I think it might stick to memory a bit better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 16:58:03 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 03 May 2020 20:58:03 +0000 Subject: [issue40426] Unable to use lowercase hexadecimal digits for percent encoding In-Reply-To: <1588097651.68.0.271507304283.issue40426@roundup.psfhosted.org> Message-ID: <1588539483.3.0.0871727307936.issue40426@roundup.psfhosted.org> Lysandros Nikolaou added the comment: I opened a pull request with an invalid bpo issue number so I unlinked it. Then a completely unrelated PR was is shown as linked by me, but I didn't do that. Unlinking that as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 16:58:22 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 03 May 2020 20:58:22 +0000 Subject: [issue40426] Unable to use lowercase hexadecimal digits for percent encoding In-Reply-To: <1588097651.68.0.271507304283.issue40426@roundup.psfhosted.org> Message-ID: <1588539502.39.0.851102011852.issue40426@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: -19200 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 17:11:16 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 03 May 2020 21:11:16 +0000 Subject: [issue40426] Unable to use lowercase hexadecimal digits for percent encoding In-Reply-To: <1588097651.68.0.271507304283.issue40426@roundup.psfhosted.org> Message-ID: <1588540276.89.0.985363440483.issue40426@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +19201 pull_request: https://github.com/python/cpython/pull/19888 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 17:14:02 2020 From: report at bugs.python.org (Yusuf Mumtaz) Date: Sun, 03 May 2020 21:14:02 +0000 Subject: [issue40256] Python 3.8 Not Launching on Bootcamp Windows 10. In-Reply-To: <1586628271.16.0.0390251857061.issue40256@roundup.psfhosted.org> Message-ID: <1588540442.66.0.894535163402.issue40256@roundup.psfhosted.org> Yusuf Mumtaz added the comment: Hello, I have just updated to the new version of python 3.8.3. The problem still occurs however, now an interactive black window does appear when an attempt to open any Python file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 17:14:33 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 03 May 2020 21:14:33 +0000 Subject: [issue40426] Unable to use lowercase hexadecimal digits for percent encoding In-Reply-To: <1588097651.68.0.271507304283.issue40426@roundup.psfhosted.org> Message-ID: <1588540473.22.0.931053640814.issue40426@roundup.psfhosted.org> Lysandros Nikolaou added the comment: PRs keep getting linked to this issue under my name, without me doing anything. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 17:19:28 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 03 May 2020 21:19:28 +0000 Subject: [issue40426] Unable to use lowercase hexadecimal digits for percent encoding In-Reply-To: <1588097651.68.0.271507304283.issue40426@roundup.psfhosted.org> Message-ID: <1588540768.07.0.238975124663.issue40426@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: -19201 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 17:41:29 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 03 May 2020 21:41:29 +0000 Subject: [issue40489] INCREF/DECREFs around the rich comparison needs tests Message-ID: <1588542089.41.0.502312186848.issue40489@roundup.psfhosted.org> New submission from Raymond Hettinger : In Objects/dictobject.c, if I remove the INCREF/DECREF pair around PyObject_RichCompareBool(), all the tests still pass: - Py_INCREF(startkey); cmp = PyObject_RichCompareBool(startkey, key, Py_EQ); - Py_DECREF(startkey); It would be nice to have tests demonstrating why it is necessary. IIRC the reason is that an object could have a custom comparison that clears the enclosing container and frees the element during the comparison. Also, it would be nice if PyObject_RichCompareBool() could be redesigned to not fail if a borrowed reference gets deallocated while the function is running. The incref and decref occur on a hot path, and it is unfortunate that they cause extra writes to objects scattered all over memory, likely causing a lot of cache misses in real programs. ---------- assignee: serhiy.storchaka components: Interpreter Core messages: 367997 nosy: rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: INCREF/DECREFs around the rich comparison needs tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 18:10:43 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 03 May 2020 22:10:43 +0000 Subject: [issue40426] Unable to use lowercase hexadecimal digits for percent encoding In-Reply-To: <1588097651.68.0.271507304283.issue40426@roundup.psfhosted.org> Message-ID: <1588543843.7.0.19430294632.issue40426@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I think that may be happening because you are still refering to this issue in the title of https://github.com/python/cpython/pull/19888? Not sure how the linkage is made, but if this keeps happening you may open an issue in the core-workflow repo in the Python org. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 18:11:43 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 03 May 2020 22:11:43 +0000 Subject: [issue40426] Unable to use lowercase hexadecimal digits for percent encoding In-Reply-To: <1588097651.68.0.271507304283.issue40426@roundup.psfhosted.org> Message-ID: <1588543903.32.0.564320322339.issue40426@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: In the title -> in the description ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 19:18:29 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 03 May 2020 23:18:29 +0000 Subject: [issue40426] Unable to use lowercase hexadecimal digits for percent encoding In-Reply-To: <1588097651.68.0.271507304283.issue40426@roundup.psfhosted.org> Message-ID: <1588547909.3.0.109207585053.issue40426@roundup.psfhosted.org> Lysandros Nikolaou added the comment: After Serhiy unlinked the linked PR, it did not happen again, so it may have been an one-off hiccup. I updated the description GH-19888 nevertheless. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 19:50:55 2020 From: report at bugs.python.org (Furkan Onder) Date: Sun, 03 May 2020 23:50:55 +0000 Subject: [issue13097] ctypes: segfault with large number of callback arguments In-Reply-To: <1317700637.71.0.186696346618.issue13097@psf.upfronthosting.co.za> Message-ID: <1588549855.3.0.384150428661.issue13097@roundup.psfhosted.org> Furkan Onder added the comment: The issue continues in python 3.8.2. ---------- nosy: +furkanonder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 20:00:38 2020 From: report at bugs.python.org (Tim Peters) Date: Mon, 04 May 2020 00:00:38 +0000 Subject: [issue40480] "fnmatch" exponential execution time In-Reply-To: <1588498627.36.0.0280402477391.issue40480@roundup.psfhosted.org> Message-ID: <1588550438.45.0.0121375131274.issue40480@roundup.psfhosted.org> Tim Peters added the comment: "The trick" with this kind of pattern is that a `*` should consume as little as possible to allow the next fixed portion to match. Apply that at every stage, and it succeeds or it doesn't. Backtracking can't change that outcome. For, e.g., the shell pattern: a*bc*d* a regexp to do this without backtracking would be like this, IF Python's re engine supported "atomic groups" (but it doesn't): a(?>.*?bc)(?>.*?d).*\Z The same effect can be gotten in a more convoluted way, via positive lookahead assertions and backreferencing (which Python's re engine does support): a(?=(.*?bc))\1(?=(.*?d))\2.*\Z Assertions are "one and done": if the overall match fails, assertions don't try alternatives. So that's _a_ way to proceed. I'm unclear on that it's worth it, though. Stuff like "*a*a*a*a*a*a*" is just hard to swallow as a shell pattern that would occur in real life. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 20:03:31 2020 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 04 May 2020 00:03:31 +0000 Subject: [issue40487] Unexpected exception handler behavior in Jupyter when returning task objects created with create_task In-Reply-To: <1588527401.93.0.870743970124.issue40487@roundup.psfhosted.org> Message-ID: <1588550611.16.0.611685731118.issue40487@roundup.psfhosted.org> Kyle Stanley added the comment: John Smith wrote: > The code works normally again if I remove the return statement from the `run_coro` function. I am a bit surprised that the code works as intended simply by removing the return statement. Perhaps Yury or Andrew can clarify on that point. >From looking at the code above, the main issue seems to be that the tasks are not awaited or cancelled and cleaned up at any point. When creating a task without ever awaiting it, there's no guarantee that it will be completed within the duration of the event loop. This is handled for the user when using asyncio.run() by cancelling the tasks and propagating any exceptions during event loop finalization, but should be done manually or by the event loop when not using it. For an example, see _cancel_all_tasks() in https://github.com/python/cpython/blob/d699d5e6178adca785a8701c32daf5e18fad0bf1/Lib/asyncio/runners.py#L54. So, my best guess as to what's happening is that the tasks are still in progress while the event loop is finalizing, and the exception handler isn't called. But, I can't say that for sure without knowing the implementation of the Jupyter event loop. For now, my recommended solution would be to include something like the above _cancel_all_tasks() or simply await your tasks at the end to ensure they are completed before the event loop is finalized. Alternatively, Jupyter could include something like that in their event loop finalization process, so that users don't have to include it on their own when using asyncio. I would also consider using asyncio.run(), but I'm not certain if it works correctly in a Jupyter notebook. I'm aware that it's not always a viable option when it is desired to use an existing event loop instead of creating a separate one; that's why I'm not explicitly recommending it for this situation. ---------- nosy: +aeros _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 20:20:12 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 04 May 2020 00:20:12 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588551612.94.0.524234542372.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 7f06af684a1882fdb19d20650825948b1d7996e5 by Lysandros Nikolaou in branch 'master': bpo-40334: Set error_indicator in _PyPegen_raise_error (GH-19887) https://github.com/python/cpython/commit/7f06af684a1882fdb19d20650825948b1d7996e5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 21:36:16 2020 From: report at bugs.python.org (anthony shaw) Date: Mon, 04 May 2020 01:36:16 +0000 Subject: [issue40490] peg_generator module has unused imports Message-ID: <1588556176.57.0.185247494944.issue40490@roundup.psfhosted.org> New submission from anthony shaw : the tools/peg_generator package contains a number of unused imports ---------- components: Interpreter Core messages: 368005 nosy: anthonypjshaw, pablogsal priority: normal severity: normal stage: needs patch status: open title: peg_generator module has unused imports type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 21:37:26 2020 From: report at bugs.python.org (anthony shaw) Date: Mon, 04 May 2020 01:37:26 +0000 Subject: [issue40490] peg_generator module has unused imports In-Reply-To: <1588556176.57.0.185247494944.issue40490@roundup.psfhosted.org> Message-ID: <1588556246.88.0.241152058961.issue40490@roundup.psfhosted.org> Change by anthony shaw : ---------- keywords: +patch pull_requests: +19202 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/19891 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 22:03:24 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 04 May 2020 02:03:24 +0000 Subject: [issue40490] peg_generator module has unused imports In-Reply-To: <1588556176.57.0.185247494944.issue40490@roundup.psfhosted.org> Message-ID: <1588557804.44.0.0228414161692.issue40490@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 Sun May 3 22:58:55 2020 From: report at bugs.python.org (hai shi) Date: Mon, 04 May 2020 02:58:55 +0000 Subject: [issue40135] multiprocessing: test_shared_memory_across_processes() cannot be run twice in parallel In-Reply-To: <1585747098.48.0.62220441008.issue40135@roundup.psfhosted.org> Message-ID: <1588561135.71.0.946709608062.issue40135@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch nosy: +shihai1991 nosy_count: 1.0 -> 2.0 pull_requests: +19203 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19892 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 23:06:24 2020 From: report at bugs.python.org (Shantanu) Date: Mon, 04 May 2020 03:06:24 +0000 Subject: [issue40491] Typo in SyntaxError produced by pegen for numeric literals Message-ID: <1588561584.15.0.715391883465.issue40491@roundup.psfhosted.org> New submission from Shantanu : ``` ~ ? python3.9 Python 3.9.0a6+ (heads/master:c95e691, May 3 2020, 19:57:46) [Clang 11.0.0 (clang-1100.0.33.17)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import ast >>> ast.parse("1_2", feature_version=(3, 5)) Traceback (most recent call last): File "", line 1, in File "/Users/shantanu/.pyenv/versions/3.9-dev/lib/python3.9/ast.py", line 50, in parse return compile(source, filename, mode, flags, File "", line 1 1_2 ^ SyntaxError: Underscores in numeric literals are only supportedin Python 3.6 and greater ``` ---------- messages: 368006 nosy: hauntsaninja priority: normal severity: normal status: open title: Typo in SyntaxError produced by pegen for numeric literals _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 23:07:28 2020 From: report at bugs.python.org (Shantanu) Date: Mon, 04 May 2020 03:07:28 +0000 Subject: [issue40491] Typo in SyntaxError produced by pegen for numeric literals In-Reply-To: <1588561584.15.0.715391883465.issue40491@roundup.psfhosted.org> Message-ID: <1588561648.82.0.540840507184.issue40491@roundup.psfhosted.org> Change by Shantanu : ---------- keywords: +patch pull_requests: +19204 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19893 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 23:14:49 2020 From: report at bugs.python.org (hai shi) Date: Mon, 04 May 2020 03:14:49 +0000 Subject: [issue40135] multiprocessing: test_shared_memory_across_processes() cannot be run twice in parallel In-Reply-To: <1585747098.48.0.62220441008.issue40135@roundup.psfhosted.org> Message-ID: <1588562089.62.0.807503892472.issue40135@roundup.psfhosted.org> hai shi added the comment: The easy way to fix this test case is that don't define the shared memory block's name. `test_shared_memory_basics` has tested against the shared memory block's name, so canceling the shared memory block'name has no side-effect. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 3 23:36:27 2020 From: report at bugs.python.org (Anthony Sottile) Date: Mon, 04 May 2020 03:36:27 +0000 Subject: [issue40492] -m cProfile -o f.pstats with a script that does chdir() writes to the changed directory and not `.` Message-ID: <1588563387.24.0.675526674384.issue40492@roundup.psfhosted.org> New submission from Anthony Sottile : just spent quite a bit of time debugging this, here's a minimal example: ```bash # rm -rf a (if you want to reset) cd /tmp mkdir -p a/b echo 'import os; os.chdir("..")' > a/b/c.py cd a/b python3 -m cProfile -o log.pstats c.py ls -al ls -al .. ``` example output: ```console $ cd /tmp $ mkdir -p a/b $ echo 'import os; os.chdir("..")' > a/b/c.py $ cd a/b $ python3 -m cProfile -o log.pstats c.py $ ls -al total 12 drwxr-xr-x 2 asottile asottile 4096 May 3 20:35 . drwxr-xr-x 3 asottile asottile 4096 May 3 20:35 .. -rw-r--r-- 1 asottile asottile 26 May 3 20:35 c.py $ ls -al .. total 16 drwxr-xr-x 3 asottile asottile 4096 May 3 20:35 . drwxrwxrwt 28 root root 4096 May 3 20:35 .. drwxr-xr-x 2 asottile asottile 4096 May 3 20:35 b -rw-r--r-- 1 asottile asottile 395 May 3 20:35 log.pstats ``` happy to work on a patch if this seems like a good idea to fix ---------- components: Library (Lib) messages: 368008 nosy: Anthony Sottile priority: normal severity: normal status: open title: -m cProfile -o f.pstats with a script that does chdir() writes to the changed directory and not `.` type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 00:21:40 2020 From: report at bugs.python.org (Shantanu) Date: Mon, 04 May 2020 04:21:40 +0000 Subject: [issue40493] Pegen can't parse some function type comments Message-ID: <1588566100.71.0.917063092257.issue40493@roundup.psfhosted.org> New submission from Shantanu : Currently fails if we don't have any arguments before *args and **kwargs ``` ~ ? python3.9 Python 3.9.0a6+ (heads/master:c95e691, May 3 2020, 19:57:46) [Clang 11.0.0 (clang-1100.0.33.17)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import ast; ast.parse("(*int) -> None", mode="func_type", type_comments=True) Traceback (most recent call last): File "", line 1, in File "/Users/shantanu/.pyenv/versions/3.9-dev/lib/python3.9/ast.py", line 50, in parse return compile(source, filename, mode, flags, File "", line 1 (*int) -> None ^ SyntaxError: invalid syntax ``` ---------- messages: 368009 nosy: hauntsaninja priority: normal severity: normal status: open title: Pegen can't parse some function type comments _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 00:23:08 2020 From: report at bugs.python.org (Shantanu) Date: Mon, 04 May 2020 04:23:08 +0000 Subject: [issue40493] Pegen can't parse some function type comments In-Reply-To: <1588566100.71.0.917063092257.issue40493@roundup.psfhosted.org> Message-ID: <1588566188.31.0.0803781942271.issue40493@roundup.psfhosted.org> Change by Shantanu : ---------- keywords: +patch pull_requests: +19205 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19894 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 01:08:21 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 04 May 2020 05:08:21 +0000 Subject: [issue40493] Pegen can't parse some function type comments In-Reply-To: <1588566100.71.0.917063092257.issue40493@roundup.psfhosted.org> Message-ID: <1588568901.14.0.0764806250303.issue40493@roundup.psfhosted.org> miss-islington added the comment: New changeset 603d3546264149f323edb7952b60075fb6bc4dc2 by Shantanu in branch 'master': bpo-40493: fix function type comment parsing (GH-19894) https://github.com/python/cpython/commit/603d3546264149f323edb7952b60075fb6bc4dc2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 01:09:59 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 04 May 2020 05:09:59 +0000 Subject: [issue40493] Pegen can't parse some function type comments In-Reply-To: <1588566100.71.0.917063092257.issue40493@roundup.psfhosted.org> Message-ID: <1588568999.57.0.195859430045.issue40493@roundup.psfhosted.org> Change by Guido van Rossum : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 01:40:30 2020 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 04 May 2020 05:40:30 +0000 Subject: [issue40454] DEBUG kw to asyncio.run overrides DEBUG mode set elsewhere In-Reply-To: <1588277169.66.0.186559339191.issue40454@roundup.psfhosted.org> Message-ID: <1588570830.54.0.889082492988.issue40454@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 3.0 -> 4.0 pull_requests: +19206 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19895 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 02:49:11 2020 From: report at bugs.python.org (Petter S) Date: Mon, 04 May 2020 06:49:11 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1588574951.86.0.420644570658.issue35907@roundup.psfhosted.org> Petter S added the comment: We should whitelist the protocols. The current solution with `getattr` is really fragile. For example, this crashes with a `TypeError`: `URLopener().open("unknown_proxy://test")` ---------- nosy: +Petter S _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 02:54:34 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 04 May 2020 06:54:34 +0000 Subject: [issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw() In-Reply-To: <1487341428.62.0.272190755105.issue29590@psf.upfronthosting.co.za> Message-ID: <1588575274.79.0.6457120727.issue29590@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- keywords: +patch pull_requests: +19207 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19896 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 03:16:07 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 04 May 2020 07:16:07 +0000 Subject: [issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw() In-Reply-To: <1487341428.62.0.272190755105.issue29590@psf.upfronthosting.co.za> Message-ID: <1588576567.94.0.542247375526.issue29590@roundup.psfhosted.org> Chris Jerdonek added the comment: I proposed a PR to fix this: https://github.com/python/cpython/pull/19896 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 03:50:07 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 04 May 2020 07:50:07 +0000 Subject: [issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad In-Reply-To: <1487329309.81.0.182915384821.issue29587@psf.upfronthosting.co.za> Message-ID: <1588578607.04.0.459034261005.issue29587@roundup.psfhosted.org> Chris Jerdonek added the comment: Since none of you are subscribed to the other issue except for Nathaniel, I thought I'd let you know I also posted a PR to fix another issue he filed similar to this one (but this time about the stack trace being incorrect for `gen.throw()` in certain circumstances): https://bugs.python.org/issue29590 That issue is the second of the two issues he cited back in 2017 about `gen.throw()` being broken: https://vorpus.org/~njs/misc/trio-language-summit-2017.pdf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 03:56:11 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 04 May 2020 07:56:11 +0000 Subject: [issue40408] GenericAlias does not support nested type variables In-Reply-To: <1588003077.18.0.979842098769.issue40408@roundup.psfhosted.org> Message-ID: <1588578971.98.0.417071212795.issue40408@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 41a64587a0fd68bcd21ba42999cd3940801dff7c by Serhiy Storchaka in branch 'master': bpo-40408: Fix support of nested type variables in GenericAlias. (GH-19836) https://github.com/python/cpython/commit/41a64587a0fd68bcd21ba42999cd3940801dff7c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 04:00:19 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 04 May 2020 08:00:19 +0000 Subject: [issue40408] GenericAlias does not support nested type variables In-Reply-To: <1588003077.18.0.979842098769.issue40408@roundup.psfhosted.org> Message-ID: <1588579219.21.0.864142885998.issue40408@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 May 4 04:07:12 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 04 May 2020 08:07:12 +0000 Subject: [issue40494] collections.abc.Callable and type variables Message-ID: <1588579632.5.0.091811612876.issue40494@roundup.psfhosted.org> New submission from Serhiy Storchaka : There is a difference between typing.Callable and collections.abc.Callable. >>> import typing, collections.abc >>> T = typing.TypeVar('T') >>> C1 = typing.Callable[[T], T] >>> C2 = collections.abc.Callable[[T], T] >>> C1 typing.Callable[[~T], ~T] >>> C2 collections.abc.Callable[[~T], ~T] >>> C1[int] typing.Callable[[int], int] >>> C2[int] collections.abc.Callable[[~T], int] ---------- components: Library (Lib) messages: 368015 nosy: gvanrossum, levkivskyi, serhiy.storchaka priority: normal severity: normal status: open title: collections.abc.Callable and type variables type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 04:13:33 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 04 May 2020 08:13:33 +0000 Subject: [issue40491] Typo in SyntaxError produced by pegen for numeric literals In-Reply-To: <1588561584.15.0.715391883465.issue40491@roundup.psfhosted.org> Message-ID: <1588580013.77.0.695377418068.issue40491@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset c3f001461d5794c81cf5f70e08ae5435fe935ceb by Shantanu in branch 'master': bpo-40491: Fix typo in syntax error for numeric literals (GH-19893) https://github.com/python/cpython/commit/c3f001461d5794c81cf5f70e08ae5435fe935ceb ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 04:13:56 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 04 May 2020 08:13:56 +0000 Subject: [issue40491] Typo in SyntaxError produced by pegen for numeric literals In-Reply-To: <1588561584.15.0.715391883465.issue40491@roundup.psfhosted.org> Message-ID: <1588580036.3.0.269638055942.issue40491@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 04:23:44 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 04 May 2020 08:23:44 +0000 Subject: [issue40426] Unable to use lowercase hexadecimal digits for percent encoding In-Reply-To: <1588097651.68.0.271507304283.issue40426@roundup.psfhosted.org> Message-ID: <1588580624.08.0.108217693589.issue40426@roundup.psfhosted.org> Serhiy Storchaka added the comment: What is wrong with the current behavior? Why does the case of hexadecimal digits matter? There are no options to repr() to control the case of hexadecimal digits in and '\ufffe', and I doubt there are such options in other functions producing hexadecimals. So it is a very uncommon request. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 04:28:13 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 04 May 2020 08:28:13 +0000 Subject: [issue40492] -m cProfile -o f.pstats with a script that does chdir() writes to the changed directory and not `.` In-Reply-To: <1588563387.24.0.675526674384.issue40492@roundup.psfhosted.org> Message-ID: <1588580893.7.0.626546070196.issue40492@roundup.psfhosted.org> Serhiy Storchaka added the comment: I think it is worth to fix and it should be not difficult to fix. Either make the output file name absolute before executing the script, or open the output file before executing the script (what is easier). Unless I miss something. ---------- nosy: +serhiy.storchaka stage: -> patch review versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 04:30:23 2020 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 04 May 2020 08:30:23 +0000 Subject: [issue40408] GenericAlias does not support nested type variables In-Reply-To: <1588003077.18.0.979842098769.issue40408@roundup.psfhosted.org> Message-ID: <1588581023.96.0.325789423872.issue40408@roundup.psfhosted.org> Ivan Levkivskyi added the comment: > But this behavior is not specified and is not covered by tests. FWIW, to be most close to the static type checkers behavior, both D[int][str] and D[int, str] should fail for D = Dict[T, List]. Not important however, since this is a really rare corner case I think. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 04:31:40 2020 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 04 May 2020 08:31:40 +0000 Subject: [issue40494] collections.abc.Callable and type variables In-Reply-To: <1588579632.5.0.091811612876.issue40494@roundup.psfhosted.org> Message-ID: <1588581100.67.0.821669304413.issue40494@roundup.psfhosted.org> Ivan Levkivskyi added the comment: Here I think the behavior of typing.Callable is correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 04:56:43 2020 From: report at bugs.python.org (wyz23x2) Date: Mon, 04 May 2020 08:56:43 +0000 Subject: [issue40051] Dead link in help(lib2to3/idlelib/turtledemo/tkinter.sub/test_*/?) In-Reply-To: <1585026386.04.0.352572849659.issue40051@roundup.psfhosted.org> Message-ID: <1588582603.13.0.854469441939.issue40051@roundup.psfhosted.org> wyz23x2 added the comment: Patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 05:08:41 2020 From: report at bugs.python.org (=?utf-8?q?Lum=C3=ADr_Balhar?=) Date: Mon, 04 May 2020 09:08:41 +0000 Subject: [issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files Message-ID: <1588583321.75.0.545037270294.issue40495@roundup.psfhosted.org> New submission from Lum?r Balhar : We would like to include a possibility of hardlink deduplication of identical pyc files to compileall module in Python 3.9. We've discussed the change [0] and tested it in Fedora RPM build system via implementation in the compileall2 module [1]. The discussion [0] contains a lot of details so I mention here only the key features: * the deduplication can be enabled only if multiple optimization levels are processed at once * it generates a pyc file (optimization level 0) as usual but if it finds that optimized files (optimization levels 1 and 2) have the same content, it uses hardlinks (os.link) to prevents duplicates * the deduplication is disabled by default We believe that this might be handy for more Pythonistas. In our case, this functionality lowers the installation size of Python 3.9 from 125 MiB to 103 MiB. [0] https://discuss.python.org/t/compileall-option-to-hardlink-duplicate-optimization-levels-bytecode-cache-files/3014 [1] https://github.com/fedora-python/compileall2 ---------- components: Library (Lib) messages: 368022 nosy: frenzy priority: normal severity: normal status: open title: compileall: option to hardlink duplicate optimization levels bytecode cache files type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 05:23:38 2020 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 04 May 2020 09:23:38 +0000 Subject: [issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files In-Reply-To: <1588583321.75.0.545037270294.issue40495@roundup.psfhosted.org> Message-ID: <1588584218.45.0.664209942884.issue40495@roundup.psfhosted.org> Change by Miro Hron?ok : ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 05:25:57 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Mon, 04 May 2020 09:25:57 +0000 Subject: [issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files In-Reply-To: <1588583321.75.0.545037270294.issue40495@roundup.psfhosted.org> Message-ID: <1588584357.51.0.929257432656.issue40495@roundup.psfhosted.org> Change by Filipe La?ns : ---------- nosy: +FFY00 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 05:37:58 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 04 May 2020 09:37:58 +0000 Subject: [issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files In-Reply-To: <1588583321.75.0.545037270294.issue40495@roundup.psfhosted.org> Message-ID: <1588585078.6.0.777553045347.issue40495@roundup.psfhosted.org> Christian Heimes added the comment: Python's import system is fully compatible with this approach. importlib never directly writes to a .pyc file. Instead it always creates a new temporary file next to the .pyc file and then overrides the .pyc file with an atomic file system operation. See _write_atomic() in Lib/importlib/_bootstrap_external.py. compileall and py_compile also use _write_atomic(). ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 05:42:07 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 04 May 2020 09:42:07 +0000 Subject: [issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files In-Reply-To: <1588583321.75.0.545037270294.issue40495@roundup.psfhosted.org> Message-ID: <1588585327.1.0.254936085022.issue40495@roundup.psfhosted.org> Christian Heimes added the comment: Brett, FYI ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 05:47:11 2020 From: report at bugs.python.org (=?utf-8?q?Lum=C3=ADr_Balhar?=) Date: Mon, 04 May 2020 09:47:11 +0000 Subject: [issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files In-Reply-To: <1588583321.75.0.545037270294.issue40495@roundup.psfhosted.org> Message-ID: <1588585631.77.0.168160438024.issue40495@roundup.psfhosted.org> Lum?r Balhar added the comment: I forgot to mention that I am working on PR which should be ready soon because the implementation is already done and tested in compileall2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 05:54:10 2020 From: report at bugs.python.org (Sergio Rael) Date: Mon, 04 May 2020 09:54:10 +0000 Subject: [issue40496] re.findall() deadlock on Python 3.6.10 Message-ID: <1588586050.03.0.673760016961.issue40496@roundup.psfhosted.org> New submission from Sergio Rael : I have found a deadlock using Python 3.6.10 that seems to have been solved on 3.7.x. probably related to capture groups. To reproduce the deadlock just do something like this: re.findall( '\[et_pb_image(?:\w|=|"|\d|\.| |_|\/)*src="(https?:\/\/(?:www\.)?\w*\.\w*(?:\/|\w|\d|\.|-)*\.(?:png|jpg|jpeg|gif))"(?:\w|=|"|\d|\.| |_|\/|%|\|)*(?:\/?\])(?:\[\/et_pb_image\])?', '[et_pb_image _builder_version="3.27.2" src="https://www.somewhere.com/wp-content/uploads/2019/08/stabilizers.jpg" box_shadow_horizontal_tablet="0px" box_shadow_vertical_tablet="0px" box_shadow_blur_tablet="40px" box_shadow_spread_tablet="0px" z_index_tablet="500" url="https://youtu.be/fTrC5gkyYBM" url_new_window="on" /]', ) I noticed that the problem is related to having two image urls on the content. The regex says to look only for the one starting with "src=" so the one starting with "url=" should be ignored. If "url=\"XXX\"" is removed from the tag it works fine. ---------- components: Regular Expressions messages: 368026 nosy: ezio.melotti, mrabarnett, srael priority: normal severity: normal status: open title: re.findall() deadlock on Python 3.6.10 type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 05:54:48 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 04 May 2020 09:54:48 +0000 Subject: [issue40497] subprocess.check_output() accept the check keyword argument Message-ID: <1588586088.87.0.880898235091.issue40497@roundup.psfhosted.org> New submission from R?mi Lapeyre : The subprocess.check_output() raises TypeError when given the `check` keyword-argument: Python 3.8.2 (v3.8.2:7b3ab5921f, Feb 24 2020, 17:52:18) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import subprocess >>> subprocess.check_output(['ls'], check=False) Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 411, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, TypeError: run() got multiple values for keyword argument 'check' It should just use True as the default when it's not specified in kwargs. ---------- components: Library (Lib) messages: 368027 nosy: remi.lapeyre priority: normal severity: normal status: open title: subprocess.check_output() accept the check keyword argument type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 05:58:38 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 04 May 2020 09:58:38 +0000 Subject: [issue40497] subprocess.check_output() accept the check keyword argument In-Reply-To: <1588586088.87.0.880898235091.issue40497@roundup.psfhosted.org> Message-ID: <1588586318.85.0.00359104148515.issue40497@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch pull_requests: +19208 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19897 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 06:02:29 2020 From: report at bugs.python.org (Sergio Rael) Date: Mon, 04 May 2020 10:02:29 +0000 Subject: [issue40496] re.findall() takes a long time (100% cup usage) on Python 3.6.10 In-Reply-To: <1588586050.03.0.673760016961.issue40496@roundup.psfhosted.org> Message-ID: <1588586549.07.0.281972580121.issue40496@roundup.psfhosted.org> Sergio Rael added the comment: Sorry, this is not a deadlock. Python puts the CPU to 100% of usage, but it takes so long that a I didn't know if it can finish the task. ---------- title: re.findall() deadlock on Python 3.6.10 -> re.findall() takes a long time (100% cup usage) on Python 3.6.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 06:02:37 2020 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 04 May 2020 10:02:37 +0000 Subject: [issue40360] Deprecate lib2to3 (and 2to3) for future removal In-Reply-To: <1587530454.25.0.44181585934.issue40360@roundup.psfhosted.org> Message-ID: <1588586557.66.0.459641720154.issue40360@roundup.psfhosted.org> Change by Miro Hron?ok : ---------- pull_requests: +19209 pull_request: https://github.com/python/cpython/pull/19898 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 06:03:53 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 04 May 2020 10:03:53 +0000 Subject: [issue40497] subprocess.check_output() accept the check keyword argument In-Reply-To: <1588586088.87.0.880898235091.issue40497@roundup.psfhosted.org> Message-ID: <1588586633.59.0.298993846602.issue40497@roundup.psfhosted.org> Christian Heimes added the comment: -1 check_output() should not accept check=False. Please only improve the error message. I would be fine with accepting check=True, too ---------- nosy: +christian.heimes stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 06:10:21 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 04 May 2020 10:10:21 +0000 Subject: [issue40496] re.findall() takes a long time (100% cup usage) on Python 3.6.10 In-Reply-To: <1588586050.03.0.673760016961.issue40496@roundup.psfhosted.org> Message-ID: <1588587021.53.0.0408425582488.issue40496@roundup.psfhosted.org> R?mi Lapeyre added the comment: I don't think this is a deadlock rather it is certainly related to the number of '*' there is in your pattern, the regexp has to search an exponentially growing number of patterns. You could try a simple pattern to match your attribute and it should be faster. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 06:14:43 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 04 May 2020 10:14:43 +0000 Subject: [issue40497] subprocess.check_output() accept the check keyword argument In-Reply-To: <1588586088.87.0.880898235091.issue40497@roundup.psfhosted.org> Message-ID: <1588587283.05.0.163057060757.issue40497@roundup.psfhosted.org> R?mi Lapeyre added the comment: > check_output() should not accept check=False. I thought about raising ValueError instead but `subprocess.check_output([...], check=False)` is actually a convenient shortcut over `subprocess.run([...], stdout=subprocess.PIPE).stdout` and I can't think of much drawbacks if someone explicitly ask for the check to be disabled. Is there any way we could have that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 06:34:20 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 04 May 2020 10:34:20 +0000 Subject: [issue40497] subprocess.check_output() accept the check keyword argument In-Reply-To: <1588586088.87.0.880898235091.issue40497@roundup.psfhosted.org> Message-ID: <1588588460.02.0.501210283135.issue40497@roundup.psfhosted.org> Christian Heimes added the comment: IMHO it's both confusing and bad API design to have a function like validate_result(..., validate=False) Now a reviewer has to check that a developer uses the validate_result() function *and* the developer is not passing validate=False into the function. GH-19897 is also provides a new feature, so it cannot get into Python 3.7 and 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 06:54:50 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 04 May 2020 10:54:50 +0000 Subject: [issue40489] INCREF/DECREFs around the rich comparison needs tests In-Reply-To: <1588542089.41.0.502312186848.issue40489@roundup.psfhosted.org> Message-ID: <1588589690.1.0.162302015642.issue40489@roundup.psfhosted.org> Serhiy Storchaka added the comment: See issue1517. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 06:58:42 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 04 May 2020 10:58:42 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588589922.58.0.39459894705.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset e10e7c771bf06112c4a311e0ef6b8af6423b0cca by Lysandros Nikolaou in branch 'master': bpo-40334: Spacialized error message for invalid args after bare '*' (GH-19865) https://github.com/python/cpython/commit/e10e7c771bf06112c4a311e0ef6b8af6423b0cca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 07:01:26 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 04 May 2020 11:01:26 +0000 Subject: [issue40497] subprocess.check_output() accept the check keyword argument In-Reply-To: <1588586088.87.0.880898235091.issue40497@roundup.psfhosted.org> Message-ID: <1588590086.44.0.411739155931.issue40497@roundup.psfhosted.org> R?mi Lapeyre added the comment: > Now a reviewer has to check that a developer uses the validate_result() function *and* the developer is not passing validate=False into the function. Fair enough, I updated the PR to raise ValueError instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 07:05:31 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Mon, 04 May 2020 11:05:31 +0000 Subject: [issue39159] Ideas for making ast.literal_eval() usable In-Reply-To: <1577658169.97.0.393062022698.issue39159@roundup.psfhosted.org> Message-ID: <1588590331.98.0.437691729744.issue39159@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch pull_requests: +19210 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19899 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 07:11:45 2020 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 04 May 2020 11:11:45 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588590705.96.0.0148446396208.issue40334@roundup.psfhosted.org> Change by Charalampos Stratakis : ---------- nosy: -cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 07:19:45 2020 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 04 May 2020 11:19:45 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588591185.41.0.36851334736.issue40334@roundup.psfhosted.org> Change by Miro Hron?ok : ---------- nosy: -hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 07:23:16 2020 From: report at bugs.python.org (PythonAmateur742) Date: Mon, 04 May 2020 11:23:16 +0000 Subject: [issue40498] Holding spacebar on button widget permanently makes it SUNKEN even after release (and wait). Message-ID: <1588591396.15.0.77715019196.issue40498@roundup.psfhosted.org> New submission from PythonAmateur742 : See my Stack Overflow question for an example code. https://stackoverflow.com/questions/61588397/problems-with-tkinter-button-bindings-and-behaviour Reproduction: 1. create a single button (even without command) 2. Use tab to navigate to the button. 3. Hold space for a bit. result: Button is now SUNKEN. Even after clicking or pressing the space again. ---------- components: Tkinter messages: 368036 nosy: PythonAmateur742 priority: normal severity: normal status: open title: Holding spacebar on button widget permanently makes it SUNKEN even after release (and wait). type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 07:24:32 2020 From: report at bugs.python.org (PythonAmateur742) Date: Mon, 04 May 2020 11:24:32 +0000 Subject: [issue40498] Holding spacebar on button widget permanently makes it SUNKEN even after release (and wait). In-Reply-To: <1588591396.15.0.77715019196.issue40498@roundup.psfhosted.org> Message-ID: <1588591472.79.0.674635574509.issue40498@roundup.psfhosted.org> PythonAmateur742 added the comment: This is a win10 issue. I haven't tried it on linux. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 07:32:40 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 04 May 2020 11:32:40 +0000 Subject: [issue40246] Different error messages for same error - invalid string prefixes In-Reply-To: <1586541958.33.0.891000303304.issue40246@roundup.psfhosted.org> Message-ID: <1588591960.72.0.973448800259.issue40246@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 846d8b28ab9bb6197ee81372820311c0abe509c0 by Lysandros Nikolaou in branch 'master': bpo-40246: Revert reporting of invalid string prefixes (GH-19888) https://github.com/python/cpython/commit/846d8b28ab9bb6197ee81372820311c0abe509c0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 07:42:23 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 04 May 2020 11:42:23 +0000 Subject: [issue40246] Different error messages for same error - invalid string prefixes In-Reply-To: <1586541958.33.0.891000303304.issue40246@roundup.psfhosted.org> Message-ID: <1588592543.93.0.519872637673.issue40246@roundup.psfhosted.org> Lysandros Nikolaou added the comment: The revert is in. Now the question is if we want to take additional action to address the original issue of this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 07:49:27 2020 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 04 May 2020 11:49:27 +0000 Subject: [issue40246] Different error messages for same error - invalid string prefixes In-Reply-To: <1586541958.33.0.891000303304.issue40246@roundup.psfhosted.org> Message-ID: <1588592967.79.0.228658865526.issue40246@roundup.psfhosted.org> Miro Hron?ok added the comment: I will soon come back with what Fedora package were affected by the problem. That could give some data about how to handle this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 07:56:05 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Mon, 04 May 2020 11:56:05 +0000 Subject: [issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling In-Reply-To: <1525901922.71.0.682650639539.issue33453@psf.upfronthosting.co.za> Message-ID: <1588593365.35.0.32636411225.issue33453@roundup.psfhosted.org> Change by Filipe La?ns : ---------- nosy: +FFY00 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 08:16:17 2020 From: report at bugs.python.org (Joel Rosdahl) Date: Mon, 04 May 2020 12:16:17 +0000 Subject: [issue40499] asyncio.wait documentation on non-emptiness requirement lost in bpo-33649 Message-ID: <1588594577.55.0.625072789912.issue40499@roundup.psfhosted.org> New submission from Joel Rosdahl : bpo-21596 documented that the sequence of futures passed to asyncio.wait must not be empty: The sequence *futures* must not be empty. This note was however lost in the bpo-33649 commit (3faaa8857a42a36383bb18425444e597fc876797). ---------- assignee: docs at python components: Documentation messages: 368041 nosy: Joel Rosdahl, docs at python priority: normal severity: normal status: open title: asyncio.wait documentation on non-emptiness requirement lost in bpo-33649 versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 08:24:41 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 04 May 2020 12:24:41 +0000 Subject: [issue39159] Ideas for making ast.literal_eval() usable In-Reply-To: <1577658169.97.0.393062022698.issue39159@roundup.psfhosted.org> Message-ID: <1588595081.09.0.125278791941.issue39159@roundup.psfhosted.org> Serhiy Storchaka added the comment: It can also crash. ast.literal_eval('+0'*10**6) The cause is that all AST handling C code (in particularly converting the AST from C to Python) is recursive, and therefore can overflow the C stack. Some recursive code has arbitrary limits which cause raising exceptions like MemoryError in the initial example, but not all code has such checks. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 08:24:52 2020 From: report at bugs.python.org (Joel Rosdahl) Date: Mon, 04 May 2020 12:24:52 +0000 Subject: [issue21596] asyncio.wait fails when futures list is empty In-Reply-To: <1401294149.12.0.93780466725.issue21596@psf.upfronthosting.co.za> Message-ID: <1588595092.82.0.264138810076.issue21596@roundup.psfhosted.org> Change by Joel Rosdahl : ---------- nosy: +jrosdahl nosy_count: 8.0 -> 9.0 pull_requests: +19212 pull_request: https://github.com/python/cpython/pull/19900 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 08:24:52 2020 From: report at bugs.python.org (Joel Rosdahl) Date: Mon, 04 May 2020 12:24:52 +0000 Subject: [issue40499] asyncio.wait documentation on non-emptiness requirement lost in bpo-33649 In-Reply-To: <1588594577.55.0.625072789912.issue40499@roundup.psfhosted.org> Message-ID: <1588595092.74.0.694344428394.issue40499@roundup.psfhosted.org> Change by Joel Rosdahl : ---------- keywords: +patch nosy: +jrosdahl nosy_count: 2.0 -> 3.0 pull_requests: +19211 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19900 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 08:24:52 2020 From: report at bugs.python.org (Joel Rosdahl) Date: Mon, 04 May 2020 12:24:52 +0000 Subject: [issue33649] asyncio docs overhaul In-Reply-To: <1527277722.54.0.682650639539.issue33649@psf.upfronthosting.co.za> Message-ID: <1588595092.95.0.528342395067.issue33649@roundup.psfhosted.org> Change by Joel Rosdahl : ---------- nosy: +jrosdahl nosy_count: 14.0 -> 15.0 pull_requests: +19213 pull_request: https://github.com/python/cpython/pull/19900 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 08:28:17 2020 From: report at bugs.python.org (=?utf-8?q?Lum=C3=ADr_Balhar?=) Date: Mon, 04 May 2020 12:28:17 +0000 Subject: [issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files In-Reply-To: <1588583321.75.0.545037270294.issue40495@roundup.psfhosted.org> Message-ID: <1588595297.49.0.887297910439.issue40495@roundup.psfhosted.org> Change by Lum?r Balhar : ---------- keywords: +patch pull_requests: +19214 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19901 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 08:38:50 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 May 2020 12:38:50 +0000 Subject: [issue40500] test_multiprocessing_fork leaks processes on PPC64LE RHEL8 LTO + PGO 3.x Message-ID: <1588595930.94.0.324889959771.issue40500@roundup.psfhosted.org> New submission from STINNER Victor : PPC64LE RHEL8 LTO + PGO 3.x: https://buildbot.python.org/all/#/builders/450/builds/313 0:01:22 load avg: 7.01 [242/423/1] test_multiprocessing_fork failed (env changed) (1 min 17 sec) -- running: test_concurrent_futures (1 min 3 sec), test_multiprocessing_forkserver (1 min 19 sec) Warning -- multiprocessing.Manager still has [, ] active children after 5.1161000469874125 seconds Warning -- Dangling processes: {} Warning -- multiprocessing.Manager still has [, ] active children after 5.116447829990648 seconds test__all__ (test.test_multiprocessing_fork.MiscTestCase) ... ok test_answer_challenge_auth_failure (test.test_multiprocessing_fork.OtherTest) ... ok test_deliver_challenge_auth_failure (test.test_multiprocessing_fork.OtherTest) ... ok (...) ---------- components: Tests messages: 368043 nosy: pitrou, tomMoral, vstinner priority: normal severity: normal status: open title: test_multiprocessing_fork leaks processes on PPC64LE RHEL8 LTO + PGO 3.x versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 08:40:28 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 04 May 2020 12:40:28 +0000 Subject: [issue40051] Dead link in help(lib2to3/idlelib/turtledemo/tkinter.sub/test_*/?) In-Reply-To: <1585026386.04.0.352572849659.issue40051@roundup.psfhosted.org> Message-ID: <1588596028.72.0.141588892862.issue40051@roundup.psfhosted.org> Terry J. Reedy added the comment: Not until decision made. And not be me until I have my development machine running. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 08:51:26 2020 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 04 May 2020 12:51:26 +0000 Subject: [issue40246] Different error messages for same error - invalid string prefixes In-Reply-To: <1586541958.33.0.891000303304.issue40246@roundup.psfhosted.org> Message-ID: <1588596686.71.0.744711526511.issue40246@roundup.psfhosted.org> Miro Hron?ok added the comment: Not that many: cpython itself (fixed via PR) demjson (fixed via PR) asn1crypto (fixed via PR) dnf (fixed via PR) freeipa (fixed via PR) I gave up sending PRs at this point. waf weasyprint virt-who thrift salt wxpython4 rosdistro mne pycairo libstoragemgmt (possibly via bundled lsm/external/xmltodict) dput-ng ddupdate aubio (via bundled waf) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 09:13:45 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 04 May 2020 13:13:45 +0000 Subject: [issue40256] Python 3.8 Not Launching on Bootcamp Windows 10. In-Reply-To: <1586628271.16.0.0390251857061.issue40256@roundup.psfhosted.org> Message-ID: <1588598025.6.0.493308100986.issue40256@roundup.psfhosted.org> Steve Dower added the comment: I assume the Bootcamp side of this is irrelevant and it's just an issue with Windows. Yusuf, can you open Powershell and run "py" on its own? If you've been going there and running "python" and you didn't select to update PATH, you're probably triggering the redirect to install via the Microsoft Store. When you pass that arguments, it fails (correctly) but doesn't print a message (incorrectly - I'm trying to get it fixed). But when you run it interactively it'll jump you to the store page for Python. You probably just want to use the "py" launcher, since you've installed that way. Or if you install from the Store instead then it'll configure python/python3/python3.8 commands for you. ---------- components: -macOS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 09:32:01 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 04 May 2020 13:32:01 +0000 Subject: [issue39573] [C API] Make PyObject an opaque structure in the limited C API In-Reply-To: <1581030432.16.0.48160379721.issue39573@roundup.psfhosted.org> Message-ID: <1588599121.06.0.7290316699.issue39573@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 5e8ffe147710e449c2e935a4e2ff5cbd19828a8a by Hai Shi in branch 'master': bpo-39573: Use Py_IS_TYPE to check for types (GH-19882) https://github.com/python/cpython/commit/5e8ffe147710e449c2e935a4e2ff5cbd19828a8a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 09:32:49 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 04 May 2020 13:32:49 +0000 Subject: [issue40455] GCC 10 compiler warnings In-Reply-To: <1588279868.77.0.13865368461.issue40455@roundup.psfhosted.org> Message-ID: <1588599169.75.0.197053814544.issue40455@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset b88cd585d36d6285a5aeb0b6fdb70c134062181e by Dong-hee Na in branch 'master': bpo-40455: Remove gcc10 warning about x_digits (#19852) https://github.com/python/cpython/commit/b88cd585d36d6285a5aeb0b6fdb70c134062181e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 09:52:43 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 04 May 2020 13:52:43 +0000 Subject: [issue40489] INCREF/DECREFs around the rich comparison needs tests In-Reply-To: <1588542089.41.0.502312186848.issue40489@roundup.psfhosted.org> Message-ID: <1588600363.53.0.883526385955.issue40489@roundup.psfhosted.org> Dong-hee Na added the comment: I can crash python interpreter with few lines of code when if we remove those codes. class S(str): def __eq__(self, other): d.clear() return NotImplemented def __hash__(self): return hash('test') d = {S(): 'value'} 'test' in d ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 09:53:47 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 04 May 2020 13:53:47 +0000 Subject: [issue40489] INCREF/DECREFs around the rich comparison needs tests In-Reply-To: <1588542089.41.0.502312186848.issue40489@roundup.psfhosted.org> Message-ID: <1588600427.48.0.600809183548.issue40489@roundup.psfhosted.org> Dong-hee Na added the comment: Would you like to add a test for this case? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 09:55:06 2020 From: report at bugs.python.org (Zachary Ware) Date: Mon, 04 May 2020 13:55:06 +0000 Subject: [issue2380] Raise a Py3K warning for catching nested tuples with non-BaseException exceptions In-Reply-To: <1205812263.49.0.840453912449.issue2380@psf.upfronthosting.co.za> Message-ID: <1588600506.73.0.200846592465.issue2380@roundup.psfhosted.org> Zachary Ware added the comment: With 2.7 out of support, closing. ---------- nosy: +zach.ware resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 10:00:54 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 04 May 2020 14:00:54 +0000 Subject: [issue40489] INCREF/DECREFs around the rich comparison needs tests In-Reply-To: <1588542089.41.0.502312186848.issue40489@roundup.psfhosted.org> Message-ID: <1588600853.99.0.646406855858.issue40489@roundup.psfhosted.org> Dong-hee Na added the comment: > Would you like to add a test for this case? Oh, I mean, is it good to add a test for this case? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 10:12:14 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 May 2020 14:12:14 +0000 Subject: [issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad In-Reply-To: <1487329309.81.0.182915384821.issue29587@psf.upfronthosting.co.za> Message-ID: <1588601534.58.0.738603209863.issue29587@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19216 pull_request: https://github.com/python/cpython/pull/19902 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 10:13:00 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 May 2020 14:13:00 +0000 Subject: [issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad In-Reply-To: <1487329309.81.0.182915384821.issue29587@psf.upfronthosting.co.za> Message-ID: <1588601580.87.0.205800632528.issue29587@roundup.psfhosted.org> STINNER Victor added the comment: tl; dr I wrote PR 19902 to remove the "XXX" comment. -- Commit 21893fbb74e8fde2931fbed9b511e2a41362b1ab adds the following code: /* XXX It seems like we shouldn't have to check not equal to Py_None here because exc_type should only ever be a class. But not including this check was causing crashes on certain tests e.g. on Fedora. */ if (gen->gi_exc_state.exc_type && gen->gi_exc_state.exc_type != Py_None) { ... } I don't think that you should mention "Fedora" as a platform impacted by this issue: all platforms should be affected. It's just unclear why the issue was first seen on Fedora. gen_send_ex() copies tstate->exc_info to gen->gi_exc_state. tstate->exc_info->exc_type is set at least in the following 3 places in CPython code base: * ceval.c: POP_EXCEPT opcode: exc_info->exc_type = POP(); * ceval.c: UNWIND_EXCEPT_HANDLER() macro: exc_info->exc_type = POP(); * errors.c: PyErr_SetExcInfo() I saw in practice POP_EXCEPT and UNWIND_EXCEPT_HANDLER() setting exc_info->exc_type to Py_None (I didn't test PyErr_SetExcInfo()). _PyErr_GetTopmostException() also handles exc_info->exc_type == Py_None case: _PyErr_StackItem * _PyErr_GetTopmostException(PyThreadState *tstate) { _PyErr_StackItem *exc_info = tstate->exc_info; while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && exc_info->previous_item != NULL) { exc_info = exc_info->previous_item; } return exc_info; } -- So exc_type=None is not a bug, but it's done on purpose. If you don't want to get None in genobject.c, we should modify all places which set tstate->exc_info->exc_type. Problem: the structure currently exposed in the public C API (bpo-40429), and I wouldn't be surprised if Cython or greenlet modify tstate->exc_info directly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 10:33:48 2020 From: report at bugs.python.org (Andy Lester) Date: Mon, 04 May 2020 14:33:48 +0000 Subject: [issue40455] GCC 10 compiler warnings In-Reply-To: <1588279868.77.0.13865368461.issue40455@roundup.psfhosted.org> Message-ID: <1588602828.69.0.23825270445.issue40455@roundup.psfhosted.org> Andy Lester added the comment: For anyone following along, note that the PR above is different than the original suggestion. The PR correctly sets x_size, not leaving it zero. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 10:56:59 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 04 May 2020 14:56:59 +0000 Subject: [issue40426] Unable to use lowercase hexadecimal digits for percent encoding In-Reply-To: <1588097651.68.0.271507304283.issue40426@roundup.psfhosted.org> Message-ID: <1588604219.91.0.806705363184.issue40426@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- nosy: -lys.nikolaou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 11:06:02 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 May 2020 15:06:02 +0000 Subject: [issue40135] multiprocessing: test_shared_memory_across_processes() cannot be run twice in parallel In-Reply-To: <1585747098.48.0.62220441008.issue40135@roundup.psfhosted.org> Message-ID: <1588604762.51.0.0281720191094.issue40135@roundup.psfhosted.org> STINNER Victor added the comment: New changeset caa3ef284a2e5e5b9bdd6a9e619804122c842d80 by Hai Shi in branch 'master': bpo-40135: Fix multiprocessing test_shared_memory_across_processes() (GH-19892) https://github.com/python/cpython/commit/caa3ef284a2e5e5b9bdd6a9e619804122c842d80 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 11:05:28 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 04 May 2020 15:05:28 +0000 Subject: [issue40494] collections.abc.Callable and type variables In-Reply-To: <1588579632.5.0.091811612876.issue40494@roundup.psfhosted.org> Message-ID: <1588604728.01.0.331945850215.issue40494@roundup.psfhosted.org> Guido van Rossum added the comment: Yeah, the fix will require a variant of types.GenericAlias that substitute's type variables in lists. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 11:06:28 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 04 May 2020 15:06:28 +0000 Subject: [issue40135] multiprocessing: test_shared_memory_across_processes() cannot be run twice in parallel In-Reply-To: <1585747098.48.0.62220441008.issue40135@roundup.psfhosted.org> Message-ID: <1588604788.93.0.248216368754.issue40135@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +19217 pull_request: https://github.com/python/cpython/pull/19903 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 11:07:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 May 2020 15:07:29 +0000 Subject: [issue40135] multiprocessing: test_shared_memory_across_processes() cannot be run twice in parallel In-Reply-To: <1585747098.48.0.62220441008.issue40135@roundup.psfhosted.org> Message-ID: <1588604849.54.0.923916116895.issue40135@roundup.psfhosted.org> STINNER Victor added the comment: Thanks for the fix Hai Shi! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 11:20:04 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 04 May 2020 15:20:04 +0000 Subject: [issue40494] collections.abc.Callable and type variables In-Reply-To: <1588579632.5.0.091811612876.issue40494@roundup.psfhosted.org> Message-ID: <1588605604.96.0.437646154985.issue40494@roundup.psfhosted.org> Serhiy Storchaka added the comment: Of course. There is more than one way to fix it: * Make GenericAlias substituting type variables in list. It is easier and it will fix this particular case, but there will be subtle differences in __args__. * Add a GenericAlias subclass with overridden constructor, __repr__, __getitem__, __reduce__ (like the _GenericAlias subclass added in issue40397). I think we should first resolve issue40397 and later decide what way be better. It is not necessary to reproduce all details of _GenericAlias if the practical behavior is the same. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 11:24:30 2020 From: report at bugs.python.org (Gregory Szorc) Date: Mon, 04 May 2020 15:24:30 +0000 Subject: [issue32030] PEP 432: Rewrite Py_Main() In-Reply-To: <1510709424.02.0.213398074469.issue32030@psf.upfronthosting.co.za> Message-ID: <1588605870.33.0.213193537202.issue32030@roundup.psfhosted.org> Change by Gregory Szorc : ---------- nosy: +indygreg nosy_count: 7.0 -> 8.0 pull_requests: +19218 pull_request: https://github.com/python/cpython/pull/19746 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 11:25:29 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 04 May 2020 15:25:29 +0000 Subject: [issue40135] multiprocessing: test_shared_memory_across_processes() cannot be run twice in parallel In-Reply-To: <1585747098.48.0.62220441008.issue40135@roundup.psfhosted.org> Message-ID: <1588605929.52.0.329976251357.issue40135@roundup.psfhosted.org> miss-islington added the comment: New changeset 70fe95cdc9ac1b00d4f86b7525dca80caf7003e1 by Miss Islington (bot) in branch '3.8': bpo-40135: Fix multiprocessing test_shared_memory_across_processes() (GH-19892) https://github.com/python/cpython/commit/70fe95cdc9ac1b00d4f86b7525dca80caf7003e1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 11:50:03 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 04 May 2020 15:50:03 +0000 Subject: [issue40458] test_bad_getattr crashes on APPX test In-Reply-To: <1588288227.67.0.928950925895.issue40458@roundup.psfhosted.org> Message-ID: <1588607403.34.0.394566347281.issue40458@roundup.psfhosted.org> Steve Dower added the comment: Yeah, I already got that part. If you check the PR, I added some better diagnostics to faulthandler for this case, but I don't see where I can add it for other platforms? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 12:05:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 May 2020 16:05:32 +0000 Subject: [issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) In-Reply-To: <1569848255.08.0.155489980043.issue38323@roundup.psfhosted.org> Message-ID: <1588608332.89.0.328731440893.issue38323@roundup.psfhosted.org> STINNER Victor added the comment: Issue open since 2019-09-30 and tests still hang randomly. What's the progress on this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 12:27:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 May 2020 16:27:27 +0000 Subject: [issue40246] Different error messages for same error - invalid string prefixes In-Reply-To: <1586541958.33.0.891000303304.issue40246@roundup.psfhosted.org> Message-ID: <1588609647.97.0.428369742793.issue40246@roundup.psfhosted.org> STINNER Victor added the comment: Lysandros: > The revert is in. Now the question is if we want to take additional action to address the original issue of this. If someone cares of that, I suggest to open an issue in pylint, pyflakes and similar tools to emit a warning in linters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 12:28:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 May 2020 16:28:24 +0000 Subject: [issue21596] asyncio.wait fails when futures list is empty In-Reply-To: <1401294149.12.0.93780466725.issue21596@psf.upfronthosting.co.za> Message-ID: <1588609704.18.0.959842352163.issue21596@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 12:28:53 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 May 2020 16:28:53 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588609733.48.0.772956480946.issue40334@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 12:31:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 May 2020 16:31:12 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1588609872.51.0.088701813118.issue35907@roundup.psfhosted.org> STINNER Victor added the comment: > We should whitelist the protocols. The current solution with `getattr` is really fragile. For example, this crashes with a `TypeError`: `URLopener().open("unknown_proxy://test")` Would you mind to elaborate why do you consider that the solution is incomplete? Your issue doesn't show that Python is vulnerable. TypeError *is* the expected behavior. Would you prefer another error message? If yes, please open a seperated issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 12:32:26 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 May 2020 16:32:26 +0000 Subject: [issue13097] [easy C issue] ctypes: segfault with large number of callback arguments In-Reply-To: <1317700637.71.0.186696346618.issue13097@psf.upfronthosting.co.za> Message-ID: <1588609946.01.0.0565145230892.issue13097@roundup.psfhosted.org> STINNER Victor added the comment: I suggest to raise an exception if it's called with more than 1024 arguments. ---------- keywords: +easy (C), newcomer friendly title: ctypes: segfault with large number of callback arguments -> [easy C issue] ctypes: segfault with large number of callback arguments _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 12:33:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 May 2020 16:33:45 +0000 Subject: [issue9216] FIPS support for hashlib In-Reply-To: <1278721335.16.0.522410247151.issue9216@psf.upfronthosting.co.za> Message-ID: <1588610025.2.0.442211734252.issue9216@roundup.psfhosted.org> STINNER Victor added the comment: > _hashlib.get_fips_mode() is not compatible with new FIPS design in OpenSSL 3.0.0: I suggest to modify the code so the private function becomes unavailable in _hashlib on OpenSSL 3.0 and newer. What do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 12:34:03 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 04 May 2020 16:34:03 +0000 Subject: [issue40501] Deprecate and remove ctypes usage in uuid Message-ID: <1588610043.03.0.653935213542.issue40501@roundup.psfhosted.org> New submission from Steve Dower : The uuid module uses ctypes to try and load likely system libraries to provide some functionality of the uuid module. This is a security risk (depending on your sensitivity to DLL hijacking), but it also seems to be not very necessary? It would be nice to remove the ctypes usage from an otherwise (almost) pure Python module. ---------- components: Library (Lib) messages: 368066 nosy: steve.dower priority: normal severity: normal stage: test needed status: open title: Deprecate and remove ctypes usage in uuid versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 12:37:26 2020 From: report at bugs.python.org (hongweipeng) Date: Mon, 04 May 2020 16:37:26 +0000 Subject: [issue40025] enum: _generate_next_value_ is not called if its definition occurs after calls to auto() In-Reply-To: <1584703504.0.0.0724934497115.issue40025@roundup.psfhosted.org> Message-ID: <1588610246.94.0.748542336148.issue40025@roundup.psfhosted.org> Change by hongweipeng : ---------- nosy: +hongweipeng nosy_count: 9.0 -> 10.0 pull_requests: +19219 pull_request: https://github.com/python/cpython/pull/19904 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 12:39:26 2020 From: report at bugs.python.org (Brett Cannon) Date: Mon, 04 May 2020 16:39:26 +0000 Subject: [issue40350] modulefinder chokes on numpy - dereferencing None in spec.loader In-Reply-To: <1587454417.83.0.816569073565.issue40350@roundup.psfhosted.org> Message-ID: <1588610366.44.0.676693499207.issue40350@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 12:41:16 2020 From: report at bugs.python.org (hai shi) Date: Mon, 04 May 2020 16:41:16 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1588610476.08.0.334239336421.issue40275@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +19220 pull_request: https://github.com/python/cpython/pull/19905 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 12:42:33 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 04 May 2020 16:42:33 +0000 Subject: [issue40501] Deprecate and remove ctypes usage in uuid In-Reply-To: <1588610043.03.0.653935213542.issue40501@roundup.psfhosted.org> Message-ID: <1588610553.62.0.556866613877.issue40501@roundup.psfhosted.org> Steve Dower added the comment: There are three scenarios where ctypes is used in this module: * get libuuid.uuid_generate_time_safe and uuid_generate_time (if _uuid was not compiled) * get rpcrt4.UuidCreateSequential (on Windows, depending on how the libuuid lookup failed) * GetSystemDirectory (on Windows, safe to replace with alternative approach) I'll happily move the UuidCreateSequential call into _uuid and add it to the Windows build, but it's not clear whether the libuuid lookup is important or not. If anyone knows of scenarios where you can't compile against libuuid but can load it with ctypes, would be great to hear about it! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 12:42:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 May 2020 16:42:54 +0000 Subject: [issue40501] Deprecate and remove ctypes usage in uuid In-Reply-To: <1588610043.03.0.653935213542.issue40501@roundup.psfhosted.org> Message-ID: <1588610574.96.0.75136672364.issue40501@roundup.psfhosted.org> STINNER Victor added the comment: uuid.py has a long history. The recent history is the addition of the _uuid module which exposes libuuid function properly. IMHO it's a better approach than ctypes. On Windows, it seems like ctypes remains used to get access to Windows function UuidCreateSequential(). It is used by uuid.getnode() for example. We should expose UuidCreateSequential() in _uuid rather than using ctypes for that. I propose to do that in two steps: (A) Ensure that _uuid works on macOS, FreeBSD and Linux, especially in the macOS installer of python.org. If yes, remove the ctypes code to access libuuid functions. (B) Add a function to _uuid to expose Windows UuidCreateSequential(), use it in uuid.py and remove the related ctypes code. Both steps can be done in parallel. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 12:42:52 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 04 May 2020 16:42:52 +0000 Subject: [issue40489] INCREF/DECREFs around the rich comparison needs tests In-Reply-To: <1588542089.41.0.502312186848.issue40489@roundup.psfhosted.org> Message-ID: <1588610572.46.0.600162237108.issue40489@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +19221 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19906 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 12:44:14 2020 From: report at bugs.python.org (Brett Cannon) Date: Mon, 04 May 2020 16:44:14 +0000 Subject: [issue40417] PyImport_ReloadModule emits deprecation warning In-Reply-To: <1588056055.69.0.268035650537.issue40417@roundup.psfhosted.org> Message-ID: <1588610654.9.0.629869558725.issue40417@roundup.psfhosted.org> Brett Cannon added the comment: This can't be backported cleanly. If you're up for making PRs for 3.8 and 3.7, Robert, we can look at applying them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 12:44:32 2020 From: report at bugs.python.org (Brett Cannon) Date: Mon, 04 May 2020 16:44:32 +0000 Subject: [issue40417] PyImport_ReloadModule emits deprecation warning In-Reply-To: <1588056055.69.0.268035650537.issue40417@roundup.psfhosted.org> Message-ID: <1588610672.61.0.173073011219.issue40417@roundup.psfhosted.org> Change by Brett Cannon : ---------- versions: -Python 3.5, Python 3.6, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 12:48:18 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 04 May 2020 16:48:18 +0000 Subject: [issue40501] Deprecate and remove ctypes usage in uuid In-Reply-To: <1588610043.03.0.653935213542.issue40501@roundup.psfhosted.org> Message-ID: <1588610898.77.0.849434744651.issue40501@roundup.psfhosted.org> Steve Dower added the comment: Do you think either need a deprecation cycle? I'd say not for the Windows change, but I'm not sure whether people could be relying on libuuid showing up after build. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 12:51:54 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 04 May 2020 16:51:54 +0000 Subject: [issue40501] Deprecate and remove ctypes usage in uuid In-Reply-To: <1588610043.03.0.653935213542.issue40501@roundup.psfhosted.org> Message-ID: <1588611114.26.0.39471586283.issue40501@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 12:52:40 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 May 2020 16:52:40 +0000 Subject: [issue40501] Deprecate and remove ctypes usage in uuid In-Reply-To: <1588610043.03.0.653935213542.issue40501@roundup.psfhosted.org> Message-ID: <1588611160.41.0.808152719337.issue40501@roundup.psfhosted.org> STINNER Victor added the comment: > Do you think either need a deprecation cycle? I'd say not for the Windows change, but I'm not sure whether people could be relying on libuuid showing up after build. If the behavior doesn't change, no deprecation is needed. For example, if libuuid was already used trough _uuid module, the ctypes code path is basically just dead code. But it should be checked manually. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 13:11:06 2020 From: report at bugs.python.org (Chris Meyer) Date: Mon, 04 May 2020 17:11:06 +0000 Subject: [issue39232] asyncio crashes when tearing down the proactor event loop In-Reply-To: <1578335360.75.0.333919607495.issue39232@roundup.psfhosted.org> Message-ID: <1588612266.83.0.950140436805.issue39232@roundup.psfhosted.org> Change by Chris Meyer : ---------- nosy: +cmeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 13:30:49 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 04 May 2020 17:30:49 +0000 Subject: [issue40489] INCREF/DECREFs around the rich comparison needs tests In-Reply-To: <1588542089.41.0.502312186848.issue40489@roundup.psfhosted.org> Message-ID: <1588613449.72.0.97846678632.issue40489@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 785f5e6d674306052bf865677d885c30561985ae by Dong-hee Na in branch 'master': bpo-40489: Add test case for dict contain use after free (GH-19906) https://github.com/python/cpython/commit/785f5e6d674306052bf865677d885c30561985ae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 14:05:09 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 May 2020 18:05:09 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1588615509.27.0.429564226097.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 975408c065b645e7d717546b0d744415abb45cd1 by Hai Shi in branch 'master': bpo-40275: test.support imports lazily locale import (GH-19761) https://github.com/python/cpython/commit/975408c065b645e7d717546b0d744415abb45cd1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 14:26:58 2020 From: report at bugs.python.org (Tomasz Pytel) Date: Mon, 04 May 2020 18:26:58 +0000 Subject: [issue40502] PyNode_New() does not initialize n->n_col_offset Message-ID: <1588616818.22.0.942372238929.issue40502@roundup.psfhosted.org> New submission from Tomasz Pytel : I found this by accident by compiling empty strings since I use column information from the AST tree, if not initialized I get a starting column of -842150451. The easy fix is to initialize n->n_col_offset = 0; in Parser/node.c:PyNode_New(). ---------- components: Interpreter Core messages: 368074 nosy: Tomasz Pytel priority: normal severity: normal status: open title: PyNode_New() does not initialize n->n_col_offset versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 14:39:07 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 04 May 2020 18:39:07 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1588617547.08.0.198382592141.issue1635741@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +19222 pull_request: https://github.com/python/cpython/pull/19907 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 14:40:10 2020 From: report at bugs.python.org (Tim Peters) Date: Mon, 04 May 2020 18:40:10 +0000 Subject: [issue40480] "fnmatch" exponential execution time In-Reply-To: <1588498627.36.0.0280402477391.issue40480@roundup.psfhosted.org> Message-ID: <1588617610.96.0.966408375786.issue40480@roundup.psfhosted.org> Tim Peters added the comment: Changed version to 3.9, because anything done would change the regexp generated, and fnmatch.translate()` makes that regexp visible. ---------- stage: -> needs patch versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 14:45:49 2020 From: report at bugs.python.org (Tim Peters) Date: Mon, 04 May 2020 18:45:49 +0000 Subject: [issue40480] "fnmatch" exponential execution time In-Reply-To: <1588498627.36.0.0280402477391.issue40480@roundup.psfhosted.org> Message-ID: <1588617949.07.0.388788274017.issue40480@roundup.psfhosted.org> Change by Tim Peters : ---------- keywords: +patch pull_requests: +19223 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/19908 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 14:51:21 2020 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 04 May 2020 18:51:21 +0000 Subject: [issue40503] PEP 615: Add zoneinfo module Message-ID: <1588618281.16.0.913416553136.issue40503@roundup.psfhosted.org> New submission from Paul Ganssle : This is an issue to track the implementation of PEP 615: https://www.python.org/dev/peps/pep-0615/ It should mostly involve migrating from the reference implementation: https://github.com/pganssle/zoneinfo/ ---------- assignee: p-ganssle components: Library (Lib) messages: 368076 nosy: belopolsky, lemburg, p-ganssle priority: high severity: normal stage: needs patch status: open title: PEP 615: Add zoneinfo module type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 14:54:44 2020 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 04 May 2020 18:54:44 +0000 Subject: [issue40503] PEP 615: Add zoneinfo module In-Reply-To: <1588618281.16.0.913416553136.issue40503@roundup.psfhosted.org> Message-ID: <1588618484.65.0.136458986245.issue40503@roundup.psfhosted.org> Change by Paul Ganssle : ---------- keywords: +patch pull_requests: +19224 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/19909 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 15:02:08 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 04 May 2020 19:02:08 +0000 Subject: [issue40360] Deprecate lib2to3 (and 2to3) for future removal In-Reply-To: <1587530454.25.0.44181585934.issue40360@roundup.psfhosted.org> Message-ID: <1588618928.58.0.335104347256.issue40360@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 18f1c60a1625d341a905c7e07367c32c08f222df by Miro Hron?ok in branch 'master': bpo-40360: Add a What's New entry for lib2to3 pending deprecation (GH-19898) https://github.com/python/cpython/commit/18f1c60a1625d341a905c7e07367c32c08f222df ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 15:10:08 2020 From: report at bugs.python.org (Emmanuel Arias) Date: Mon, 04 May 2020 19:10:08 +0000 Subject: [issue39159] Ideas for making ast.literal_eval() usable In-Reply-To: <1577658169.97.0.393062022698.issue39159@roundup.psfhosted.org> Message-ID: <1588619408.48.0.102819712816.issue39159@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 15:18:42 2020 From: report at bugs.python.org (Anthony Sottile) Date: Mon, 04 May 2020 19:18:42 +0000 Subject: [issue40492] -m cProfile -o f.pstats with a script that does chdir() writes to the changed directory and not `.` In-Reply-To: <1588563387.24.0.675526674384.issue40492@roundup.psfhosted.org> Message-ID: <1588619922.32.0.867016660777.issue40492@roundup.psfhosted.org> Change by Anthony Sottile : ---------- keywords: +patch pull_requests: +19225 pull_request: https://github.com/python/cpython/pull/19910 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 15:47:09 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 04 May 2020 19:47:09 +0000 Subject: [issue39470] Indicate that os.makedirs is equivalent to Path.mkdir In-Reply-To: <1580161847.67.0.0849845535184.issue39470@roundup.psfhosted.org> Message-ID: <1588621629.74.0.739043301471.issue39470@roundup.psfhosted.org> Joannah Nanjekye added the comment: New changeset f25fb6ebfec894c01bc927c9aae7924ffc826d11 by Joannah Nanjekye in branch 'master': bpo-39470: Indicate that ``os.makedirs`` is equivalent to ``Path.mkdir`` (GH-18216) https://github.com/python/cpython/commit/f25fb6ebfec894c01bc927c9aae7924ffc826d11 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 16:00:54 2020 From: report at bugs.python.org (Dutcho) Date: Mon, 04 May 2020 20:00:54 +0000 Subject: [issue40464] functools.singledispatch doesn't verify annotation is on FIRST parameter In-Reply-To: <1588316641.36.0.617194746525.issue40464@roundup.psfhosted.org> Message-ID: <1588622454.64.0.434626130273.issue40464@roundup.psfhosted.org> Dutcho added the comment: I'm afraid my "even return" was interpreted in https://github.com/python/cpython/pull/19871 as "only return", while as stated "any annotation" suffices. To rephrase: If the *first* parameter of the registered function isn't annotated, any non-first annotation suffices for registering, but will not dispatch correctly. Example: ``` >>> @functools.singledispatch ... def func(arg, x):... >>> @func.register ... def _int(arg, x:int):... >>> @func.register ... def _str(arg, x:str):... ``` No errors happen, although parameter `x` is annotated, not the first parameter `arg`. So `func()` will dispatch on the type of `arg` according to the annotation of `x`. So I'm afraid the PR solves the specific "return" example case, but not the flagged general issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 16:20:05 2020 From: report at bugs.python.org (Petter S) Date: Mon, 04 May 2020 20:20:05 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1588623605.65.0.817040839676.issue35907@roundup.psfhosted.org> Petter S added the comment: The solution is incomplete because it fixes just this single security issue, not the inherent fragility of this file. If, in the future someone happens to add another method starting with open to this class, we are at risk of having the same problem again. As for the error message, it is of course a minor issue, but I don't think it is expected that "unknown_proxy://" and "something_else://" raise different exceptions, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 16:35:16 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 04 May 2020 20:35:16 +0000 Subject: [issue39470] Indicate that os.makedirs is equivalent to Path.mkdir In-Reply-To: <1580161847.67.0.0849845535184.issue39470@roundup.psfhosted.org> Message-ID: <1588624516.76.0.374108911401.issue39470@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 16:36:26 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 04 May 2020 20:36:26 +0000 Subject: [issue40504] Restore weakref support for lru_cache wrappers Message-ID: <1588624586.76.0.0628520967833.issue40504@roundup.psfhosted.org> New submission from Raymond Hettinger : The pure python version of lru_cache() wrappers supported weak references. It's not essential, but I have used it a couple of times. In the spirit of PEP 399, the C version should add back the weakref support (and a test). ---------- components: Extension Modules keywords: easy (C) messages: 368081 nosy: rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: Restore weakref support for lru_cache wrappers type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 17:04:59 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 May 2020 21:04:59 +0000 Subject: [issue40500] test_multiprocessing_fork leaks processes on PPC64LE RHEL8 LTO + PGO 3.x In-Reply-To: <1588595930.94.0.324889959771.issue40500@roundup.psfhosted.org> Message-ID: <1588626299.19.0.218378231069.issue40500@roundup.psfhosted.org> STINNER Victor added the comment: Another example "PPC64LE RHEL8 LTO 3.x": https://buildbot.python.org/all/#/builders/356/builds/347 0:02:49 load avg: 9.54 [415/423/1] test_multiprocessing_spawn failed (env changed) (2 min 15 sec) -- running: test_concurrent_futures (58.1 sec), test_peg_generator (1 min 39 sec), test_gdb (47.8 sec) Warning -- multiprocessing.Manager still has [, ] active children after 5.1163996559916995 seconds Warning -- Dangling processes: {} Warning -- multiprocessing.Manager still has [, ] active children after 5.115814491000492 seconds ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 17:10:35 2020 From: report at bugs.python.org (Shantanu) Date: Mon, 04 May 2020 21:10:35 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588626635.83.0.587769098191.issue40334@roundup.psfhosted.org> Change by Shantanu : ---------- nosy: +hauntsaninja nosy_count: 7.0 -> 8.0 pull_requests: +19226 pull_request: https://github.com/python/cpython/pull/19911 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 17:34:10 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 04 May 2020 21:34:10 +0000 Subject: [issue36543] Remove old-deprecated ElementTree features (part 2) In-Reply-To: <1554566782.39.0.176680363975.issue36543@roundup.psfhosted.org> Message-ID: <1588628050.35.0.142618328643.issue36543@roundup.psfhosted.org> Christian Heimes added the comment: For the record, I'm quite unhappy that xml.etree.cElementTree was removed without going through a proper active deprecation cycle with plenty of head start. The removal came as a surprise to me -- and I'm a core dev, author of PEP 594 and owner of the defusedxml package. xml.etree.cElementTree module was also never added to PEP 4 and is still not mentioned as removed in PEP 4. This changeset broke defusedxml, a package with over 10M downloads a month and 57k dependencies on Github. I'm sure that the removal is going to cause more trouble for other packages, too. In PEP 594 I deliberately included a long deprecation phase for all packages with at least one release deprecation warnings. I gave users plenty of time to plan for removal. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 17:49:54 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 04 May 2020 21:49:54 +0000 Subject: [issue39946] Remove _PyThreadState_GetFrame In-Reply-To: <1584034848.74.0.766421748348.issue39946@roundup.psfhosted.org> Message-ID: <1588628994.13.0.0569767827289.issue39946@roundup.psfhosted.org> Gregory P. Smith added the comment: Thanks! We use this function internally in some VM traceback grabbing code but the best solution looks to just be for us to adopt the patch to 3.9 on our interpreter until we're running on 3.9. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 17:50:53 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 May 2020 21:50:53 +0000 Subject: [issue39946] Remove _PyThreadState_GetFrame In-Reply-To: <1584034848.74.0.766421748348.issue39946@roundup.psfhosted.org> Message-ID: <1588629053.29.0.418418652784.issue39946@roundup.psfhosted.org> STINNER Victor added the comment: > We use this function internally in some VM traceback grabbing code Would you mind to elaborate your use case? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 17:51:07 2020 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 04 May 2020 21:51:07 +0000 Subject: [issue40505] getpath.c doesn't know about lib64 Message-ID: <1588629067.84.0.887023365467.issue40505@roundup.psfhosted.org> New submission from Marc-Andre Lemburg : On platforms which configure identifies as bi-arch platform, libdir is set to $[exec_prefix}/lib64, which results in the C extensions to get installed in e.g. /usr/local/lib64/python3.8/lib-dynload/. However, the getpath.c routines use a fixed "lib/python" VERSION (see https://github.com/python/cpython/blob/3.8/Modules/getpath.c#L1200) path to build sys.path. As a result, the built Python binary cannot load the builtin C extensions. A work-around on OpenSUSE is to set CONFIG_SITE="" when configuring Python. This disables the bi-arch support and has libdir default to ${exec_prefix}/lib again. Looking at the master branch, this may already have been fixed for 3.9, since a PLATLIBDIR variable is used instead. The patch would have to be backported to earlier Python versions as well. ---------- components: Interpreter Core messages: 368086 nosy: lemburg priority: normal severity: normal status: open title: getpath.c doesn't know about lib64 type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 17:53:19 2020 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 04 May 2020 21:53:19 +0000 Subject: [issue40505] getpath.c doesn't know about lib64 In-Reply-To: <1588629067.84.0.887023365467.issue40505@roundup.psfhosted.org> Message-ID: <1588629199.38.0.260346639811.issue40505@roundup.psfhosted.org> Marc-Andre Lemburg added the comment: Just to clarify: the CONFIG_SITE script on OpenSUSE causes configure to use lib64, not the Python configure script itself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 17:54:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 May 2020 21:54:12 +0000 Subject: [issue40505] getpath.c doesn't know about lib64 In-Reply-To: <1588629067.84.0.887023365467.issue40505@roundup.psfhosted.org> Message-ID: <1588629252.86.0.715883775479.issue40505@roundup.psfhosted.org> STINNER Victor added the comment: Hum, this issue seems to be specific to Fedora and SuSE. Did you open an issue on OpenSuSE bug tracker? > Looking at the master branch, this may already have been fixed for 3.9, since a PLATLIBDIR variable is used instead. The patch would have to be backported to earlier Python versions as well. Yeah, this issue looks like a duplicate of bpo-1294959 which has been fixed. I suggest to close the issue. I had to a new attribute to the sys module, not like the thing that we can do in a stable version. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 17:56:08 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 04 May 2020 21:56:08 +0000 Subject: [issue21596] asyncio.wait fails when futures list is empty In-Reply-To: <1401294149.12.0.93780466725.issue21596@psf.upfronthosting.co.za> Message-ID: <1588629368.11.0.254460233524.issue21596@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 9d74658f0a6e8a9b8d6dcf199dda886f35c6ad68 by Joel Rosdahl in branch 'master': bpo-40499: Mention that asyncio.wait() needs a non-empty aws set (GH-19900) https://github.com/python/cpython/commit/9d74658f0a6e8a9b8d6dcf199dda886f35c6ad68 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 17:56:08 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 04 May 2020 21:56:08 +0000 Subject: [issue33649] asyncio docs overhaul In-Reply-To: <1527277722.54.0.682650639539.issue33649@psf.upfronthosting.co.za> Message-ID: <1588629368.25.0.552892974976.issue33649@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 9d74658f0a6e8a9b8d6dcf199dda886f35c6ad68 by Joel Rosdahl in branch 'master': bpo-40499: Mention that asyncio.wait() needs a non-empty aws set (GH-19900) https://github.com/python/cpython/commit/9d74658f0a6e8a9b8d6dcf199dda886f35c6ad68 ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 17:56:08 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 04 May 2020 21:56:08 +0000 Subject: [issue40499] asyncio.wait documentation on non-emptiness requirement lost in bpo-33649 In-Reply-To: <1588594577.55.0.625072789912.issue40499@roundup.psfhosted.org> Message-ID: <1588629368.8.0.20194850888.issue40499@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 9d74658f0a6e8a9b8d6dcf199dda886f35c6ad68 by Joel Rosdahl in branch 'master': bpo-40499: Mention that asyncio.wait() needs a non-empty aws set (GH-19900) https://github.com/python/cpython/commit/9d74658f0a6e8a9b8d6dcf199dda886f35c6ad68 ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 17:56:50 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 04 May 2020 21:56:50 +0000 Subject: [issue40499] asyncio.wait documentation on non-emptiness requirement lost in bpo-33649 In-Reply-To: <1588594577.55.0.625072789912.issue40499@roundup.psfhosted.org> Message-ID: <1588629410.98.0.416735129985.issue40499@roundup.psfhosted.org> Change by Guido van Rossum : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 18:15:13 2020 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 04 May 2020 22:15:13 +0000 Subject: [issue40505] getpath.c doesn't know about lib64 In-Reply-To: <1588629067.84.0.887023365467.issue40505@roundup.psfhosted.org> Message-ID: <1588630513.96.0.950767712343.issue40505@roundup.psfhosted.org> Marc-Andre Lemburg added the comment: No, I have not opened a bug report on OpenSUSE. Since the OS uses bi-arch throughout, using lib64 is the natural thing to use for libdir on the OS. I think the issue lies with getpath.c only, since it makes an assumption about the libdir config value, which doesn't necessarily hold in practice. The libdir config value can be changed via the standard --libdir configure parameter, so getpath.c should really not assume that the default setting is always used. Having a variable in Python 3.9 is nice, but perhaps we can still make Python 3.7 and 3.8 work as well. The correct approach to building the full lib_python path is not to use exec_prefix + "/lib/python" + VERSION, but instead to use libdir + "/python" + VERSION (which corresponds to the Makefile variable BINLIBDEST). libdir would have to be taken from the config variable LIBDIR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 19:35:18 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Mon, 04 May 2020 23:35:18 +0000 Subject: [issue40504] Restore weakref support for lru_cache wrappers In-Reply-To: <1588624586.76.0.0628520967833.issue40504@roundup.psfhosted.org> Message-ID: <1588635318.94.0.452410554111.issue40504@roundup.psfhosted.org> Dennis Sweeney added the comment: I can submit a PR. Just making sure I understand, is this essentially the desired behavior change? import weakref import functools if 0: from test.support import import_fresh_module functools = import_fresh_module('functools', blocked=['_functools']) @functools.lru_cache def f(x): return x ref_to_f = weakref.ref(f) print(ref_to_f) # Current: # TypeError: cannot create weak reference to 'functools._lru_cache_wrapper' object # Desired: # ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 19:52:58 2020 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 04 May 2020 23:52:58 +0000 Subject: [issue40454] DEBUG kw to asyncio.run overrides DEBUG mode set elsewhere In-Reply-To: <1588277169.66.0.186559339191.issue40454@roundup.psfhosted.org> Message-ID: <1588636378.56.0.783132649046.issue40454@roundup.psfhosted.org> Yury Selivanov added the comment: Good catch. The function should be fixed to: _marker = object() def run(coro, *, debug=_marker): if debug is not _marker: loop.set_debug(debug) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 20:04:18 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Tue, 05 May 2020 00:04:18 +0000 Subject: [issue40464] functools.singledispatch doesn't verify annotation is on FIRST parameter In-Reply-To: <1588316641.36.0.617194746525.issue40464@roundup.psfhosted.org> Message-ID: <1588637058.35.0.626777727515.issue40464@roundup.psfhosted.org> Filipe La?ns added the comment: Right, forgot about that. We can get the first argument name from inspect.signature and then fetch it from the get_type_hints dictionary, I don't know a better way to do it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 21:49:52 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 05 May 2020 01:49:52 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1588643392.64.0.171784516435.issue1635741@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 92a98ed97513c6e365ce8765550ea65d0ddc8cd7 by Dong-hee Na in branch 'master': bpo-1635741: Port syslog module to multiphase initialization (GH-19907) https://github.com/python/cpython/commit/92a98ed97513c6e365ce8765550ea65d0ddc8cd7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 21:59:27 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 05 May 2020 01:59:27 +0000 Subject: [issue40504] Restore weakref support for lru_cache wrappers In-Reply-To: <1588624586.76.0.0628520967833.issue40504@roundup.psfhosted.org> Message-ID: <1588643967.7.0.68568250376.issue40504@roundup.psfhosted.org> Raymond Hettinger added the comment: Yes. That is the desired behavior. Use Objects/setobject.c and Include/setobject.h as a model. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 22:12:03 2020 From: report at bugs.python.org (Domenico Ragusa) Date: Tue, 05 May 2020 02:12:03 +0000 Subject: [issue40506] add support for os.Pathlike filenames in zipfile.ZipFile.writestr Message-ID: <1588644723.41.0.516863649113.issue40506@roundup.psfhosted.org> New submission from Domenico Ragusa : ZipFile seems to support Pathlike objects pretty well, except in ZipFile.writestr. For example: >>> a = ZipFile(Path('test.zip'), 'w') # this works ok >>> a.write(Path('./foo.jpeg'), arcname=PurePath('/some/thing.jpeg')) # this works as well >>> a.writestr(PurePath('/test.txt'), 'idk') # this doesn't Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.8/zipfile.py", line 1788, in writestr zinfo = ZipInfo(filename=zinfo_or_arcname, File "/usr/lib/python3.8/zipfile.py", line 349, in __init__ null_byte = filename.find(chr(0)) AttributeError: 'PurePosixPath' object has no attribute 'find' I think it would be more consistent if it accepted any kind of paths, it would suffice to call os.fspath in ZipInfo.__init__ when the filename is a Pathlike-object, it's just 2 lines (+ tests, of course). Can I go ahead and prepare a patch for this? ---------- components: Library (Lib) messages: 368098 nosy: d.ragusa priority: normal severity: normal status: open title: add support for os.Pathlike filenames in zipfile.ZipFile.writestr type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 22:33:23 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 05 May 2020 02:33:23 +0000 Subject: [issue40459] [easy] undefined names in platform.py In-Reply-To: <1588290308.75.0.293273104248.issue40459@roundup.psfhosted.org> Message-ID: <1588646003.96.0.895657296827.issue40459@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 1e7e4519a8ddc2239101a0146d788c9161143a77 by Dennis Sweeney in branch 'master': bpo-40459: Fix NameError in platform.py (GH-19855) https://github.com/python/cpython/commit/1e7e4519a8ddc2239101a0146d788c9161143a77 ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 22:33:37 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 05 May 2020 02:33:37 +0000 Subject: [issue40459] [easy] undefined names in platform.py In-Reply-To: <1588290308.75.0.293273104248.issue40459@roundup.psfhosted.org> Message-ID: <1588646017.48.0.93650258444.issue40459@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +19227 pull_request: https://github.com/python/cpython/pull/19912 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 22:33:47 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 05 May 2020 02:33:47 +0000 Subject: [issue40459] [easy] undefined names in platform.py In-Reply-To: <1588290308.75.0.293273104248.issue40459@roundup.psfhosted.org> Message-ID: <1588646027.92.0.333006831548.issue40459@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19228 pull_request: https://github.com/python/cpython/pull/19913 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 22:51:40 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 05 May 2020 02:51:40 +0000 Subject: [issue40459] [easy] undefined names in platform.py In-Reply-To: <1588290308.75.0.293273104248.issue40459@roundup.psfhosted.org> Message-ID: <1588647100.06.0.6386241225.issue40459@roundup.psfhosted.org> miss-islington added the comment: New changeset 8ddf91543890e38c76aa0029482c6f5f5c444837 by Miss Islington (bot) in branch '3.7': bpo-40459: Fix NameError in platform.py (GH-19855) https://github.com/python/cpython/commit/8ddf91543890e38c76aa0029482c6f5f5c444837 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 22:51:52 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 05 May 2020 02:51:52 +0000 Subject: [issue40459] [easy] undefined names in platform.py In-Reply-To: <1588290308.75.0.293273104248.issue40459@roundup.psfhosted.org> Message-ID: <1588647112.44.0.323337512587.issue40459@roundup.psfhosted.org> miss-islington added the comment: New changeset efc782d29e229924076ffb6645a72f26242fb3ef by Miss Islington (bot) in branch '3.8': bpo-40459: Fix NameError in platform.py (GH-19855) https://github.com/python/cpython/commit/efc782d29e229924076ffb6645a72f26242fb3ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 22:57:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 02:57:49 +0000 Subject: [issue40459] [easy] undefined names in platform.py In-Reply-To: <1588290308.75.0.293273104248.issue40459@roundup.psfhosted.org> Message-ID: <1588647469.04.0.0323366162563.issue40459@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 4 23:52:08 2020 From: report at bugs.python.org (wyz23x2) Date: Tue, 05 May 2020 03:52:08 +0000 Subject: [issue40051] Dead link in help(lib2to3/idlelib/turtledemo/tkinter.sub/test_*/?) In-Reply-To: <1585026386.04.0.352572849659.issue40051@roundup.psfhosted.org> Message-ID: <1588650728.08.0.207493026465.issue40051@roundup.psfhosted.org> wyz23x2 added the comment: OK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 00:17:00 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 05 May 2020 04:17:00 +0000 Subject: [issue40316] Add zero function to time, datetime, which acts as the use case of replace to limit resolution In-Reply-To: <1587202635.96.0.0810977655343.issue40316@roundup.psfhosted.org> Message-ID: <1588652220.82.0.996161482911.issue40316@roundup.psfhosted.org> Raymond Hettinger added the comment: FWIW, I like the answer in the StackOverflow link better than this proposal. At any rate, I think Terry's suggestion is a good one. If you would like to move forward with this, please take it to python-ideas. That said, if another core-dev wants to champion this, feel free to re-open. ---------- nosy: +rhettinger resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 01:06:02 2020 From: report at bugs.python.org (Roundup Robot) Date: Tue, 05 May 2020 05:06:02 +0000 Subject: [issue13097] [easy C issue] ctypes: segfault with large number of callback arguments In-Reply-To: <1317700637.71.0.186696346618.issue13097@psf.upfronthosting.co.za> Message-ID: <1588655162.67.0.161491104394.issue13097@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 5.0 -> 6.0 pull_requests: +19229 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/19914 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 01:52:17 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 05 May 2020 05:52:17 +0000 Subject: [issue40286] Add randbytes() method to random.Random In-Reply-To: <1586903418.02.0.530735802731.issue40286@roundup.psfhosted.org> Message-ID: <1588657937.09.0.251767593578.issue40286@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset f01d1be97d740ea0369379ca305646a26694236e by Raymond Hettinger in branch 'master': bpo-40286: Put methods in correct sections. Add security notice to use secrets for session tokens. (GH-19870) https://github.com/python/cpython/commit/f01d1be97d740ea0369379ca305646a26694236e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 01:55:13 2020 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 05 May 2020 05:55:13 +0000 Subject: [issue36543] Remove old-deprecated ElementTree features (part 2) In-Reply-To: <1554566782.39.0.176680363975.issue36543@roundup.psfhosted.org> Message-ID: <1588658113.34.0.9737605411.issue36543@roundup.psfhosted.org> Stefan Behnel added the comment: Christian, I understand your complaint, but I've actually never seen code in the wild that didn't provide a fallback for the import, usually something like what Serhiy spelled out and explained above: try: import xml.etree.cElementTree as ET except ImportError: import xml.etree.ElementTree as ET This makes it inconvenient for users to emit a deprecation warning for the import, because it would impact perfectly future proof code like the above, without a good way for users to work around it by adapting their code, because the above import order is actually what they want. And there's a lot of such code. I personally believe that the breakage will be quite limited. But that's a belief, not a fact. I don't have numbers to back it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 01:56:58 2020 From: report at bugs.python.org (Russell Davis) Date: Tue, 05 May 2020 05:56:58 +0000 Subject: [issue40507] FileNotFound error raised by os.exec* doesn't contain filename Message-ID: <1588658218.29.0.0740534174098.issue40507@roundup.psfhosted.org> New submission from Russell Davis : To repro: >>> import os, sys >>> os.execv("nosuchfile", ["nosuchfile"]) Traceback (most recent call last): File "", line 1, in FileNotFoundError: [Errno 2] No such file or directory >>> print(sys.last_value.filename) None ---------- components: Library (Lib) messages: 368106 nosy: russelldavis priority: normal severity: normal status: open title: FileNotFound error raised by os.exec* doesn't contain filename 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 May 5 01:59:48 2020 From: report at bugs.python.org (Russell Davis) Date: Tue, 05 May 2020 05:59:48 +0000 Subject: [issue40507] FileNotFound error raised by os.exec* doesn't contain filename In-Reply-To: <1588658218.29.0.0740534174098.issue40507@roundup.psfhosted.org> Message-ID: <1588658388.7.0.357511151037.issue40507@roundup.psfhosted.org> Change by Russell Davis : ---------- keywords: +patch pull_requests: +19230 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19915 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 02:08:07 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 05 May 2020 06:08:07 +0000 Subject: [issue40489] INCREF/DECREFs around the rich comparison needs tests In-Reply-To: <1588542089.41.0.502312186848.issue40489@roundup.psfhosted.org> Message-ID: <1588658887.24.0.110882197965.issue40489@roundup.psfhosted.org> Raymond Hettinger added the comment: Thank you. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 02:31:18 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 05 May 2020 06:31:18 +0000 Subject: [issue36543] Remove old-deprecated ElementTree features (part 2) In-Reply-To: <1554566782.39.0.176680363975.issue36543@roundup.psfhosted.org> Message-ID: <1588660278.13.0.239343835015.issue36543@roundup.psfhosted.org> Serhiy Storchaka added the comment: xml.etree.cElementTree should be treated in the same way as cStringIO and cPickle -- they where separate modules in the past, but now the acceleration is used by default in io.StringIO and pickle. It looks an oversign that it was not removed in 3.0. xml.etree.cElementTree was deprecated since 3.3. I think 6 releases (3.3-3.8) is long enough period. It was not possible to emit a deprecation warning at runtime for reasons mentioned above. And we did not have deprecation warnings for cStringIO and cPickle for the same reasons. defusedxml is the only known to me package which does not fall back to xml.etree.ElementTree. I hope it is easy to fix it. In Python xml.etree.cElementTree is the same as xml.etree.ElementTree, so you can just import xml.etree.ElementTree. And you can use the above mentioned idiom if you still support Python 2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 03:06:33 2020 From: report at bugs.python.org (Louis) Date: Tue, 05 May 2020 07:06:33 +0000 Subject: [issue40508] IDLE won't open Message-ID: <1588662393.26.0.656755064199.issue40508@roundup.psfhosted.org> Change by Louis : ---------- components: macOS files: IDLE.app.zip nosy: Louis, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: IDLE won't open type: performance versions: Python 3.6 Added file: https://bugs.python.org/file49120/IDLE.app.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 03:38:17 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 05 May 2020 07:38:17 +0000 Subject: [issue40508] IDLE won't open Message-ID: <1588664297.07.0.199629982992.issue40508@roundup.psfhosted.org> Change by Ned Deily : ---------- assignee: -> terry.reedy components: +IDLE -macOS nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 03:39:49 2020 From: report at bugs.python.org (Sergio Rael) Date: Tue, 05 May 2020 07:39:49 +0000 Subject: [issue40496] re.findall() takes a long time (100% cup usage) on Python 3.6.10 In-Reply-To: <1588586050.03.0.673760016961.issue40496@roundup.psfhosted.org> Message-ID: <1588664389.24.0.697904497919.issue40496@roundup.psfhosted.org> Sergio Rael added the comment: Thank you for your reply R?mi. I agree with you that the reason can be that the pattern is too complex. I just noticed that in Python 3.7 using the same pattern finish the searchall almost instantaneously, but in 3.6 the CPU goes to 100% and it takes ages to finish. In fact I don't know if this can finish at all because it takes so long that I had to stop it. I tough it would be a good idea to let you know this behaviour. Of course, after this, I don't use 3.6 anymore. Thanks again! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 04:16:12 2020 From: report at bugs.python.org (Louis) Date: Tue, 05 May 2020 08:16:12 +0000 Subject: [issue40508] IDLE won't open Message-ID: <1588666572.44.0.988085318224.issue40508@roundup.psfhosted.org> New submission from Louis : Hi, I cannot open IDLE. When i try and open it from finder it says that the file could not be opened. When I try and open it from the dock, it bounces once and then nothing else happens. When i try and open it from terminal, it says that there is a bad cpu type in the executable. -Louis ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 04:42:22 2020 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Tue, 05 May 2020 08:42:22 +0000 Subject: [issue36543] Remove old-deprecated ElementTree features (part 2) In-Reply-To: <1554566782.39.0.176680363975.issue36543@roundup.psfhosted.org> Message-ID: <1588668142.34.0.20947544484.issue36543@roundup.psfhosted.org> Miro Hron?ok added the comment: Some stats: See https://bugzilla.redhat.com/showdependencytree.cgi?id=PYTHON39&hide_resolved=0 and Ctrl+F for cElementTree. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 04:43:35 2020 From: report at bugs.python.org (Cajetan Rodrigues) Date: Tue, 05 May 2020 08:43:35 +0000 Subject: [issue40350] modulefinder chokes on numpy - dereferencing None in spec.loader In-Reply-To: <1587454417.83.0.816569073565.issue40350@roundup.psfhosted.org> Message-ID: <1588668215.47.0.58775783563.issue40350@roundup.psfhosted.org> Change by Cajetan Rodrigues : ---------- keywords: +patch pull_requests: +19231 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/19917 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 04:47:08 2020 From: report at bugs.python.org (Cajetan Rodrigues) Date: Tue, 05 May 2020 08:47:08 +0000 Subject: [issue40350] modulefinder chokes on numpy - dereferencing None in spec.loader In-Reply-To: <1587454417.83.0.816569073565.issue40350@roundup.psfhosted.org> Message-ID: <1588668428.95.0.624913213259.issue40350@roundup.psfhosted.org> Cajetan Rodrigues added the comment: Turns out using _PKG_DIRECTORY as a type for namespace packages ended up making `_find_module` try to search for an __init__.py within them, since it had no understanding of the diff. between a namespace package and a regular one (the lack of __init__.py), and caused it to break. I've raised a PR with a new type _NSP_DIRECTORY for namespace-directories. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 04:51:24 2020 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 05 May 2020 08:51:24 +0000 Subject: [issue36543] Remove old-deprecated ElementTree features (part 2) In-Reply-To: <1554566782.39.0.176680363975.issue36543@roundup.psfhosted.org> Message-ID: <1588668684.94.0.795317352134.issue36543@roundup.psfhosted.org> Stefan Behnel added the comment: Thanks Miro, that's beautiful. Good to know that I'm not the only one who doesn't read documentation. ;-) So, how do we deal with this? We can't warn about the deprecation without annoying everyone. We can't just remove the empty module without breaking lots of code. We also can't really let the module stick around forever and let people write more code that uselessly imports it. Any ideas? ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 04:52:01 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 05 May 2020 08:52:01 +0000 Subject: [issue40508] IDLE won't open In-Reply-To: <1588666572.44.0.988085318224.issue40508@roundup.psfhosted.org> Message-ID: <1588668721.72.0.153783700113.issue40508@roundup.psfhosted.org> Ronald Oussoren added the comment: What version of macOS do you use? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 04:54:11 2020 From: report at bugs.python.org (Louis) Date: Tue, 05 May 2020 08:54:11 +0000 Subject: [issue40508] IDLE won't open In-Reply-To: <1588666572.44.0.988085318224.issue40508@roundup.psfhosted.org> Message-ID: <1588668851.85.0.84400200089.issue40508@roundup.psfhosted.org> Louis added the comment: Mac OS Catalina 10.15.4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 04:58:35 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 05 May 2020 08:58:35 +0000 Subject: [issue40508] IDLE won't open In-Reply-To: <1588666572.44.0.988085318224.issue40508@roundup.psfhosted.org> Message-ID: <1588669115.77.0.162702323581.issue40508@roundup.psfhosted.org> Ned Deily added the comment: Thanks for submitting the version of IDLE you were using. It appears to be a Python 3.6.1 from 2017; the version is very old-of-date and no longer supported. Python 3.6.x is now in security fix mode only; Python 3.8.2 is now current. Unless you have a reallygood reason to stick with it you should download and use the latest version from here: https://www.python.org/downloads/ The reason you are getting the bad cpy type message is that the 3.6.1 variant you are trying to use was built for 32-bit architectures only. macOS 10.15 no longer supports running 32-bit executables. The most recent downloads from python.org for macOS are 64-bit executables and work fine on 10.15. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 04:59:49 2020 From: report at bugs.python.org (Louis) Date: Tue, 05 May 2020 08:59:49 +0000 Subject: [issue40508] IDLE won't open In-Reply-To: <1588666572.44.0.988085318224.issue40508@roundup.psfhosted.org> Message-ID: <1588669189.5.0.49462317901.issue40508@roundup.psfhosted.org> Louis added the comment: Thank You for your reply -Louis ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 05:06:16 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 05 May 2020 09:06:16 +0000 Subject: [issue36543] Remove old-deprecated ElementTree features (part 2) In-Reply-To: <1554566782.39.0.176680363975.issue36543@roundup.psfhosted.org> Message-ID: <1588669576.87.0.209896053993.issue36543@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you Miro for information. It looks as awesome work! The simplest solution would be to restore xml.etree.cElementTree and keep it forever. It will not harm anyone, it is just outdated import here and there. We could also write an import hook which would analyze the code of the importer and warn only if xml.etree.cElementTree is imported without a common idiom. But it looks slightly overcomplicated to me. And we can just let the users to fix they code for 3.9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 05:18:05 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 05 May 2020 09:18:05 +0000 Subject: [issue40496] re.findall() takes a long time (100% cup usage) on Python 3.6.10 In-Reply-To: <1588586050.03.0.673760016961.issue40496@roundup.psfhosted.org> Message-ID: <1588670285.78.0.634716648085.issue40496@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is hard to say what is the problem, but seems it was solved in 3.7. Either it was an optimization, or a bug fix which had such side effect. If it was a bug fix, it was one of backward incompatible bugfixes which are not backported to older versions. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 05:20:19 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 05 May 2020 09:20:19 +0000 Subject: [issue36543] Remove old-deprecated ElementTree features (part 2) In-Reply-To: <1554566782.39.0.176680363975.issue36543@roundup.psfhosted.org> Message-ID: <1588670419.19.0.700493801819.issue36543@roundup.psfhosted.org> Christian Heimes added the comment: Stefan wrote: > Christian, I understand your complaint, but I've actually never seen code in the wild that didn't provide a fallback for the import, usually something like what Serhiy spelled out My package defusedxml broke with the change. Python's documention recommends my package for parsing XML from untrusted sources. defusedxml 0.7.0rc1 addresses the problem by removing defusedxml.cElementTree in 3.9, too. The fix is going to break other packages, too. Serhiy wrote: > xml.etree.cElementTree should be treated in the same way as cStringIO and cPickle -- they where separate modules in the past, but now the acceleration is used by default in io.StringIO and pickle. It looks an oversign that it was not removed in 3.0. I completely agree with you. It should have been removed with 3.0. But this fact doesn't grant a carte blanche to remove the module without a deprecation phase with a proper deadline. Stefan wrote: > So, how do we deal with this? We can't warn about the deprecation without annoying everyone. We can't just remove the empty module without breaking lots of code. We also can't really let the module stick around forever and let people write more code that uselessly imports it. I prefer annoyance over getting broking by surprise. If the current deprecation warning system doesn't work for us, then we need to come up with a better plan. In the mean time please give users one release head star to adjust their code. I propose that feature shall not be removed in 3.x unless the documentation of 3.(x-1).0 release has explicitly stated the removal of a feature (unless other special circumstances and general consense require it). * Add deprecation and removal warning for xml.etree.cElementTree to whatsnew/3.9.rst * Remove xml.etree.cElementTree in 3.10 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 05:28:24 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 05 May 2020 09:28:24 +0000 Subject: [issue36543] Remove old-deprecated ElementTree features (part 2) In-Reply-To: <1554566782.39.0.176680363975.issue36543@roundup.psfhosted.org> Message-ID: <1588670904.08.0.0513546377285.issue36543@roundup.psfhosted.org> Christian Heimes added the comment: IMHO we don't have to spend extra work on an import hook. It might be a good idea to raise the problem with https://github.com/PyCQA/, though. Large projects tend to use code checkers and linters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 05:30:34 2020 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 05 May 2020 09:30:34 +0000 Subject: [issue36543] Remove old-deprecated ElementTree features (part 2) In-Reply-To: <1554566782.39.0.176680363975.issue36543@roundup.psfhosted.org> Message-ID: <1588671034.09.0.806612725158.issue36543@roundup.psfhosted.org> Stefan Behnel added the comment: It's not like the deprecation was hidden ? the ET docs have this line right at the top: "Changed in version 3.3: This module will use a fast implementation whenever available. The xml.etree.cElementTree module is deprecated." https://docs.python.org/3/library/xml.etree.elementtree.html But as I said, people don't read docs. I agree that it's best to keep the module "for now", and maybe leave it to IDEs and code checkers to spread the deprecation notice for us. As Serhiy said, it doesn't hurt us much to have it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 05:40:25 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 05 May 2020 09:40:25 +0000 Subject: [issue40028] Math module method to find prime factors for non-negative int n In-Reply-To: <1584733974.83.0.0417466712916.issue40028@roundup.psfhosted.org> Message-ID: <1588671625.13.0.930966030759.issue40028@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- nosy: +remi.lapeyre nosy_count: 7.0 -> 8.0 pull_requests: +19232 pull_request: https://github.com/python/cpython/pull/19918 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 05:43:20 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 05 May 2020 09:43:20 +0000 Subject: [issue36543] Remove old-deprecated ElementTree features (part 2) In-Reply-To: <1554566782.39.0.176680363975.issue36543@roundup.psfhosted.org> Message-ID: <1588671800.74.0.231443701349.issue36543@roundup.psfhosted.org> Christian Heimes added the comment: 3.3.0 was released in 2012. That's almost a lifetime ago. I assume that majority of users either forgot, missed the note, or no longer took the deprecation serious. After seven, eight years we should do our users a service and point out the deprecation with a concrete deadline. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 05:53:22 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 05 May 2020 09:53:22 +0000 Subject: [issue40028] Math module method to find prime factors for non-negative int n In-Reply-To: <1584733974.83.0.0417466712916.issue40028@roundup.psfhosted.org> Message-ID: <1588672402.9.0.793846038994.issue40028@roundup.psfhosted.org> R?mi Lapeyre added the comment: >> Regardless, how can we best move forward with this idea? > Provide a pull request. Hi, I looked into what scientific programs where doing. Most of them uses a form of the Baillie?PSW primality test which is a probabilistic primality test that's never wrong up to 2**64 and for which their is currently no known pseudoprime. This first version I wrote uses a deterministic variant of the Miller-Rabin test for n < 3317044064679887385961981. For larger n, a probabilistic Miller-Rabin test is used with s=25 random bases. The probabilistic Miller-Rabin test is never wrong when it concludes that n is composite and has a probability of error of 4^(-s) when it concludes that n is prime. The implementations of next_prime() and previous_prime() are straightforward and factorise() uses the Phollard's rho heuristic which gives satisfactory results for numbers with small factors. It's a generator as it may hang when n has very large factors e.g. 2**(2**8)+1. I implemented all functions Steven D'Aprano suggested but did not bother with the sieve as Tim Peters already provided one in the python-ideas thread. The code is in imath for now but I can move it. Hopefully this is enough to bikeshed the API, if this proposal is accepted I will write more tests and fix any bug found. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 05:54:32 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 05 May 2020 09:54:32 +0000 Subject: [issue40028] Math module method to find prime factors for non-negative int n In-Reply-To: <1584733974.83.0.0417466712916.issue40028@roundup.psfhosted.org> Message-ID: <1588672472.67.0.7511168137.issue40028@roundup.psfhosted.org> R?mi Lapeyre added the comment: I can't mark the issue as open thought, can someone do this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 06:30:44 2020 From: report at bugs.python.org (Shani Armon) Date: Tue, 05 May 2020 10:30:44 +0000 Subject: [issue40509] In argparse, allow REMAINDER(...) arguments in a mutually exclusive group Message-ID: <1588674644.49.0.299540849008.issue40509@roundup.psfhosted.org> New submission from Shani Armon : Options specified with the REMAINDER nargs should be treated as optional. And an empty list should be treated as default. ---------- components: Library (Lib) messages: 368126 nosy: Shani Armon, rhettinger priority: normal severity: normal status: open title: In argparse, allow REMAINDER(...) arguments in a mutually exclusive group type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 06:43:24 2020 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 05 May 2020 10:43:24 +0000 Subject: [issue36543] Remove old-deprecated ElementTree features (part 2) In-Reply-To: <1554566782.39.0.176680363975.issue36543@roundup.psfhosted.org> Message-ID: <1588675404.75.0.986637046482.issue36543@roundup.psfhosted.org> Stefan Behnel added the comment: >> But as I said, people don't read docs. > After seven, eight years we should do our users a service and point out the deprecation with a concrete deadline. ?\_(?)_/? Honestly, let's just keep it. Maybe we can add an invisible PendingDeprecationWarning and wait if some static analysers pick it up. I wouldn't want to invest any more work into it than that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 07:03:31 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 05 May 2020 11:03:31 +0000 Subject: [issue40028] Math module method to find prime factors for non-negative int n In-Reply-To: <1588672402.9.0.793846038994.issue40028@roundup.psfhosted.org> Message-ID: <20200505105859.GD16433@ando.pearwood.info> Steven D'Aprano added the comment: Miller-Rabin is known to be deterministic for all N < 2**64 too. To be pedantic, M-R is known to be deterministic if you check every value up to sqrt(N), or possibly 2*log(N) if the generalized Riemann hypothesis is true. The question is whether there is a smaller set of values that is sufficient to make M-R deterministic, and that has been proven for N up to 2**64. Wikipedia has more details including some small sets of bases which are deterministic. There may be even smaller sets, but for N < 2**64, just 12 M-R tests with the following set of bases is sufficient to give a deterministic result: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37. https://en.wikipedia.org/wiki/Miller%E2%80%93Rabin_primality_test#Testing_against_small_sets_of_bases ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 07:27:33 2020 From: report at bugs.python.org (Shani Armon) Date: Tue, 05 May 2020 11:27:33 +0000 Subject: [issue40509] In argparse, allow REMAINDER(...) arguments in a mutually exclusive group In-Reply-To: <1588674644.49.0.299540849008.issue40509@roundup.psfhosted.org> Message-ID: <1588678053.94.0.12041267474.issue40509@roundup.psfhosted.org> Change by Shani Armon : ---------- keywords: +patch pull_requests: +19233 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19919 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 07:30:45 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 05 May 2020 11:30:45 +0000 Subject: [issue40028] Math module method to find prime factors for non-negative int n In-Reply-To: <1584733974.83.0.0417466712916.issue40028@roundup.psfhosted.org> Message-ID: <1588678245.76.0.351822793813.issue40028@roundup.psfhosted.org> Christian Heimes added the comment: I'm still not convinced that it's a good idea to add a general prime factor function to Python's standard library. IMO the feature is better suited for an external math library or crypto library. If we are going to add a prime factor function, then we should consider existing implementations. OpenSSL has BN_generate_prime_ex() [1] API. It's based on MR probabilistic prime test. The API can also generate primes with additional properties, e.g. Sophie Germain primes or primes suitable for finite field Diffie-Hellman. [1] https://www.openssl.org/docs/man1.1.1/man3/BN_generate_prime_ex.html ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 07:31:57 2020 From: report at bugs.python.org (David Naylor) Date: Tue, 05 May 2020 11:31:57 +0000 Subject: [issue40510] [regression] ZipFile fails to round trip on some files Message-ID: <1588678317.42.0.364207173861.issue40510@roundup.psfhosted.org> New submission from David Naylor : With commit 18ee29d0b8 [1] a change was introduced that prevents a round-trip of some zip files (i.e. files generated by Microsoft Excel) due to the clobbering of `ZipInfo.flag_bits`[2] and `external_attr`[3]. For example: ```python[name=zip-round-trip.py] #!/usr/bin/env python3 import io import sys import zipfile compression = zipfile.ZIP_STORED source = sys.stdin dest = sys.stdout with io.BytesIO(source.buffer.read()) as source, io.BytesIO() as buffer: with zipfile.ZipFile(source, "r") as source_zip, zipfile.ZipFile(buffer, "w") as dest_zip: dest_zip.comment = source_zip.comment for info in source_zip.infolist(): content = source_zip.read(info) dest_zip.writestr(info, content, compression) buffer.seek(0) dest.buffer.write(buffer.read()) ``` ```shell > python3.5 zip-round-trip.py < Book1.zip > Python.zip > diff Book1.zip Python.zip > python3.6 zip-round-trip.py < Book1.zip > Python.zip > diff Book1.zip Python.zip Binary files Book1.zip and Python.zip differ ``` [1] https://github.com/python/cpython/commit/18ee29d0b870caddc0806916ca2c823254f1a1f9 [2] https://github.com/python/cpython/blob/f01d1be97d740ea0369379ca305646a26694236e/Lib/zipfile.py#L1579 [3] https://github.com/python/cpython/blob/f01d1be97d740ea0369379ca305646a26694236e/Lib/zipfile.py#L1586 ---------- components: Library (Lib) files: Book1.zip messages: 368130 nosy: DragonSA priority: normal severity: normal status: open title: [regression] ZipFile fails to round trip on some files type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file49121/Book1.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 07:51:02 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 05 May 2020 11:51:02 +0000 Subject: [issue36543] Remove old-deprecated ElementTree features (part 2) In-Reply-To: <1554566782.39.0.176680363975.issue36543@roundup.psfhosted.org> Message-ID: <1588679462.48.0.264429811427.issue36543@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +19235 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/19920 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 07:54:37 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 05 May 2020 11:54:37 +0000 Subject: [issue36453] pkgutil.get_importer only return the first valid path_hook(importer) In-Reply-To: <1553731868.7.0.689003457524.issue36453@roundup.psfhosted.org> Message-ID: <1588679677.14.0.997223576138.issue36453@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch nosy: +christian.heimes nosy_count: 1.0 -> 2.0 pull_requests: +19236 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19921 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 07:54:12 2020 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 05 May 2020 11:54:12 +0000 Subject: [issue40028] Math module method to find prime factors for non-negative int n In-Reply-To: <1584733974.83.0.0417466712916.issue40028@roundup.psfhosted.org> Message-ID: <1588679652.81.0.413934954117.issue40028@roundup.psfhosted.org> Mark Dickinson added the comment: Reopening as requested. Adding a new module to the standard library is a fairly big change. I don't think we can do that through just this issue and PR. I think we're going to need a PEP sooner or later. (In any case, a PEP is standard procedure for a new standard library module.) ---------- resolution: postponed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 07:56:07 2020 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 05 May 2020 11:56:07 +0000 Subject: [issue40028] Math module method to find prime factors for non-negative int n In-Reply-To: <1584733974.83.0.0417466712916.issue40028@roundup.psfhosted.org> Message-ID: <1588679767.1.0.207289337957.issue40028@roundup.psfhosted.org> Mark Dickinson added the comment: Here's the relevant part of the dev. guide: https://devguide.python.org/stdlibchanges/#proposal-process The PEP would also need a core dev sponsor. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 07:57:40 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 05 May 2020 11:57:40 +0000 Subject: [issue36543] Remove old-deprecated ElementTree features (part 2) In-Reply-To: <1554566782.39.0.176680363975.issue36543@roundup.psfhosted.org> Message-ID: <1588679860.67.0.308381882839.issue36543@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +19237 pull_request: https://github.com/python/cpython/pull/19921 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 08:09:51 2020 From: report at bugs.python.org (wyz23x2) Date: Tue, 05 May 2020 12:09:51 +0000 Subject: [issue40511] Yellow hint frame blinks when entering () in strings Message-ID: <1588680591.22.0.16376057042.issue40511@roundup.psfhosted.org> New submission from wyz23x2 : The yellow frame blinks as shown in mp4. It's annoying and isn't good to the eyes. ---------- assignee: terry.reedy components: IDLE messages: 368133 nosy: terry.reedy, wyz23x2 priority: normal severity: normal status: open title: Yellow hint frame blinks when entering () in strings type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 08:12:57 2020 From: report at bugs.python.org (wyz23x2) Date: Tue, 05 May 2020 12:12:57 +0000 Subject: [issue40511] Yellow hint frame blinks when entering () in strings In-Reply-To: <1588680591.22.0.16376057042.issue40511@roundup.psfhosted.org> Message-ID: <1588680777.05.0.410236597595.issue40511@roundup.psfhosted.org> wyz23x2 added the comment: OMG, request too large. I can't upload mp4 /(?o?)/~~ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 08:13:07 2020 From: report at bugs.python.org (wyz23x2) Date: Tue, 05 May 2020 12:13:07 +0000 Subject: [issue40511] IDLE yellow hint frame blinks when entering () in strings In-Reply-To: <1588680591.22.0.16376057042.issue40511@roundup.psfhosted.org> Message-ID: <1588680787.85.0.582587898752.issue40511@roundup.psfhosted.org> Change by wyz23x2 : ---------- title: Yellow hint frame blinks when entering () in strings -> IDLE yellow hint frame blinks when entering () in strings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 08:13:27 2020 From: report at bugs.python.org (wyz23x2) Date: Tue, 05 May 2020 12:13:27 +0000 Subject: [issue40511] IDLE yellow hint frame blinks when entering () in strings in functions/classes In-Reply-To: <1588680591.22.0.16376057042.issue40511@roundup.psfhosted.org> Message-ID: <1588680807.37.0.746563496575.issue40511@roundup.psfhosted.org> Change by wyz23x2 : ---------- title: IDLE yellow hint frame blinks when entering () in strings -> IDLE yellow hint frame blinks when entering () in strings in functions/classes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 08:18:22 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 05 May 2020 12:18:22 +0000 Subject: [issue36543] Remove old-deprecated ElementTree features (part 2) In-Reply-To: <1554566782.39.0.176680363975.issue36543@roundup.psfhosted.org> Message-ID: <1588681102.74.0.750663367818.issue36543@roundup.psfhosted.org> Serhiy Storchaka added the comment: I do not think that it is right to emit a warning at import time. We should not punish people which do things right: fallback to xml.etree.ElementTree and test with -We. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 08:19:46 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 05 May 2020 12:19:46 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1588681186.12.0.781878923665.issue1635741@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +19238 pull_request: https://github.com/python/cpython/pull/19923 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 08:51:15 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 12:51:15 +0000 Subject: [issue40512] Meta issue: per-interpreter GIL Message-ID: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> New submission from STINNER Victor : To be able to run multiple (sub)interpreters in parallel, the unique global interpreter lock aka "GIL" should be replace with multiple GILs: one "GIL" per interpreter. The scope of such per-interpreter GIL would be a single interpreter. The current CPython code base is not fully read to have one GIL per interpreter. TODO: * Move signals pending and gil_drop_request from _PyRuntimeState.ceval to PyInterpreterState.ceval: https://github.com/ericsnowcurrently/multi-core-python/issues/34 * Add a lock to pymalloc, or disable pymalloc when subinterpreters are used: https://github.com/ericsnowcurrently/multi-core-python/issues/30 * Make free lists per interpreters: tuple, dict, frame, etc. * Make Unicode interned strings per interpreter * Make Unicode latin1 single character string singletons per interpreter * None, True, False, ... singletons: make them per-interpreter (bpo-39511) or immortal (bpo-40255) * etc. Until we can ensure that no Python object is shared between two interpreters, we might make PyObject.ob_refcnt, PyGC_Head (_gc_next and _gc_prev) and _dictkeysobject.dk_refcnt atomic. C extension modules should be modified as well: * Convert to PEP 489 multi-phase initialization * Replace globals ("static" variables) with a module state, or design a new "per-interpreter" local storage similar to Thread Local Storage (TLS). There is already PyInterpreterState.dict which is convenient to use in "Python" code, but it's not convenient to use in "C" code (code currently using "static int ..." for example). I'm not sure how to handle C extensions which are binding for a C library which has a state and so should not be used multiple times in parallel. Some C extensions use a "global lock" for that. The question is how to get Most of these tasks are already tracked in Eric Snow's "Multi Core Python" project: https://github.com/ericsnowcurrently/multi-core-python/issues This issue is related to PEP 554 "Multiple Interpreters in the Stdlib", but not required by this PEP. This issue is a tracker for sub-issues related to the goal "have one GIL per interpreter". -- Some changes have a negative impact on "single threaded" Python application. Even if the overhead is low, one option to be able to move faster on this issue may be to add a new temporary configure option to have an opt-in build mode to better isolate subinterpreters. Examples: * disable pymalloc * atomic reference counters * disable free lists That would be a temporary solution to "unblock" the development on this list. For the long term, free lists should be made per-interpreter, pymalloc should support multiple interpreters, no Python object must be shared by two interpreters, etc. -- One idea to detect if a Python object is shared by two interpreters *in debug mode* would be to store a reference to the interpreter which created it, and then check if the current interpreter is the same. If not, fail with a Python Fatal Error. -- During Python 3.9 development cycle, many states moved from the global _PyRuntimeState to per-interpreter PyInterpreterState: * GC state (bpo-36854) * warnings state (bpo-36737) * small integer singletons (bpo-38858) * parser state (bpo-36876) * ceval pending calls and "eval breaker" (bpo-39984) * etc. Many corner cases related to daemon threads have also been fixed: * https://vstinner.github.io/daemon-threads-python-finalization-python32.html * https://vstinner.github.io/threading-shutdown-race-condition.html * https://vstinner.github.io/gil-bugfixes-daemon-threads-python39.html And more code is now shared for the initialization and finalization of the main interpreter and subinterpreters (ex: see bpo-38858). Subinterpreters builtins and sys are now really isolated from the main interpreter (bpo-38858). -- Obviously, there are likely tons of other issues which are not known at this stage. Again, this issue is a placeholder to track them all. It may be more efficient to create one sub-issue per sub-task, rather than discussing all tasks at the same place. ---------- components: Interpreter Core messages: 368136 nosy: vstinner priority: normal severity: normal status: open title: Meta issue: per-interpreter GIL type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 08:56:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 12:56:33 +0000 Subject: [issue40513] Move _PyRuntimeState.ceval to PyInterpreterState Message-ID: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> New submission from STINNER Victor : To get one GIL per interpreter (bpo-40512), remaining _PyRuntimeState.ceval members should be moved to PyInterpreterState.ceval. The work started in bpo-39984 with ceval "pending calls" and ceval "eval breaker". There are 4 remaining fields: struct _ceval_runtime_state { int recursion_limit; /* Request for dropping the GIL */ _Py_atomic_int gil_drop_request; /* Request for checking signals. */ _Py_atomic_int signals_pending; struct _gil_runtime_state gil; }; The most complex part will be to move the "gil" member: bpo-40512 lists all sub-tasks which must be completed before being able to have one GIL per interpreter without crashing. ---------- components: Interpreter Core messages: 368137 nosy: vstinner priority: normal severity: normal status: open title: Move _PyRuntimeState.ceval to PyInterpreterState versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 08:57:18 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 12:57:18 +0000 Subject: [issue40512] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1588683438.28.0.663645516368.issue40512@roundup.psfhosted.org> STINNER Victor added the comment: > Move signals pending and gil_drop_request from _PyRuntimeState.ceval to PyInterpreterState.ceval: https://github.com/ericsnowcurrently/multi-core-python/issues/34 I created bpo-40513: "Move _PyRuntimeState.ceval to PyInterpreterState". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 08:57:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 12:57:32 +0000 Subject: [issue40513] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1588683452.18.0.474077083728.issue40513@roundup.psfhosted.org> STINNER Victor added the comment: See also: https://github.com/ericsnowcurrently/multi-core-python/issues/34 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 08:58:03 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 12:58:03 +0000 Subject: [issue40513] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1588683483.48.0.174526649232.issue40513@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +19239 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19924 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 09:02:24 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 05 May 2020 13:02:24 +0000 Subject: [issue40028] Math module method to find prime factors for non-negative int n In-Reply-To: <1588678245.76.0.351822793813.issue40028@roundup.psfhosted.org> Message-ID: <20200505125755.GG16433@ando.pearwood.info> Steven D'Aprano added the comment: Speaking of OpenSSL, a few years ago this paper came out about OpenSSL's vulnerability to adversarial composites. Quote: "As examples of our findings, weare able to construct 2048-bit composites that are declared prime with probability 1/16 byOpenSSL?s primality testing in its default configuration; the advertised performance is 2^?80. We can also construct 1024-bit composites that always pass the primality testing routine in GNU GMP when configured with the recommended minimum number of rounds." https://eprint.iacr.org/2018/749.pdf The paper discusses various languages, libraries, crypto toolkits, computer algebra systems, etc, including some Python libraries, and shows how many of them are vulnerable to adversarial composites. With some of them, the authors were able to defeat the isprime function 100% of the time. My take on this is as follows: For 64-bit ints, a deterministic set of M-R bases is sufficient (since it's deterministic there's no way to fool it into passing a composite as prime). For ints with more than 64-bits, the authors suggest either: - a minimum of one M-R test with base 2, followed by 1 Lucas test (this is equivalent to a Baillie-PSW test; there are currently no known Baillie-PSW pseudoprimes and no known adversarily attacks against it; (unless the NSA has some, but if so, they aren't saying) - a default of 64 rounds with randomly choosen Miller-Rabin bases. Presumably doing trial division on larger numbers to weed out the easy cases is acceptable too :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 09:13:51 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 13:13:51 +0000 Subject: [issue40514] Add --experimental-isolated-subinterpreters build option Message-ID: <1588684431.91.0.693668036583.issue40514@roundup.psfhosted.org> New submission from STINNER Victor : Modifying Python internals to have one GIL per interpreter (bpo-40512) is a large project which requires to modify many small things (again, see bpo-40512). I propose to add a temporary build --experimental-isolated-subinterpreters build option to configure for developers who want to hack on isolated subinterpreters. The intent is to speedup bpo-40512 development by making some practice compromises, to have more time to properly design the real fixes. For example, tuple, dict and frame have free lists which are shared by subinterpreters. A practical solution is to simply disable them at build time to avoid the need to have per-interpreter free lists. Another example is pymalloc which is shared by all subinterpreters and rely on the unique global interpreter lock (GIL) to protect its internal states. A practical solution is to disable it and force the usage of libc malloc() function instead. Some compromosises cannot be the default since they have a significant negative impact on performances. So I propose to add a temporary build option until all these small issues will be fixed. ---------- components: Build messages: 368141 nosy: vstinner priority: normal severity: normal status: open title: Add --experimental-isolated-subinterpreters build option versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 09:14:21 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 13:14:21 +0000 Subject: [issue40512] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1588684461.16.0.791738607185.issue40512@roundup.psfhosted.org> STINNER Victor added the comment: > Some changes have a negative impact on "single threaded" Python application. Even if the overhead is low, one option to be able to move faster on this issue may be to add a new temporary configure option to have an opt-in build mode to better isolate subinterpreters. (...) I created bpo-40514: "Add --experimental-isolated-subinterpreters build option". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 09:20:24 2020 From: report at bugs.python.org (Miguel) Date: Tue, 05 May 2020 13:20:24 +0000 Subject: [issue40515] test_ssl.py hangs with SSL 1.1 built with no threads Message-ID: <1588684824.78.0.561425398379.issue40515@roundup.psfhosted.org> New submission from Miguel : Hello, this is my first python bug report! I've been running builds of Python 3.7.x on CentOS Linux release 7.7 (64bit/Intel Core 2 Duo) and I ran into hangs with test_ssl.py when using latest SSL 1.1.1d sources. I've done a full compilation from source for Python 3.7.7 and SSL 1.1 in my workspaces. >From what I can tell the problem is when SSL 1.1 is built with no threading there is no locking enabled by python. This one line change will make the hangs in test_ssl.py go away: Index: Modules/_ssl.c --- Modules/_ssl.c (revision 70) +++ Modules/_ssl.c (working copy) @@ -5875,7 +5875,7 @@ if (!_setup_ssl_threads()) { return NULL; } -#elif OPENSSL_VERSION_1_1 && defined(OPENSSL_THREADS) +#elif OPENSSL_VERSION_1_1 / OpenSSL 1.1.0 builtin thread support is enabled / _ssl_locks_count++; # endif There appears to be an assumption in _ssl.c and test_ssl.y that SSL 1.1 will be threaded but this may not be true (as in my case). Appreciate any feedback. Thanks! ---------- assignee: christian.heimes components: SSL messages: 368143 nosy: christian.heimes, mig28suarez priority: normal severity: normal status: open title: test_ssl.py hangs with SSL 1.1 built with no threads 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 May 5 09:24:06 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 05 May 2020 13:24:06 +0000 Subject: [issue40028] Math module method to find prime factors for non-negative int n In-Reply-To: <1584733974.83.0.0417466712916.issue40028@roundup.psfhosted.org> Message-ID: <1588685046.19.0.203138483399.issue40028@roundup.psfhosted.org> Christian Heimes added the comment: It seems we agree that prime functions only appear to be easy until you realize that they are far from trivial. :) +1 to require a PEP. I'm happy to give my feedback on crypto and security-related part of the feature. OpenSSL now uses 64 MR rounds for small and 128 for larger primes (https://github.com/openssl/openssl/blob/278260bfa238aefef5a1abe2043d2f812c3a4bd5/crypto/bn/bn_prime.c#L87-L99) and trial divisions to update to 2048 tests (https://github.com/openssl/openssl/blob/278260bfa238aefef5a1abe2043d2f812c3a4bd5/crypto/bn/bn_prime.c#L70-L85). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 09:24:16 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 05 May 2020 13:24:16 +0000 Subject: [issue40028] Math module method to find prime factors for non-negative int n In-Reply-To: <1584733974.83.0.0417466712916.issue40028@roundup.psfhosted.org> Message-ID: <1588685056.23.0.643004804005.issue40028@roundup.psfhosted.org> Change by Christian Heimes : ---------- stage: resolved -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 09:30:39 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 05 May 2020 13:30:39 +0000 Subject: [issue40515] test_ssl.py hangs with SSL 1.1 built with no threads In-Reply-To: <1588684824.78.0.561425398379.issue40515@roundup.psfhosted.org> Message-ID: <1588685439.9.0.639724299413.issue40515@roundup.psfhosted.org> Christian Heimes added the comment: How did you build OpenSSL 1.1.1d? Python assumes default build of OpenSSL. Since Python is now always multi-threaded we no longer support non-threaded OpenSSL builds. ---------- versions: -Python 3.5, Python 3.6, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 09:32:24 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 05 May 2020 13:32:24 +0000 Subject: [issue40516] GCC 9 compiler warnings on MacOS Catalina Message-ID: <1588685544.13.0.656606061052.issue40516@roundup.psfhosted.org> New submission from R?mi Lapeyre : Building master with GCC 9.3.0 gives some warnings on posix and nis: ./Modules/posixmodule.c: In function 'os_chown_impl': ./Modules/posixmodule.c:3397:39: warning: the comparison will always evaluate as 'false' for the address of 'lchown' will never be NULL [-Waddress] 3397 | if ((!follow_symlinks) && (lchown == NULL)) { | ^~ ./Modules/posixmodule.c: In function 'PyInit_posix': ./Modules/posixmodule.c:14939:16: warning: the comparison will always evaluate as 'false' for the address of 'lchown' will never be NULL [-Waddress] 14939 | if (lchown == NULL) { | ^~ /Users/remi/src/cpython/Modules/nismodule.c: In function 'nis_cat': /Users/remi/src/cpython/Modules/nismodule.c:216:18: warning: cast between incompatible function types from 'int (*)(int, char *, int, char *, int, struct ypcallback_data *)' to 'int (*)(long unsigned int, char *, int, char *, int, void *)' [-Wcast-function-type] 216 | cb.foreach = (foreachfunc)nis_foreach; | ^ /Users/remi/src/cpython/Modules/nismodule.c: In function 'nis_xdr_ypmaplist': /Users/remi/src/cpython/Modules/nismodule.c:302:42: warning: cast between incompatible function types from 'int (*)(XDR *, nismaplist *)' {aka 'int (*)(struct __rpc_xdr *, struct nismaplist *)'} to 'int (*)(XDR *, void *, unsigned int)' {aka 'int (*)(struct __rpc_xdr *, void *, unsigned int)'} [-Wcast-function-type] 302 | sizeof(nismaplist), (xdrproc_t)nis_xdr_ypmaplist)) | ^ /Users/remi/src/cpython/Modules/nismodule.c: In function 'nis_xdr_ypresp_maplist': /Users/remi/src/cpython/Modules/nismodule.c:328:42: warning: cast between incompatible function types from 'int (*)(XDR *, nismaplist *)' {aka 'int (*)(struct __rpc_xdr *, struct nismaplist *)'} to 'int (*)(XDR *, void *, unsigned int)' {aka 'int (*)(struct __rpc_xdr *, void *, unsigned int)'} [-Wcast-function-type] 328 | sizeof(nismaplist), (xdrproc_t)nis_xdr_ypmaplist)) | ^ In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/rpc/rpc.h:76, from /Users/remi/src/cpython/Modules/nismodule.c:17: /Users/remi/src/cpython/Modules/nismodule.c: In function 'nisproc_maplist_2': /Users/remi/src/cpython/Modules/nismodule.c:344:19: warning: cast between incompatible function types from 'int (*)(XDR *, char **)' {aka 'int (*)(struct __rpc_xdr *, char **)'} to 'int (*)(XDR *, void *, unsigned int)' {aka 'int (*)(struct __rpc_xdr *, void *, unsigned int)'} [-Wcast-function-type] 344 | (xdrproc_t)nis_xdr_domainname, (caddr_t)argp, | ^ /Users/remi/src/cpython/Modules/nismodule.c:345:19: warning: cast between incompatible function types from 'int (*)(XDR *, nisresp_maplist *)' {aka 'int (*)(struct __rpc_xdr *, struct nisresp_maplist *)'} to 'int (*)(XDR *, void *, unsigned int)' {aka 'int (*)(struct __rpc_xdr *, void *, unsigned int)'} [-Wcast-function-type] 345 | (xdrproc_t)nis_xdr_ypresp_maplist, (caddr_t)&res, | ^ I'm not sure about the fix, especially for nis but I will propose a PR. There is also some warnings concerning libffi_osx but this looks like a vendored dependency so I left it untouched. ---------- components: Build messages: 368146 nosy: remi.lapeyre priority: normal severity: normal status: open title: GCC 9 compiler warnings on MacOS Catalina type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 09:35:40 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 05 May 2020 13:35:40 +0000 Subject: [issue40516] GCC 9 compiler warnings on MacOS Catalina In-Reply-To: <1588685544.13.0.656606061052.issue40516@roundup.psfhosted.org> Message-ID: <1588685740.35.0.49776526918.issue40516@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch pull_requests: +19240 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19925 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 09:39:51 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 13:39:51 +0000 Subject: [issue40514] Add --experimental-isolated-subinterpreters build option In-Reply-To: <1588684431.91.0.693668036583.issue40514@roundup.psfhosted.org> Message-ID: <1588685991.09.0.460075793737.issue40514@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +19241 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19926 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 09:43:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 13:43:44 +0000 Subject: [issue40513] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1588686224.15.0.672468986248.issue40513@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 4e01946cafca0cf49f796c3118e0d65237bcad69 by Victor Stinner in branch 'master': bpo-40513: Per-interpreter signals pending (GH-19924) https://github.com/python/cpython/commit/4e01946cafca0cf49f796c3118e0d65237bcad69 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 09:51:02 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 05 May 2020 13:51:02 +0000 Subject: [issue40517] Syntax highlighting for ASDL Message-ID: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> New submission from Batuhan Taskaya : ASDL is around here for a long time, and it was showed as raw text on documentation (under library/ast), IMHO it would be great to highlight it. ---------- assignee: docs at python components: Documentation messages: 368148 nosy: BTaskaya, docs at python, eric.araujo, ezio.melotti, mdk, willingc priority: normal severity: normal status: open title: Syntax highlighting for ASDL type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 09:52:22 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 13:52:22 +0000 Subject: [issue40513] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1588686742.33.0.311967352192.issue40513@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19242 pull_request: https://github.com/python/cpython/pull/19927 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 09:54:27 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 05 May 2020 13:54:27 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588686867.39.0.952917929695.issue40517@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch pull_requests: +19243 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19928 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 09:57:38 2020 From: report at bugs.python.org (Shota Iwamoto) Date: Tue, 05 May 2020 13:57:38 +0000 Subject: [issue40518] ValueError when using resource.setrlimit on macOS Catalina Message-ID: <1588687058.44.0.691468502141.issue40518@roundup.psfhosted.org> New submission from Shota Iwamoto : Hello, I'm having trouble when using `resource.setrlimit` on macOS. ``` import resource resource.setrlimit(resource.RLIMIT_STACK, resource.getrlimit(resource.RLIMIT_STACK)) ``` Running this code gives the following error: ``` Traceback (most recent call last): File "main.py", line 2, in resource.setrlimit(resource.RLIMIT_STACK, resource.getrlimit(resource.RLIMIT_STACK)) ValueError: current limit exceeds maximum limit ``` I ran the same code in my linux environment and it worked. * macOS Catalina 10.15.4 (19E287) * `python --version` : Python 3.7.7 Thanks. ---------- components: macOS messages: 368149 nosy: morioprog, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: ValueError when using resource.setrlimit on macOS Catalina type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 09:59:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 13:59:58 +0000 Subject: [issue40513] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1588687198.83.0.363765201865.issue40513@roundup.psfhosted.org> STINNER Victor added the comment: Python/ceval.c also has "int _Py_CheckRecursionLimit = Py_DEFAULT_RECURSION_LIMIT;". _Py_CheckRecursiveCall() has this comment: /* Needed for ABI backwards-compatibility (see bpo-31857) */ _Py_CheckRecursionLimit = recursion_limit; I converted Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() macros into opaque functions in bpo-38644: commit f4b1e3d7c64985f5d5b00f6cc9a1c146bbbfd613. I don't think that the "ABI backwards-compatibility" rationale is correct. These macros never worked in the limited C API: they accessed PyThreadState.recursion_depth and PyThreadState.overflowed members, whereas the PyThreadState structure is opaque in the limited C API (on purpose, see also bpo-39947). I think that it is now safe to simply remove _Py_CheckRecursionLimit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 10:05:11 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 05 May 2020 14:05:11 +0000 Subject: [issue40518] ValueError when using resource.setrlimit on macOS Catalina In-Reply-To: <1588687058.44.0.691468502141.issue40518@roundup.psfhosted.org> Message-ID: <1588687511.42.0.850963051554.issue40518@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 10:14:39 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 14:14:39 +0000 Subject: [issue40513] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1588688079.25.0.485743489155.issue40513@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 0b1e3307e24b0af45787ab6456535b8346e0239a by Victor Stinner in branch 'master': bpo-40513: Per-interpreter gil_drop_request (GH-19927) https://github.com/python/cpython/commit/0b1e3307e24b0af45787ab6456535b8346e0239a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 10:19:16 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 05 May 2020 14:19:16 +0000 Subject: [issue40514] Add --experimental-isolated-subinterpreters build option In-Reply-To: <1588684431.91.0.693668036583.issue40514@roundup.psfhosted.org> Message-ID: <1588688356.51.0.265106572025.issue40514@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 10:22:56 2020 From: report at bugs.python.org (hai shi) Date: Tue, 05 May 2020 14:22:56 +0000 Subject: [issue40513] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1588688576.42.0.468983830819.issue40513@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 10:31:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 14:31:45 +0000 Subject: [issue40513] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1588689105.82.0.111247493685.issue40513@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19244 pull_request: https://github.com/python/cpython/pull/19929 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 10:32:40 2020 From: report at bugs.python.org (Arusekk) Date: Tue, 05 May 2020 14:32:40 +0000 Subject: [issue40519] Preserve AttributeError exception context in __getattr__ Message-ID: <1588689160.61.0.0507579486079.issue40519@roundup.psfhosted.org> New submission from Arusekk : This is another attempt at issue 39865, but with a different attitude. Please see that issue for some extra motivation for this change. My suggestion is to change getattr logic, which now is (in this case): def getattr(obj, attr): try: return normal_getattr(obj, attr) except AttributeError: pass return obj.__getattr__(attr) to be more like: def getattr(obj, attr): try: return normal_getattr(obj, attr) except AttributeError: return obj.__getattr__(attr) A __getattr__ function would then be able to know the exception context (through sys.exc_info()) and to have the context automatically attached to all the exceptions raised (still respecting raise ... from None). This particular issue only lies in Objects/typeobject.c, but is probably valid for other uses of PyErr_Clear() in the interpreter. I checked some using a simple shell pipeline: $ grep -r -A5 PyErr_ExceptionMatches |grep -C5 PyErr_Clear And found some interesting examples of what be worth looking into: Python/sysmodule.c:708 Parser/tokenizer.c:1110 Objects/memoryobject.c:fix_error_int I prepared two patches for this (please forgive if I violated code style somewhere, I am not saying that they are a final version ready to be merged): a simple one, addressing just this very issue, and a robust one, allowing other places (e.g. from the list above) to reuse it. ---------- components: Interpreter Core files: typeobject.patch keywords: patch messages: 368152 nosy: Arusekk, ammar2, pasenor priority: normal severity: normal status: open title: Preserve AttributeError exception context in __getattr__ type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file49122/typeobject.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 10:34:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 14:34:48 +0000 Subject: [issue40513] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1588689288.55.0.729247724941.issue40513@roundup.psfhosted.org> STINNER Victor added the comment: For signals_pending, see also: bpo-40010 "Inefficient signal handling in multithreaded applications" which added _Py_ThreadCanHandleSignals() and _Py_ThreadCanHandlePendingCalls() functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 10:36:34 2020 From: report at bugs.python.org (Arusekk) Date: Tue, 05 May 2020 14:36:34 +0000 Subject: [issue40519] Preserve AttributeError exception context in __getattr__ In-Reply-To: <1588689160.61.0.0507579486079.issue40519@roundup.psfhosted.org> Message-ID: <1588689394.74.0.641599179124.issue40519@roundup.psfhosted.org> Arusekk added the comment: Feel free to reuse the patches if you have better ideas ---------- Added file: https://bugs.python.org/file49123/robust.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 10:39:02 2020 From: report at bugs.python.org (Miguel) Date: Tue, 05 May 2020 14:39:02 +0000 Subject: [issue40515] test_ssl.py hangs with SSL 1.1 built with no threads In-Reply-To: <1588684824.78.0.561425398379.issue40515@roundup.psfhosted.org> Message-ID: <1588689542.95.0.925614346285.issue40515@roundup.psfhosted.org> Miguel added the comment: I built with 'no-threads' option. I understand if you no longer wish to support non-threaded SSL. But it just seemed to me that you could if you protected the SSL API calls with locking since I can get all your ssl tests to work with this minor change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 10:41:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 14:41:17 +0000 Subject: [issue40514] Add --experimental-isolated-subinterpreters build option In-Reply-To: <1588684431.91.0.693668036583.issue40514@roundup.psfhosted.org> Message-ID: <1588689677.97.0.757518280959.issue40514@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c5fa364f4ea836f25dd07cfb328152d40a568371 by Victor Stinner in branch 'master': bpo-40514: Add --with-experimental-isolated-subinterpreters (GH-19926) https://github.com/python/cpython/commit/c5fa364f4ea836f25dd07cfb328152d40a568371 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 10:42:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 14:42:29 +0000 Subject: [issue40462] [easy] undefined name in Lib/test/mock_socket.py In-Reply-To: <1588290630.2.0.182306583677.issue40462@roundup.psfhosted.org> Message-ID: <1588689749.28.0.163097531151.issue40462@roundup.psfhosted.org> STINNER Victor added the comment: > IMHO we should create backport patch for 3.8 and 3.7 It's deadcode, I don't think that it's worth it. But it's up to you. If you consider that it's worth it, go ahead and backport the fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 10:45:19 2020 From: report at bugs.python.org (hai shi) Date: Tue, 05 May 2020 14:45:19 +0000 Subject: [issue40520] port the declartions in pydebug.h to initconfig.h Message-ID: <1588689919.11.0.704783497449.issue40520@roundup.psfhosted.org> New submission from hai shi : Nick left a comment in `pydebug.h` /* These global variable are defined in pylifecycle.c */ /* XXX (ncoghlan): move these declarations to pylifecycle.h? */ I have checked those global variables are not only debug variables and they are defined in `Python/initconfig.c` now. If I understand clearly, those declarations should moved to `Include/cpython/initconfig.h` and `pydebug.h` could be deleted. ref: https://github.com/python/cpython/commit/d600951748d7a19cdb3e58a376c51ed804b630e6 ---------- components: Interpreter Core messages: 368158 nosy: ncoghlan, shihai1991, vstinner priority: normal severity: normal status: open title: port the declartions in pydebug.h to initconfig.h versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 10:46:13 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 14:46:13 +0000 Subject: [issue40514] Add --experimental-isolated-subinterpreters build option In-Reply-To: <1588684431.91.0.693668036583.issue40514@roundup.psfhosted.org> Message-ID: <1588689973.09.0.989249242942.issue40514@roundup.psfhosted.org> STINNER Victor added the comment: --with-experimental-isolated-subinterpreters option name is very long on purpose: to advertize that you must not use it, unless you fully understand its purpose :-) I didn't document the build option in Misc/SpecialBuilds.txt or Doc/whatsnew/3.9.rst on purpose: you should not use this special build :-) Basically, this option is only for Eric Snow and me :-D ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 10:48:48 2020 From: report at bugs.python.org (hai shi) Date: Tue, 05 May 2020 14:48:48 +0000 Subject: [issue40520] port the declartions in pydebug.h to initconfig.h In-Reply-To: <1588689919.11.0.704783497449.issue40520@roundup.psfhosted.org> Message-ID: <1588690128.65.0.399518965338.issue40520@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +19245 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19930 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 10:49:30 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 14:49:30 +0000 Subject: [issue40520] port the declartions in pydebug.h to initconfig.h In-Reply-To: <1588689919.11.0.704783497449.issue40520@roundup.psfhosted.org> Message-ID: <1588690170.27.0.496829854772.issue40520@roundup.psfhosted.org> STINNER Victor added the comment: Global configuration variables are part of the C API. They are now documented: https://docs.python.org/dev/c-api/init.html#global-configuration-variables They are used to populate PyConfig (PEP 587). At startup, the PyConfig is copied into these global configuration variables. After the Python initilization, they are no longer read, but PyConfig (tstate->interp->config) is read instead. You can simply remove the two lines comment from pydebug.h. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 10:50:03 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 05 May 2020 14:50:03 +0000 Subject: [issue32117] Tuple unpacking in return and yield statements In-Reply-To: <1511393509.38.0.213398074469.issue32117@psf.upfronthosting.co.za> Message-ID: <1588690203.83.0.821243325749.issue32117@roundup.psfhosted.org> miss-islington added the comment: New changeset 627f7012353411590434a7d5777ddcbcc8d97fcd by Javier Buzzi in branch 'master': bpo-32117: Updated Simpsons names in docs (GH-19737) https://github.com/python/cpython/commit/627f7012353411590434a7d5777ddcbcc8d97fcd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 10:52:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 14:52:58 +0000 Subject: [issue40513] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1588690378.59.0.246704213988.issue40513@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 4e30ed3af06ae655f4cb8aad8cba21f341384250 by Victor Stinner in branch 'master': bpo-40513: Per-interpreter recursion_limit (GH-19929) https://github.com/python/cpython/commit/4e30ed3af06ae655f4cb8aad8cba21f341384250 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 11:00:19 2020 From: report at bugs.python.org (hai shi) Date: Tue, 05 May 2020 15:00:19 +0000 Subject: [issue40520] port the declartions in pydebug.h to initconfig.h In-Reply-To: <1588689919.11.0.704783497449.issue40520@roundup.psfhosted.org> Message-ID: <1588690819.69.0.770372109401.issue40520@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +19246 pull_request: https://github.com/python/cpython/pull/19931 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 11:01:42 2020 From: report at bugs.python.org (hai shi) Date: Tue, 05 May 2020 15:01:42 +0000 Subject: [issue40520] port the declartions in pydebug.h to initconfig.h In-Reply-To: <1588689919.11.0.704783497449.issue40520@roundup.psfhosted.org> Message-ID: <1588690902.68.0.586918041844.issue40520@roundup.psfhosted.org> hai shi added the comment: Got it, thanks for your explanation, victor ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 11:04:51 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 15:04:51 +0000 Subject: [issue40513] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1588691091.49.0.181433666627.issue40513@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19247 pull_request: https://github.com/python/cpython/pull/19932 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 11:07:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 15:07:49 +0000 Subject: [issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad In-Reply-To: <1487329309.81.0.182915384821.issue29587@psf.upfronthosting.co.za> Message-ID: <1588691269.47.0.784462106472.issue29587@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b0be6b3b94fbdf31b796adc19dc86a04a52b03e1 by Victor Stinner in branch 'master': bpo-29587: _PyErr_ChainExceptions() checks exception (GH-19902) https://github.com/python/cpython/commit/b0be6b3b94fbdf31b796adc19dc86a04a52b03e1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 11:11:26 2020 From: report at bugs.python.org (Eric Snow) Date: Tue, 05 May 2020 15:11:26 +0000 Subject: [issue40513] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1588691486.74.0.447888374228.issue40513@roundup.psfhosted.org> Eric Snow added the comment: FWIW, I think it would make sense to keep "signals_pending" under _PyRuntimeState rather than moving it to PyInterpreterState. Signals are only handled by the main interpreter (in its main thread). Even though "signals_pending" is useful to only one interpreter in the runtime, making it per-interpreter sends the wrong message that it is significant at that level. This may be confusing to readers of the code. At the very least there should be a clear comment with the field in Include/internal/pycore_interp.h explaining how it is only used by the main interpreter and why we made it per-interpreter anyway. ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 11:12:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 15:12:33 +0000 Subject: [issue40514] Add --experimental-isolated-subinterpreters build option In-Reply-To: <1588684431.91.0.693668036583.issue40514@roundup.psfhosted.org> Message-ID: <1588691553.37.0.644344483315.issue40514@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 11:12:39 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 15:12:39 +0000 Subject: [issue40512] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1588691559.33.0.465863274954.issue40512@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 11:20:46 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 05 May 2020 15:20:46 +0000 Subject: [issue40520] port the declartions in pydebug.h to initconfig.h In-Reply-To: <1588689919.11.0.704783497449.issue40520@roundup.psfhosted.org> Message-ID: <1588692046.03.0.747353912863.issue40520@roundup.psfhosted.org> miss-islington added the comment: New changeset 6351d9e4400a77fe1fcbe4f03e5fb6620cca236d by Hai Shi in branch 'master': bpo-40520: Remove redundant comment in pydebug.h (GH-19931) https://github.com/python/cpython/commit/6351d9e4400a77fe1fcbe4f03e5fb6620cca236d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 11:22:09 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 05 May 2020 15:22:09 +0000 Subject: [issue40520] Remove redundant comment in pydebug.h In-Reply-To: <1588689919.11.0.704783497449.issue40520@roundup.psfhosted.org> Message-ID: <1588692129.09.0.613263376635.issue40520@roundup.psfhosted.org> Change by Dong-hee Na : ---------- title: port the declartions in pydebug.h to initconfig.h -> Remove redundant comment in pydebug.h _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 11:22:43 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 05 May 2020 15:22:43 +0000 Subject: [issue40520] Remove redundant comment in pydebug.h In-Reply-To: <1588689919.11.0.704783497449.issue40520@roundup.psfhosted.org> Message-ID: <1588692163.02.0.467948875008.issue40520@roundup.psfhosted.org> Dong-hee Na added the comment: Thanks hai shi :) ---------- nosy: +corona10 resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 11:23:08 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 05 May 2020 15:23:08 +0000 Subject: [issue40512] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1588692188.49.0.233194012548.issue40512@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 11:25:38 2020 From: report at bugs.python.org (Eric Snow) Date: Tue, 05 May 2020 15:25:38 +0000 Subject: [issue40513] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1588692338.3.0.233803231124.issue40513@roundup.psfhosted.org> Eric Snow added the comment: >From a user perspective, does it make sense to have a different recursion_limit per interpreter? I don't see a problem with it. However, does it make sense to also keep a global value that we default to when a per-interpreter value is not set? I think it might. I suppose a bigger question is what users will expect the recursion limit (AKA "sys.getrecursionlimit()") to be for a newly created subinterpreter. Will it be some global default? Will it be the value from the parent interpreter? I'd go with a global default, which would imply that the default value should be stored under _PyRuntimeState like we had it (but still keep the actual per-interpreter field for the actual value). FWIW, the existing docs don't really block either approach. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 11:26:56 2020 From: report at bugs.python.org (Eric Snow) Date: Tue, 05 May 2020 15:26:56 +0000 Subject: [issue40513] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1588692416.13.0.938867108539.issue40513@roundup.psfhosted.org> Eric Snow added the comment: If this issue covers the GIL (which it seems to) then I'd expect _PyRuntimeState.gilstate to be handled here too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 11:27:16 2020 From: report at bugs.python.org (hai shi) Date: Tue, 05 May 2020 15:27:16 +0000 Subject: [issue40520] Remove redundant comment in pydebug.h In-Reply-To: <1588689919.11.0.704783497449.issue40520@roundup.psfhosted.org> Message-ID: <1588692436.83.0.614049981891.issue40520@roundup.psfhosted.org> hai shi added the comment: Thanks, Dong-hee Na ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 11:27:40 2020 From: report at bugs.python.org (Eric Snow) Date: Tue, 05 May 2020 15:27:40 +0000 Subject: [issue40010] Inefficient signal handling in multithreaded applications In-Reply-To: <1584579439.15.0.43767534151.issue40010@roundup.psfhosted.org> Message-ID: <1588692460.81.0.75265514952.issue40010@roundup.psfhosted.org> Eric Snow added the comment: Good catch on this, Victor. Thanks for doing it. ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 11:33:32 2020 From: report at bugs.python.org (Eric Snow) Date: Tue, 05 May 2020 15:33:32 +0000 Subject: [issue40514] Add --experimental-isolated-subinterpreters build option In-Reply-To: <1588684431.91.0.693668036583.issue40514@roundup.psfhosted.org> Message-ID: <1588692812.24.0.0707600407383.issue40514@roundup.psfhosted.org> Eric Snow added the comment: It would probably make sense to remove the build option in the 3.9 release. We can leave it in master, but remove it in the 3.9 branch once it has been created. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 11:35:22 2020 From: report at bugs.python.org (Itamar Turner-Trauring) Date: Tue, 05 May 2020 15:35:22 +0000 Subject: [issue40379] multiprocessing's default start method of fork()-without-exec() is broken In-Reply-To: <1587752543.41.0.119768714545.issue40379@roundup.psfhosted.org> Message-ID: <1588692922.18.0.38730775264.issue40379@roundup.psfhosted.org> Itamar Turner-Trauring added the comment: Just got an email from someone for whom switching to "spawn" fixed a problem. Earlier this week someone tweeted about this fixing things. This keeps hitting people in the real world. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 11:40:25 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 15:40:25 +0000 Subject: [issue40513] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1588693225.78.0.429967155982.issue40513@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 299b8c61e9d1a42b929b8deb1b05067876e191e6 by Victor Stinner in branch 'master': Revert "bpo-40513: Per-interpreter signals pending (GH-19924)" (GH-19932) https://github.com/python/cpython/commit/299b8c61e9d1a42b929b8deb1b05067876e191e6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 11:48:02 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 15:48:02 +0000 Subject: [issue40521] Make tuple, dict, frame free lists, unicode interned strings, unicode latin1 singletons per-interpreter Message-ID: <1588693682.5.0.219755904926.issue40521@roundup.psfhosted.org> New submission from STINNER Victor : tuple, dict and frame use free lists to optimize the creation of objects. Unicode uses "interned" strings to reduce the Python memory footprint and speedup dictionary lookups. Unicode also uses singletons for single letter Latin1 characters ([U+0000; U+00FF] range). All these optimizations are incompatible with isolated subinterpreters, since caches are currently shared by all inteprepreters. These caches should be made per-intepreter. See bpo-40512 "Meta issue: per-interpreter GIL" for the rationale. I already made small integer singletons per interpreter in bpo-38858: * commit 5dcc06f6e0d7b5d6589085692b86c63e35e2325e * commit 630c8df5cf126594f8c1c4579c1888ca80a29d59. ---------- components: Interpreter Core messages: 368175 nosy: vstinner priority: normal severity: normal status: open title: Make tuple, dict, frame free lists, unicode interned strings, unicode latin1 singletons per-interpreter versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 11:49:09 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 05 May 2020 15:49:09 +0000 Subject: [issue40515] test_ssl.py hangs with SSL 1.1 built with no threads In-Reply-To: <1588684824.78.0.561425398379.issue40515@roundup.psfhosted.org> Message-ID: <1588693749.88.0.530297392784.issue40515@roundup.psfhosted.org> Christian Heimes added the comment: It not about what I wish or wish not to do. Python requires thread-safe libraries. A library without proper locking and thread safety is no longer safe to use without great effort and careful locking in the glue code. A non-threaded OpenSSL build will lead to memory corruption and eventually crash the interpreter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 12:11:07 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 16:11:07 +0000 Subject: [issue40521] Make tuple, dict, frame free lists, unicode interned strings, unicode latin1 singletons per-interpreter In-Reply-To: <1588693682.5.0.219755904926.issue40521@roundup.psfhosted.org> Message-ID: <1588695067.79.0.458269614241.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +19248 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19933 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 12:13:09 2020 From: report at bugs.python.org (Robert Rouhani) Date: Tue, 05 May 2020 16:13:09 +0000 Subject: [issue40417] PyImport_ReloadModule emits deprecation warning In-Reply-To: <1588056055.69.0.268035650537.issue40417@roundup.psfhosted.org> Message-ID: <1588695189.54.0.686160502538.issue40417@roundup.psfhosted.org> Change by Robert Rouhani : ---------- pull_requests: +19249 pull_request: https://github.com/python/cpython/pull/19934 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 12:33:04 2020 From: report at bugs.python.org (Robert Rouhani) Date: Tue, 05 May 2020 16:33:04 +0000 Subject: [issue40417] PyImport_ReloadModule emits deprecation warning In-Reply-To: <1588056055.69.0.268035650537.issue40417@roundup.psfhosted.org> Message-ID: <1588696384.93.0.750352214524.issue40417@roundup.psfhosted.org> Change by Robert Rouhani : ---------- pull_requests: +19250 pull_request: https://github.com/python/cpython/pull/19935 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 12:47:32 2020 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 05 May 2020 16:47:32 +0000 Subject: [issue38787] PEP 573: Module State Access from C Extension Methods In-Reply-To: <1573655440.57.0.563143759574.issue38787@roundup.psfhosted.org> Message-ID: <1588697252.17.0.733067951914.issue38787@roundup.psfhosted.org> Change by Petr Viktorin : ---------- pull_requests: +19251 pull_request: https://github.com/python/cpython/pull/19936 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 12:48:34 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 16:48:34 +0000 Subject: [issue40521] Make tuple, dict, frame free lists, unicode interned strings, unicode latin1 singletons per-interpreter In-Reply-To: <1588693682.5.0.219755904926.issue40521@roundup.psfhosted.org> Message-ID: <1588697314.72.0.751122191757.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19252 pull_request: https://github.com/python/cpython/pull/19937 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 12:50:37 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 16:50:37 +0000 Subject: [issue40521] Make tuple, dict, frame free lists, unicode interned strings, unicode latin1 singletons per-interpreter In-Reply-To: <1588693682.5.0.219755904926.issue40521@roundup.psfhosted.org> Message-ID: <1588697437.55.0.173413163597.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 607b1027fec7b4a1602aab7df57795fbcec1c51b by Victor Stinner in branch 'master': bpo-40521: Disable Unicode caches in isolated subinterpreters (GH-19933) https://github.com/python/cpython/commit/607b1027fec7b4a1602aab7df57795fbcec1c51b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 12:51:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 16:51:28 +0000 Subject: [issue40513] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1588697488.17.0.95642857685.issue40513@roundup.psfhosted.org> STINNER Victor added the comment: > FWIW, I think it would make sense to keep "signals_pending" under _PyRuntimeState rather than moving it to PyInterpreterState. Oh right. I forgot about the details. I reverted my change, but this time I added a comment to prevent me to write the same change in 6 months :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 12:53:16 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 16:53:16 +0000 Subject: [issue40513] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1588697596.48.0.261610521326.issue40513@roundup.psfhosted.org> STINNER Victor added the comment: > From a user perspective, does it make sense to have a different recursion_limit per interpreter? Yes, I think so. Someone might use a lower limit to run a template rendering engine or "unsafe" code. Well, it's not hard to find random usage for interpreters with a configuration different than the main interpreter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 12:57:43 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 16:57:43 +0000 Subject: [issue38787] PEP 573: Module State Access from C Extension Methods In-Reply-To: <1573655440.57.0.563143759574.issue38787@roundup.psfhosted.org> Message-ID: <1588697863.69.0.827056680742.issue38787@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-40137: TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 13:10:00 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Tue, 05 May 2020 17:10:00 +0000 Subject: [issue40504] Restore weakref support for lru_cache wrappers In-Reply-To: <1588624586.76.0.0628520967833.issue40504@roundup.psfhosted.org> Message-ID: <1588698600.4.0.549418725637.issue40504@roundup.psfhosted.org> Change by Dennis Sweeney : ---------- keywords: +patch pull_requests: +19253 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19938 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 13:10:02 2020 From: report at bugs.python.org (Patrick Thizy) Date: Tue, 05 May 2020 17:10:02 +0000 Subject: [issue36284] importlib.import_module() not thread safe if Exception is raised (3.4, 3.5) In-Reply-To: <1552520828.65.0.116670090756.issue36284@roundup.psfhosted.org> Message-ID: <1588698602.62.0.0037468483948.issue36284@roundup.psfhosted.org> Patrick Thizy added the comment: I use Apache + mod_wsgi on Windows When I update from Django 2.2.4 to Django 2.2.5, this fix has been apply With this fix my application is not running The navigator is lock and waiting Can you help me ? ---------- nosy: +Patrick Thizy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 13:10:57 2020 From: report at bugs.python.org (Kyle Stanley) Date: Tue, 05 May 2020 17:10:57 +0000 Subject: [issue40512] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1588698657.86.0.551174086878.issue40512@roundup.psfhosted.org> Change by Kyle Stanley : ---------- nosy: +aeros _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 13:12:14 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 17:12:14 +0000 Subject: [issue40522] Subinterpreters: get the current Python interpreter state from Thread Local Storage (autoTSSkey) Message-ID: <1588698734.65.0.223552100195.issue40522@roundup.psfhosted.org> New submission from STINNER Victor : _PyThreadState_GET() gets the current Python thread state from _PyRuntime.gilstate.tstate_current atomic variable. When I experimented per-interpreter GIL (bpo-40512), I got issues with _PyThreadState_GET() which didn't return the expected Python thread state. I propose to modify _PyThreadState_GET() in the exprimental isolated subinterpreters mode to get and set the current Python thread state using a Thread Local Storage: autoTSSkey. ---------- components: Interpreter Core messages: 368182 nosy: vstinner priority: normal severity: normal status: open title: Subinterpreters: get the current Python interpreter state from Thread Local Storage (autoTSSkey) versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 13:19:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 17:19:49 +0000 Subject: [issue40522] Subinterpreters: get the current Python interpreter state from Thread Local Storage (autoTSSkey) In-Reply-To: <1588698734.65.0.223552100195.issue40522@roundup.psfhosted.org> Message-ID: <1588699189.74.0.644739230149.issue40522@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +19254 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19939 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 13:22:38 2020 From: report at bugs.python.org (Kyle Stanley) Date: Tue, 05 May 2020 17:22:38 +0000 Subject: [issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) In-Reply-To: <1569848255.08.0.155489980043.issue38323@roundup.psfhosted.org> Message-ID: <1588699358.79.0.642242191604.issue38323@roundup.psfhosted.org> Kyle Stanley added the comment: I have also explored a few different solutions and was unable to find a fix for this issue. If it's still causing intermittent hangs after Andrew's patch, we may want to consider skipping `test_close_kill_running` for `MultiLoopWatcher` until we can find one. This clearly seems to be a complex issue without an easy solution, and I don't think we want it to potentially mask other issues in the meantime. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 13:39:00 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 17:39:00 +0000 Subject: [issue40512] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1588700340.89.0.183975396435.issue40512@roundup.psfhosted.org> STINNER Victor added the comment: I created bpo-40522: "Subinterpreters: get the current Python interpreter state from Thread Local Storage (autoTSSkey)". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 13:45:42 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 05 May 2020 17:45:42 +0000 Subject: [issue40458] test_bad_getattr crashes on APPX test In-Reply-To: <1588288227.67.0.928950925895.issue40458@roundup.psfhosted.org> Message-ID: <1588700742.81.0.534484193574.issue40458@roundup.psfhosted.org> Steve Dower added the comment: New changeset ac4bf424119d1300f57929120968e216a85d3a25 by Steve Dower in branch 'master': bpo-40458: Increase reserved stack space to prevent overflow crash on Windows (GH-19845) https://github.com/python/cpython/commit/ac4bf424119d1300f57929120968e216a85d3a25 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 13:46:01 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 05 May 2020 17:46:01 +0000 Subject: [issue40458] test_bad_getattr crashes on APPX test In-Reply-To: <1588288227.67.0.928950925895.issue40458@roundup.psfhosted.org> Message-ID: <1588700761.71.0.813223673251.issue40458@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +19255 pull_request: https://github.com/python/cpython/pull/19941 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 13:48:12 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 05 May 2020 17:48:12 +0000 Subject: [issue40458] test_bad_getattr crashes on APPX test In-Reply-To: <1588288227.67.0.928950925895.issue40458@roundup.psfhosted.org> Message-ID: <1588700892.82.0.447253417806.issue40458@roundup.psfhosted.org> Steve Dower added the comment: Merged without the improved diagnostics. I might add that later if I get time. ?ukasz - this is a fairly trivial crash fix that'd be nice (and safe) to pull into 3.8.3, but not critical. Your call. ---------- assignee: -> steve.dower nosy: +lukasz.langa stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 13:53:38 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 17:53:38 +0000 Subject: [issue40513] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1588701218.59.0.659125157982.issue40513@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19256 pull_request: https://github.com/python/cpython/pull/19942 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 13:55:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 17:55:33 +0000 Subject: [issue40521] Make tuple, dict, frame free lists, unicode interned strings, unicode latin1 singletons per-interpreter In-Reply-To: <1588693682.5.0.219755904926.issue40521@roundup.psfhosted.org> Message-ID: <1588701333.21.0.291479247174.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b4b53868d7d6cd13505321d3802fd00865b25e05 by Victor Stinner in branch 'master': bpo-40521: Disable free lists in subinterpreters (GH-19937) https://github.com/python/cpython/commit/b4b53868d7d6cd13505321d3802fd00865b25e05 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 13:56:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 17:56:52 +0000 Subject: [issue40522] Subinterpreters: get the current Python interpreter state from Thread Local Storage (autoTSSkey) In-Reply-To: <1588698734.65.0.223552100195.issue40522@roundup.psfhosted.org> Message-ID: <1588701412.36.0.57245477545.issue40522@roundup.psfhosted.org> STINNER Victor added the comment: New changeset e838a9324c1719bb917ca81ede8d766b5cb551f4 by Victor Stinner in branch 'master': bpo-40522: _PyThreadState_Swap() sets autoTSSkey (GH-19939) https://github.com/python/cpython/commit/e838a9324c1719bb917ca81ede8d766b5cb551f4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 14:01:16 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 18:01:16 +0000 Subject: [issue40513] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1588701676.76.0.92407557626.issue40513@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19257 pull_request: https://github.com/python/cpython/pull/19943 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 14:03:24 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 05 May 2020 18:03:24 +0000 Subject: [issue40458] test_bad_getattr crashes on APPX test In-Reply-To: <1588288227.67.0.928950925895.issue40458@roundup.psfhosted.org> Message-ID: <1588701804.65.0.00360582960201.issue40458@roundup.psfhosted.org> miss-islington added the comment: New changeset a6a116c1b964b3d1fdff0f533861ed2a2227de1f by Miss Islington (bot) in branch '3.8': bpo-40458: Increase reserved stack space to prevent overflow crash on Windows (GH-19845) https://github.com/python/cpython/commit/a6a116c1b964b3d1fdff0f533861ed2a2227de1f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 14:09:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 18:09:44 +0000 Subject: [issue40513] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1588702184.26.0.184295672263.issue40513@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19258 pull_request: https://github.com/python/cpython/pull/19944 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 14:16:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 18:16:45 +0000 Subject: [issue40513] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1588702605.14.0.11222335673.issue40513@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 0dd5e7a718997da2026ed64fe054dc36cae4fee7 by Victor Stinner in branch 'master': bpo-40513: new_interpreter() init GIL earlier (GH-19942) https://github.com/python/cpython/commit/0dd5e7a718997da2026ed64fe054dc36cae4fee7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 14:17:42 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Tue, 05 May 2020 18:17:42 +0000 Subject: [issue40246] Different error messages for same error - invalid string prefixes In-Reply-To: <1586541958.33.0.891000303304.issue40246@roundup.psfhosted.org> Message-ID: <1588702662.42.0.288566919748.issue40246@roundup.psfhosted.org> Lysandros Nikolaou added the comment: Ok, I'm closing this, after consulting with Guido. ---------- resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 14:23:45 2020 From: report at bugs.python.org (Benjamin Wood) Date: Tue, 05 May 2020 18:23:45 +0000 Subject: [issue17254] add thai encoding aliases to encodings.aliases In-Reply-To: <1361360924.27.0.663240022367.issue17254@psf.upfronthosting.co.za> Message-ID: <1588703025.51.0.326940973766.issue17254@roundup.psfhosted.org> Benjamin Wood added the comment: This is an easy alias to a valid codepage. I supplied proof that they are the same. I don't understand why this has been allowed to languish for 9 months. Did I miss something? Is there more work I need to do? Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 14:27:54 2020 From: report at bugs.python.org (James Addison) Date: Tue, 05 May 2020 18:27:54 +0000 Subject: [issue18857] urlencode of a None value uses the string 'None' In-Reply-To: <1377633255.35.0.29938622913.issue18857@psf.upfronthosting.co.za> Message-ID: <1588703274.26.0.222738602406.issue18857@roundup.psfhosted.org> James Addison added the comment: Chiming in here to add that I'd appreciate the ability to render 'standalone' (i.e. no '=') query-string keys in order to distinguish between absence-of-value and empty-string situations. The backwards-compatibility concerns in here are genuine, so perhaps this could be introduced as an argument to urlencode with a disabled default value, allowing developers to opt-in. >> Unless someone can point to a "real" web server that does something different with "&foo" than with "&foo=", there is no reason to make a change to Python. There's a popular nodejs library that makes this serialization distinction explicit: https://github.com/sindresorhus/query-string#falsy-values I've developed a Python 3.7-based set of commits[1] to address this issue. I haven't yet opened this as a pull request since I see that Python 3.7 is in maintenance/bugfix mode[2]. In case a new urlencode flag would fall under the category of feature, I'll aim to develop a subsequent set of commits against the master development branch soon. [1] - https://github.com/jayaddison/cpython/compare/3.7..9555467 [2] - https://devguide.python.org/#status-of-python-branches ---------- nosy: +jayaddison _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 14:27:53 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 18:27:53 +0000 Subject: [issue40513] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1588703273.84.0.100419146444.issue40513@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 7be4e350aadf93c4be5c97b7291d0db2b6bc1dc4 by Victor Stinner in branch 'master': bpo-40513: Per-interpreter GIL (GH-19943) https://github.com/python/cpython/commit/7be4e350aadf93c4be5c97b7291d0db2b6bc1dc4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 14:32:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 18:32:48 +0000 Subject: [issue40512] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1588703568.02.0.403939575272.issue40512@roundup.psfhosted.org> STINNER Victor added the comment: Attached demo.py: benchmark to compare performance of sequential execution, threads and subinterpreters. ---------- Added file: https://bugs.python.org/file49124/demo.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 14:33:10 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 18:33:10 +0000 Subject: [issue40513] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1588703590.1.0.425551249546.issue40513@roundup.psfhosted.org> STINNER Victor added the comment: New changeset fb2c7c4afbab0514352ab0246b0c0cc85d1bba53 by Victor Stinner in branch 'master': bpo-40513: _xxsubinterpreters.run_string() releases the GIL (GH-19944) https://github.com/python/cpython/commit/fb2c7c4afbab0514352ab0246b0c0cc85d1bba53 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 14:34:38 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 05 May 2020 18:34:38 +0000 Subject: [issue40523] Weakref proxy missing pass throughs for hash() and reversed() Message-ID: <1588703678.72.0.637534837496.issue40523@roundup.psfhosted.org> New submission from Raymond Hettinger : from weakref import proxy class Alpha: def __len__(self): return 3 def __reversed__(self): return iter('cba') def __hash__(self): return hash('abc') a = Alpha() # Direct use of the instance works print(len(a)) print(list(reversed(a))) print(hash(a)) # Proxies can use the dunder methods directly r = proxy(a) print(r.__len__()) print(list(r.__reversed__())) print(r.__hash__()) # Proxy fails for __reversed__ and __hash__ print(len(r), 'This succeeds') try: print(list(reversed(r))) except TypeError: print('reverse(r) failed') try: print(hash(r)) except TypeError: print('hash(r) failed') ---------- components: Library (Lib) messages: 368197 nosy: rhettinger priority: normal severity: normal status: open title: Weakref proxy missing pass throughs for hash() and reversed() type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 14:46:18 2020 From: report at bugs.python.org (Code436) Date: Tue, 05 May 2020 18:46:18 +0000 Subject: [issue40524] Print() issue Message-ID: <1588704378.01.0.0352511120518.issue40524@roundup.psfhosted.org> Change by Code436 : ---------- components: Regular Expressions files: Python bug.png nosy: Coder436, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: Print() issue type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file49125/Python bug.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 14:47:59 2020 From: report at bugs.python.org (Code436) Date: Tue, 05 May 2020 18:47:59 +0000 Subject: [issue40524] Print() issue Message-ID: <1588704479.85.0.595047050058.issue40524@roundup.psfhosted.org> New submission from Code436 : When I tried to print some stuff I get a KeyError:0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 14:57:00 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 05 May 2020 18:57:00 +0000 Subject: [issue40524] Print() issue In-Reply-To: <1588704479.85.0.595047050058.issue40524@roundup.psfhosted.org> Message-ID: <1588705020.7.0.918340686276.issue40524@roundup.psfhosted.org> Eric V. Smith added the comment: This is not the place to ask for help programming with python. What you're seeing is that your attribute_set or attribute_names mapping are missing whatever data you think should be present. I suggest you ask for help on the python-list or python-tutor mailing lists: https://mail.python.org/mailman/listinfo/python-list https://mail.python.org/mailman/listinfo/tutor ---------- components: -Regular Expressions nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 15:17:23 2020 From: report at bugs.python.org (epiphyte) Date: Tue, 05 May 2020 19:17:23 +0000 Subject: [issue29211] assertRaises with exceptions re-raised from a generator kills generator In-Reply-To: <1483910065.0.0.586195151306.issue29211@psf.upfronthosting.co.za> Message-ID: <1588706243.52.0.638484376423.issue29211@roundup.psfhosted.org> Change by epiphyte : ---------- nosy: +epiphyte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 15:26:02 2020 From: report at bugs.python.org (James Addison) Date: Tue, 05 May 2020 19:26:02 +0000 Subject: [issue18857] urlencode of a None value uses the string 'None' In-Reply-To: <1377633255.35.0.29938622913.issue18857@psf.upfronthosting.co.za> Message-ID: <1588706762.85.0.614235533094.issue18857@roundup.psfhosted.org> Change by James Addison : ---------- pull_requests: +19259 pull_request: https://github.com/python/cpython/pull/19945 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 15:37:42 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 05 May 2020 19:37:42 +0000 Subject: [issue40523] Weakref proxy missing pass throughs for hash() and reversed() In-Reply-To: <1588703678.72.0.637534837496.issue40523@roundup.psfhosted.org> Message-ID: <1588707462.06.0.168519069969.issue40523@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch nosy: +pablogsal nosy_count: 1.0 -> 2.0 pull_requests: +19261 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19946 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 15:41:04 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 05 May 2020 19:41:04 +0000 Subject: [issue40355] The ast module fails to reject certain malformed nodes In-Reply-To: <1587499162.97.0.267428394248.issue40355@roundup.psfhosted.org> Message-ID: <1588707664.87.0.0610886950998.issue40355@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset c21c51235aa8061da6b0593d6f857f42fd92fd8b by Curtis Bucher in branch 'master': bpo-40355: Improve error messages in ast.literal_eval with malformed Dict nodes (GH-19868) https://github.com/python/cpython/commit/c21c51235aa8061da6b0593d6f857f42fd92fd8b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 15:41:10 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 05 May 2020 19:41:10 +0000 Subject: [issue40355] The ast module fails to reject certain malformed nodes In-Reply-To: <1587499162.97.0.267428394248.issue40355@roundup.psfhosted.org> Message-ID: <1588707670.76.0.133771147301.issue40355@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +19262 pull_request: https://github.com/python/cpython/pull/19947 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 15:52:50 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 05 May 2020 19:52:50 +0000 Subject: [issue37860] Add deploy preview for docs In-Reply-To: <1565817286.53.0.142673590989.issue37860@roundup.psfhosted.org> Message-ID: <1588708370.99.0.478757075151.issue37860@roundup.psfhosted.org> Batuhan Taskaya added the comment: > Personally, I feel that it most largely benefits more significant documentation changes that involve modification of existing markup or the addition of new markup, rather than all documentation PRs. So a manually added label to trigger it makes the most sense to me. This would be very similar to the recently added "test-with-buildbots" label. +1, It would be so much useful in cases like GH 19928. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 16:01:04 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 05 May 2020 20:01:04 +0000 Subject: [issue40355] The ast module fails to reject certain malformed nodes In-Reply-To: <1587499162.97.0.267428394248.issue40355@roundup.psfhosted.org> Message-ID: <1588708864.77.0.258471512001.issue40355@roundup.psfhosted.org> miss-islington added the comment: New changeset 2a3b876b0286b22a9058510d9e51dc4d60eeb89a by Miss Islington (bot) in branch '3.8': bpo-40355: Improve error messages in ast.literal_eval with malformed Dict nodes (GH-19868) https://github.com/python/cpython/commit/2a3b876b0286b22a9058510d9e51dc4d60eeb89a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 16:13:30 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 20:13:30 +0000 Subject: [issue40512] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1588709610.03.0.712466879511.issue40512@roundup.psfhosted.org> Change by STINNER Victor : Removed file: https://bugs.python.org/file49124/demo.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 16:13:59 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 20:13:59 +0000 Subject: [issue40512] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1588709639.92.0.797704760023.issue40512@roundup.psfhosted.org> STINNER Victor added the comment: (oops, there was a typo in my script: threads and subinterpreters was the same benchmark) ---------- Added file: https://bugs.python.org/file49126/demo.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 16:19:32 2020 From: report at bugs.python.org (Lewis Ball) Date: Tue, 05 May 2020 20:19:32 +0000 Subject: [issue40474] Code coverage report not entirely accurate In-Reply-To: <1588381882.86.0.0551558198731.issue40474@roundup.psfhosted.org> Message-ID: <1588709972.77.0.0238305802896.issue40474@roundup.psfhosted.org> Lewis Ball added the comment: I've updated the travis.yml now to fix this issue and global statements are now showing as covered in the coverage report. This means an extra 4k lines show as covered which weren't previously showing. See the report for the PR here (https://codecov.io/gh/python/cpython/tree/64d521b5d34c25b83d0472608d1eab3a6334bf59/Lib). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 16:30:42 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 05 May 2020 20:30:42 +0000 Subject: [issue40511] IDLE yellow hint frame blinks when entering () in strings in functions/classes In-Reply-To: <1588680591.22.0.16376057042.issue40511@roundup.psfhosted.org> Message-ID: <1588710642.94.0.523930730709.issue40511@roundup.psfhosted.org> Terry J. Reedy added the comment: 1. What OS and for Windows/Mac, version? 2. What Python release and from where and how installed? If not latest release of x.y, where x.y >= 3.7, consider upgrading. 3. Tcl/tk version (see Help => About IDLE? 4. How start IDLE? 5. What is a the minimum action needed to exhibit the behavior. Copy and paste minimum code. 6. Describe behavior with more detail. What you wrote is nothing like anything that should happen (which is why you report it), so it is hard to imagine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 17:10:07 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 21:10:07 +0000 Subject: [issue40512] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1588713007.26.0.889516181728.issue40512@roundup.psfhosted.org> STINNER Victor added the comment: Hum, demo.py is not reliable for threads: the standard deviation is quite large. I rewrote it using pyperf to compute the average and the standard deviation. ---------- Added file: https://bugs.python.org/file49127/demo-pyperf.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 17:14:39 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 05 May 2020 21:14:39 +0000 Subject: [issue40504] Restore weakref support for lru_cache wrappers In-Reply-To: <1588624586.76.0.0628520967833.issue40504@roundup.psfhosted.org> Message-ID: <1588713279.89.0.0346762858575.issue40504@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 1253c3ef70ea5632d32ae19579a14152db0d45c1 by Dennis Sweeney in branch 'master': bpo-40504: Allow weakrefs to lru_cache objects (GH-19938) https://github.com/python/cpython/commit/1253c3ef70ea5632d32ae19579a14152db0d45c1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 17:15:17 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 05 May 2020 21:15:17 +0000 Subject: [issue40504] Restore weakref support for lru_cache wrappers In-Reply-To: <1588624586.76.0.0628520967833.issue40504@roundup.psfhosted.org> Message-ID: <1588713317.98.0.50526167914.issue40504@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks for the PE :-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 17:38:55 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 05 May 2020 21:38:55 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588714735.64.0.17879500355.issue40517@roundup.psfhosted.org> Raymond Hettinger added the comment: +1 ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 17:52:39 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 21:52:39 +0000 Subject: [issue40512] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1588715559.23.0.0567968999278.issue40512@roundup.psfhosted.org> Change by STINNER Victor : Added file: https://bugs.python.org/file49128/demo-pyperf.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 17:52:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 21:52:47 +0000 Subject: [issue40512] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1588715567.01.0.538009632939.issue40512@roundup.psfhosted.org> Change by STINNER Victor : Removed file: https://bugs.python.org/file49127/demo-pyperf.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 17:52:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 21:52:48 +0000 Subject: [issue40512] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1588715568.04.0.894585321794.issue40512@roundup.psfhosted.org> Change by STINNER Victor : Removed file: https://bugs.python.org/file49126/demo.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 17:53:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 May 2020 21:53:11 +0000 Subject: [issue40512] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1588715591.33.0.446474919836.issue40512@roundup.psfhosted.org> STINNER Victor added the comment: I updated demo-pyperf.py to also benchmark multiprocessing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 17:58:28 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 05 May 2020 21:58:28 +0000 Subject: [issue40523] Weakref proxy missing pass throughs for hash() and reversed() In-Reply-To: <1588703678.72.0.637534837496.issue40523@roundup.psfhosted.org> Message-ID: <1588715908.9.0.662853106826.issue40523@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 96074de573f82fc66a2bd73c36905141a3f1d5c1 by Pablo Galindo in branch 'master': bpo-40523: Add pass-throughs for hash() and reversed() to weakref.proxy objects (GH-19946) https://github.com/python/cpython/commit/96074de573f82fc66a2bd73c36905141a3f1d5c1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 17:58:36 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 05 May 2020 21:58:36 +0000 Subject: [issue40523] Weakref proxy missing pass throughs for hash() and reversed() In-Reply-To: <1588703678.72.0.637534837496.issue40523@roundup.psfhosted.org> Message-ID: <1588715916.12.0.116414008421.issue40523@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 May 5 18:55:41 2020 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 05 May 2020 22:55:41 +0000 Subject: [issue40525] zipapps execute symlinks as if they are code Message-ID: <1588719341.33.0.757930708567.issue40525@roundup.psfhosted.org> New submission from Anthony Sottile : ```console $ ln -s 'import os; os.system("echo hi")' __main__.py $ ls -al total 8 drwxr-xr-x 2 asottile asottile 4096 May 5 15:55 . drwxr-xr-x 3 asottile asottile 4096 May 5 14:50 .. lrwxrwxrwx 1 asottile asottile 31 May 5 15:55 __main__.py -> 'import os; os.system("echo hi")' $ zip --symlinks out.zip __main__.py adding: __main__.py (stored 0%) $ python3 out.zip hi ``` I expect the output to be similar to running `__main__.py`: ``` $ python3 __main__.py python3: can't open file '__main__.py': [Errno 2] No such file or directory ``` (real usecase, I wanted `__main__.py` to be a symlink but got a very strange NameError and traced it down to executing the symlink target name instead of the symlink destination) ---------- components: Interpreter Core messages: 368212 nosy: Anthony Sottile priority: normal severity: normal status: open title: zipapps execute symlinks as if they are code type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 19:44:13 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 05 May 2020 23:44:13 +0000 Subject: [issue40501] Deprecate and remove ctypes usage in uuid In-Reply-To: <1588610043.03.0.653935213542.issue40501@roundup.psfhosted.org> Message-ID: <1588722253.52.0.26343710274.issue40501@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +19263 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/19948 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 19:49:31 2020 From: report at bugs.python.org (paul j3) Date: Tue, 05 May 2020 23:49:31 +0000 Subject: [issue40509] In argparse, allow REMAINDER(...) arguments in a mutually exclusive group In-Reply-To: <1588674644.49.0.299540849008.issue40509@roundup.psfhosted.org> Message-ID: <1588722571.92.0.639010684331.issue40509@roundup.psfhosted.org> Change by paul j3 : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 19:52:02 2020 From: report at bugs.python.org (paul j3) Date: Tue, 05 May 2020 23:52:02 +0000 Subject: [issue40509] In argparse, allow REMAINDER(...) arguments in a mutually exclusive group In-Reply-To: <1588674644.49.0.299540849008.issue40509@roundup.psfhosted.org> Message-ID: <1588722722.34.0.167638058274.issue40509@roundup.psfhosted.org> paul j3 added the comment: Handling the positional with '?' and '*' in a mutually_exclusive_group is tricky enough! I believe your user can use the '--' to get the same effect. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 20:00:00 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 06 May 2020 00:00:00 +0000 Subject: [issue40518] ValueError when using resource.setrlimit on macOS Catalina In-Reply-To: <1588687058.44.0.691468502141.issue40518@roundup.psfhosted.org> Message-ID: <1588723200.66.0.379700267827.issue40518@roundup.psfhosted.org> Ned Deily added the comment: See the long discussion in Issue34602 for more details. The investigation there showed that there are now conditions when running in newer versions of macOS (apparently as of 10.14.4) where trying to increase the stack limit at run time using resource.RLIMIT_STACK fails. If you do need to increase the stack limit, to handle deeper recusions etc, one solution is to rebuild Python for macOS with a larger stack size as shown in PR 14546 rather than trying to change it at runtime. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> python3 resource.setrlimit strange behaviour under macOS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 20:06:00 2020 From: report at bugs.python.org (paul j3) Date: Wed, 06 May 2020 00:06:00 +0000 Subject: [issue40420] argparse choices formatter In-Reply-To: <1588077262.4.0.512927383758.issue40420@roundup.psfhosted.org> Message-ID: <1588723560.76.0.33751969601.issue40420@roundup.psfhosted.org> paul j3 added the comment: Related topic re. long usage with choices : https://bugs.python.org/issue16418 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 20:15:05 2020 From: report at bugs.python.org (James Addison) Date: Wed, 06 May 2020 00:15:05 +0000 Subject: [issue18857] urlencode of a None value uses the string 'None' In-Reply-To: <1377633255.35.0.29938622913.issue18857@psf.upfronthosting.co.za> Message-ID: <1588724105.22.0.682364527604.issue18857@roundup.psfhosted.org> Change by James Addison : ---------- pull_requests: +19264 pull_request: https://github.com/python/cpython/pull/19949 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 20:32:21 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 06 May 2020 00:32:21 +0000 Subject: [issue40417] PyImport_ReloadModule emits deprecation warning In-Reply-To: <1588056055.69.0.268035650537.issue40417@roundup.psfhosted.org> Message-ID: <1588725141.85.0.609940792895.issue40417@roundup.psfhosted.org> miss-islington added the comment: New changeset a32587a60da5939a3932bb30432d2bdd3d6203d4 by Robert Rouhani in branch '3.8': [3.8] bpo-40417: Fix deprecation warning in PyImport_ReloadModule (GH-19750) (GH-19934) https://github.com/python/cpython/commit/a32587a60da5939a3932bb30432d2bdd3d6203d4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 20:49:36 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 06 May 2020 00:49:36 +0000 Subject: [issue40417] PyImport_ReloadModule emits deprecation warning In-Reply-To: <1588056055.69.0.268035650537.issue40417@roundup.psfhosted.org> Message-ID: <1588726176.14.0.435214806208.issue40417@roundup.psfhosted.org> miss-islington added the comment: New changeset d64fd617e02346ecbcba9559f227936e08e89602 by Robert Rouhani in branch '3.7': [3.7] bpo-40417: Fix deprecation warning in PyImport_ReloadModule (GH-19750) (GH-19935) https://github.com/python/cpython/commit/d64fd617e02346ecbcba9559f227936e08e89602 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 21:04:18 2020 From: report at bugs.python.org (Brett Cannon) Date: Wed, 06 May 2020 01:04:18 +0000 Subject: [issue40417] PyImport_ReloadModule emits deprecation warning In-Reply-To: <1588056055.69.0.268035650537.issue40417@roundup.psfhosted.org> Message-ID: <1588727058.07.0.233947224295.issue40417@roundup.psfhosted.org> Brett Cannon added the comment: Thanks for all your hard work, Robert! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 21:07:16 2020 From: report at bugs.python.org (Robert Rouhani) Date: Wed, 06 May 2020 01:07:16 +0000 Subject: [issue40417] PyImport_ReloadModule emits deprecation warning In-Reply-To: <1588727058.07.0.233947224295.issue40417@roundup.psfhosted.org> Message-ID: Robert Rouhani added the comment: No problem! Happy to contribute where I can :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 21:09:44 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 06 May 2020 01:09:44 +0000 Subject: [issue40501] Deprecate and remove ctypes usage in uuid In-Reply-To: <1588610043.03.0.653935213542.issue40501@roundup.psfhosted.org> Message-ID: <1588727384.55.0.176276152825.issue40501@roundup.psfhosted.org> Ned Deily added the comment: > (A) Ensure that _uuid works on macOS, FreeBSD and Linux, especially in the macOS installer of python.org. FWIW, a spot check shows that _uuid builds and test_uuid passes both sets of its tests, e.g. TestUUIDWithExtModule and TestUUIDWithoutExtModule, with current python.org macOS installers on macOS releases of interest. So, AFAICT, we have no need for the ctypes fallback on at least macOS 10.6 or later and we don't actively support anything older than that. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 21:32:00 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 06 May 2020 01:32:00 +0000 Subject: [issue40516] GCC 9 compiler warnings on MacOS Catalina In-Reply-To: <1588685544.13.0.656606061052.issue40516@roundup.psfhosted.org> Message-ID: <1588728720.96.0.880952962427.issue40516@roundup.psfhosted.org> Ned Deily added the comment: See proposed PR 19925 for further discussion. ---------- components: +macOS -Build nosy: +ned.deily, ronaldoussoren versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 21:33:18 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 06 May 2020 01:33:18 +0000 Subject: [issue40379] multiprocessing's default start method of fork()-without-exec() is broken In-Reply-To: <1587752543.41.0.119768714545.issue40379@roundup.psfhosted.org> Message-ID: <1588728798.44.0.901199311562.issue40379@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +davin, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 21:35:48 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 06 May 2020 01:35:48 +0000 Subject: [issue40516] GCC 9 compiler warnings on MacOS Catalina In-Reply-To: <1588685544.13.0.656606061052.issue40516@roundup.psfhosted.org> Message-ID: <1588728947.99.0.00879170027922.issue40516@roundup.psfhosted.org> Change by Ned Deily : ---------- components: +Build _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 22:28:31 2020 From: report at bugs.python.org (Tim Peters) Date: Wed, 06 May 2020 02:28:31 +0000 Subject: [issue40480] "fnmatch" exponential execution time In-Reply-To: <1588498627.36.0.0280402477391.issue40480@roundup.psfhosted.org> Message-ID: <1588732111.65.0.825832177762.issue40480@roundup.psfhosted.org> Tim Peters added the comment: New changeset b9c46a2c2d7fc68457bff641f78932d66f5e5f59 by Tim Peters in branch 'master': bpo-40480 "fnmatch" exponential execution time (GH-19908) https://github.com/python/cpython/commit/b9c46a2c2d7fc68457bff641f78932d66f5e5f59 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 5 22:31:54 2020 From: report at bugs.python.org (Tim Peters) Date: Wed, 06 May 2020 02:31:54 +0000 Subject: [issue40480] "fnmatch" exponential execution time In-Reply-To: <1588498627.36.0.0280402477391.issue40480@roundup.psfhosted.org> Message-ID: <1588732314.95.0.268325105163.issue40480@roundup.psfhosted.org> Change by Tim Peters : ---------- assignee: -> tim.peters resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 00:06:03 2020 From: report at bugs.python.org (Chris Drake) Date: Wed, 06 May 2020 04:06:03 +0000 Subject: [issue40526] documentation bad on asyncio Message-ID: <1588737963.7.0.298937096343.issue40526@roundup.psfhosted.org> New submission from Chris Drake : > The sample on this page is not demonstrating anything asynchronous: > https://docs.python.org/3/library/asyncio.html Put something that is relevant please. e.g. import asyncio import time async def say_after(delay, what): await asyncio.sleep(delay) print(what) async def main(): print(f"started at {time.strftime('%X')}") await say_after(2, 'world') await say_after(1, 'hello') print(f"finished at {time.strftime('%X')}") asyncio.run(main()) ---------- components: asyncio messages: 368223 nosy: asvetlov, cnd, yselivanov priority: normal severity: normal status: open title: documentation bad on asyncio versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 00:43:16 2020 From: report at bugs.python.org (Kyle Stanley) Date: Wed, 06 May 2020 04:43:16 +0000 Subject: [issue40357] asyncio: will shutdown_default_executor work in single step (stop, run_forever) mode? In-Reply-To: <1587506447.82.0.117857372941.issue40357@roundup.psfhosted.org> Message-ID: <1588740196.45.0.924744480351.issue40357@roundup.psfhosted.org> Kyle Stanley added the comment: > Is the new asyncio.loop.shutdown_default_executor() suitable for event loops that are run in single-step mode? I honestly can't say for certain; the primary intended use case for shutdown_default_executor() was to provide a means of properly finalizing the resources associated with the default executor without blocking the event loop, notably the threads in the ThreadPoolExecutor (which were intermittently left dangling). So, when working on the implementation w/ Yury and Andrew, I did not strongly consider single-step event loops. I was more concerned with how it fit in with asyncio.run() and safe finalization of executor resources. See https://bugs.python.org/issue34037 for context. If you have a recommendation for a change to the current version shutdown_default_executor() that would help provide compatibility with single-step event loops without hindering the primary goals, I'm sure it would be considered. > Also, what happens to pending executor futures? When using `loop.shutdown_default_executor()`, it calls executor.shutdown(wait=True), which waits for submitted futures to the executor to complete before joining the executor's workers (regardless of whether they're threads or processes). So, the executor should not be terminated prior to the pending futures being completed. >From a glance at the example code posted above, it seems like it would be incompatible with asyncio.run(), which is a requirement for shutdown_default_executor(). See https://github.com/python/cpython/blob/b9c46a2c2d7fc68457bff641f78932d66f5e5f59/Lib/asyncio/runners.py#L8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 00:47:58 2020 From: report at bugs.python.org (hai shi) Date: Wed, 06 May 2020 04:47:58 +0000 Subject: [issue40512] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1588740478.93.0.0460071179189.issue40512@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 01:24:52 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 06 May 2020 05:24:52 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588742692.53.0.720045275244.issue40517@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +19265 pull_request: https://github.com/python/cpython/pull/19950 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 01:24:48 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 06 May 2020 05:24:48 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588742688.52.0.857001082414.issue40517@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset d60040ba226bd2e3b6f58d074015aa2499dc1cb8 by Batuhan Taskaya in branch 'master': bpo-40517: Implement syntax highlighting support for ASDL (#19928) https://github.com/python/cpython/commit/d60040ba226bd2e3b6f58d074015aa2499dc1cb8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 01:34:02 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 06 May 2020 05:34:02 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588743242.11.0.0135104315812.issue40517@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset eff870b618ca6f6b7a60a271f15af7e54b8a1b97 by Raymond Hettinger in branch 'master': Revert "bpo-40517: Implement syntax highlighting support for ASDL (#19928)" (#19950) https://github.com/python/cpython/commit/eff870b618ca6f6b7a60a271f15af7e54b8a1b97 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 01:34:49 2020 From: report at bugs.python.org (Shani Armon) Date: Wed, 06 May 2020 05:34:49 +0000 Subject: [issue40509] In argparse, allow REMAINDER(...) arguments in a mutually exclusive group In-Reply-To: <1588674644.49.0.299540849008.issue40509@roundup.psfhosted.org> Message-ID: <1588743289.59.0.821808279113.issue40509@roundup.psfhosted.org> Shani Armon added the comment: Why is REMAINDER any more complicated than ZERO_OR_MORE? I need to make a subcommand system (think jupyter style) and -- isn't an intuitive interface. Jupyter just doesn't use argparse in the subcommand case. I prever to in order to support options given before the subcommand, outside the mutually exclusive group (like -C for git) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 01:39:13 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 06 May 2020 05:39:13 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588743553.33.0.495406041804.issue40517@roundup.psfhosted.org> Raymond Hettinger added the comment: I really like this idea but it needs different styling. Attaching a screen shot will significant readability and beauty issues. Suggest: * Boldfacethe class names (Module, Interactive, etc) * Unboldface the fields names (body, types_ignores, argtypes, etc) * The tinted grape color does not work well on the green background. * Perhaps have a graphic designer take a look. ---------- Added file: https://bugs.python.org/file49129/Screen Shot 2020-05-05 at 10.17.15 PM.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 01:49:00 2020 From: report at bugs.python.org (Kyle Stanley) Date: Wed, 06 May 2020 05:49:00 +0000 Subject: [issue40526] documentation bad on asyncio In-Reply-To: <1588737963.7.0.298937096343.issue40526@roundup.psfhosted.org> Message-ID: <1588744140.79.0.954754362898.issue40526@roundup.psfhosted.org> Kyle Stanley added the comment: I presume this is referring to the following example on the first page of the docs: ``` import asyncio async def main(): print('Hello ...') await asyncio.sleep(1) print('... World!') # Python 3.7+ asyncio.run(main()) ``` If so, the main purpose of that example is just to demonstrate basic async/await syntax, and show asyncio.run() for a trivial case to clearly show how it's used at a fundamental level; it's intentional that the more involved examples that demonstrate asynchronous programming are contained in https://docs.python.org/3/library/asyncio-task.html#coroutine. Also, the example is simple and condensed enough that it requires zero additional explanation or context, as should be the case for a simple "hello world" example. Consider the perspective of someone who found the page without having previously seen async/await syntax used. FYI, in the future, I would highly recommend focusing more on the constructive parts when opening issues. Particularly the title "documentation bad on asyncio", provides zero context or usefulness. It also comes across as rather rude and unappreciative of the significant voluntary efforts that went into writing the documentation in the first place. Instead, something like "Improve example on front page of asyncio docs" is much more helpful. ---------- nosy: +aeros _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 03:57:44 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 06 May 2020 07:57:44 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588751864.21.0.781389282143.issue40517@roundup.psfhosted.org> Batuhan Taskaya added the comment: Oh, sorry for that bad look :/ I just want it to look consistent, let me see what I can do further (I'll probably consult a friend of mine who understand this things). By the way, I could've just adjust the values over the existing code if you didn't revert, the core logic would be same we just need to change token types. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 04:21:23 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 06 May 2020 08:21:23 +0000 Subject: [issue40355] The ast module fails to reject certain malformed nodes In-Reply-To: <1587499162.97.0.267428394248.issue40355@roundup.psfhosted.org> Message-ID: <1588753283.19.0.95356820398.issue40355@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 05:32:05 2020 From: report at bugs.python.org (Florian Bruhin) Date: Wed, 06 May 2020 09:32:05 +0000 Subject: [issue40527] Multiple "unknown option" errors when passing unknown arguments to the interpreter Message-ID: <1588757525.36.0.428936320881.issue40527@roundup.psfhosted.org> New submission from Florian Bruhin : A minor issue I just discovered today: When e.g. doing "python3 --foo", the output is: unknown option --foo unknown option --foo unknown option --foo usage: /usr/bin/python3 [option] ... [-c cmd | -m mod | file | -] [arg] ... With more dashes in the options, it seems to get worse: unknown option --foo-bar-baz unknown option --foo-bar-baz unknown option --foo-bar-baz unknown option --foo-bar-baz unknown option --foo-bar-baz unknown option --foo-bar-baz unknown option --foo-bar-baz usage: /usr/bin/python3 [option] ... [-c cmd | -m mod | file | -] [arg] ... This seems very similar to issue16306 (thus why I added people involved there to the nosy list), except that it happens with long rather than short arguments. This only happens with Python 3.8/3.9, not 3.7 or older. I was able to bisect this to the following commit: commit 6dcb54228e7520abd058897440c26e323f62afcd Author: Victor Stinner Date: Tue Mar 5 02:44:12 2019 +0100 bpo-36142: Add _PyPreConfig_ReadFromArgv() (GH-12173) The new function is now responsible to parse -E and -I command line arguments. ---------- components: Interpreter Core messages: 368231 nosy: The Compiler, hieu.nguyen, serhiy.storchaka, tweksteen, vstinner priority: normal severity: normal status: open title: Multiple "unknown option" errors when passing unknown arguments to the interpreter type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 06:27:00 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 06 May 2020 10:27:00 +0000 Subject: [issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad In-Reply-To: <1487329309.81.0.182915384821.issue29587@psf.upfronthosting.co.za> Message-ID: <1588760820.66.0.735142460867.issue29587@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- pull_requests: +19266 pull_request: https://github.com/python/cpython/pull/19858 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 06:36:11 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 06 May 2020 10:36:11 +0000 Subject: [issue40466] asyncio.ensure_future() breaks implicit exception chaining In-Reply-To: <1588327031.68.0.391066617052.issue40466@roundup.psfhosted.org> Message-ID: <1588761371.4.0.673681256885.issue40466@roundup.psfhosted.org> Chris Jerdonek added the comment: Closing this as a duplicate of https://bugs.python.org/issue29587 It turns out that, as Nathaniel first suggested, this is really just another special case of that issue (the "yield from" case as opposed to the "yield" case). It's just that the particular examples provided in that issue were for "yield" and not "yield from", so it wasn't immediately evident. ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 06:38:43 2020 From: report at bugs.python.org (Michael) Date: Wed, 06 May 2020 10:38:43 +0000 Subject: [issue38227] Setting a signal handler gets multiprocessing.Pool stuck In-Reply-To: <1568929295.79.0.555392640133.issue38227@roundup.psfhosted.org> Message-ID: <1588761523.48.0.947522729133.issue38227@roundup.psfhosted.org> Michael added the comment: Looks like a duplicate of my previous issue https://bugs.python.org/issue29759 Unfortunately some frameworks like Gunicorn are extensively using signal handlers for their internal purposes. ---------- nosy: +mapozyan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 06:47:21 2020 From: report at bugs.python.org (Michael) Date: Wed, 06 May 2020 10:47:21 +0000 Subject: [issue38227] Setting a signal handler gets multiprocessing.Pool stuck In-Reply-To: <1568929295.79.0.555392640133.issue38227@roundup.psfhosted.org> Message-ID: <1588762041.44.0.283905346955.issue38227@roundup.psfhosted.org> Michael added the comment: Reproducing issue with attached test (Python 3.8.2 on Ubuntu 16.04). ---------- Added file: https://bugs.python.org/file49130/mp-signal-bug-python3.8.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 07:06:24 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 06 May 2020 11:06:24 +0000 Subject: [issue31033] Add argument to .cancel() of Task and Future In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1588763184.97.0.50788695041.issue31033@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- keywords: +patch pull_requests: +19267 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19951 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 07:17:00 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 06 May 2020 11:17:00 +0000 Subject: [issue40528] Improve / Clear ASDL generator Message-ID: <1588763820.27.0.218398998224.issue40528@roundup.psfhosted.org> New submission from Batuhan Taskaya : - Better error messages with punctuation - Py_UNREACHABLE() for unreachable states - Removal of several 'unused' and 'undocumented (in Zephyr ASDL spec) built-in types. ---------- components: Interpreter Core messages: 368235 nosy: BTaskaya priority: normal severity: normal status: open title: Improve / Clear ASDL generator versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 07:22:08 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 06 May 2020 11:22:08 +0000 Subject: [issue31033] Add argument to .cancel() of Task and Future In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1588764128.68.0.999672086231.issue31033@roundup.psfhosted.org> Chris Jerdonek added the comment: I just posted a draft, proof-of-concept PR for one aspect of this issue: https://github.com/python/cpython/pull/19951 Namely, the PR makes it so that cancelled tasks have full tracebacks, all the way to where the code first gets interrupted. I did the C implementation, but I still need to do the pure Python implementation. (Note that it doesn't show where `task.cancel()` was *called*, but rather the first line of code that is cancelled. That other aspect can be handled in a separate PR.) As an example, for this code-- import asyncio async def nested(): await asyncio.sleep(1) async def run(): task = asyncio.create_task(nested()) await asyncio.sleep(0) task.cancel() await task loop = asyncio.new_event_loop() try: loop.run_until_complete(run()) finally: loop.close() Python currently (before the PR) does this: Traceback (most recent call last): File "/.../cpython/test-cancel.py", line 15, in loop.run_until_complete(run()) File "/.../cpython/Lib/asyncio/base_events.py", line 642, in run_until_complete return future.result() asyncio.exceptions.CancelledError With the PR, it looks like this. In particular, you can see that it includes "await asyncio.sleep(1)", as well as the intermediate await: Traceback (most recent call last): File "/.../cpython/test-cancel.py", line 5, in nested await asyncio.sleep(1) File "/.../cpython/Lib/asyncio/tasks.py", line 657, in sleep return await future asyncio.exceptions.CancelledError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/.../cpython/test-cancel.py", line 11, in run await task asyncio.exceptions.CancelledError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/.../cpython/test-cancel.py", line 15, in loop.run_until_complete(run()) File "/.../cpython/Lib/asyncio/base_events.py", line 642, in run_until_complete return future.result() asyncio.exceptions.CancelledError ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 07:24:40 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 06 May 2020 11:24:40 +0000 Subject: [issue40528] Improve / Clear ASDL generator In-Reply-To: <1588763820.27.0.218398998224.issue40528@roundup.psfhosted.org> Message-ID: <1588764280.75.0.553505343073.issue40528@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch pull_requests: +19268 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19952 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 07:46:41 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 06 May 2020 11:46:41 +0000 Subject: [issue40528] Improve / Clear ASDL generator In-Reply-To: <1588763820.27.0.218398998224.issue40528@roundup.psfhosted.org> Message-ID: <1588765601.73.0.212370854737.issue40528@roundup.psfhosted.org> Serhiy Storchaka added the comment: You just read my thoughts. That's what I was going to do tonight. ;) ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 07:46:38 2020 From: report at bugs.python.org (Michael) Date: Wed, 06 May 2020 11:46:38 +0000 Subject: [issue38227] Setting a signal handler gets multiprocessing.Pool stuck In-Reply-To: <1568929295.79.0.555392640133.issue38227@roundup.psfhosted.org> Message-ID: <1588765598.85.0.675012331368.issue38227@roundup.psfhosted.org> Michael added the comment: Attached working patch. Tested with signal handler set in Lib/test/_test_multiprocessing.py: 2329a2330,2331 > def signal_handler(signum, frame): > pass 2335a2338 > cls.old_handler = signal.signal(signal.SIGTERM, signal_handler) 2342a2346 > signal.signal(signal.SIGTERM, cls.old_handler) All passing. ---------- keywords: +patch Added file: https://bugs.python.org/file49131/pool.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 07:52:23 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 06 May 2020 11:52:23 +0000 Subject: [issue40528] Improve / Clear ASDL generator In-Reply-To: <1588763820.27.0.218398998224.issue40528@roundup.psfhosted.org> Message-ID: <1588765943.39.0.423431688852.issue40528@roundup.psfhosted.org> Batuhan Taskaya added the comment: > You just read my thoughts. That's what I was going to do tonight. ;) :) Awesome. Well I'll plan to continue this; @pablogsal and I was discussing the idea of extracting _ast.AST subclasses to python level (which would save a lot of time for new additions). So my primary goal is clearing bunch of old stuff / making it extendable and clean. ---------- nosy: +pablogsal stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 07:53:27 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 06 May 2020 11:53:27 +0000 Subject: [issue40528] Improve / Clear ASDL generator In-Reply-To: <1588763820.27.0.218398998224.issue40528@roundup.psfhosted.org> Message-ID: <1588766007.81.0.900446367131.issue40528@roundup.psfhosted.org> Batuhan Taskaya added the comment: Currently working on implementing some items from this TODO https://github.com/eliben/asdl_parser/blob/master/TODO ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 07:56:40 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 06 May 2020 11:56:40 +0000 Subject: [issue40515] test_ssl.py hangs with SSL 1.1 built with no threads In-Reply-To: <1588684824.78.0.561425398379.issue40515@roundup.psfhosted.org> Message-ID: <1588766200.33.0.149506122725.issue40515@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +19269 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19953 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 08:34:19 2020 From: report at bugs.python.org (Madhusudhan Kasula) Date: Wed, 06 May 2020 12:34:19 +0000 Subject: [issue40529] Auto Completions with case insensitive Message-ID: <1588768459.35.0.455156839892.issue40529@roundup.psfhosted.org> New submission from Madhusudhan Kasula : Now, we don't have user option to make completions with case insensitive. It would be nice if user have option to enable/disable case insensitive completions. ---------- components: Library (Lib) messages: 368241 nosy: mkasula priority: normal severity: normal status: open title: Auto Completions with case insensitive type: enhancement 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 May 6 08:39:03 2020 From: report at bugs.python.org (Vadim Godunko) Date: Wed, 06 May 2020 12:39:03 +0000 Subject: [issue40530] distutils/cygwinccompiler.py doesn't support recent msvc versions Message-ID: <1588768743.33.0.586739194503.issue40530@roundup.psfhosted.org> New submission from Vadim Godunko : Prebuild Python 3.7 package can't be used with GObjectIntrospection library on Windows due to miss of support of used MSVC compiler by distutils/cygwinccompiler.py module. sys.version returns: 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 00:42:30) [MSC v.1916 64 bit (AMD64)] so, compiler version is detected as 1916, while get_msvcr() function supports only versions up to '1600'. ---------- messages: 368242 nosy: Vadim Godunko priority: normal severity: normal status: open title: distutils/cygwinccompiler.py doesn't support recent msvc versions versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 08:39:41 2020 From: report at bugs.python.org (Roundup Robot) Date: Wed, 06 May 2020 12:39:41 +0000 Subject: [issue40529] Auto Completions with case insensitive In-Reply-To: <1588768459.35.0.455156839892.issue40529@roundup.psfhosted.org> Message-ID: <1588768781.61.0.356982475331.issue40529@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +19270 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19954 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 08:58:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 May 2020 12:58:04 +0000 Subject: [issue40527] Multiple "unknown option" errors when passing unknown arguments to the interpreter In-Reply-To: <1588757525.36.0.428936320881.issue40527@roundup.psfhosted.org> Message-ID: <1588769884.26.0.0233332082266.issue40527@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +19271 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19955 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 08:58:42 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 06 May 2020 12:58:42 +0000 Subject: [issue31033] Add argument to .cancel() of Task and Future In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1588769922.41.0.00650527883456.issue31033@roundup.psfhosted.org> Chris Jerdonek added the comment: Okay, I completed my draft PR (both C and pure Python implementations are done). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 08:59:03 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 May 2020 12:59:03 +0000 Subject: [issue40527] Multiple "unknown option" errors when passing unknown arguments to the interpreter In-Reply-To: <1588757525.36.0.428936320881.issue40527@roundup.psfhosted.org> Message-ID: <1588769943.1.0.519530115642.issue40527@roundup.psfhosted.org> STINNER Victor added the comment: Oh right, that's because Python parses the command line at least 3 times :-) The first 2 times, it is not supposed to log errors. It's a bug: attached PR 19955 fix it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 09:00:20 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 06 May 2020 13:00:20 +0000 Subject: [issue40528] Improve / Clear ASDL generator In-Reply-To: <1588763820.27.0.218398998224.issue40528@roundup.psfhosted.org> Message-ID: <1588770020.83.0.67804135064.issue40528@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I was also thinking about getting rid of "string" nodes and just use Constant for those. Having the strings raw make the AST inconsistent because nodes that are 'strings' do not have line numbers and other metadata, making tools that need the source to report stuff more complex than it should. What are your opinions on this @serhiy.storchaka and @BTaskaya? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 09:00:23 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 May 2020 13:00:23 +0000 Subject: [issue40527] Multiple "unknown option" errors when passing unknown arguments to the interpreter In-Reply-To: <1588757525.36.0.428936320881.issue40527@roundup.psfhosted.org> Message-ID: <1588770023.4.0.925910750715.issue40527@roundup.psfhosted.org> STINNER Victor added the comment: > I was able to bisect this to the following commit: (...) Oh, well done! Yeah, it's all my fault ;-) It's a regression of the PEP 587 (PyConfig) implementation. I chose to share code between Python/preconfig.c and Python/initconfig.c rather than duplicate code. The implementation of _PyPreConfig_Read() and PyConfig_Read() is quite complex. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 09:16:11 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 06 May 2020 13:16:11 +0000 Subject: [issue40528] Improve / Clear ASDL generator In-Reply-To: <1588763820.27.0.218398998224.issue40528@roundup.psfhosted.org> Message-ID: <1588770971.63.0.449079099511.issue40528@roundup.psfhosted.org> Batuhan Taskaya added the comment: > I was also thinking about getting rid of "string" nodes and just use Constant for those. Having the strings raw make the AST inconsistent because nodes that are 'strings' do not have line numbers and other metadata, making tools that need the source to report stuff more complex than it should. I'm +1 on that (especially for finding import aliases, as we discussed earlier), if necessary precautions happen to ensure minimum breakage (from what I understand, it is something that will break everyone's code. Maybe we can implement custom Constant.__str__? and other different things to ensure it breaks small). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 09:17:18 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 06 May 2020 13:17:18 +0000 Subject: [issue40528] Improve / Clear ASDL generator In-Reply-To: <1588763820.27.0.218398998224.issue40528@roundup.psfhosted.org> Message-ID: <1588771038.59.0.848178805142.issue40528@roundup.psfhosted.org> Serhiy Storchaka added the comment: "string" is only used for * type_comment in a number of statements * kind in Constant * tag in type_ignore For which of them a line number is meaningful and useful? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 09:22:21 2020 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 06 May 2020 13:22:21 +0000 Subject: [issue40527] Multiple "unknown option" errors when passing unknown arguments to the interpreter In-Reply-To: <1588757525.36.0.428936320881.issue40527@roundup.psfhosted.org> Message-ID: <1588771341.63.0.89527626482.issue40527@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 2668a9a5aa506a048aef7b4881c8dcf6b81c6870 by Victor Stinner in branch 'master': bpo-40527: Fix command line argument parsing (GH-19955) https://github.com/python/cpython/commit/2668a9a5aa506a048aef7b4881c8dcf6b81c6870 ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 09:22:48 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 06 May 2020 13:22:48 +0000 Subject: [issue40527] Multiple "unknown option" errors when passing unknown arguments to the interpreter In-Reply-To: <1588757525.36.0.428936320881.issue40527@roundup.psfhosted.org> Message-ID: <1588771368.36.0.00126393197315.issue40527@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +19272 pull_request: https://github.com/python/cpython/pull/19956 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 09:33:26 2020 From: report at bugs.python.org (Roundup Robot) Date: Wed, 06 May 2020 13:33:26 +0000 Subject: [issue40529] Auto Completions with case insensitive In-Reply-To: <1588768459.35.0.455156839892.issue40529@roundup.psfhosted.org> Message-ID: <1588772006.17.0.373603917676.issue40529@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +19273 pull_request: https://github.com/python/cpython/pull/19957 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 09:34:22 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 06 May 2020 13:34:22 +0000 Subject: [issue40528] Improve / Clear ASDL generator In-Reply-To: <1588763820.27.0.218398998224.issue40528@roundup.psfhosted.org> Message-ID: <1588772062.81.0.046646991207.issue40528@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > For which of them a line number is meaningful and useful? Apologies, I was thinking of 'identifier', which is basically a PyObject representing a string. For instance, when parsing function calls like x = ast.parse("f(x=435)") the 'arg' attribute of the keyword is just the string 'x', without any metadata about it (like column offset and such). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 09:35:09 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 06 May 2020 13:35:09 +0000 Subject: [issue40528] Improve / Clear ASDL generator In-Reply-To: <1588763820.27.0.218398998224.issue40528@roundup.psfhosted.org> Message-ID: <1588772109.26.0.830761162013.issue40528@roundup.psfhosted.org> Batuhan Taskaya added the comment: Oh, I confuse with it identifier. IMHO replacing identifier with Constant would infer position in some cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 09:41:52 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 06 May 2020 13:41:52 +0000 Subject: [issue40528] Improve / Clear ASDL generator In-Reply-To: <1588763820.27.0.218398998224.issue40528@roundup.psfhosted.org> Message-ID: <1588772512.33.0.330399545982.issue40528@roundup.psfhosted.org> Batuhan Taskaya added the comment: A real world example would be tools like `unimport`, that try to remove a certain part of import by looking start/end column offsets. Before (lib2to3), it was using tokens to manipulate source, and what I can tell is that having position information on multi line from imports would be a life saver for tool authors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 09:43:13 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 06 May 2020 13:43:13 +0000 Subject: [issue40527] Multiple "unknown option" errors when passing unknown arguments to the interpreter In-Reply-To: <1588757525.36.0.428936320881.issue40527@roundup.psfhosted.org> Message-ID: <1588772593.31.0.43430133323.issue40527@roundup.psfhosted.org> miss-islington added the comment: New changeset bce4ddafdd188cc6deb1584728b67b9e149ca6a4 by Miss Islington (bot) in branch '3.8': bpo-40527: Fix command line argument parsing (GH-19955) https://github.com/python/cpython/commit/bce4ddafdd188cc6deb1584728b67b9e149ca6a4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 09:48:01 2020 From: report at bugs.python.org (=?utf-8?q?Ionel_Cristian_M=C4=83rie=C8=99?=) Date: Wed, 06 May 2020 13:48:01 +0000 Subject: [issue29759] Deadlock in multiprocessing.pool.Pool on terminate In-Reply-To: <1488995446.21.0.189589252767.issue29759@psf.upfronthosting.co.za> Message-ID: <1588772881.65.0.656991918315.issue29759@roundup.psfhosted.org> Change by Ionel Cristian M?rie? : ---------- nosy: +ionelmc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 09:49:00 2020 From: report at bugs.python.org (=?utf-8?q?Jo=C3=A3o_Marcos?=) Date: Wed, 06 May 2020 13:49:00 +0000 Subject: [issue40531] Adding the method find() to list Message-ID: <1588772940.44.0.121672930635.issue40531@roundup.psfhosted.org> New submission from Jo?o Marcos : """ PROBLEM: When trying to search the position of an element inside a list, we should use the `in` operator to first check if the element exists, and then use the `index` method to obtain the index. `in` (__contains__) runs a linear search to return the boolean. `index` also runs a linear search to return the index. This makes the code slower, because we need to search for the same item twice. FEATURE PROPOSAL: Similar to str.find(), list.find() should be implemented, where -1 is returned when the element isn't present """ # Since there's no list.find(), this is my workaround to achieve making only one linear search per query def find(container: list, index: int) -> int: """ Str.find() behavior but for lists """ try: return container.index(index) except ValueError: return -1 # Example driver code: index = find(list, possible_element) if index_of_element == -1: pass # Not found else: pass # Found ---------- messages: 368254 nosy: Jo?o Marcos priority: normal severity: normal status: open title: Adding the method find() to list type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 10:04:38 2020 From: report at bugs.python.org (=?utf-8?q?Jo=C3=A3o_Marcos?=) Date: Wed, 06 May 2020 14:04:38 +0000 Subject: [issue40531] Adding the method find() to list In-Reply-To: <1588772940.44.0.121672930635.issue40531@roundup.psfhosted.org> Message-ID: <1588773878.36.0.27291263287.issue40531@roundup.psfhosted.org> Jo?o Marcos added the comment: This is my first issue, is this the right place to discuss enhancements? ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 10:28:45 2020 From: report at bugs.python.org (Code436) Date: Wed, 06 May 2020 14:28:45 +0000 Subject: [issue40532] Persmission error Message-ID: <1588775325.08.0.437728334126.issue40532@roundup.psfhosted.org> New submission from Code436 : When I try to edit a module *as an administrator* is show permission denied even tho in permissions administrator is set to full control ---------- messages: 368256 nosy: Coder436 priority: normal severity: normal status: open title: Persmission error type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 10:29:40 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 06 May 2020 14:29:40 +0000 Subject: [issue40528] Improve / Clear ASDL generator In-Reply-To: <1588763820.27.0.218398998224.issue40528@roundup.psfhosted.org> Message-ID: <1588775380.41.0.0259759865175.issue40528@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 091951a67c832db83c60f4eb22f1fb474b70e635 by Batuhan Taskaya in branch 'master': bpo-40528: Improve and clear several aspects of the ASDL definition code for the AST (GH-19952) https://github.com/python/cpython/commit/091951a67c832db83c60f4eb22f1fb474b70e635 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 10:32:22 2020 From: report at bugs.python.org (Benjamin Keen) Date: Wed, 06 May 2020 14:32:22 +0000 Subject: [issue40440] allow array.array construction from memoryview w/o copy In-Reply-To: <1588186893.13.0.865332377255.issue40440@roundup.psfhosted.org> Message-ID: <1588775542.09.0.910371005702.issue40440@roundup.psfhosted.org> Benjamin Keen added the comment: memoryview has a lot of overlap with array, but there are still useful methods (index and count for instance) that memoryview does not have. I don't see a workaround that will run with equivalent speed without writing some extension or adding them to memoryview. Constructing an array from the memoryview when one wants these isn't a workaround because there may not be enough memory to make a copy. For instance - a memoryview of a mapped disk file that is much larger than the physical memory in the machine. When writing functions that use an array you don't always know ahead of time whether you are going to be in this situation. The functions may come from someone else with a bigger machine. This lets the client of the function decide what the right thing to do is as needed without changing the function itself. So for that reason this brings something that just using the memoryview directly won't provide. There's value in being able to write things that use the array interface consistently. You could also think of this as a way of providing compiled-speed index() and count() on certain memoryviews without needing to add new code for that to memoryview itself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 10:41:54 2020 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 06 May 2020 14:41:54 +0000 Subject: [issue40527] Multiple "unknown option" errors when passing unknown arguments to the interpreter In-Reply-To: <1588757525.36.0.428936320881.issue40527@roundup.psfhosted.org> Message-ID: <1588776114.93.0.214755935229.issue40527@roundup.psfhosted.org> Dong-hee Na added the comment: Thanks for the bug report Florian and for work Victor! I am now closing this issue :) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 10:44:03 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 06 May 2020 14:44:03 +0000 Subject: [issue40532] Persmission error In-Reply-To: <1588775325.08.0.437728334126.issue40532@roundup.psfhosted.org> Message-ID: <1588776243.23.0.712054522048.issue40532@roundup.psfhosted.org> Eric V. Smith added the comment: What editor are you using? What platform? What file are you trying to edit? ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 10:55:18 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 06 May 2020 14:55:18 +0000 Subject: [issue40532] Persmission error In-Reply-To: <1588775325.08.0.437728334126.issue40532@roundup.psfhosted.org> Message-ID: <1588776918.78.0.773719934751.issue40532@roundup.psfhosted.org> Steven D'Aprano added the comment: What reason do you have to think that this is a Python issue rather than a permissions error? Since you haven't told us what permissions the file has, what OS you are using, who set the permissions, or even the actual error message, it is impossible to diagnose the issue, but nothing you have told us so far suggests this is a Python issue. It sounds like a local permissions issue that you will have to solve yourself. If you have reason to think this is a Python bug, please explain why, otherwise we shall close the issue. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 11:11:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 May 2020 15:11:35 +0000 Subject: [issue40533] Subinterpreters: don't share Python objects between interpreters Message-ID: <1588777895.61.0.395509624257.issue40533@roundup.psfhosted.org> New submission from STINNER Victor : To get one GIL per interpreter (bpo-40512), either PyObject.ob_refcnt member must become an atomic variable, or subinterpreters must not share any object. Right now, subinterpreters share Python objects. For example, PyModule_Type is declared statically and so shared by all interpreters and so PyModule_Type.tp_mro tuple is accessed in parallel by multiple interpreters. If PyObject.ob_refcnt is not atomic, Py_INCREF() and Py_DECREF() are unsafe and tp_mro tuple can be destroyed whereas it is still used. I propose to make PyObject.ob_refcnt atomic for now, when Python is built with EXPERIMENTAL_ISOLATED_SUBINTERPRETERS macro defined. It's a temporary workaround until subinterpreters stop sharing objects. ---------- components: Interpreter Core messages: 368262 nosy: vstinner priority: normal severity: normal status: open title: Subinterpreters: don't share Python objects between interpreters versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 11:17:36 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 06 May 2020 15:17:36 +0000 Subject: [issue40529] Auto Completions with case insensitive In-Reply-To: <1588768459.35.0.455156839892.issue40529@roundup.psfhosted.org> Message-ID: <1588778256.04.0.346288184127.issue40529@roundup.psfhosted.org> Steven D'Aprano added the comment: Python is a case-sensitive language. Why would case-insensitive completions be useful? ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 11:19:04 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 06 May 2020 15:19:04 +0000 Subject: [issue40529] Auto Completions with case insensitive In-Reply-To: <1588768459.35.0.455156839892.issue40529@roundup.psfhosted.org> Message-ID: <1588778344.67.0.502147402238.issue40529@roundup.psfhosted.org> Steven D'Aprano added the comment: This is a new feature, so it would have to go into 3.9, all older versions are in feature-freeze. ---------- versions: -Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 11:21:07 2020 From: report at bugs.python.org (Florian Bruhin) Date: Wed, 06 May 2020 15:21:07 +0000 Subject: [issue40527] Multiple "unknown option" errors when passing unknown arguments to the interpreter In-Reply-To: <1588757525.36.0.428936320881.issue40527@roundup.psfhosted.org> Message-ID: <1588778467.03.0.5156036406.issue40527@roundup.psfhosted.org> Florian Bruhin added the comment: That was an insanely fast fix - thanks everyone! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 11:25:16 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 06 May 2020 15:25:16 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588778716.15.0.655563787504.issue40517@roundup.psfhosted.org> Raymond Hettinger added the comment: Sorry about the commit/revert. I fat fingered a comment. Please do resubmit the PR. In general, this is a nice idea. The look just needs to be tweaked a bit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 11:28:43 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 06 May 2020 15:28:43 +0000 Subject: [issue40531] Adding the method find() to list In-Reply-To: <1588772940.44.0.121672930635.issue40531@roundup.psfhosted.org> Message-ID: <1588778923.4.0.0865144370071.issue40531@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi Jo?o, ideas like this can also be proposed first on the python-ideas mailing list but as you said in your post there is already a method to do this and it raises ValueError when it is not found which is a common idiom in Python. Other objects don't often have two versions of the same method, one that raises an exception on error and one that returns a sentinel, most only have the one that raises. Notice that your example is not simpler with your proposal: # Example driver code: index = find(list, possible_element) if index_of_element == -1: pass # Not found else: pass # Found is a hard to read than and actually longer: try: index = list.index(possible_element) except ValueError: index = -1 if you really care about the number of lines you could use, while I don't recommend it: try: index = list.index(possible_element) except ValueErrort: index = -1 Also adding a new method to list would mean adding it to all sequence objects and that is asking for a lot. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 11:30:09 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 06 May 2020 15:30:09 +0000 Subject: [issue40531] Adding the method find() to list In-Reply-To: <1588772940.44.0.121672930635.issue40531@roundup.psfhosted.org> Message-ID: <1588779009.83.0.166106332601.issue40531@roundup.psfhosted.org> Raymond Hettinger added the comment: Please take this to Python ideas. My understanding is that index() is supposed to be the one-way-to-do-it going forward. The find() API proved to be problematic because -1 is a valid index and people were hitting bugs by failing to check for the -1 and then doing an unintended s[-1]. ---------- nosy: +rhettinger resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 11:31:45 2020 From: report at bugs.python.org (hai shi) Date: Wed, 06 May 2020 15:31:45 +0000 Subject: [issue40533] Subinterpreters: don't share Python objects between interpreters In-Reply-To: <1588777895.61.0.395509624257.issue40533@roundup.psfhosted.org> Message-ID: <1588779105.96.0.528365566467.issue40533@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 11:34:35 2020 From: report at bugs.python.org (hai shi) Date: Wed, 06 May 2020 15:34:35 +0000 Subject: [issue38787] PEP 573: Module State Access from C Extension Methods In-Reply-To: <1573655440.57.0.563143759574.issue38787@roundup.psfhosted.org> Message-ID: <1588779275.88.0.781688083409.issue38787@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 11:38:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 May 2020 15:38:52 +0000 Subject: [issue40533] Subinterpreters: don't share Python objects between interpreters In-Reply-To: <1588777895.61.0.395509624257.issue40533@roundup.psfhosted.org> Message-ID: <1588779532.31.0.7914455296.issue40533@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +19274 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19958 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 11:43:24 2020 From: report at bugs.python.org (Madhusudhan Kasula) Date: Wed, 06 May 2020 15:43:24 +0000 Subject: [issue40529] Auto Completions with case insensitive In-Reply-To: <1588768459.35.0.455156839892.issue40529@roundup.psfhosted.org> Message-ID: <1588779804.62.0.358632151097.issue40529@roundup.psfhosted.org> Madhusudhan Kasula added the comment: Yes. Python is case sensitive language and this feature will not break its essence. This case insensitive completion will help interpreter user for easy typing and choose from the available options. In the following example even user typed 'os.po', completions will give user all the options ignoring case: >>> os.po os.POSIX_FADV_DONTNEED os.POSIX_FADV_NORMAL os.POSIX_FADV_SEQUENTIAL os.popen( os.posix_fallocate( os.POSIX_FADV_NOREUSE os.POSIX_FADV_RANDOM os.POSIX_FADV_WILLNEED os.posix_fadvise( >>> os.po And finally, this is implemented as an controllable user option with default value as 'case sensitive'. So user can choose to go case insensitive or not. Even core 'readline' also provide this option with 'set completion-ignore-case on'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 11:43:49 2020 From: report at bugs.python.org (T UA) Date: Wed, 06 May 2020 15:43:49 +0000 Subject: [issue40534] ShUtil doc deficiencies Message-ID: <1588779829.75.0.0438051451832.issue40534@roundup.psfhosted.org> New submission from T UA : https://docs.python.org/3/library/shutil.html The operational outcome for the various copy functions is not described for the cases in which the target file already exists. Do they overwrite, do they raise exceptions and if so, which ones? ---------- messages: 368270 nosy: T UA priority: normal severity: normal status: open title: ShUtil doc deficiencies _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 11:44:05 2020 From: report at bugs.python.org (T UA) Date: Wed, 06 May 2020 15:44:05 +0000 Subject: [issue40534] ShUtil doc deficiencies In-Reply-To: <1588779829.75.0.0438051451832.issue40534@roundup.psfhosted.org> Message-ID: <1588779845.57.0.454779951448.issue40534@roundup.psfhosted.org> Change by T UA : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 11:44:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 May 2020 15:44:12 +0000 Subject: [issue40521] Make tuple, dict, frame free lists, unicode interned strings, unicode latin1 singletons per-interpreter In-Reply-To: <1588693682.5.0.219755904926.issue40521@roundup.psfhosted.org> Message-ID: <1588779852.38.5.30430710003e-05.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19275 pull_request: https://github.com/python/cpython/pull/19959 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 11:48:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 May 2020 15:48:33 +0000 Subject: [issue40521] Make tuple, dict, frame free lists, unicode interned strings, unicode latin1 singletons per-interpreter In-Reply-To: <1588693682.5.0.219755904926.issue40521@roundup.psfhosted.org> Message-ID: <1588780113.18.0.387653119673.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19276 pull_request: https://github.com/python/cpython/pull/19960 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 11:49:07 2020 From: report at bugs.python.org (=?utf-8?q?Jo=C3=A3o_Marcos?=) Date: Wed, 06 May 2020 15:49:07 +0000 Subject: [issue40531] Adding the method find() to list In-Reply-To: <1588772940.44.0.121672930635.issue40531@roundup.psfhosted.org> Message-ID: <1588780147.11.0.0486973792824.issue40531@roundup.psfhosted.org> Jo?o Marcos added the comment: Thanks for the replies!. Here's the link for discussion in the Python Ideas: https://discuss.python.org/t/adding-the-method-find-to-list/4113 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 11:57:00 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 May 2020 15:57:00 +0000 Subject: [issue40533] Subinterpreters: don't share Python objects between interpreters In-Reply-To: <1588777895.61.0.395509624257.issue40533@roundup.psfhosted.org> Message-ID: <1588780620.02.0.559927618434.issue40533@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19277 pull_request: https://github.com/python/cpython/pull/19961 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 11:59:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 May 2020 15:59:11 +0000 Subject: [issue40533] Subinterpreters: don't share Python objects between interpreters In-Reply-To: <1588777895.61.0.395509624257.issue40533@roundup.psfhosted.org> Message-ID: <1588780751.07.0.876079918427.issue40533@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 11:59:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 May 2020 15:59:32 +0000 Subject: [issue40512] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1588780772.5.0.811360001276.issue40512@roundup.psfhosted.org> STINNER Victor added the comment: I created bpo-40533: "Subinterpreters: don't share Python objects between interpreters". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 12:03:27 2020 From: report at bugs.python.org (Eric Snow) Date: Wed, 06 May 2020 16:03:27 +0000 Subject: [issue40058] Running test_datetime twice fails with: module 'datetime' has no attribute '_divide_and_round' In-Reply-To: <1585101280.02.0.657415835319.issue40058@roundup.psfhosted.org> Message-ID: <1588781007.08.0.610742338201.issue40058@roundup.psfhosted.org> Eric Snow added the comment: FYI, with the following additions in Lib/test/test_datetime.py... before = set(sys.modules) try: pure_tests = import_fresh_module(TESTS, fresh=['datetime', '_strptime'], blocked=['_datetime']) _pure = set(sys.modules) fast_tests = import_fresh_module(TESTS, fresh=['datetime', '_datetime', '_strptime']) _fast = set(sys.modules) print(f'added (pure): {sorted(_pure-before)}') print(f'added (fast): {sorted(_fast-before)}') print('---') finally: ... I get the following output running "./python -m test test_datetime test_datetime": 0:00:00 load avg: 0.52 Run tests sequentially 0:00:00 load avg: 0.52 [1/2] test_datetime added (pure): ['_decimal', '_strptime', '_testcapi', 'decimal', 'numbers', 'test.datetimetester'] added (fast): ['_decimal', '_strptime', '_testcapi', 'decimal', 'numbers', 'test.datetimetester'] --- 0:00:05 load avg: 0.52 [2/2] test_datetime added (pure): ['_datetime', '_strptime', 'datetime'] added (fast): ['_datetime', '_strptime', 'datetime'] --- [snipped] That definitely tells a story. :) Unfortunately, for now I don't have any more time to investigate. Sorry. ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 12:08:25 2020 From: report at bugs.python.org (Eric Snow) Date: Wed, 06 May 2020 16:08:25 +0000 Subject: [issue40533] Subinterpreters: don't share Python objects between interpreters In-Reply-To: <1588777895.61.0.395509624257.issue40533@roundup.psfhosted.org> Message-ID: <1588781305.2.0.199386076993.issue40533@roundup.psfhosted.org> Eric Snow added the comment: Yep, before per-interpreter GIL is official we must get to the point where *no* PyObject objects are shared. Making PyObject.ob_refcnt atomic until then (only as part of the experiment) should be fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 12:17:31 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 May 2020 16:17:31 +0000 Subject: [issue40527] Multiple "unknown option" errors when passing unknown arguments to the interpreter In-Reply-To: <1588757525.36.0.428936320881.issue40527@roundup.psfhosted.org> Message-ID: <1588781851.27.0.666675458854.issue40527@roundup.psfhosted.org> STINNER Victor added the comment: > That was an insanely fast fix - thanks everyone! :) Sorry about that. We are working on this issue to ensure that next bugs will not fixed as quickly a this done ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 12:19:26 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Wed, 06 May 2020 16:19:26 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588781966.95.0.941721487912.issue40334@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +19278 pull_request: https://github.com/python/cpython/pull/19962 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 12:20:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 May 2020 16:20:33 +0000 Subject: [issue40533] Subinterpreters: don't share Python objects between interpreters In-Reply-To: <1588777895.61.0.395509624257.issue40533@roundup.psfhosted.org> Message-ID: <1588782033.97.0.549858351338.issue40533@roundup.psfhosted.org> STINNER Victor added the comment: > Yep, before per-interpreter GIL is official we must get to the point where *no* PyObject objects are shared. I would like to add: "no PyObject objects are shared in the stdlib" ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 12:23:03 2020 From: report at bugs.python.org (Ajaya) Date: Wed, 06 May 2020 16:23:03 +0000 Subject: [issue40535] While build python 3.8.2 in linux ctypes.so is using libffi.so.6 instead of libffi.so.7 Message-ID: <1588782183.35.0.376036230435.issue40535@roundup.psfhosted.org> New submission from Ajaya : i am using libffi-3.3.tgz for building python 3.8.2 in Linux. In windows there is no problem it is using libffi-7.dll.In linux it is using libffi.so.6 instead of libffi.so.7. i am using "./configure --prefix=/u/$loginID/Python$pythonVersion --enable-debug". ---------- components: Build messages: 368277 nosy: Ajaya priority: normal severity: normal status: open title: While build python 3.8.2 in linux ctypes.so is using libffi.so.6 instead of libffi.so.7 type: compile error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 12:24:06 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 May 2020 16:24:06 +0000 Subject: [issue40521] Make tuple, dict, frame free lists, unicode interned strings, unicode latin1 singletons per-interpreter In-Reply-To: <1588693682.5.0.219755904926.issue40521@roundup.psfhosted.org> Message-ID: <1588782246.38.0.77743698215.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 89fc4a34cf7a01df9dd269d32d3706c68a72d130 by Victor Stinner in branch 'master': bpo-40521: Disable method cache in subinterpreters (GH-19960) https://github.com/python/cpython/commit/89fc4a34cf7a01df9dd269d32d3706c68a72d130 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 12:25:10 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 May 2020 16:25:10 +0000 Subject: [issue40533] Subinterpreters: don't share Python objects between interpreters In-Reply-To: <1588777895.61.0.395509624257.issue40533@roundup.psfhosted.org> Message-ID: <1588782310.41.0.0619934019817.issue40533@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d8135e913ab7c694db247c86d0a84c450c32d86e by Victor Stinner in branch 'master': bpo-40533: Disable GC in subinterpreters (GH-19961) https://github.com/python/cpython/commit/d8135e913ab7c694db247c86d0a84c450c32d86e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 12:32:16 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 May 2020 16:32:16 +0000 Subject: [issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) In-Reply-To: <1569848255.08.0.155489980043.issue38323@roundup.psfhosted.org> Message-ID: <1588782736.54.0.934466773956.issue38323@roundup.psfhosted.org> STINNER Victor added the comment: > we may want to consider skipping `test_close_kill_running` for `MultiLoopWatcher` until we can find one There are more MultiLoopWatcher tests which hang randomly, it's not only test_close_kill_running(). I'm fine with skipping tests until someone can come up with a fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 12:38:28 2020 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 06 May 2020 16:38:28 +0000 Subject: [issue5879] multiprocessing example "pool of http servers " fails on windows In-Reply-To: <1241019482.48.0.575158847578.issue5879@psf.upfronthosting.co.za> Message-ID: <1588783108.43.0.234309977654.issue5879@roundup.psfhosted.org> Zackery Spytz added the comment: Python 2 is EOL. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 13:02:22 2020 From: report at bugs.python.org (paul j3) Date: Wed, 06 May 2020 17:02:22 +0000 Subject: [issue40509] In argparse, allow REMAINDER(...) arguments in a mutually exclusive group In-Reply-To: <1588674644.49.0.299540849008.issue40509@roundup.psfhosted.org> Message-ID: <1588784542.93.0.540923280835.issue40509@roundup.psfhosted.org> paul j3 added the comment: A flagged argument with REMAINDER works just fine in a mutually exclusive group. group.add_argument('-g', nargs='...') positionals in such a group can only have ? or *. If you check the code, and past issues you'll see that those require some special handling. Normally that kind of positional is always 'seen', because an empty list (not strings) satisfies those nargs. One positional can work in a mutually exclusive group because it's been made to work, not because the fit is natural. Search past issues for REMAINDER to check whether your concerns have been raised before. If I recall correctly, even without a group, handling a flagged argument with REMAINDER is more robust than a positional. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 13:05:34 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 May 2020 17:05:34 +0000 Subject: [issue40521] Make tuple, dict, frame free lists, unicode interned strings, unicode latin1 singletons per-interpreter In-Reply-To: <1588693682.5.0.219755904926.issue40521@roundup.psfhosted.org> Message-ID: <1588784734.02.0.844964998925.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b7aa23d29fa48238dab3692d02e1f0a7e8a5af9c by Victor Stinner in branch 'master': bpo-40521: Disable list free list in subinterpreters (GH-19959) https://github.com/python/cpython/commit/b7aa23d29fa48238dab3692d02e1f0a7e8a5af9c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 13:11:01 2020 From: report at bugs.python.org (Shani Armon) Date: Wed, 06 May 2020 17:11:01 +0000 Subject: [issue40509] In argparse, allow REMAINDER(...) arguments in a mutually exclusive group In-Reply-To: <1588674644.49.0.299540849008.issue40509@roundup.psfhosted.org> Message-ID: <1588785061.2.0.449456353434.issue40509@roundup.psfhosted.org> Shani Armon added the comment: Yes. The pull request contains the special handling. For the purpose of REMAINDER positionals, the default is changed to the empty list that was returned if no arguments were passed. For the purpose of positional argument, that is equivalent to nothing being passed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 13:19:51 2020 From: report at bugs.python.org (Paul Ganssle) Date: Wed, 06 May 2020 17:19:51 +0000 Subject: [issue40536] Addition of a "list of available time zones" function to zoneinfo Message-ID: <1588785591.81.0.248136692657.issue40536@roundup.psfhosted.org> New submission from Paul Ganssle : One thing that I sort of overlooked in PEP 615 that I think will be a common feature request for zoneinfo is the ability to get a list of time zones available on the current TZPATH. This is more complicated to implement than it sounds like, but luckily I already did it in order to implement the property tests for the zoneinfo module: https://github.com/pganssle/zoneinfo/blob/ffd21a6d065e04725e04b37bb430c2559fefd5fa/tests/test_zoneinfo_property.py#L23-L70 The biggest complication is that there are files on TZPATH that are not necessarily time zones, and when I looked I couldn't easily find a list of all available time zones, so the only way to tell which ones are time zones and which ones aren't is to open each one and read the first 4 bytes. However, `tzdata` does ship with a list of available time zones, so the way I've got the function working right now is: 1. If `tzdata` is installed ? despite the fact that it's technically the end of the search path, convert the list of available zones that ships with `tzdata` to your starting set (since you know these are all valid zones). 2. Walk the `tzpath`, and every time you find something not in the set of valid keys, open it and read the first 4 bytes, then add that to the set. The common cases will be that `tzdata` is not available (in which case no harm done), or `tzdata` has the same set of keys as the TZPATH, in which case you never have to open any of the TZif files. The fact that the search order is inverted from what it normally is doesn't matter because the output is the union of all the sets anyway. I don't know that the PEP needs to be amended ? if this were a feature request for Python 3.10 I don't think it would need a PEP to go through, but I don't mind amending the PEP to document it. Design decisions (with my initial answers, loosely held): 1. Should this be a classmethod or a free-standing function? I'm inclined towards free-standing function because zoneinfo.TZPATH is at the module level and not the class level. 2. What should the return type be? I think frozenset() or set(); a sorted list is also a reasonable option, but for people who just want to use "in" or show some subset of available zones, that would be wasteful. We should go with frozenset() if we want there to be some possibility of caching the result in the future. 3. Should we try to cache the result? I would say no, at least for now. It would not be super easy to get the cache invalidation right in the general case, and not many people are likely to be sensitive to the performance of this operation ? the people who are can easily create their own cache. 4. What should it be called? Naming things is hard. Options: - zoneinfo.timezones() - zoneinfo.all_timezones() - zoneinfo.timezone_{list,set}() - zoneinfo.valid_timezones() - zoneinfo.valid_keys() - zoneinfo.available_timezones() `pytz` has a similar thing and calls it all_timezones. It also has something called common_timezones, but that is a bit harder to pull off and I'm not confident that we'll get something satisfactory before the feature freeze. ---------- components: Library (Lib) messages: 368285 nosy: belopolsky, lemburg, p-ganssle priority: normal severity: normal status: open title: Addition of a "list of available time zones" function to zoneinfo type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 13:31:55 2020 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 06 May 2020 17:31:55 +0000 Subject: [issue40028] Math module method to find prime factors for non-negative int n In-Reply-To: <1584733974.83.0.0417466712916.issue40028@roundup.psfhosted.org> Message-ID: <1588786315.39.0.906206947892.issue40028@roundup.psfhosted.org> Mark Dickinson added the comment: Some of the things that might go into a PEP, or into the PEP-creation process: - Arguments for: (a) a new imath module, versus (b) new functions in math, versus (c) a 3rd party package on PyPI. - A handful of plausible use-cases. - Comparisons with what other languages provide. - Discussion of how to handle existing integer math functions (gcd, factorial, isqrt, comb, perm, ...). If we had an imath module, users would probably expect to find many of these in that imath rather than in math. Do we re-export these functions in imath? If so, do we live with the duplication indefinitely, or aim for eventual deprecation and removal of the math module functions? Over what time period would such deprecation happen? Or do we leave everything where it is and simply add a "see also" documentation note to the imath documentation directing users to those math module functions? - Outline of the minimal coherent set of things that we want to implement. - Q: do we want "primes_below / small_primes" _and_ a lazy prime generator, or just one? Which one? - Q: do we need nextprime and prevprime? - Q: do we want a deterministic prime test in addition to a probable prime test (however slow that may be)? - Q: do we need random prime (or probable prime) generation? - Proposed APIs for each of those things (mostly straightforward, but not entirely so). There are lots of potentially contentious details here, like how to handle factorization of non-positive integers, the format for the factorization output (pairs of (prime, exponent)? repeated primes? guaranteed sorted?), etc.; we've already discussed the fun involved in probabilistic prime testing. - The inevitable bikeshedding on names. factorize? factorise? factor? factorint? nextprime? next_prime? I'd also like to have set out some kind of coherent set of goals / design decisions for the module that will help us make decisions in the future about whether a particular proposed shiny new thing should be included or not, whether it belongs in math or in imath, and that for new things in imath would help guide the API for that new thing. Are we aiming for a basic set of building blocks, or something more complete? Are we thinking about security concerns (adversarial attacks on probabilistic prime testing), or are those out of scope? Algorithmic details (as opposed to API) should mostly be out of scope for the PEP, but there'll be plenty to discuss if/when we get to implementation stage. (For factorization, I think we'll need to say _something_, so that users can have reasonable expectations about what size of composite can be factorised in a reasonable amount of time.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 13:42:48 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Wed, 06 May 2020 17:42:48 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588786968.71.0.978666615104.issue40334@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +19279 pull_request: https://github.com/python/cpython/pull/19963 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 13:52:03 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 06 May 2020 17:52:03 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588787523.74.0.18954596116.issue40334@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +19280 pull_request: https://github.com/python/cpython/pull/19964 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 14:01:32 2020 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 06 May 2020 18:01:32 +0000 Subject: [issue40526] documentation bad on asyncio In-Reply-To: <1588737963.7.0.298937096343.issue40526@roundup.psfhosted.org> Message-ID: <1588788092.89.0.258976542428.issue40526@roundup.psfhosted.org> Yury Selivanov added the comment: > If so, the main purpose of that example is just to demonstrate basic async/await syntax, and show asyncio.run() for a trivial case to clearly show how it's used at a fundamental level; it's intentional that the more involved examples that demonstrate asynchronous programming are contained in https://docs.python.org/3/library/asyncio-task.html#coroutine. Also, the example is simple and condensed enough that it requires zero additional explanation or context, as should be the case for a simple "hello world" example. Consider the perspective of someone who found the page without having previously seen async/await syntax used. Yes, exactly. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 14:11:14 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 06 May 2020 18:11:14 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588788674.11.0.653792211778.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 999ec9ab6af536cc2666a0847ec02331aaf00416 by Lysandros Nikolaou in branch 'master': bpo-40334: Add type to the assignment rule in the grammar file (GH-19963) https://github.com/python/cpython/commit/999ec9ab6af536cc2666a0847ec02331aaf00416 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 14:31:13 2020 From: report at bugs.python.org (Domenico Ragusa) Date: Wed, 06 May 2020 18:31:13 +0000 Subject: [issue40506] add support for os.Pathlike filenames in zipfile.ZipFile.writestr In-Reply-To: <1588644723.41.0.516863649113.issue40506@roundup.psfhosted.org> Message-ID: Domenico Ragusa added the comment: Here's a small patch to do this. Everything seems to work fine. I don't know if where I placed the test (in OtherTests) is the most appropriate. On Tue, May 5, 2020 at 4:12 AM Domenico Ragusa wrote: > > > New submission from Domenico Ragusa : > > ZipFile seems to support Pathlike objects pretty well, except in ZipFile.writestr. > For example: > > >>> a = ZipFile(Path('test.zip'), 'w') # this works ok > >>> a.write(Path('./foo.jpeg'), arcname=PurePath('/some/thing.jpeg')) # this works as well > >>> a.writestr(PurePath('/test.txt'), 'idk') # this doesn't > Traceback (most recent call last): > File "", line 1, in > File "/usr/lib/python3.8/zipfile.py", line 1788, in writestr > zinfo = ZipInfo(filename=zinfo_or_arcname, > File "/usr/lib/python3.8/zipfile.py", line 349, in __init__ > null_byte = filename.find(chr(0)) > AttributeError: 'PurePosixPath' object has no attribute 'find' > > I think it would be more consistent if it accepted any kind of paths, it would suffice to call os.fspath in ZipInfo.__init__ when the filename is a Pathlike-object, it's just 2 lines (+ tests, of course). > > Can I go ahead and prepare a patch for this? > > ---------- > components: Library (Lib) > messages: 368098 > nosy: d.ragusa > priority: normal > severity: normal > status: open > title: add support for os.Pathlike filenames in zipfile.ZipFile.writestr > type: enhancement > versions: Python 3.9 > > _______________________________________ > Python tracker > > _______________________________________ ---------- keywords: +patch Added file: https://bugs.python.org/file49132/pathlike_writestr.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff --git a/Lib/test/test_zipfile.py b/Lib/test/test_zipfile.py index 29d98c8092..31c83987ab 100644 --- a/Lib/test/test_zipfile.py +++ b/Lib/test/test_zipfile.py @@ -1546,6 +1546,12 @@ class OtherTests(unittest.TestCase): zinfo.flag_bits |= 0x08 # Include an extended local header. orig_zip.writestr(zinfo, data) + def test_writestr_pathlike_issue40506(self): + with zipfile.ZipFile(TESTFN2, 'w') as orig_zip: + path = '/foo/bar.txt' + orig_zip.writestr(pathlib.PurePath(path), '1234') + self.assertEqual(orig_zip.open(path).read(4), b'1234') + def test_close(self): """Check that the zipfile is closed after the 'with' block.""" with zipfile.ZipFile(TESTFN2, "w") as zipfp: diff --git a/Lib/zipfile.py b/Lib/zipfile.py index 8903d6a42e..44b3ee8e63 100644 --- a/Lib/zipfile.py +++ b/Lib/zipfile.py @@ -341,6 +341,8 @@ class ZipInfo (object): ) def __init__(self, filename="NoName", date_time=(1980,1,1,0,0,0)): + if isinstance(filename, os.PathLike): + filename = os.fspath(filename) self.orig_filename = filename # Original file name in archive # Terminate the file name at the first null byte. Null bytes in file From report at bugs.python.org Wed May 6 14:47:00 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 06 May 2020 18:47:00 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588790820.18.0.185348135955.issue40334@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +19281 pull_request: https://github.com/python/cpython/pull/19966 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 14:58:42 2020 From: report at bugs.python.org (Cajetan Rodrigues) Date: Wed, 06 May 2020 18:58:42 +0000 Subject: [issue40283] Documentation of turtle.circle() In-Reply-To: <1586883280.42.0.803600338852.issue40283@roundup.psfhosted.org> Message-ID: <1588791522.51.0.056103012729.issue40283@roundup.psfhosted.org> Cajetan Rodrigues added the comment: When I checked, I found the following: turtle.circle(50, 50) # counter-clockwise turtle.circle(-50, -50) # counter-clockwise turtle.circle(-50, 50) # clockwise turtle.circle(50, -50) # clockwise So it seems both radius and extent need to be of the same signage to effect a counter-clockwise draw. However, for the 2 cases where extent is negative, the draw happens through the turtle's tail rather than the head. Looks weird. ---------- nosy: +cajetan.rodrigues _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 15:06:06 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 06 May 2020 19:06:06 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588791966.2.0.445527453691.issue40517@roundup.psfhosted.org> Batuhan Taskaya added the comment: Hey Raymond, can you give me your feedback on asdl.png (the screenshot of new theme)? ---------- Added file: https://bugs.python.org/file49133/asdl.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 15:13:07 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 06 May 2020 19:13:07 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588792387.22.0.854241321979.issue40517@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- pull_requests: +19282 pull_request: https://github.com/python/cpython/pull/19967 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 15:18:40 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 06 May 2020 19:18:40 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588792720.21.0.595011367774.issue40517@roundup.psfhosted.org> Raymond Hettinger added the comment: The new screenshot looks nice. The colors are much better. Can you post another run with the class names in bold. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 15:32:00 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 06 May 2020 19:32:00 +0000 Subject: [issue40528] Improve / Clear ASDL generator In-Reply-To: <1588763820.27.0.218398998224.issue40528@roundup.psfhosted.org> Message-ID: <1588793520.17.0.532003053212.issue40528@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- pull_requests: +19283 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19968 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 15:37:13 2020 From: report at bugs.python.org (Brett Cannon) Date: Wed, 06 May 2020 19:37:13 +0000 Subject: [issue36284] importlib.import_module() not thread safe if Exception is raised (3.4, 3.5) In-Reply-To: <1552520828.65.0.116670090756.issue36284@roundup.psfhosted.org> Message-ID: <1588793833.42.0.631030055296.issue36284@roundup.psfhosted.org> Brett Cannon added the comment: @Patrick you will have to open a new issue and be very specific about what the problem is with a reproducible code snippet to show how the current fix is wrong (I also don't know how upgrading Django comes into play since this is not Django's issue tracker). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 15:40:38 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 06 May 2020 19:40:38 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588794038.06.0.284356376314.issue40517@roundup.psfhosted.org> Batuhan Taskaya added the comment: Unfortunately there aren't many `bold` type tokens I can use, so I had to change color of module . If you wish I can make both class names and `Python` bold, or keep it in this way. ---------- Added file: https://bugs.python.org/file49134/asdl2.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 15:49:02 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Wed, 06 May 2020 19:49:02 +0000 Subject: [issue40537] Typo in Doc/library/sqlite3.rst Message-ID: <1588794542.32.0.922466933824.issue40537@roundup.psfhosted.org> New submission from Joannah Nanjekye : >From this: Now you want to store the point in a single SQLite column. First you'll have to choose one of the supported types first to be used for representing the point. First looks repeated. ---------- assignee: docs at python components: Documentation messages: 368295 nosy: docs at python, nanjekyejoannah priority: normal severity: normal status: open title: Typo in Doc/library/sqlite3.rst versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 15:49:39 2020 From: report at bugs.python.org (Naglis Jonaitis) Date: Wed, 06 May 2020 19:49:39 +0000 Subject: [issue40537] Typo in Doc/library/sqlite3.rst In-Reply-To: <1588794542.32.0.922466933824.issue40537@roundup.psfhosted.org> Message-ID: <1588794579.5.0.944327618478.issue40537@roundup.psfhosted.org> Change by Naglis Jonaitis : ---------- keywords: +patch nosy: +naglis nosy_count: 2.0 -> 3.0 pull_requests: +19284 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19965 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 15:53:55 2020 From: report at bugs.python.org (Steve Dower) Date: Wed, 06 May 2020 19:53:55 +0000 Subject: [issue40501] Deprecate and remove ctypes usage in uuid In-Reply-To: <1588610043.03.0.653935213542.issue40501@roundup.psfhosted.org> Message-ID: <1588794835.58.0.85811138478.issue40501@roundup.psfhosted.org> Steve Dower added the comment: Thanks Ned. There are some platform.version() checks in there that I'm basically ignoring right now - are those unnecessary? Shall I clean them up too? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 15:54:42 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Wed, 06 May 2020 19:54:42 +0000 Subject: [issue40537] Typo in Doc/library/sqlite3.rst In-Reply-To: <1588794542.32.0.922466933824.issue40537@roundup.psfhosted.org> Message-ID: <1588794882.68.0.909651018887.issue40537@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 16:21:40 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 06 May 2020 20:21:40 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588796500.05.0.31004236966.issue40517@roundup.psfhosted.org> Batuhan Taskaya added the comment: (by the way, I did not push this change. I'll push it when you think it is ready) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 16:25:01 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Wed, 06 May 2020 20:25:01 +0000 Subject: [issue40028] Math module method to find prime factors for non-negative int n In-Reply-To: <1584733974.83.0.0417466712916.issue40028@roundup.psfhosted.org> Message-ID: <1588796701.24.0.922205195441.issue40028@roundup.psfhosted.org> Dennis Sweeney added the comment: For some more ideas for features or APIs, you could look at: https://docs.sympy.org/latest/modules/ntheory.html or http://doc.sagemath.org/html/en/reference/rings_standard/sage/arith/misc.html for an absolute upper bound. If there's to be a minimal number theory (imath?) module, I would interested in what's below. I'm a math student so perhaps my workload is perhaps not representative of most people (and I can turn to tools like SageMath for most of this), but nonetheless here would be my wishlist for the stdlib. - prime_factors(n): iterator or tuple of prime factors in multiplicity - factorization(n): like collections.Counter(prime_factors(n)) - divisors(n): iterator for divisors based on factorization - is_prime(n, bases=20): do some randomized Miller-Rabin - crt(moduli, values): Chinese Remainder Theorem - xgcd(numbers) -> tuple[int, tuple[int]]: use the extended euclidean algorithm to find gcd and Bezout coefficients - generate_primes(start=2) - next_prime(n) / prev_prime(n) - prime_range(a, b) - is_square(n) (maybe is_nth_power?) - multiplicity(p, n): maximal r such that p**r divides n - is_quadratic_residue(a, modulus) - primitive_root(modulus) - multinomial(n, *ks) Already in math module: - gcd and lcm - comb(n, k) - perm(n, k) - isqrt(n) - factorial(n) Looking at this list though, I realize that there is infinite potential for feature-creep, and so it would be nice to have an explicit set of guidelines for what sorts of functions are allowed. Perhaps something like "must have a common-enough use case outside of pure math". There's also a limitless amount of micro-optimization that can come with several of these (is_prime, is_square, generate_primes, etc.), so it might be nice to have a guideline about only accepting performace optimizations if the cost in complexity is small. ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 16:59:14 2020 From: report at bugs.python.org (Jo King) Date: Wed, 06 May 2020 20:59:14 +0000 Subject: [issue40538] struct.calcsize('L')== 8 but 4 is specified in documentation Message-ID: <1588798754.7.0.999279988731.issue40538@roundup.psfhosted.org> Change by Jo King : ---------- nosy: JoKing priority: normal severity: normal status: open title: struct.calcsize('L')== 8 but 4 is specified in documentation type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 17:00:17 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 06 May 2020 21:00:17 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588798817.61.0.647468784897.issue40334@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +19285 pull_request: https://github.com/python/cpython/pull/19969 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 17:41:38 2020 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 06 May 2020 21:41:38 +0000 Subject: [issue40538] struct.calcsize('L')== 8 but 4 is specified in documentation Message-ID: <1588801298.76.0.851084795052.issue40538@roundup.psfhosted.org> New submission from Mark Dickinson : Use `struct.calcsize('L')` if you want the standard sizes and formats given in the documentation. The note at the top of the struct module documentation describes the difference. See also #1709506. ---------- nosy: +mark.dickinson resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 17:47:14 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 06 May 2020 21:47:14 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588801634.14.0.110430608022.issue40517@roundup.psfhosted.org> Terry J. Reedy added the comment: I don't like the red Python in asdl2. Just black, perhaps bold, would be better. Also I like the darker blue in asdl.py, bold or not. Better contrast to me from the greens. But I agree that grape is too clashy. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 17:47:36 2020 From: report at bugs.python.org (James Addison) Date: Wed, 06 May 2020 21:47:36 +0000 Subject: [issue18857] urlencode of a None value uses the string 'None' In-Reply-To: <1377633255.35.0.29938622913.issue18857@psf.upfronthosting.co.za> Message-ID: <1588801656.85.0.606657575701.issue18857@roundup.psfhosted.org> James Addison added the comment: The pair of pull requests below implement None-preserving urlencode and parse_qs* via a default-disabled flag 'standalone_keys'. - https://bugs.python.org/pull_request19259 - https://bugs.python.org/pull_request19264 (they're also already linked with this issue, thanks to the neat GitHub/BPO integration) A benefit of the proposed serialization changes is that developers can opt-in to a scheme in which "{'a': None}" and "{'a': ''}" do not collide to the same encoded representation. Would it be possible to re-open this issue for discussion? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 17:54:42 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 06 May 2020 21:54:42 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588802082.24.0.796876795093.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 99db2a1db7a9b468a0ce8377d579f78fa03a2a34 by Pablo Galindo in branch 'master': bpo-40334: Allow trailing comma in parenthesised context managers (GH-19964) https://github.com/python/cpython/commit/99db2a1db7a9b468a0ce8377d579f78fa03a2a34 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 18:03:28 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 06 May 2020 22:03:28 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588802608.44.0.817323862814.issue40517@roundup.psfhosted.org> Batuhan Taskaya added the comment: Attaching 2 different styles python_bold.png (module is bold) and asdl_no_style.png (module has no style) ---------- Added file: https://bugs.python.org/file49135/python_bold.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 18:03:35 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 06 May 2020 22:03:35 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588802615.98.0.64562815816.issue40517@roundup.psfhosted.org> Change by Batuhan Taskaya : Added file: https://bugs.python.org/file49136/asdl_no_style.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 18:14:50 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 06 May 2020 22:14:50 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588803290.0.0.498251803562.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 470aac4d8e76556bd8f820f3f3928dca2b4d2849 by Pablo Galindo in branch 'master': bpo-40334: Generate comments in the parser code to improve debugging (GH-19966) https://github.com/python/cpython/commit/470aac4d8e76556bd8f820f3f3928dca2b4d2849 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 18:21:15 2020 From: report at bugs.python.org (Lewis Ball) Date: Wed, 06 May 2020 22:21:15 +0000 Subject: [issue40539] Docs - difflib.SequenceMatcher quick_ratio and real_quick_ratio improved docs Message-ID: <1588803675.88.0.74490317192.issue40539@roundup.psfhosted.org> New submission from Lewis Ball : Currently the docs for `difflib.SequenceMatcher.quick_ratio()` just says 'Return an upper bound on ratio() relatively quickly', which doesn't give much of an idea about how that upper bound is calculated. `real_quick_ratio` has similarly brief documentation. I'll raise a PR shortly to add a more verbose description to each of these ratios, so that it is clear when each should be used. My current suggestions would be: quick_ratio Return an upper bound on ratio() relatively quickly. This is the highest possible ratio() given these letters, regardless of their order. real_quick_ratio Return an upper bound on ratio() very quickly. This is the highest possible ratio() given the lengths of a and b, regardless of their letters. i.e. 2*(min(len(a), len(b))/(len(a) + len(b)) ---------- assignee: docs at python components: Documentation messages: 368305 nosy: Lewis Ball, docs at python priority: normal severity: normal status: open title: Docs - difflib.SequenceMatcher quick_ratio and real_quick_ratio improved docs type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 18:32:58 2020 From: report at bugs.python.org (Peter Law) Date: Wed, 06 May 2020 22:32:58 +0000 Subject: [issue40540] inconstent stdin buffering/seeking behaviour Message-ID: <1588804378.46.0.584037601686.issue40540@roundup.psfhosted.org> New submission from Peter Law : `sys.stdin` (on Windows, tested Pythons 3.6-3.8) appears to have different seeking behaviour depending on the source of the incoming data. This seems arguably reasonable given that `stdin` isn't always seekable, however even in the failing case `sys.stdin.seekable()` returns `True`. Given the `reader.py` source: ``` python import sys def coding_check(lines, default='utf-8'): for line_number, line in enumerate(lines, 1): print((line_number, line)) if line_number > 2: break return default stdin = sys.stdin print(stdin.seekable()) stdin.seek(0) coding_check(stdin) stdin.seek(0) print(stdin.read()) ``` then for two similar invocations we get differing results: ``` > python reader.py < reader.py True (1, 'import sys\n') (2, '\n') (3, '\n') import sys def coding_check(lines, default='utf-8'): <... etc. redacted for brevity> > ``` ``` > type reader.py | python reader.py True (1, 'import sys\n') (2, '\n') (3, '\n') > ``` I realise that raw standard input isn't always seekable, however I would hope that in the case that it isn't seekable that `.seekable()` would tell us that. I also tried wrapping `stdin.buffer` in an `io.BufferedReader` and using that, however for short files (three lines or less) this issue is still present. I'm not sure if this is something I'm misunderstanding around buffered readers, a variation on this issue or another issue though. ---------- components: Windows messages: 368306 nosy: PeterJCLaw, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: inconstent stdin buffering/seeking behaviour type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 18:35:20 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 06 May 2020 22:35:20 +0000 Subject: [issue40541] Add optional weights parameter to random.sample() Message-ID: <1588804520.3.0.249071627671.issue40541@roundup.psfhosted.org> New submission from Raymond Hettinger : I've seen multiple requests for this and it isn't obvious how to do it with the existing tooling. The example currently given in the recipes section isn't scalable because it involves expanding the population into a big list with repeated elements: sample(['x', 'x', 'x', 'x', 'y', 'y', 'z'], k=5) Example task: Given an urn with 8 red balls, 2 white balls, and 3 green balls, choose ten without replacement: >>> population = ['red', 'blue', 'green'] >>> weights = [ 8, 5, 3 ] >>> sample(population, weights=weights, k=10) ['red', 'green', 'blue', 'red', 'green', 'blue', 'red', 'blue', 'red', 'blue'] I could also add *cum_weights* as an optional optimization but think it best to wait until someone asks for it ;-) ---------- components: Library (Lib) messages: 368307 nosy: rhettinger, tim.peters priority: normal severity: normal status: open title: Add optional weights parameter to random.sample() type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 18:35:42 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 06 May 2020 22:35:42 +0000 Subject: [issue40541] Add optional weights parameter to random.sample() In-Reply-To: <1588804520.3.0.249071627671.issue40541@roundup.psfhosted.org> Message-ID: <1588804542.14.0.640642565767.issue40541@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +19286 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19970 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 18:39:43 2020 From: report at bugs.python.org (Furkan Onder) Date: Wed, 06 May 2020 22:39:43 +0000 Subject: [issue25707] Add the close method for ElementTree.iterparse() object In-Reply-To: <1448287045.22.0.0931965485798.issue25707@psf.upfronthosting.co.za> Message-ID: <1588804783.4.0.150167895962.issue25707@roundup.psfhosted.org> Furkan Onder added the comment: Python 3.8.2 (default, Apr 8 2020, 14:31:25) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import xml.etree.ElementTree as ET >>> import gc >>> ET.iterparse('/dev/null') .IterParseIterator object at 0x7fb96f679d00> >>> gc.collect() 34 The warning(__main__:1: ResourceWarning: unclosed file <_io.BufferedReader name='/dev/null'>) is no longer available in python3.8.2 ---------- nosy: +furkanonder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 18:55:03 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 06 May 2020 22:55:03 +0000 Subject: [issue5879] multiprocessing example "pool of http servers " fails on windows In-Reply-To: <1241019482.48.0.575158847578.issue5879@psf.upfronthosting.co.za> Message-ID: <1588805703.49.0.606920991874.issue5879@roundup.psfhosted.org> Terry J. Reedy added the comment: As I said above, the example was removed from 3.x. At some point, they were all vetted for Windows execution or failure. Zach, thanks for reviewing 2.7 issues. ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 18:56:02 2020 From: report at bugs.python.org (Lewis Ball) Date: Wed, 06 May 2020 22:56:02 +0000 Subject: [issue40539] Docs - difflib.SequenceMatcher quick_ratio and real_quick_ratio improved docs In-Reply-To: <1588803675.88.0.74490317192.issue40539@roundup.psfhosted.org> Message-ID: <1588805762.86.0.379983972518.issue40539@roundup.psfhosted.org> Change by Lewis Ball : ---------- keywords: +patch pull_requests: +19287 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19971 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 19:07:16 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 May 2020 23:07:16 +0000 Subject: [issue40512] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1588806436.35.0.753840995244.issue40512@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-39465: "Design a subinterpreter friendly alternative to _Py_IDENTIFIER". Currently, this C API is not compatible with subinterpreters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 19:16:34 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 06 May 2020 23:16:34 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588806994.45.0.77690267646.issue40517@roundup.psfhosted.org> Terry J. Reedy added the comment: I tried both a laptop and desktop and slightly prefer unbolded. How about a darker blue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 19:19:40 2020 From: report at bugs.python.org (Roman) Date: Wed, 06 May 2020 23:19:40 +0000 Subject: [issue40542] path environment variable not created correctly Message-ID: <1588807180.48.0.747657967597.issue40542@roundup.psfhosted.org> New submission from Roman : The Python 3.8 for Windows installer has an option to add the install folder to the path environment variable. It adds the path to the front of the list so that it is the first item. According to my understanding, this is bad behavior. It should add new path items to the end of the list because Windows searches in order. c:\windows\system32 should remain the first item in the list. This is a classic mistake of installers. ---------- components: Installation messages: 368312 nosy: Roman priority: normal severity: normal status: open title: path environment variable not created correctly type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 19:20:32 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 06 May 2020 23:20:32 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588807232.18.0.992714684048.issue40517@roundup.psfhosted.org> Batuhan Taskaya added the comment: > I tried both a laptop and desktop and slightly prefer unbolded. How about a darker blue? Sorry but I have no control over styles. They are pre-defined, I only change the token type and pygments handles the rest of it. I dont know if such a color exists. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 19:21:33 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 06 May 2020 23:21:33 +0000 Subject: [issue40542] path environment variable not created correctly In-Reply-To: <1588807180.48.0.747657967597.issue40542@roundup.psfhosted.org> Message-ID: <1588807293.71.0.187991819877.issue40542@roundup.psfhosted.org> Change by Ned Deily : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 19:31:59 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 06 May 2020 23:31:59 +0000 Subject: [issue40494] collections.abc.Callable and type variables In-Reply-To: <1588579632.5.0.091811612876.issue40494@roundup.psfhosted.org> Message-ID: <1588807919.75.0.278048921791.issue40494@roundup.psfhosted.org> Guido van Rossum added the comment: Hm, I am indeed torn. ISTM a subclass just for Callable is slightly better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 19:35:13 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 06 May 2020 23:35:13 +0000 Subject: [issue36077] Inheritance dataclasses fields and default init statement In-Reply-To: <1550838433.8.0.658564691536.issue36077@roundup.psfhosted.org> Message-ID: <1588808113.7.0.623693438602.issue36077@roundup.psfhosted.org> Eric V. Smith added the comment: It would be good if there were some way of unifying existing usage with positional-only and keyword-only parameters, and also supporting inheritance for dataclasses that use these features at various points in the hierarchy. I don't have any big ideas about this. And of course it all needs to be backward compatible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 19:55:47 2020 From: report at bugs.python.org (Furkan Onder) Date: Wed, 06 May 2020 23:55:47 +0000 Subject: [issue40462] [easy] undefined name in Lib/test/mock_socket.py In-Reply-To: <1588290630.2.0.182306583677.issue40462@roundup.psfhosted.org> Message-ID: <1588809347.37.0.222570089189.issue40462@roundup.psfhosted.org> Change by Furkan Onder : ---------- pull_requests: +19288 pull_request: https://github.com/python/cpython/pull/19972 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 19:56:26 2020 From: report at bugs.python.org (Furkan Onder) Date: Wed, 06 May 2020 23:56:26 +0000 Subject: [issue2716] Document license under which audioop is used In-Reply-To: <1209428570.75.0.48368829493.issue2716@psf.upfronthosting.co.za> Message-ID: <1588809386.94.0.145187626101.issue2716@roundup.psfhosted.org> Furkan Onder added the comment: PR has been sent. ---------- nosy: +furkanonder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 20:12:02 2020 From: report at bugs.python.org (Furkan Onder) Date: Thu, 07 May 2020 00:12:02 +0000 Subject: [issue2716] Document license under which audioop is used In-Reply-To: <1209428570.75.0.48368829493.issue2716@psf.upfronthosting.co.za> Message-ID: <1588810322.91.0.482336605519.issue2716@roundup.psfhosted.org> Change by Furkan Onder : ---------- keywords: +patch pull_requests: +19289 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/19972 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 20:33:02 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 07 May 2020 00:33:02 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588811582.95.0.1277107626.issue40334@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +19290 pull_request: https://github.com/python/cpython/pull/19973 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 20:56:43 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 07 May 2020 00:56:43 +0000 Subject: [issue2716] Document license under which audioop is used In-Reply-To: <1209428570.75.0.48368829493.issue2716@psf.upfronthosting.co.za> Message-ID: <1588813003.84.0.228952480909.issue2716@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.7, Python 3.8, Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 21:09:40 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 07 May 2020 01:09:40 +0000 Subject: [issue40397] Refactor typing._GenericAlias In-Reply-To: <1587918915.07.0.818996162208.issue40397@roundup.psfhosted.org> Message-ID: <1588813780.01.0.890491192378.issue40397@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset c1c7d8ead9eb214a6149a43e31a3213c52448877 by Serhiy Storchaka in branch 'master': bpo-40397: Refactor typing._GenericAlias (GH-19719) https://github.com/python/cpython/commit/c1c7d8ead9eb214a6149a43e31a3213c52448877 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 21:17:23 2020 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 07 May 2020 01:17:23 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1588814243.79.0.743461450403.issue1635741@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 3466922320d54a922cfe6d6d44e89e1cea4023ef by Dong-hee Na in branch 'master': bpo-1635741: Port errno module to multiphase initialization (GH-19923) https://github.com/python/cpython/commit/3466922320d54a922cfe6d6d44e89e1cea4023ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 21:21:37 2020 From: report at bugs.python.org (Tim Peters) Date: Thu, 07 May 2020 01:21:37 +0000 Subject: [issue40539] Docs - difflib.SequenceMatcher quick_ratio and real_quick_ratio improved docs In-Reply-To: <1588803675.88.0.74490317192.issue40539@roundup.psfhosted.org> Message-ID: <1588814497.09.0.549082760115.issue40539@roundup.psfhosted.org> Tim Peters added the comment: Thanks for the effort, but I'm rejecting this. The language deliberately defines nothing about how these are calculated. It defines how `.ratio()` is computed, but that's all. An implementation is free to do whatever it likes for the "quick" versions, provided only they return upper bounds on `.ratio()`. Indeed, it's perfectly fine if an implementation merely returns 1.0 for both, regardless of the arguments. If an implementation is cleverer than that, great, that's fine too - but it would be actively counterproductive to constrain them to be no _more_ clever than the current implementations. ---------- nosy: +tim.peters resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 21:48:03 2020 From: report at bugs.python.org (Laurie Opperman) Date: Thu, 07 May 2020 01:48:03 +0000 Subject: [issue36077] Inheritance dataclasses fields and default init statement In-Reply-To: <1550838433.8.0.658564691536.issue36077@roundup.psfhosted.org> Message-ID: <1588816083.58.0.206311994649.issue36077@roundup.psfhosted.org> Laurie Opperman added the comment: Daniel's suggestion (and my PR) introduce a mechanism that is as far as I know almost completely bakwards-compatible. The only issue is if people were wanting (and acting on) a TypeError to be raised on dataclass construction (which I would say is rare to non-existant), and is the issue raised by the original post. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 6 23:32:43 2020 From: report at bugs.python.org (Eryk Sun) Date: Thu, 07 May 2020 03:32:43 +0000 Subject: [issue40542] path environment variable not created correctly In-Reply-To: <1588807180.48.0.747657967597.issue40542@roundup.psfhosted.org> Message-ID: <1588822363.9.0.730631474737.issue40542@roundup.psfhosted.org> Eryk Sun added the comment: Prepending directories ahead of system directories in PATH affects programs that implement their own search, which includes shells such as cmd.exe that do so in order to support PATHEXT efficiently. That said, note that temporarily prepending to PATH in a particular environment is common. Consider an activated virtual environment or a developer command prompt. Usually programs defer to a Windows API function when searching for a file. The API uses search paths from the runtime library functions RtlGetSearchPath, RtlGetExePath, and LdrGetDllPath. With WINAPI SearchPathW, the default search path is from RtlGetSearchPath (undocumented). It includes the following directories in non-safe search mode (the default mode): 1. %__APPDIR__% 2. %__CD__% 3. %SystemRoot%\System32 4. %SystemRoot%\System 5. %SystemRoot% 6. %PATH% and the following adjusted order in safe search mode: 1. %__APPDIR__% 3. %SystemRoot%\System32 4. %SystemRoot%\System 5. %SystemRoot% 2. %__CD__% 6. %PATH% Safe search mode can be set via WINAPI SetSearchPathMode(BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE). With WINAPI CreateProcessW, the search path is from RtlGetExePath (undocumented). This is similar to the result from RtlGetSearchPath, except, instead of supporting a safe search mode, RtlGetExePath allows excluding the current directory (%__CD__%) from the search path by setting the environment variable NoDefaultCurrentDirectoryInExePath. With WINAPI LoadLibrary[Ex]W, the system uses the search path from LdrGetDllPath (undocumented). The default DLL search path at startup under normal circumstances is the same as the safe-mode result from RtlGetSearchPath -- except for special casing of known system DLLs and API sets. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 00:21:36 2020 From: report at bugs.python.org (John Andersen) Date: Thu, 07 May 2020 04:21:36 +0000 Subject: [issue37247] swap distutils build_ext and build_py commands to allow proper SWIG extension installation In-Reply-To: <1560341496.09.0.819646109086.issue37247@roundup.psfhosted.org> Message-ID: <1588825296.46.0.829564424621.issue37247@roundup.psfhosted.org> John Andersen added the comment: I haven't made much progress on the fix yet. But I have a workaround here: https://github.com/tpm2-software/tpm2-pytss/commit/9952e374b4d9b854aea12c667dd7d7ab4ad501a9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 01:58:06 2020 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 07 May 2020 05:58:06 +0000 Subject: [issue30459] PyList_SET_ITEM could be safer In-Reply-To: <1495638852.56.0.0790136948712.issue30459@psf.upfronthosting.co.za> Message-ID: <1588831086.98.0.818491345282.issue30459@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 5.0 -> 6.0 pull_requests: +19291 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19975 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 02:13:16 2020 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 07 May 2020 06:13:16 +0000 Subject: [issue30459] PyList_SET_ITEM could be safer In-Reply-To: <1495638852.56.0.0790136948712.issue30459@psf.upfronthosting.co.za> Message-ID: <1588831996.36.0.982642425433.issue30459@roundup.psfhosted.org> Change by Zackery Spytz : ---------- versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 02:23:37 2020 From: report at bugs.python.org (Shani Armon) Date: Thu, 07 May 2020 06:23:37 +0000 Subject: [issue40509] In argparse, allow REMAINDER(...) arguments in a mutually exclusive group In-Reply-To: <1588674644.49.0.299540849008.issue40509@roundup.psfhosted.org> Message-ID: <1588832617.57.0.466411178514.issue40509@roundup.psfhosted.org> Shani Armon added the comment: Also, this is quite different from previous issues with REMAINDER. This fits in line with how the example suggests remainder should be used. I wand some flags (version, configuration) to be separate and exclusive to subcommands. And the usage is not ambiguous. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 03:13:53 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 07 May 2020 07:13:53 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588835633.61.0.460689146166.issue40517@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks for producing the comparison panel. In side-by-side views, python_bold.png looks best to me with asdl2.png as a close second. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 03:41:48 2020 From: report at bugs.python.org (Muthu A) Date: Thu, 07 May 2020 07:41:48 +0000 Subject: [issue40543] Tamil locale is using outdated encoding Message-ID: <1588837308.8.0.873026053476.issue40543@roundup.psfhosted.org> New submission from Muthu A : Tamil locale (TA_IN, TA_SL, TA_SG, TA_MY) is using outdated encoding of TSCII. Tamil community is widely using UTF-8 encoding. Further, the 'locale' standard library package in Python3 should be updated with these strings. Should the maintainers desire assistance on this task, as a native speaker of the language, I can propose a patch or recommed other native speakers for this task. ---------- files: Screen Shot 2020-05-06 at 11.04.18 PM.png messages: 368325 nosy: Muthu A priority: normal severity: normal status: open title: Tamil locale is using outdated encoding Added file: https://bugs.python.org/file49137/Screen Shot 2020-05-06 at 11.04.18 PM.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 04:22:24 2020 From: report at bugs.python.org (mirii1994) Date: Thu, 07 May 2020 08:22:24 +0000 Subject: [issue40544] Formatter exception when using logging.config.fileConfig Message-ID: <1588839744.95.0.946020207504.issue40544@roundup.psfhosted.org> New submission from mirii1994 : In Python 3.8, a "validate" key was added to the Formatter, with a default value of True (https://docs.python.org/3/library/logging.html#formatter-objects). When using the "logging.config.fileConfig()" method, there is no way to set the "validate" field to "False" if needed, thus making the code to throw an exception. In "logging.config.dictConfig()" it is possible, since there is an "if" statement that checks the validate field was given a value in the configuration. It would be useful to add the option to set the "validate" field through "logging.config.fileConfig" like it is on "logging.config.dictConfig", since it's breaking the code for many users who want to upgrade to python 3.8. ---------- messages: 368326 nosy: mirii1994 priority: normal severity: normal status: open title: Formatter exception when using logging.config.fileConfig versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 05:29:58 2020 From: report at bugs.python.org (Julien Danjou) Date: Thu, 07 May 2020 09:29:58 +0000 Subject: [issue40545] Expose _PyErr_GetTopmostException Message-ID: <1588843798.84.0.388180612972.issue40545@roundup.psfhosted.org> New submission from Julien Danjou : The function _PyErr_GetTopmostException() is not exported and is useful to get access to exceptions info from a PyThreadState. ---------- components: C API messages: 368327 nosy: jd priority: normal severity: normal status: open title: Expose _PyErr_GetTopmostException type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 05:32:14 2020 From: report at bugs.python.org (Julien Danjou) Date: Thu, 07 May 2020 09:32:14 +0000 Subject: [issue40545] Expose _PyErr_GetTopmostException In-Reply-To: <1588843798.84.0.388180612972.issue40545@roundup.psfhosted.org> Message-ID: <1588843934.23.0.304790686351.issue40545@roundup.psfhosted.org> Change by Julien Danjou : ---------- keywords: +patch pull_requests: +19292 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19977 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 05:42:09 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 May 2020 09:42:09 +0000 Subject: [issue40545] Expose _PyErr_GetTopmostException In-Reply-To: <1588843798.84.0.388180612972.issue40545@roundup.psfhosted.org> Message-ID: <1588844529.5.0.479380501061.issue40545@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner nosy_count: 1.0 -> 2.0 pull_requests: +19293 pull_request: https://github.com/python/cpython/pull/19978 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 05:43:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 May 2020 09:43:44 +0000 Subject: [issue40545] Expose _PyErr_GetTopmostException In-Reply-To: <1588843798.84.0.388180612972.issue40545@roundup.psfhosted.org> Message-ID: <1588844624.08.0.76985048312.issue40545@roundup.psfhosted.org> STINNER Victor added the comment: The function was added by: commit ae3087c6382011c47db82fea4d05f8bbf514265d Author: Mark Shannon Date: Sun Oct 22 22:41:51 2017 +0100 Move exc state to generator. Fixes bpo-25612 (#1773) Move exception state information from frame objects to coroutine (generator/thread) object where it belongs. Python 3.9 is now built with -fvisibility=hidden, bpo-11410: commit 0b60f64e4343913b4931dc27379d9808e5b78fe1 Author: Vinay Sajip Date: Tue Oct 15 08:26:12 2019 +0100 bpo-11410: Standardize and use symbol visibility attributes across POSIX and Windows. (GH-16347) It means that functions which are not explicitly exported are no longer exported. So yeah, _PyErr_GetTopmostException() symbol is not properly exported. But the function remains private. IMHO if someone wants to add a *public* function, it should return a *strong* reference to the 3 variables (exc type, exc value, exc tb). See also bpo-39947: "[C API] Make the PyThreadState structure opaque (move it to the internal C API)". I added multiple public getters for PyThreadState structure in Python 3.9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 06:21:10 2020 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 07 May 2020 10:21:10 +0000 Subject: [issue39573] [C API] Make PyObject an opaque structure in the limited C API In-Reply-To: <1581030432.16.0.48160379721.issue39573@roundup.psfhosted.org> Message-ID: <1588846870.51.0.8270861535.issue39573@roundup.psfhosted.org> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz nosy_count: 8.0 -> 9.0 pull_requests: +19294 pull_request: https://github.com/python/cpython/pull/19975 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 06:37:58 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 07 May 2020 10:37:58 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588847878.5.0.747015092093.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 2f37c355ab0e9ec9c1753985d27c41fa0bd719b9 by Lysandros Nikolaou in branch 'master': bpo-40334: Fix error location upon parsing an invalid string literal (GH-19962) https://github.com/python/cpython/commit/2f37c355ab0e9ec9c1753985d27c41fa0bd719b9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 06:44:10 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 07 May 2020 10:44:10 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588848250.3.0.534817018304.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 4638c6429575bd6de26b12b2af5df74d6568b553 by Lysandros Nikolaou in branch 'master': bpo-40334: Error message for invalid default args in function call (GH-19973) https://github.com/python/cpython/commit/4638c6429575bd6de26b12b2af5df74d6568b553 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 06:45:17 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Thu, 07 May 2020 10:45:17 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588848317.78.0.256158219551.issue40517@roundup.psfhosted.org> Batuhan Taskaya added the comment: I've found a bold dark blue, which I guess suits both your and @terry.reedy recommendations. How does bold_dark_blue.png looks? ---------- Added file: https://bugs.python.org/file49138/bold_dark_blue.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 06:45:43 2020 From: report at bugs.python.org (Julien Danjou) Date: Thu, 07 May 2020 10:45:43 +0000 Subject: [issue40545] Expose _PyErr_GetTopmostException In-Reply-To: <1588843798.84.0.388180612972.issue40545@roundup.psfhosted.org> Message-ID: <1588848343.25.0.143269781742.issue40545@roundup.psfhosted.org> Julien Danjou added the comment: I would definitely love to have a public API for this. Would `PyErr_GetTopmostException` be a good candidate for this? (I can open a different bug report if needed) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 07:25:31 2020 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 07 May 2020 11:25:31 +0000 Subject: [issue40541] Add optional weights parameter to random.sample() In-Reply-To: <1588804520.3.0.249071627671.issue40541@roundup.psfhosted.org> Message-ID: <1588850731.05.0.495428925027.issue40541@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 07:34:58 2020 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 07 May 2020 11:34:58 +0000 Subject: [issue40541] Add optional weights parameter to random.sample() In-Reply-To: <1588804520.3.0.249071627671.issue40541@roundup.psfhosted.org> Message-ID: <1588851298.4.0.244084550115.issue40541@roundup.psfhosted.org> Mark Dickinson added the comment: +1 for the functionality. How about "counts" instead of "weights"? I found the name "weights" misleading - my first thought was that this would be doing a weighted sampling without replacement (like NumPy's `random.choice(..., replace=False, p=weights)`). Of course, now I've read the docs, I know better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 08:12:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 May 2020 12:12:45 +0000 Subject: [issue39562] Asynchronous comprehensions don't work in asyncio REPL In-Reply-To: <1580923705.71.0.29233909242.issue39562@roundup.psfhosted.org> Message-ID: <1588853565.85.0.309773961388.issue39562@roundup.psfhosted.org> STINNER Victor added the comment: I reopen the bug to ensure that the fix will land into Python 3.8.3. The issue is marked as release blocker. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 09:01:00 2020 From: report at bugs.python.org (Steve Dower) Date: Thu, 07 May 2020 13:01:00 +0000 Subject: [issue40542] path environment variable not created correctly In-Reply-To: <1588807180.48.0.747657967597.issue40542@roundup.psfhosted.org> Message-ID: <1588856460.61.0.972977087115.issue40542@roundup.psfhosted.org> Steve Dower added the comment: Yes, it is bad behaviour, but it is very upsetting for many people to not have the option. This is why it's disabled by default, and why I regularly discourage people from selecting the option (and quite often get abused for taking the trouble... oh well... that's apparently how open-source life works these days). If you install just for the current user, it will only appear ahead of the user's own PATH entries, which are stored separately from the system ones and concatenated automatically (unless the whole thing exceeds a certain length, in which case you just lose PATH entries... another reason to avoid it). Adding to the end of the PATH would leave people broken and confused as any other install of Python would still take precedence. So to minimize breakage, it goes to the front, but the per-user install is the default. So thanks for the support, but unfortunately we don't have any viable way to move forward on it. Tell people not to add to PATH and to run py.exe instead - which we've been doing for years, but it doesn't really have much effect. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 09:10:10 2020 From: report at bugs.python.org (Eike Fokken) Date: Thu, 07 May 2020 13:10:10 +0000 Subject: [issue37339] os.path.ismount returns true on nested btrfs subvolumes In-Reply-To: <1560939042.69.0.683071795623.issue37339@roundup.psfhosted.org> Message-ID: <1588857010.39.0.980779971136.issue37339@roundup.psfhosted.org> Eike Fokken added the comment: Ok, this is my proposal for the documentation. I hope you like it. Is this the correct place to post it or can I make a direct pull request? old: .. function:: ismount(path) Return ``True`` if pathname *path* is a :dfn:`mount point`: a point in a file system where a different file system has been mounted. The function checks whether *path*'s parent, :file:`path/..`, is on a different device than *path*, or whether :file:`path/..` and *path* point to the same i-node on the same device --- this should detect mount points for all Unix and POSIX variants. new: .. function:: ismount(path) Return ``True`` if pathname *path* is a :dfn:`mount point`: a point in a file system where a different file system has been mounted. The function checks whether *path*'s parent, :file:`path/..`, is on a different device than *path*, or whether :file:`path/..` and *path* point to the same i-node on the same device --- this should detect mount points for all Unix and POSIX variants. Note that in Linux not all mountpoints as recognized by the kernel are found this way. An example are bind-mounts. Also some directories return ``True`` although Linux doesn't recognize them as mount points. An example are nested subvolumes in the Btrfs filesystem ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 09:40:06 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 May 2020 13:40:06 +0000 Subject: [issue38787] PEP 573: Module State Access from C Extension Methods In-Reply-To: <1573655440.57.0.563143759574.issue38787@roundup.psfhosted.org> Message-ID: <1588858806.55.0.261438689547.issue38787@roundup.psfhosted.org> STINNER Victor added the comment: New changeset e1becf46b4e3ba6d7d32ebf4bbd3e0804766a423 by Petr Viktorin in branch 'master': bpo-38787: C API for module state access from extension methods (PEP 573) (GH-19936) https://github.com/python/cpython/commit/e1becf46b4e3ba6d7d32ebf4bbd3e0804766a423 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 09:42:40 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 May 2020 13:42:40 +0000 Subject: [issue40545] Expose _PyErr_GetTopmostException In-Reply-To: <1588843798.84.0.388180612972.issue40545@roundup.psfhosted.org> Message-ID: <1588858960.43.0.102502962543.issue40545@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8963a7f1f84a05412178b56629508b660d38861b by Victor Stinner in branch 'master': bpo-40545: Export _PyErr_GetTopmostException() function (GH-19978) https://github.com/python/cpython/commit/8963a7f1f84a05412178b56629508b660d38861b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 09:50:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 May 2020 13:50:54 +0000 Subject: [issue40545] Expose _PyErr_GetTopmostException In-Reply-To: <1588843798.84.0.388180612972.issue40545@roundup.psfhosted.org> Message-ID: <1588859454.13.0.586362953247.issue40545@roundup.psfhosted.org> STINNER Victor added the comment: > I would definitely love to have a public API for this. I'm not sure if it's a good idea. It's kind of semi-internal. Stephan Behnel and Mark Shannon: What do you think of exposing PyThreadState exception stack (exc_state)? Especially the "top" exception. If I recall correctly, Mark designed it and Stephan "reimplemented" it in Cython. I also recall a minor issue in greenlet: https://github.com/python-greenlet/greenlet/pull/132 ---------- nosy: +Mark.Shannon, scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 09:57:54 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 07 May 2020 13:57:54 +0000 Subject: [issue31033] Add argument to .cancel() of Task and Future In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1588859874.79.0.762885519506.issue31033@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- pull_requests: +19295 pull_request: https://github.com/python/cpython/pull/19979 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 10:03:05 2020 From: report at bugs.python.org (Mark Shannon) Date: Thu, 07 May 2020 14:03:05 +0000 Subject: [issue40228] Make setting line number in frame more robust. In-Reply-To: <1586360855.72.0.434652598832.issue40228@roundup.psfhosted.org> Message-ID: <1588860185.98.0.950288698103.issue40228@roundup.psfhosted.org> Change by Mark Shannon : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 10:02:26 2020 From: report at bugs.python.org (Mark Shannon) Date: Thu, 07 May 2020 14:02:26 +0000 Subject: [issue40545] Expose _PyErr_GetTopmostException In-Reply-To: <1588843798.84.0.388180612972.issue40545@roundup.psfhosted.org> Message-ID: <1588860146.84.0.119124703755.issue40545@roundup.psfhosted.org> Mark Shannon added the comment: What's wrong with `PyErr_GetExcInfo()` for accessing the current exception? Victor, would you revert https://github.com/python/cpython/pull/19978 until we decide what to do. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 10:10:08 2020 From: report at bugs.python.org (Julien Danjou) Date: Thu, 07 May 2020 14:10:08 +0000 Subject: [issue40545] Expose _PyErr_GetTopmostException In-Reply-To: <1588843798.84.0.388180612972.issue40545@roundup.psfhosted.org> Message-ID: <1588860608.07.0.388302994769.issue40545@roundup.psfhosted.org> Julien Danjou added the comment: PyErr_GetExcInfo() does not allow to specify a PyThreadState as argument. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 10:13:15 2020 From: report at bugs.python.org (Mark Shannon) Date: Thu, 07 May 2020 14:13:15 +0000 Subject: [issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API In-Reply-To: <1588079870.34.0.984904607646.issue40421@roundup.psfhosted.org> Message-ID: <1588860795.62.0.344249592488.issue40421@roundup.psfhosted.org> Mark Shannon added the comment: "maybe a few setter functions as well" Please don't add any setter functions, that would a major change to the VM and would need a PEP. Also, could you remove PyFrame_GetLastInstr(PyFrameObject *frame)? The only purpose of `f_lasti` is to get the line number and that can be done directly via `PyFrame_GetLineNumber(PyFrameObject *frame)` Perhaps Stefan can tell us why Cython needs to access the internals of the frame object. ---------- nosy: +Mark.Shannon, scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 10:15:27 2020 From: report at bugs.python.org (Mark Shannon) Date: Thu, 07 May 2020 14:15:27 +0000 Subject: [issue40545] Expose _PyErr_GetTopmostException In-Reply-To: <1588843798.84.0.388180612972.issue40545@roundup.psfhosted.org> Message-ID: <1588860927.57.0.467661167107.issue40545@roundup.psfhosted.org> Mark Shannon added the comment: Why do you need to specify a `PyThreadState`? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 10:35:06 2020 From: report at bugs.python.org (Zachary Ware) Date: Thu, 07 May 2020 14:35:06 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588862106.5.0.684158364954.issue40517@roundup.psfhosted.org> Zachary Ware added the comment: I say merge it :) ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 10:39:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 May 2020 14:39:04 +0000 Subject: [issue40545] Expose _PyErr_GetTopmostException In-Reply-To: <1588843798.84.0.388180612972.issue40545@roundup.psfhosted.org> Message-ID: <1588862344.71.0.802771068792.issue40545@roundup.psfhosted.org> STINNER Victor added the comment: > Why do you need to specify a `PyThreadState`? >From past issues, I understood that Julien's use case is a profiler which inspects memory without calling functions nor switching to other threads. It's like "dump the state of all Python threads". I'm fine with exposing _PyErr_GetTopmostException() as a *private* function. Moreover, the function was already exposed in 3.8. It was not exposed because of the visibility change which was made in 3.9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 10:46:56 2020 From: report at bugs.python.org (=?utf-8?q?Gilles_Bassi=C3=A8re?=) Date: Thu, 07 May 2020 14:46:56 +0000 Subject: [issue18319] gettext() cannot find translations with plural forms In-Reply-To: <1372373603.42.0.596981858746.issue18319@psf.upfronthosting.co.za> Message-ID: <1588862816.47.0.327715194961.issue18319@roundup.psfhosted.org> Gilles Bassi?re added the comment: Hi there, I worked on a patch for this issue (see attached pull request). I would be happy to discuss it with people involved in gettext module maintenance but I'm not sure how to contact them. Is there a dedicated mailing list or an IRC channel or something? I've found i18n-sig but it has been inactive for 5 years... Best regards Gilles ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 10:49:19 2020 From: report at bugs.python.org (Zachary Ware) Date: Thu, 07 May 2020 14:49:19 +0000 Subject: [issue40542] path environment variable not created correctly In-Reply-To: <1588807180.48.0.747657967597.issue40542@roundup.psfhosted.org> Message-ID: <1588862959.74.0.00601184715203.issue40542@roundup.psfhosted.org> Zachary Ware added the comment: Just a note to add my full support for what Steve said. PATH is frequently abused on Windows, and we only have the option at all because people become unreasonably upset if it's not there. I wouldn't be against adding a "you don't actually want this, use py.exe" note to the option, though :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 10:53:22 2020 From: report at bugs.python.org (Julien Danjou) Date: Thu, 07 May 2020 14:53:22 +0000 Subject: [issue40545] Expose _PyErr_GetTopmostException In-Reply-To: <1588843798.84.0.388180612972.issue40545@roundup.psfhosted.org> Message-ID: <1588863202.81.0.571968603315.issue40545@roundup.psfhosted.org> Julien Danjou added the comment: I confirm what Victor wrote. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 10:56:05 2020 From: report at bugs.python.org (Eric Snow) Date: Thu, 07 May 2020 14:56:05 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1588863365.79.0.258710019352.issue32604@roundup.psfhosted.org> Eric Snow added the comment: New changeset a1d9e0accd33af1d8e90fc48b34c13d7b07dcf57 by Eric Snow in branch 'master': bpo-32604: [_xxsubinterpreters] Propagate exceptions. (GH-19768) https://github.com/python/cpython/commit/a1d9e0accd33af1d8e90fc48b34c13d7b07dcf57 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 11:13:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 May 2020 15:13:33 +0000 Subject: [issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API In-Reply-To: <1588079870.34.0.984904607646.issue40421@roundup.psfhosted.org> Message-ID: <1588864413.79.0.329464661042.issue40421@roundup.psfhosted.org> STINNER Victor added the comment: > Please don't add any setter functions, that would a major change to the VM and would need a PEP. There is no such "major change". PyFrameObject structure was fully exposed in the public C API since the earliest Python version. I don't see how adding setter is a major change, since it's already possible to directly modify *any* field of PyFrameObject without any kind of protection. My plan is to have two milestones: A) Make the structure opaque, so it's not longer possible to directly access it. B) Deprecate or remove a few getter or setter functions, or move them to the internal C API. I don't think that moving directly to step (B) is a realistic migration plan. So far, nobody analyzed all C extensions on PyPI to see how PyFrameObject is accessed. I prefer to move slowly, step by step. Breaking C extensions which currently *modify* directly PyFrameObject on purpose doesn't seem like a reasonable option to me. -- I'm trying to distinguish functions which should be "safe"/"portable" from the ones which may be too "CPython specific": * I added Include/pyframe.h which is included by Include/Python.h for "safe"/"portable" functions: * PyFrame_GetLineNumber() * PyFrame_GetCode() * All other functions are added to Include/cpython/frameobject.h which is excluded from the limited C API: * PyFrame_GetBack() Note: Compared to accessing directly PyFrameObject.f_code, PyFrame_GetCode() also avoids the issue of borrowed references since it returns a strong reference. PyFrame_GetBack() looks specific to the current implementation of CPython. Another implementation might decide to not chain frames. Or maybe don't provide an easy way to traverse the chain of frames. Or at least, it might be a different API than PyFrame_GetBack(). -- > Also, could you remove PyFrame_GetLastInstr(PyFrameObject *frame)? I didn't add it :-) It's the pending PR 19764. I didn't merge it since it's unclear to me if it's a good idea to directly expose it or not. Cython uses it, but Cython also abuses CPython internals in general, usually for best performances :-) *Maybe* one compromise would be to add a private _PyFrame_GetLastInstr() to ease migration to step (A) (replace direct access to the structure with function calls). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 11:16:43 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Thu, 07 May 2020 15:16:43 +0000 Subject: [issue38131] compile(mode='eval') uninformative error message In-Reply-To: <1568283719.06.0.851695472479.issue38131@roundup.psfhosted.org> Message-ID: <1588864603.42.0.276262668578.issue38131@roundup.psfhosted.org> Batuhan Taskaya added the comment: I've updated PR 17715 in order to point out exact field that error happened. Also it now only shows type >>> import ast >>> expr_without_lineno_but_ok = ast.Expression(body=ast.BinOp(left=ast.Num(n=2), right=ast.Num(n=2), op=ast.Add())) >>> expr_with_lineno_but_with_wrong_body = ast.Expression(body=[ast.BinOp(left=ast.Num(n=2), right=ast.Num(n=2), op=ast.Add())]) >>> ast.fix_missing_locations(expr_with_lineno_but_with_wrong_body) >>> compile(expr_without_lineno_but_ok, "", "eval") Traceback (most recent call last): File "", line 1, in TypeError: required field "lineno" missing from expr >>> compile(expr_with_lineno_but_with_wrong_body, "", "eval") Traceback (most recent call last): File "", line 1, in TypeError: For field 'body'; expected expr type node, got list ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 11:22:54 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Thu, 07 May 2020 15:22:54 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588864974.23.0.745579615294.issue40517@roundup.psfhosted.org> Batuhan Taskaya added the comment: I've updated the PR with bold_dark_blue.png changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 12:01:16 2020 From: report at bugs.python.org (hai shi) Date: Thu, 07 May 2020 16:01:16 +0000 Subject: [issue38787] PEP 573: Module State Access from C Extension Methods In-Reply-To: <1573655440.57.0.563143759574.issue38787@roundup.psfhosted.org> Message-ID: <1588867276.08.0.809580629947.issue38787@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +19296 pull_request: https://github.com/python/cpython/pull/19980 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 12:05:21 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 07 May 2020 16:05:21 +0000 Subject: [issue40546] Inconsistencies between pegen and traceback SyntaxErrors Message-ID: <1588867521.75.0.200197181166.issue40546@roundup.psfhosted.org> New submission from Lysandros Nikolaou : Since traceback is programmed to match the SyntaxErrors emitted by the old parser, there are some inconsistencies between how it formats SyntaxErrors and how the new parser does it. One example for such behaviour is the following: New Parser: ?? ./python.exe Python 3.9.0a6+ (heads/master:4638c64295, May 7 2020, 16:47:53) [Clang 11.0.0 (clang-1100.0.33.8)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> x = 1 | 2 | File "", line 1 x = 1 | 2 | ^ SyntaxError: invalid syntax Old parser and traceback module: ?? ./python.exe -X oldparser Python 3.9.0a6+ (heads/master:4638c64295, May 7 2020, 16:47:53) [Clang 11.0.0 (clang-1100.0.33.8)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> x = 1 | 2 | File "", line 1 x = 1 | 2 | ^ SyntaxError: invalid syntax We actually think that the new parser does a better job here, since there is nothing wrong with the `|` itself, the error is that a newline follows it and that's where the caret should point to. Tests that are testing this are currently skipped. I think we should change traceback to match the new parser, wherever we think the new parser does a better job, and "unskip" these tests. ---------- components: Library (Lib) messages: 368353 nosy: gvanrossum, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: Inconsistencies between pegen and traceback SyntaxErrors type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 12:08:05 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 07 May 2020 16:08:05 +0000 Subject: [issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors In-Reply-To: <1588867521.75.0.200197181166.issue40546@roundup.psfhosted.org> Message-ID: <1588867685.87.0.225399289276.issue40546@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- title: Inconsistencies between pegen and traceback SyntaxErrors -> Inconsistencies between PEG parser and traceback SyntaxErrors _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 12:14:06 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Thu, 07 May 2020 16:14:06 +0000 Subject: [issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors In-Reply-To: <1588867521.75.0.200197181166.issue40546@roundup.psfhosted.org> Message-ID: <1588868046.35.0.0872133374975.issue40546@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 12:27:37 2020 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 07 May 2020 16:27:37 +0000 Subject: [issue37132] Add a module for integer related math functions In-Reply-To: <1559472897.43.0.110105466613.issue37132@roundup.psfhosted.org> Message-ID: <1588868857.04.0.900746254576.issue37132@roundup.psfhosted.org> Mark Dickinson added the comment: See also #40028 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 12:37:14 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9my_Oudompheng?=) Date: Thu, 07 May 2020 16:37:14 +0000 Subject: [issue40547] 2to3 raise can silently remove code from old 2.4 string exceptions Message-ID: <1588869434.41.0.260360648069.issue40547@roundup.psfhosted.org> New submission from R?my Oudompheng : When running "2to3 -f raise" on the following code, which uses an old Python 2.4 raise of a string: def f(): raise ("message %s %s" % (1, 2)) try: f() finally: pass I obtain the following quite surprising result. I would have expected to get either an error or leave the original file unchanged, because "raise (s)" is syntactically valid although incorrect. $ 2to3 -f raise w.py RefactoringTool: Refactored w.py --- w.py (original) +++ w.py (refactored) @@ -1,5 +1,5 @@ def f(): - raise ("message %s %s" % (1, 2)) + raise "message %s %s" try: f() ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 368355 nosy: R?my Oudompheng priority: normal severity: normal status: open title: 2to3 raise can silently remove code from old 2.4 string exceptions type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 13:16:08 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 May 2020 17:16:08 +0000 Subject: [issue38787] PEP 573: Module State Access from C Extension Methods In-Reply-To: <1573655440.57.0.563143759574.issue38787@roundup.psfhosted.org> Message-ID: <1588871768.35.0.787231002151.issue38787@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c068b53a0ca6ebf740d98e422569d2f705e54f93 by Hai Shi in branch 'master': bpo-38787: Update structures.rst docs (PEP 573) (GH-19980) https://github.com/python/cpython/commit/c068b53a0ca6ebf740d98e422569d2f705e54f93 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 13:39:37 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 May 2020 17:39:37 +0000 Subject: [issue40548] Always run GitHub action jobs, even on documentation-only jobs Message-ID: <1588873177.1.0.956855864504.issue40548@roundup.psfhosted.org> New submission from STINNER Victor : bpo-39837 made Azure Pipelines CI non-mandatory. Travis CI was made mandatory to have at least one mandatory job: https://github.com/python/core-workflow/issues/365 I would prefer to have at least one mandatory Windows CI running on Python pull requests. Before we had pre-commit checks, it was too common to break Windows. I would prefer to not regress on that aspect. -- Currently, GitHub action jobs ignore "documentation-only" changes. Extract of .github/workflows/build.yml: on: push: branches: - master - 3.8 - 3.7 paths-ignore: - 'Doc/**' - 'Misc/**' - '**/*.md' - '**/*.rst' If a job is marked as mandatory but the GitHub action is skipped because of paths-ignore, the PR cannot be merged :-( It seems to be a known GitHub limitation which is not going to be fixed soon: https://discuss.python.org/t/make-one-windows-ci-job-mandatory/4047/6 To workaround is to always run GitHub action jobs, even on documentation-only jobs. I propose to always run GitHub actions and then make the Windows (64 bit) job mandatory. -- Sadly, it will waste resources for documentation-only jobs. To avoid that, the Windows job can be modified later to be skipped if it detects that the PR is a documentation-only change. Steve Dower wrote: "That workaround looks roughly like what is in the Azure Pipelines files. Someone just needs the time to go and migrate it." https://discuss.python.org/t/make-one-windows-ci-job-mandatory/4047/6 Note: the Travis CI job (.travis.yml) uses the following check: # Pull requests are slightly complicated because $TRAVIS_COMMIT_RANGE # may include more changes than desired if the history is convoluted. # Instead, explicitly fetch the base branch and compare against the # merge-base commit. git fetch -q origin +refs/heads/$TRAVIS_BRANCH changes=$(git diff --name-only HEAD $(git merge-base HEAD FETCH_HEAD)) echo "Files changed:" echo "$changes" if ! echo "$changes" | grep -qvE '(\.rst$)|(^Doc)|(^Misc)' then echo "Only docs were updated, stopping build process." exit fi -- More background on these CI issues: * https://bugs.python.org/issue39837 * https://github.com/python/core-workflow/issues/365 * https://discuss.python.org/t/make-one-windows-ci-job-mandatory/4047 ---------- components: Build messages: 368357 nosy: vstinner priority: normal severity: normal status: open title: Always run GitHub action jobs, even on documentation-only jobs versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 13:44:22 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 May 2020 17:44:22 +0000 Subject: [issue40548] Always run GitHub action jobs, even on documentation-only jobs In-Reply-To: <1588873177.1.0.956855864504.issue40548@roundup.psfhosted.org> Message-ID: <1588873462.33.0.634096736042.issue40548@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +19297 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19981 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 13:48:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 May 2020 17:48:04 +0000 Subject: [issue39837] Make Azure Pipelines optional on GitHub PRs In-Reply-To: <1583255119.77.0.277327127951.issue39837@roundup.psfhosted.org> Message-ID: <1588873684.17.0.268132555177.issue39837@roundup.psfhosted.org> STINNER Victor added the comment: I created a follow-up issue to have again a mandatory Windows pre-commit CI: bpo-40548. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 13:48:40 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Thu, 07 May 2020 17:48:40 +0000 Subject: [issue40548] Always run GitHub action jobs, even on documentation-only jobs In-Reply-To: <1588873177.1.0.956855864504.issue40548@roundup.psfhosted.org> Message-ID: <1588873720.74.0.266059777638.issue40548@roundup.psfhosted.org> Filipe La?ns added the comment: The workaround presented at https://github.community/t5/GitHub-Actions/Feature-request-conditional-required-checks/m-p/51344/highlight/true#M8157 seems pretty reasonable. And it seems like travis is alerady doing the same thing as it doesn't have native support to skip runs based on path changes. I can open a PR if you want. ---------- nosy: +FFY00 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 13:50:45 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 07 May 2020 17:50:45 +0000 Subject: [issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors In-Reply-To: <1588867521.75.0.200197181166.issue40546@roundup.psfhosted.org> Message-ID: <1588873845.99.0.520524096878.issue40546@roundup.psfhosted.org> Guido van Rossum added the comment: I don't understand why the traceback module is implicated. It just formats the information in the SyntaxError object, same as the builtin printing for syntax errors. The key difference is always in what line/column/text is put in the SyntaxError object by whichever parser is being used. In the past there was some misunderstanding about whether column numbers are 0-based (the leftmost column is numbered 0) or 1-based (the leftmost column is numbered 1), and at some point we discovered there was an inconsistency -- certain parts of the code put 0-based offsets in the SyntaxError object and other parts put 1-based offsets. We then decided that the SyntaxError column offset should be 1-based and changed various bits of code to match. It's however possible that we forgot some. It's also still not clearly documented (e.g. the stdlib docs for SyntaxError don't mention it). What complicates matters further is that the lowest-level C code in the tokenizer definitely uses 0-based offsets, which means that whenever we create a SyntaxError we have to add 1 to the offset. (You can see this happening if you look at various calls to PyErr_SyntaxLocationObject().) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 14:00:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 May 2020 18:00:48 +0000 Subject: [issue40548] Always run GitHub action jobs, even on documentation-only jobs In-Reply-To: <1588873177.1.0.956855864504.issue40548@roundup.psfhosted.org> Message-ID: <1588874448.45.0.474043182646.issue40548@roundup.psfhosted.org> STINNER Victor added the comment: > The workaround presented at https://github.community/t5/GitHub-Actions/Feature-request-conditional-required-checks/m-p/51344/highlight/true#M8157 seems pretty reasonable. And it seems like travis is alerady doing the same thing as it doesn't have native support to skip runs based on path changes. I suppose that Steve Dower mentioned the following part of .azure-pipelines/prebuild-checks.yml: ---------------- - script: | if ! git diff --name-only $(diffTarget) | grep -qvE '(\.rst$|^Doc|^Misc)' then echo "Only docs were updated: tests.run=false" echo "##vso[task.setvariable variable=run;isOutput=true]false" else echo "Code was updated: tests.run=true" echo "##vso[task.setvariable variable=run;isOutput=true]true" fi displayName: Detect source changes name: tests ---------------- I understood that he proposed to port it inside the Windows job of GitHub actions (.github/workflows/build.yml). I propose the following plan: * Always run GitHub Action jobs * Make Windows 64-bit job mandatory * And only then try to skip documentation-only changes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 14:05:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 May 2020 18:05:48 +0000 Subject: [issue40549] Convert posixmodule.c to multiphase initialization (PEP 489) Message-ID: <1588874748.21.0.997527577662.issue40549@roundup.psfhosted.org> New submission from STINNER Victor : Attached PR converts posixmodule.c to multiphase initialization (PEP 489). It uses the new shiny PyType_FromModuleAndSpec() and PyType_GetModule() of the PEP 573 added by bpo-38787. The PR removes the following macro :-) #define _posixstate_global ((_posixstate *)PyModule_GetState(PyState_FindModule(&posixmodule))) ---------- components: Interpreter Core messages: 368362 nosy: vstinner priority: normal severity: normal status: open title: Convert posixmodule.c to multiphase initialization (PEP 489) versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 14:08:07 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 07 May 2020 18:08:07 +0000 Subject: [issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors In-Reply-To: <1588867521.75.0.200197181166.issue40546@roundup.psfhosted.org> Message-ID: <1588874887.09.0.650691698617.issue40546@roundup.psfhosted.org> Guido van Rossum added the comment: For example: raise SyntaxError("message", ("", 1, 3, "text")) Traceback (most recent call last): File "", line 1, in File "", line 1 text ^ SyntaxError: message >>> (I can't find docs for the constructor of SyntaxError objects. We should update the docs.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 14:13:13 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 May 2020 18:13:13 +0000 Subject: [issue40549] Convert posixmodule.c to multiphase initialization (PEP 489) In-Reply-To: <1588874748.21.0.997527577662.issue40549@roundup.psfhosted.org> Message-ID: <1588875193.57.0.512941543699.issue40549@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +19298 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19982 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 14:14:12 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 07 May 2020 18:14:12 +0000 Subject: [issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors In-Reply-To: <1588867521.75.0.200197181166.issue40546@roundup.psfhosted.org> Message-ID: <1588875252.79.0.210813608278.issue40546@roundup.psfhosted.org> Lysandros Nikolaou added the comment: Guido: > I don't understand why the traceback module is implicated. The traceback module is implicated, because it currently does not allow the caret to point to a position after the error line. In format_exception_only there is the following snippet of code: if offset is not None: caretspace = badline.rstrip('\n') offset = min(len(caretspace), offset) - 1 caretspace = caretspace[:offset].lstrip() # non-space whitespace (likes tabs) must be kept for alignment caretspace = ((c.isspace() and c or ' ') for c in caretspace) yield ' {}^\n'.format(''.join(caretspace)) There are two things here, that put together contradict the way that pegen reports errors. `badline` gets rstripped and then the offset is changed to point to the end of the string, in case it is currently pointing after its end. That basically does not allow SyntaxErrors to be formatted the way they currently are, when using the new parser. For example: ?? ./python.exe Python 3.9.0a6+ (heads/master:4638c64295, May 7 2020, 16:47:53) [Clang 11.0.0 (clang-1100.0.33.8)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> x = 1 | 2 | File "", line 1 x = 1 | 2 | ^ SyntaxError: invalid syntax But: ?? ./python.exe Python 3.9.0a6+ (heads/master:4638c64295, May 7 2020, 16:47:53) [Clang 11.0.0 (clang-1100.0.33.8)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import traceback >>> try: ... exec('x = 1 | 2 |') ... except SyntaxError as se: ... exc = se ... >>> traceback.print_exception(type(exc), exc, exc.__traceback__) Traceback (most recent call last): File "", line 2, in File "", line 1 x = 1 | 2 | ^ SyntaxError: invalid syntax I might be missing something here, but I think that that's the traceback module's "fault". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 14:14:29 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 07 May 2020 18:14:29 +0000 Subject: [issue40178] Convert the remaining os funtions to Argument Clinic In-Reply-To: <1586003108.43.0.643087706293.issue40178@roundup.psfhosted.org> Message-ID: <1588875269.01.0.196175518051.issue40178@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 May 7 14:18:58 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Thu, 07 May 2020 18:18:58 +0000 Subject: [issue40548] Always run GitHub action jobs, even on documentation-only jobs In-Reply-To: <1588873177.1.0.956855864504.issue40548@roundup.psfhosted.org> Message-ID: <1588875538.17.0.152282430879.issue40548@roundup.psfhosted.org> Change by Filipe La?ns : ---------- pull_requests: +19299 pull_request: https://github.com/python/cpython/pull/19983 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 14:28:24 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Thu, 07 May 2020 18:28:24 +0000 Subject: [issue40528] Improve / Clear ASDL generator In-Reply-To: <1588763820.27.0.218398998224.issue40528@roundup.psfhosted.org> Message-ID: <1588876104.41.0.310339129323.issue40528@roundup.psfhosted.org> Batuhan Taskaya added the comment: Next is using asdl_int_seq for all simple sum types, and not for only cmpop. Looks like it is hardcoded to use it, and I plan to refactor this in a way that might save some time in python implementation of classes (also it will solve this bug). For not conflicting, I'll wait GH 19968. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 14:36:29 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Thu, 07 May 2020 18:36:29 +0000 Subject: [issue40548] Always run GitHub action jobs, even on documentation-only jobs In-Reply-To: <1588873177.1.0.956855864504.issue40548@roundup.psfhosted.org> Message-ID: <1588876589.03.0.127261256811.issue40548@roundup.psfhosted.org> Filipe La?ns added the comment: > * And only then try to skip documentation-only changes Done :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 14:44:00 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 07 May 2020 18:44:00 +0000 Subject: [issue40397] Refactor typing._GenericAlias In-Reply-To: <1587918915.07.0.818996162208.issue40397@roundup.psfhosted.org> Message-ID: <1588877040.39.0.797830764866.issue40397@roundup.psfhosted.org> Serhiy Storchaka added the comment: The next PR removes __args__ and __parameters__ from _SpecialGenericAlias. * No existing test is failed. It is an evidence that these attributes are not intended, but a side effect of mixing two different kinds in one class. * get_args() ignores __args__ and returns () for _SpecialGenericAlias (after resolving issue40398). * Nested _SpecialGenericAlias is not considered a generic class containing type variables: >>> from typing import * >>> T = TypeVar('T') >>> Dict[int, List[T]][str] typing.Dict[int, typing.List[str]] >>> Dict[int, List][str] Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython-release/Lib/typing.py", line 244, in inner return func(*args, **kwds) File "/home/serhiy/py/cpython-release/Lib/typing.py", line 695, in __getitem__ _check_generic(self, params) File "/home/serhiy/py/cpython-release/Lib/typing.py", line 194, in _check_generic raise TypeError(f"{cls} is not a generic class") TypeError: typing.Dict[int, typing.List] is not a generic class It also fixes the following error: >>> from typing import * >>> T = TypeVar('T') >>> Dict[T, List][str] Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython-release/Lib/typing.py", line 241, in inner return cached(*args, **kwds) File "/home/serhiy/py/cpython-release/Lib/typing.py", line 703, in __getitem__ subargs = tuple(subst[x] for x in arg.__parameters__) File "/home/serhiy/py/cpython-release/Lib/typing.py", line 703, in subargs = tuple(subst[x] for x in arg.__parameters__) KeyError: ~T and allows to simplify __eq__ and __hash__ for _SpecialGenericAlias. Currently it has a weird behavior in corner case: >>> from typing import * >>> from typing import T >>> List == List[T] True ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 14:45:12 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 07 May 2020 18:45:12 +0000 Subject: [issue40397] Refactor typing._GenericAlias In-Reply-To: <1587918915.07.0.818996162208.issue40397@roundup.psfhosted.org> Message-ID: <1588877112.67.0.123089708548.issue40397@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +19300 pull_request: https://github.com/python/cpython/pull/19984 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 15:08:40 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 07 May 2020 19:08:40 +0000 Subject: [issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors In-Reply-To: <1588867521.75.0.200197181166.issue40546@roundup.psfhosted.org> Message-ID: <1588878520.06.0.841051257945.issue40546@roundup.psfhosted.org> Guido van Rossum added the comment: Aha! So the traceback module does have a difference. First, if the offset points inside the text, there's no difference: >>> raise SyntaxError("message", ("", 1, 4, "text")) Traceback (most recent call last): File "", line 1, in File "", line 1 text ^ SyntaxError: message traceback.print_exception(SyntaxError, SyntaxError("message", ("", 1, 4, "text")), None) File "", line 1 text ^ SyntaxError: message >>> But if the offset points past the text, there's a difference: >>> raise SyntaxError("message", ("", 1, 5, "text")) Traceback (most recent call last): File "", line 1, in File "", line 1 text ^ SyntaxError: message >>> traceback.print_exception(SyntaxError, SyntaxError("message", ("", 1, 5, "text")), None) File "", line 1 text ^ SyntaxError: message >>> And even: >>> raise SyntaxError("message", ("", 1, 10, "text")) Traceback (most recent call last): File "", line 1, in File "", line 1 text ^ SyntaxError: message >>> traceback.print_exception(SyntaxError, SyntaxError("message", ("", 1, 10, "text")), None) File "", line 1 text ^ SyntaxError: message >>> I wonder if we need to support the final case? It seems clear to me that if the col_offset points just past the text, we should display a caret just past the text. (I wonder if this might be an off-by-one issue caused by confusion about 0-based vs. 1-based offsets.) But if the col_offset points way past the text, what should happen? The clipping there seems reasonable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 15:32:48 2020 From: report at bugs.python.org (hillpd) Date: Thu, 07 May 2020 19:32:48 +0000 Subject: [issue39685] Python 3.8 regression Socket operation on non-socket In-Reply-To: <1582092460.6.0.713532643736.issue39685@roundup.psfhosted.org> Message-ID: <1588879968.49.0.00135688022379.issue39685@roundup.psfhosted.org> hillpd added the comment: Blocking the use of stdin/stdout like this looks intentional. I have added dimaqq and asvetlov for comment. The python docs [0] indicate that the file descriptor should be a socket: "The file descriptor should refer to a socket, but this is not checked ? subsequent operations on the object may fail if the file descriptor is invalid." With bpo-35415, the fd is explicitly checked. [0] https://docs.python.org/3/library/socket.html#socket.fromfd ---------- nosy: +Dima.Tisnek, asvetlov, hillpd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 16:01:24 2020 From: report at bugs.python.org (Alexander Overvoorde) Date: Thu, 07 May 2020 20:01:24 +0000 Subject: [issue40550] Popen.terminate fails with ProcessLookupError under certain conditions Message-ID: <1588881684.43.0.416849020134.issue40550@roundup.psfhosted.org> New submission from Alexander Overvoorde : The following program frequently raises a ProcessLookupError exception when calling proc.terminate(): ``` import threading import subprocess import multiprocessing proc = subprocess.Popen(["sh", "-c", "exit 0"]) q = multiprocessing.Queue() def communicate_thread(proc): proc.communicate() t = threading.Thread(target=communicate_thread, args=(proc,)) t.start() proc.terminate() t.join() ``` I'm reproducing this with Python 3.8.2 on Arch Linux by saving the script and rapidly executing it like this: $ bash -e -c "while true; do python3 test.py; done The (unused) multiprocessing.Queue seems to play a role here because the problem vanishes when removing that one line. ---------- components: Library (Lib) messages: 368370 nosy: Alexander Overvoorde priority: normal severity: normal status: open title: Popen.terminate fails with ProcessLookupError under certain conditions type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 16:09:53 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Thu, 07 May 2020 20:09:53 +0000 Subject: [issue40551] PRs should be rebased on top of master before running the build/tests Message-ID: <1588882193.5.0.928762641921.issue40551@roundup.psfhosted.org> New submission from Filipe La?ns : Let's imagine this scenario: (master history) abcd - some commit hijk - change something (pull request history) abcd - some commit defg - add feature master pull request abcd - some commit ------- defg - add feature hijk - change something Currently in the CI we checkout defg and run the tests. If hijk introduces some change that breaks defg, we only know about it after defg is in master. I propose pull requests to be automatically rebased on top of master, so that the resulting story becomes: abcd - some commit hijk - change something defg - add feature Now defg is properly tested :) This may not be an issue in smaller projects, but in cpython where most things are a moving target, it should make a difference. Here I am referring to master but applies to all other maintained branches. Github can't merge if the PR doesn't cleanly rebase to master, or rather, it will ask you to resolve conflicts, so I don't think there should be any problem. Keep in mind that this only works at the time the pull request is created. To check against the latest master the build needs to be retriggered, which you should be able to do manually. Even if we don't check against the latest master when the PR is merged, this is already an improvement. After this we could look into maybe automatically retriggering the CI on approvals, or better, managing merges with a bot. ---------- components: Build messages: 368371 nosy: FFY00 priority: normal severity: normal status: open title: PRs should be rebased on top of master before running the build/tests type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 16:42:21 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 May 2020 20:42:21 +0000 Subject: [issue40548] Always run GitHub action jobs, even on documentation-only jobs In-Reply-To: <1588873177.1.0.956855864504.issue40548@roundup.psfhosted.org> Message-ID: <1588884141.83.0.893359216093.issue40548@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 4e363761fc02a89d53aba4382dc451293bd6f0ba by Victor Stinner in branch 'master': bpo-40548: Always run GitHub action, even on doc PRs (GH-19981) https://github.com/python/cpython/commit/4e363761fc02a89d53aba4382dc451293bd6f0ba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 16:48:23 2020 From: report at bugs.python.org (Julien Palard) Date: Thu, 07 May 2020 20:48:23 +0000 Subject: [issue40552] Enhance for loop and copy example in tutorial Message-ID: <1588884503.92.0.729674513869.issue40552@roundup.psfhosted.org> New submission from Julien Palard : During the past few weeks we got two reports of an example not working in the tutorial: [1], [2]. [1]: https://mail.python.org/archives/list/docs at python.org/message/ZJM3S2TE5UPFYIII5R4VQ4KY2WN4TKVO/ [2]: https://mail.python.org/archives/list/docs at python.org/thread/6FZ55HTMILK4P6EOYLAI7WXAY427NKQU/ Problem is: the example uses a `users` variable that is not defined. users should be a dict, which is not straightforward for newcomers neither, so I propose to define it to: users = {"Hans": "active", "Andrea": "inactive", "Nils": "active"} in the example, to make it work. ---------- assignee: docs at python components: Documentation keywords: easy messages: 368373 nosy: docs at python, mdk priority: low severity: normal status: open title: Enhance for loop and copy example in tutorial type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 16:49:09 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 07 May 2020 20:49:09 +0000 Subject: [issue40541] Add optional weights parameter to random.sample() In-Reply-To: <1588804520.3.0.249071627671.issue40541@roundup.psfhosted.org> Message-ID: <1588884549.26.0.126828010257.issue40541@roundup.psfhosted.org> Raymond Hettinger added the comment: > How about "counts" instead of "weights"? That makes sense. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 16:55:32 2020 From: report at bugs.python.org (Zain Said) Date: Thu, 07 May 2020 20:55:32 +0000 Subject: [issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs Message-ID: <1588884932.92.0.367303002443.issue40553@roundup.psfhosted.org> New submission from Zain Said : What I'm currently using: Mid 2012 13'' MacBook Pro OS Catalina 10.15.4 Python 3.8.2 I'm having an issue with saving a new python program. When I go to "save as" a program python seems to freeze/not . The only way I've been able to get python working again is to "Force Quit" the existing process and reopen IDLE. Running and writing existing programs seems to be working fine. ---------- messages: 368375 nosy: Zain priority: normal severity: normal status: open title: Python 3.8.2 Mac freezing/not responding when saving new programs type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 16:57:34 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 07 May 2020 20:57:34 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588885054.55.0.613827362276.issue40517@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset b7a78ca74ab539943ab11b5c4c9cfab7f5b7ff5a by Batuhan Taskaya in branch 'master': bpo-40517: Implement syntax highlighting support for ASDL (GH-19967) https://github.com/python/cpython/commit/b7a78ca74ab539943ab11b5c4c9cfab7f5b7ff5a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 16:58:17 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 07 May 2020 20:58:17 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588885097.98.0.426375067866.issue40517@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks for the contribution. It looks much nicer than what we had before. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 17:01:28 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Thu, 07 May 2020 21:01:28 +0000 Subject: [issue40517] Syntax highlighting for ASDL In-Reply-To: <1588686662.66.0.89093613583.issue40517@roundup.psfhosted.org> Message-ID: <1588885288.15.0.714636964764.issue40517@roundup.psfhosted.org> Batuhan Taskaya added the comment: Thank you all for your reviews for styling, also I have to thank https://github.com/CyberSaxosTiGER for his external reviews on the color scheme. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 17:24:26 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Thu, 07 May 2020 21:24:26 +0000 Subject: [issue40244] AIX: build: _PyObject_GC_TRACK Asstertion failure In-Reply-To: <1586507316.69.0.786578254213.issue40244@roundup.psfhosted.org> Message-ID: <1588886666.9.0.973690081327.issue40244@roundup.psfhosted.org> Batuhan Taskaya added the comment: Any news about this? Should we revert the commit for 3.9? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 17:26:46 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 07 May 2020 21:26:46 +0000 Subject: [issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs In-Reply-To: <1588884932.92.0.367303002443.issue40553@roundup.psfhosted.org> Message-ID: <1588886806.27.0.769822863677.issue40553@roundup.psfhosted.org> Raymond Hettinger added the comment: I frequently have this issue as well. My workaround is awful: I go to the terminal prompt to create an empty file with the desired name, and then open it up in IDLE to edit and save. This avoids the SaveAs dialog window that triggers the failure. This doesn't happen to me with new, empty directories. So, my best guess is that the document preview in the SaveAs window is triggering the failure. This problem may go away in the future with a O/S update or with a Tcl/Tk update. AFAICT, IDLE doesn't have any way to ask for a simplified FileDialog window. ---------- assignee: -> terry.reedy components: +IDLE nosy: +rhettinger, terry.reedy priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 17:32:18 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 07 May 2020 21:32:18 +0000 Subject: [issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs In-Reply-To: <1588884932.92.0.367303002443.issue40553@roundup.psfhosted.org> Message-ID: <1588887138.83.0.526270155106.issue40553@roundup.psfhosted.org> Raymond Hettinger added the comment: Perhaps we could create an option in the general settings that offers a workaround: open a regular text window to get the filename. This wouldn't be as pretty (won't display filenames, offer mouse support, won't show file previews), but it would be reliable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 17:36:57 2020 From: report at bugs.python.org (Julien Palard) Date: Thu, 07 May 2020 21:36:57 +0000 Subject: [issue40554] Add escape to the glossary? Message-ID: <1588887417.08.0.726428643093.issue40554@roundup.psfhosted.org> New submission from Julien Palard : Geoff Cutter noticed via docs@ that escape is not defined in the glossary. I concur with the idea of adding it, opening as an "easy" issue, even if finding a good definition might not be that easy. ---------- assignee: docs at python components: Documentation keywords: easy messages: 368382 nosy: docs at python, mdk priority: low severity: normal status: open title: Add escape to the glossary? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 17:53:51 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 May 2020 21:53:51 +0000 Subject: [issue40228] Make setting line number in frame more robust. In-Reply-To: <1586360855.72.0.434652598832.issue40228@roundup.psfhosted.org> Message-ID: <1588888431.25.0.899115772482.issue40228@roundup.psfhosted.org> STINNER Victor added the comment: Windows 64-bit emits a compiler warning on this line: int len = PyBytes_GET_SIZE(f->f_code->co_code)/sizeof(_Py_CODEUNIT); Warning: D:\a\cpython\cpython\Objects\frameobject.c(400,1): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj] Either the code should be rewritten to to Py_ssize_t, or the result should be downcasted to int. Technically, it seems possible to create a code object larger than INT_MAX instructors: PyCode_New() has no limit on the bytecode length. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 17:53:59 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 May 2020 21:53:59 +0000 Subject: [issue40228] Make setting line number in frame more robust. In-Reply-To: <1586360855.72.0.434652598832.issue40228@roundup.psfhosted.org> Message-ID: <1588888439.5.0.535245573117.issue40228@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 17:56:55 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Thu, 07 May 2020 21:56:55 +0000 Subject: [issue39881] Multiple Interpreters in the Stdlib (PEP 554) - High-level Implementation In-Reply-To: <1583531445.05.0.495452199299.issue39881@roundup.psfhosted.org> Message-ID: <1588888615.73.0.001251224303.issue39881@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- pull_requests: +19301 pull_request: https://github.com/python/cpython/pull/19985 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 18:25:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 May 2020 22:25:54 +0000 Subject: [issue40548] Always run GitHub action jobs, even on documentation-only jobs In-Reply-To: <1588873177.1.0.956855864504.issue40548@roundup.psfhosted.org> Message-ID: <1588890354.27.0.372419915506.issue40548@roundup.psfhosted.org> STINNER Victor added the comment: > I propose the following plan: > > * Always run GitHub Action jobs Done. > * Make Windows 64-bit job mandatory My request: https://github.com/python/core-workflow/issues/368 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 18:25:55 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 07 May 2020 22:25:55 +0000 Subject: [issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs In-Reply-To: <1588884932.92.0.367303002443.issue40553@roundup.psfhosted.org> Message-ID: <1588890355.79.0.861488116928.issue40553@roundup.psfhosted.org> Ned Deily added the comment: Zain and/or Raymond: can you please give the exact steps to reproduce this problem, including exactly how you invoke IDLE, the Python version info and build date info from the IDLE shell window, the details of exactly how you invoke Save As (i.e whether via clicking on the menu bar File menu or instead by using a keyboard shortcut like shift-cmd-S. And when the SaveAs window appears perhaps a screen shot or at least what options you have selected (icons, list, etc, expanded or compressed window) and what is the default folder it opens to. I am not able to reproduce a hang although I do see some delays. Also what happens if you just use Save for a new file rather than Save As? If it's a new file, that should also produce a Save file window and that's what I always use when smoke testing. EIther should work, of course :( ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 19:26:25 2020 From: report at bugs.python.org (Zain Said) Date: Thu, 07 May 2020 23:26:25 +0000 Subject: [issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs In-Reply-To: <1588884932.92.0.367303002443.issue40553@roundup.psfhosted.org> Message-ID: <1588893985.1.0.936491429172.issue40553@roundup.psfhosted.org> Zain Said added the comment: Sure i'll supply a screenshot This problem doesn't effect saving in general after editing existing programs by the way. My process of saving a program: - I'll open IDLE (Python 3.8.2) - write anything at all - I'll either hit command>s or click file>save as then ill be prompted to name my program and then save as (also if i want to rename an existing program the same issue occurs) - after typing in the name of the new program ill click save as then most of the window goes blank (you'll see in the screenshot) ---------- Added file: https://bugs.python.org/file49139/Screen Shot 2020-05-07 at 3.46.02 PM.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 19:27:35 2020 From: report at bugs.python.org (Zain Said) Date: Thu, 07 May 2020 23:27:35 +0000 Subject: [issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs In-Reply-To: <1588884932.92.0.367303002443.issue40553@roundup.psfhosted.org> Message-ID: <1588894055.19.0.769591968047.issue40553@roundup.psfhosted.org> Zain Said added the comment: The screenshot link is at the top of the thread ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 19:27:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 May 2020 23:27:54 +0000 Subject: [issue40360] Deprecate lib2to3 (and 2to3) for future removal In-Reply-To: <1587530454.25.0.44181585934.issue40360@roundup.psfhosted.org> Message-ID: <1588894074.55.0.831574980899.issue40360@roundup.psfhosted.org> STINNER Victor added the comment: FYI the autopep8 project uses lib2to3. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 19:35:40 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Thu, 07 May 2020 23:35:40 +0000 Subject: [issue40550] Popen.terminate fails with ProcessLookupError under certain conditions In-Reply-To: <1588881684.43.0.416849020134.issue40550@roundup.psfhosted.org> Message-ID: <1588894540.46.0.49287053011.issue40550@roundup.psfhosted.org> Filipe La?ns added the comment: This is the backtrace I get: Traceback (most recent call last): File "/home/anubis/test/multiprocessing-error.py", line 16, in proc.terminate() File "/home/anubis/git/cpython/Lib/subprocess.py", line 2069, in terminate self.send_signal(signal.SIGTERM) File "/home/anubis/git/cpython/Lib/subprocess.py", line 2064, in send_signal os.kill(self.pid, sig) ProcessLookupError: [Errno 3] No such process Is yours the same? This is expected, the process exited before proc.terminate(). You should wrap proc.terminate() in a try..except block: try: proc.terminate() except ProcessLookupError: pass I am not sure we want to suppress this. ---------- nosy: +FFY00 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 19:41:44 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Thu, 07 May 2020 23:41:44 +0000 Subject: [issue40535] While build python 3.8.2 in linux ctypes.so is using libffi.so.6 instead of libffi.so.7 In-Reply-To: <1588782183.35.0.376036230435.issue40535@roundup.psfhosted.org> Message-ID: <1588894904.73.0.532292134498.issue40535@roundup.psfhosted.org> Filipe La?ns added the comment: Which error are you getting? libffi is provided by your distribution. ---------- nosy: +FFY00 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 19:49:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 May 2020 23:49:46 +0000 Subject: [issue40555] pegen (PEP 617): bug in error handling In-Reply-To: <1588895336.21.0.583196255938.issue40555@roundup.psfhosted.org> Message-ID: <1588895386.72.0.608946240362.issue40555@roundup.psfhosted.org> STINNER Victor added the comment: Workaround: use python3.9 -X oldparser. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 19:48:56 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 May 2020 23:48:56 +0000 Subject: [issue40555] pegen (PEP 617): bug in error handling Message-ID: <1588895336.21.0.583196255938.issue40555@roundup.psfhosted.org> New submission from STINNER Victor : autopep8 test suite does crash on Python 3.9.0a6. The bug can be reproduced with: Python 3.9.0a6+ (heads/master:b7a78ca74a, May 8 2020, 01:46:01) [GCC 10.0.1 20200430 (Red Hat 10.0.1-0.14)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> compile('"\\xhh" \\', '', 'exec', dont_inherit=True) python: Objects/typeobject.c:984: type_call: Assertion `!_PyErr_Occurred(tstate)' failed. Abandon (core dumped) It seems like p->error_condition should be checked more often in Parser/pegen/parse.c. ---------- components: Interpreter Core messages: 368391 nosy: gvanrossum, lys.nikolaou, pablogsal, vstinner priority: normal severity: normal status: open title: pegen (PEP 617): bug in error handling versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 19:53:42 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 07 May 2020 23:53:42 +0000 Subject: [issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors In-Reply-To: <1588867521.75.0.200197181166.issue40546@roundup.psfhosted.org> Message-ID: <1588895622.03.0.435436260208.issue40546@roundup.psfhosted.org> Lysandros Nikolaou added the comment: > But if the col_offset points way past the text, what should happen? The clipping there seems reasonable. Note that if a file is being parsed and not a string the behaviour is this: ?? cat -e t.py x = 1 | 2 | $ ?? ./python.exe t.py File "/Users/lysnikolaou/repos/cpython/t.py", line 1 x = 1 | 2 | ^ SyntaxError: invalid syntax ?? ./python.exe -X oldparser t.py File "/Users/lysnikolaou/repos/cpython/t.py", line 1 x = 1 | 2 | ^ SyntaxError: invalid syntax Would we want to also change this? If not, then I guess that we should as closely as possible match this behaviour with strings as well, which means not clipping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 20:03:29 2020 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 08 May 2020 00:03:29 +0000 Subject: [issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors In-Reply-To: <1588867521.75.0.200197181166.issue40546@roundup.psfhosted.org> Message-ID: <1588896209.13.0.575334043291.issue40546@roundup.psfhosted.org> Guido van Rossum added the comment: Hm, but there the old parser seems at fault: it points to the last space rather than beyond it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 20:05:00 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 08 May 2020 00:05:00 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1588896300.61.0.706886768076.issue32604@roundup.psfhosted.org> STINNER Victor added the comment: The commit a1d9e0accd33af1d8e90fc48b34c13d7b07dcf57 introduced reference leaks: $ ./python -m test -R 3:3 test__xxsubinterpreters -m test.test__xxsubinterpreters.RunFailedTests.test_traceback_propagated (...) test__xxsubinterpreters leaked [1863, 1861, 1863] references, sum=5587 test__xxsubinterpreters leaked [559, 558, 559] memory blocks, sum=1676 (...) ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 20:36:24 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 08 May 2020 00:36:24 +0000 Subject: [issue40555] pegen (PEP 617): bug in error handling In-Reply-To: <1588895336.21.0.583196255938.issue40555@roundup.psfhosted.org> Message-ID: <1588898184.0.0.165587541605.issue40555@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +19302 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19986 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 20:37:28 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 08 May 2020 00:37:28 +0000 Subject: [issue40555] pegen (PEP 617): bug in error handling In-Reply-To: <1588895336.21.0.583196255938.issue40555@roundup.psfhosted.org> Message-ID: <1588898248.74.0.0262572504622.issue40555@roundup.psfhosted.org> Lysandros Nikolaou added the comment: That's because we're not checking for errors after a loop is done. Pushing a fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 20:45:46 2020 From: report at bugs.python.org (Dima Tisnek) Date: Fri, 08 May 2020 00:45:46 +0000 Subject: [issue39685] Python 3.8 regression Socket operation on non-socket In-Reply-To: <1582092460.6.0.713532643736.issue39685@roundup.psfhosted.org> Message-ID: <1588898746.55.0.593356524513.issue39685@roundup.psfhosted.org> Dima Tisnek added the comment: The code in question is interesting... I don't claim to understand it. A pair of file descriptors is passed wrapped in sockets, and the objects are used here: https://github.com/sshuttle/sshuttle/blob/966fd0c5231d56c4f464752865d96f97bd3c0aac/sshuttle/ssnet.py#L238-L240 * s.setblocking(False) * os.read(s.fileno()) * select.select([s], [s], ...) elsewhere in the file * s.shutdown() elsewhere in the file server.py uses Mux() with a pair of os.stdin/stdout, realistically pty/pipe/file client.py uses Mux() with [an anonymous domain] socket from socketpair() So, on one hand, it is used like a socket, on the other, it's used as a holder for a file-like file descriptor ???? Back in the day, I too wrote (C) code that treated file/tty and socket file descriptors alike. I've since come to realise that's not exactly correct. IIRC doing so was elegant, UNIX-y, but implied platform specifics, i.e. was not cross-platform. I've also done similar tricks with serial.Serial before: instantiate but don't open, set pty fd, use to test code that expects a serial port in memory. Luckily that code was not open-source ??. It was a hack, but I don't know if it's cpython's job to support hacks of this kind. My 2c: Personally, I'd rather see the this "fixed" in sshuttle than in cpython. Perhaps someone with authority over the socket module can weight the balance between "a regression because using socket.socket as a container for generic file descriptors used to work before" vs. "least surprise for well-behaved and future code". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 20:56:28 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 08 May 2020 00:56:28 +0000 Subject: [issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors In-Reply-To: <1588867521.75.0.200197181166.issue40546@roundup.psfhosted.org> Message-ID: <1588899388.95.0.62296080683.issue40546@roundup.psfhosted.org> Lysandros Nikolaou added the comment: > Hm, but there the old parser seems at fault: it points to the last space rather than beyond it? Both parsers seem to have the same behaviour, when parsing files. I just found out that even the new parser points to the `|` if there is not trailing whitespace: ?? cat -e t.py x = 1 | 2 |$ ?? ./python.exe t.py File "/Users/lysnikolaou/Repositories/cpython/t.py", line 1 x = 1 | 2 | ^ SyntaxError: invalid syntax ?? ./python.exe -X oldparser t.py File "/Users/lysnikolaou/Repositories/cpython/t.py", line 1 x = 1 | 2 | ^ SyntaxError: invalid syntax I'll investigate more tomorrow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 21:51:01 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 08 May 2020 01:51:01 +0000 Subject: [issue14527] How to link with a non-system libffi? In-Reply-To: <1333851935.11.0.629390980004.issue14527@psf.upfronthosting.co.za> Message-ID: <1588902661.18.0.771778751514.issue14527@roundup.psfhosted.org> Ned Deily added the comment: As of current Python 3 releases, like 3.8, the python build no longer vendors a copy of libffi for most Unix systems and for those systems the --with-system-ffi configure option is ignored, i.e. configure and setup.py will always try to find an external libffi. On most systems, if you use are OK with using the system-supplied libffi, building and execution should usually "just work". But if you want to use another version of libffi, for example, one that you build from source, it can be very non-intuitive of how to successfully do that *especially* if there is already a system libffi installed. Depending on the system, you may need to set environment build variables like LDFLAGS, CFLAGS or PKG_CONFIG_PATH, and LD_LIBRARY_PATH for the Python build and/or you might need to override some of the libffi build variables to install in the proper locations for your system. It seems like, as has been suggested in various places, setup.py should at least try to use pkg-config to find libffi library locations as it already does to find libffi include files. But that might not be enough to get a working setup, i.e. you still might need to set LD_LIBRARY_PATH or the equivalent to find libffi. At the very least, there should be some documentation on how to build with a non-system libffi. ---------- components: +Build nosy: +ned.deily title: How to link with an external libffi? -> How to link with a non-system libffi? versions: +Python 3.8, Python 3.9 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 21:58:37 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 08 May 2020 01:58:37 +0000 Subject: [issue27133] python 3.5.1 will not compile because libffi module uses wrong CFLAGS In-Reply-To: <1464299251.55.0.694249257494.issue27133@psf.upfronthosting.co.za> Message-ID: <1588903117.05.0.457332340328.issue27133@roundup.psfhosted.org> Ned Deily added the comment: As of Python 3.7.0, we no longer "vendor" a copy of the libffi source for Unix-y platforms so I believe this issue of passing the right flag values into cpython's libffi build is no longer relevant. ---------- nosy: +ned.deily resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 22:11:29 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 08 May 2020 02:11:29 +0000 Subject: [issue17848] can't compile with clang and build a shared lib due to libffi In-Reply-To: <1366961546.37.0.678140272964.issue17848@psf.upfronthosting.co.za> Message-ID: <1588903889.16.0.34876264772.issue17848@roundup.psfhosted.org> Ned Deily added the comment: As of Python 3.7, Python source releases no longer "vendor" the source of libffi for Linux platforms; you need to use either a system-supplied libffi or, if really necessary, build and link with your own copy (not always easy to do). As the supplied patch modifies the now-defunct vendored libffi source, this issue is no longer relevant for current Pythons. ---------- nosy: +ned.deily resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 22:20:38 2020 From: report at bugs.python.org (Inada Naoki) Date: Fri, 08 May 2020 02:20:38 +0000 Subject: [issue40554] Add escape to the glossary? In-Reply-To: <1588887417.08.0.726428643093.issue40554@roundup.psfhosted.org> Message-ID: <1588904438.66.0.528833585352.issue40554@roundup.psfhosted.org> Inada Naoki added the comment: There are many "escape"; JSON, HTML, SQL, Python string literal, ESC-key, escape sequence in the terminal, etc... Is there a consistent meaning of "escape" in the context of Python? ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 22:21:52 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Fri, 08 May 2020 02:21:52 +0000 Subject: [issue40525] zipapps execute symlinks as if they are code In-Reply-To: <1588719341.33.0.757930708567.issue40525@roundup.psfhosted.org> Message-ID: <1588904512.27.0.59471887813.issue40525@roundup.psfhosted.org> Filipe La?ns added the comment: I tracked this down to zipimporter. I have one untested patch, when I run python from my development tree for some reason the zipimport definition at Lib/zipimport.py is not used. I assume something weird is going on because of the frozen circular imports. I would appreaciate it if someone could explain how this works and how I get the correct zipimporter definition to be used. ---------- keywords: +patch nosy: +FFY00 Added file: https://bugs.python.org/file49140/zipimporter-symlink.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 22:22:45 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 08 May 2020 02:22:45 +0000 Subject: [issue36944] Add support for ARM64 to libffi In-Reply-To: <1558043538.34.0.103396364975.issue36944@roundup.psfhosted.org> Message-ID: <1588904565.15.0.243067302845.issue36944@roundup.psfhosted.org> Ned Deily added the comment: Paul, it looks like your changes were included upstream in libffi 3.3.0 which is now being used for python.org Windows builds. If that is true, can we now close this issue? ---------- nosy: +ned.deily resolution: -> out of date stage: -> resolved status: open -> pending versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 22:27:38 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 08 May 2020 02:27:38 +0000 Subject: [issue31033] Add argument to .cancel() of Task and Future In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1588904858.93.0.163609830878.issue31033@roundup.psfhosted.org> Chris Jerdonek added the comment: I also posted a second PR (separate from the first) that adds a "msg" argument to Future.cancel() and Task.cancel(). That PR is also now ready for review: https://github.com/python/cpython/pull/19979 The other PR is simpler and more essential though, so I think should be reviewed before this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 22:35:40 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 08 May 2020 02:35:40 +0000 Subject: [issue35061] Specify libffi.so soname for ctypes In-Reply-To: <1540433070.81.0.788709270274.issue35061@psf.upfronthosting.co.za> Message-ID: <1588905340.47.0.0415521401152.issue35061@roundup.psfhosted.org> Ned Deily added the comment: Sorry for the long delay in answering this issue: ctypes and libffi issues do not get a lot of attention currently. I assume you must have long ago found a solution to the problem but, just for the record and assuming I understand the problem correctly, if you build Python on centos6 with its default libffi.so.5 and then try to move those binaries to a centos7 system that does not include a libffi.so.5 along with libffi.so.6, you are out of luck. Normally, the change from .5 to .6 would indicate some ABI incompatibility between the two libffi versions. Rebuilding Python on centos7 should produce a working Python that links with the latest library versions, including libffi, available on that centos release. ---------- nosy: +ned.deily resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 22:36:02 2020 From: report at bugs.python.org (Paul Monson) Date: Fri, 08 May 2020 02:36:02 +0000 Subject: [issue36944] Add support for ARM64 to libffi In-Reply-To: <1558043538.34.0.103396364975.issue36944@roundup.psfhosted.org> Message-ID: <1588905362.24.0.509496700524.issue36944@roundup.psfhosted.org> Paul Monson added the comment: Yes I think this can be closed. Thank you! ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 22:37:06 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 08 May 2020 02:37:06 +0000 Subject: [issue1648957] HP-UX: _ctypes/libffi/src/ia64/ffi/__attribute__/native cc Message-ID: <1588905426.05.0.696547274574.issue1648957@roundup.psfhosted.org> Change by Ned Deily : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 22:38:48 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 08 May 2020 02:38:48 +0000 Subject: [issue40555] pegen (PEP 617): bug in error handling In-Reply-To: <1588895336.21.0.583196255938.issue40555@roundup.psfhosted.org> Message-ID: <1588905528.03.0.720321674148.issue40555@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset db9163ceef31ba00ccb23226917f9c8e9142a0b8 by Pablo Galindo in branch 'master': bpo-40555: Check for p->error_indicator in loop rules after the main loop is done (GH-19986) https://github.com/python/cpython/commit/db9163ceef31ba00ccb23226917f9c8e9142a0b8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 22:39:00 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 08 May 2020 02:39:00 +0000 Subject: [issue40555] pegen (PEP 617): bug in error handling In-Reply-To: <1588895336.21.0.583196255938.issue40555@roundup.psfhosted.org> Message-ID: <1588905540.57.0.930070819232.issue40555@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 Thu May 7 22:38:51 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 08 May 2020 02:38:51 +0000 Subject: [issue36944] Add support for ARM64 to libffi In-Reply-To: <1558043538.34.0.103396364975.issue36944@roundup.psfhosted.org> Message-ID: <1588905531.47.0.24287845776.issue36944@roundup.psfhosted.org> Change by Ned Deily : ---------- resolution: out of date -> third party status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 22:45:05 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 08 May 2020 02:45:05 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588905905.3.0.658712253722.issue40334@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +19303 pull_request: https://github.com/python/cpython/pull/19987 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 22:47:09 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 08 May 2020 02:47:09 +0000 Subject: [issue25413] ctypes (libffi) fails to compile on Solaris X86 In-Reply-To: <1444919626.01.0.242398686702.issue25413@psf.upfronthosting.co.za> Message-ID: <1588906029.44.0.111942712644.issue25413@roundup.psfhosted.org> Ned Deily added the comment: As of Python 3.7, we no longer "vendor" a copy of the libffi source in Python source releases; you either need to use a system-supplied libffi, a third-party binary, or build it youself. Also Python 2.7 has reached end-of-life and is now frozen. So, if any libffi compile problems remain, they would need to be pursued with the libffi project. ---------- nosy: +ned.deily resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 22:51:58 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 08 May 2020 02:51:58 +0000 Subject: [issue26192] python3 k1om dissociation permanence: libffi In-Reply-To: <1453650595.09.0.833212655161.issue26192@psf.upfronthosting.co.za> Message-ID: <1588906318.36.0.157480054739.issue26192@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the patch and sorry for the long delay in replying. As you may know, as of Python 3.7, we no longer "vendor" a copy of the libffi source in Python source releases; you now have to use either a system-supplied version of libffi or otherwise supply your own copy of the library. So, if the changes to libffi are still needed, you would need to pursue them with the libffi project. ---------- nosy: +ned.deily resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 23:04:25 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 08 May 2020 03:04:25 +0000 Subject: [issue40556] test__xxsubinterpreters leaked [1486, 1484, 1484, 1484] references Message-ID: <1588907065.92.0.443788591369.issue40556@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : Minimal reproducer: ./python -m test test__xxsubinterpreters -m test_custom___reduce__ -R : 0:00:00 load avg: 3.20 Run tests sequentially 0:00:00 load avg: 3.20 [1/1] test__xxsubinterpreters beginning 9 repetitions 123456789 ......... test__xxsubinterpreters leaked [1486, 1484, 1484, 1484] references, sum=5938 test__xxsubinterpreters leaked [399, 398, 398, 398] memory blocks, sum=1593 test__xxsubinterpreters failed == Tests result: FAILURE == 1 test failed: test__xxsubinterpreters Total duration: 2.2 sec Bisecting points to: commit a1d9e0accd33af1d8e90fc48b34c13d7b07dcf57 Author: Eric Snow Date: Thu May 7 08:56:01 2020 -0600 bpo-32604: [_xxsubinterpreters] Propagate exceptions. (GH-19768) (Note: PEP 554 is not accepted and the implementation in the code base is a private one for use in the test suite.) If code running in a subinterpreter raises an uncaught exception then the "run" call in the calling interpreter fails. A RunFailedError is raised there that summarizes the original exception as a string. The actual exception type, __cause__, __context__, state, etc. are all discarded. This turned out to be functionally insufficient in practice. There is a more helpful solution (and PEP 554 has been updated appropriately). This change adds the exception propagation behavior described in PEP 554 to the _xxsubinterpreters module. With this change a copy of the original exception is set to __cause__ on the RunFailedError. For now we are using "pickle", which preserves the exception's state. We also preserve the original __cause__, __context__, and __traceback__ (since "pickle" does not preserve those). https://bugs.python.org/issue32604 Lib/test/test__xxsubinterpreters.py | 301 ++++++++- Modules/_xxsubinterpretersmodule.c | 1139 +++++++++++++++++++++++++++++++---- 2 files changed, 1317 insertions(+), 123 deletions(-) bisect run success ---------- components: Interpreter Core messages: 368411 nosy: eric.snow, pablogsal, vstinner priority: normal severity: normal status: open title: test__xxsubinterpreters leaked [1486, 1484, 1484, 1484] references type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 23:11:07 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 08 May 2020 03:11:07 +0000 Subject: [issue18499] mingw: setup _ctypes module with system libffi In-Reply-To: <1374179259.91.0.757433514975.issue18499@psf.upfronthosting.co.za> Message-ID: <1588907467.05.0.156199163897.issue18499@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the suggested patch and sorry that it has not been replied to earlier. As of Python 3.7, the libffi source for Unix-y platforms is no longer "vendored" in Python source releases; building ctypes now requires an external copy of libffi, either as supplied by the system, a third-party distribution, or by building yourself. If changes to setup.py are still needed to build with a current external libffi, please feel free to reopen this issue with a pull request against the current master branch. ---------- nosy: +ned.deily resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 23:20:02 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 08 May 2020 03:20:02 +0000 Subject: [issue14527] How to link with a non-system libffi? In-Reply-To: <1333851935.11.0.629390980004.issue14527@psf.upfronthosting.co.za> Message-ID: <1588908002.34.0.500794278166.issue14527@roundup.psfhosted.org> Ned Deily added the comment: See also earlier discussions in Issue31710, Issue34823, Issue40488, and Issue40535, closed as duplicated of this issue. ---------- stage: -> needs patch type: enhancement -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 23:21:22 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 08 May 2020 03:21:22 +0000 Subject: [issue31710] setup.py: _ctypes won't get built when system ffi is only in $PREFIX In-Reply-To: <1507266884.06.0.213398074469.issue31710@psf.upfronthosting.co.za> Message-ID: <1588908082.19.0.264398452934.issue31710@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the report and for the analysis. There have been a number of reports over the years about problems trying to build and/or execute Pythons with an external copy of libffi. They have become more pressing now that we no longer vendor the source of libffi in Python source releases. To help focus on the issues, we are consolidated the discussion in Issue14527, one of the earliest opened issues. ---------- nosy: +ned.deily resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> How to link with a non-system libffi? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 23:22:08 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 08 May 2020 03:22:08 +0000 Subject: =?utf-8?q?=5Bissue34823=5D_libffi_detection_doesn=E2=80=99t_work_in_my_se?= =?utf-8?q?tup?= In-Reply-To: <1538067503.8.0.545547206417.issue34823@psf.upfronthosting.co.za> Message-ID: <1588908128.82.0.984329397994.issue34823@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the report and for the analysis. There have been a number of reports over the years about problems trying to build and/or execute Pythons with an external copy of libffi. They have become more pressing now that we no longer vendor the source of libffi in Python source releases. To help focus on the issues, we are consolidated the discussion in Issue14527, one of the earliest opened issues. ---------- nosy: +ned.deily resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> How to link with a non-system libffi? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 23:23:51 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Fri, 08 May 2020 03:23:51 +0000 Subject: [issue40502] PyNode_New() does not initialize n->n_col_offset In-Reply-To: <1588616818.22.0.942372238929.issue40502@roundup.psfhosted.org> Message-ID: <1588908231.48.0.0439056492532.issue40502@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- keywords: +patch nosy: +nanjekyejoannah nosy_count: 1.0 -> 2.0 pull_requests: +19304 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19988 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 23:24:54 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 08 May 2020 03:24:54 +0000 Subject: [issue40535] While build python 3.8.2 in linux ctypes.so is using libffi.so.6 instead of libffi.so.7 In-Reply-To: <1588782183.35.0.376036230435.issue40535@roundup.psfhosted.org> Message-ID: <1588908294.67.0.0134691319713.issue40535@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the report and for the analysis. There have been a number of reports over the years about problems trying to build and/or execute Pythons with an external copy of libffi. They have become more pressing now that we no longer vendor the source of libffi in Python source releases. To help focus on the issues, we are consolidating the discussion in Issue14527, one of the earliest opened issues. ---------- nosy: +ned.deily -FFY00 resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> How to link with a non-system libffi? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 7 23:27:34 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 08 May 2020 03:27:34 +0000 Subject: [issue40488] setup.py shall search by default for libffi.so in /usr/local/lib64 In-Reply-To: <1588535648.17.0.424777794849.issue40488@roundup.psfhosted.org> Message-ID: <1588908454.03.0.957575285501.issue40488@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the report and for the analysis. There have been a number of reports over the years about problems trying to build and/or execute Pythons with an external copy of libffi. They have become more pressing now that we no longer vendor the source of libffi in Python source releases. To help focus on the issues, we are consolidating the discussion in Issue14527, one of the earliest opened issues. ---------- nosy: +ned.deily resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> How to link with a non-system libffi? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 01:01:24 2020 From: report at bugs.python.org (hai shi) Date: Fri, 08 May 2020 05:01:24 +0000 Subject: [issue40549] Convert posixmodule.c to multiphase initialization (PEP 489) In-Reply-To: <1588874748.21.0.997527577662.issue40549@roundup.psfhosted.org> Message-ID: <1588914084.82.0.766985919467.issue40549@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 01:07:03 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 08 May 2020 05:07:03 +0000 Subject: [issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs In-Reply-To: <1588884932.92.0.367303002443.issue40553@roundup.psfhosted.org> Message-ID: <1588914423.71.0.586791020424.issue40553@roundup.psfhosted.org> Terry J. Reedy added the comment: Zain, what I understand is: > python3.8 -m idlelib # To open idle from Terminal In IDLE, File=>New, then File=>SaveAs In dialog opened to Documents, enter name in Save As box, then click Save. For me 2012? Macbook Air with 10.14.6? Mohave and 3.8.3rc1, dialog disappears and the (blank) file is saved, with a confirmation dialog if name exits. For you, the Documents name list disappears and maybe something else (or vice versa) and the dialog freezes. I presume keys and clicks have no effect. The freezing itself is almost certainly an issue between macOS and tcl/tk 8.6.8. If you start IDLE in Terminal, does anything error message appear? The relevant IDLE code is idlelib.iomenu.IOBInding.asksavefile, which creates an instance of tkinter.filedialog.SaveAs and calls its show method, inherited from tkinter.commondialog.CommonDialog. The important line there is 's = w.tk.call(self.command, )', where the save as command is 'tk_getSaveFile'. This tk command is documented in https://www.tcl.tk/man/tcl8.6/TkCmd/getOpenFile.htm. There are Mac-specific items but nothing jumped out at me as significant for this issue. To debug, and test Raymond's hypothesis, someone please try this minimal (IDLE-free) code to show the dialog and print the return. (Interactive should work, at least on IDLE.) import tkinter as tk r = tk.Tk() print(r.tk.call('tk_getSaveFile')) This does not display a preview, even after selecting a location, such as Documents, on the 3rd line. If that works, try deleting the 'dir' option in the .show call. Other options in the SaveAs and show calls could be experimentally deleted if needed. If something works, we could use platform.mac_ver()[0].split('.')[1] to detect Catalina and switch to the workaround. ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 01:12:03 2020 From: report at bugs.python.org (Mariusz Felisiak) Date: Fri, 08 May 2020 05:12:03 +0000 Subject: [issue40557] Move captured_stdin(), captured_stdout(), and captured_stderr() to the public API. Message-ID: <1588914723.68.0.692041381493.issue40557@roundup.psfhosted.org> New submission from Mariusz Felisiak : I would like to propose making test.support.captured_stdin(), captured_stdout(), and captured_stderr() public APIs with guaranteed stability. These helpers are really useful and are stable for the last ~10 years. ---------- components: Tests messages: 368419 nosy: felixxm priority: normal severity: normal status: open title: Move captured_stdin(), captured_stdout(), and captured_stderr() to the public API. type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 01:12:39 2020 From: report at bugs.python.org (Mariusz Felisiak) Date: Fri, 08 May 2020 05:12:39 +0000 Subject: [issue40557] Move captured_stdin(), captured_stdout(), and captured_stderr() to the public API. In-Reply-To: <1588914723.68.0.692041381493.issue40557@roundup.psfhosted.org> Message-ID: <1588914759.57.0.433027152105.issue40557@roundup.psfhosted.org> Mariusz Felisiak added the comment: I can prepare a patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 01:25:57 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 08 May 2020 05:25:57 +0000 Subject: [issue40273] mappingproxy isn't reversible In-Reply-To: <1586786082.33.0.84219610791.issue40273@roundup.psfhosted.org> Message-ID: <1588915557.16.0.208417844208.issue40273@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 02fa0ea9c1073e4476c9bde3d7112f5dd964aa57 by Zackery Spytz in branch 'master': bpo-40273: Reversible mappingproxy (FH-19513) https://github.com/python/cpython/commit/02fa0ea9c1073e4476c9bde3d7112f5dd964aa57 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 01:30:03 2020 From: report at bugs.python.org (hai shi) Date: Fri, 08 May 2020 05:30:03 +0000 Subject: [issue40558] update CONTRIBUTING.rst docs Message-ID: <1588915803.68.0.575667736057.issue40558@roundup.psfhosted.org> New submission from hai shi : update the links of buildbot in CONTRIBUTING.rst. I don't know why I can not visit `http://buildbot.python.org/3.8.stable/` ---------- assignee: docs at python components: Documentation messages: 368422 nosy: docs at python, shihai1991 priority: normal severity: normal status: open title: update CONTRIBUTING.rst docs versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 01:32:23 2020 From: report at bugs.python.org (hai shi) Date: Fri, 08 May 2020 05:32:23 +0000 Subject: [issue40558] update CONTRIBUTING.rst docs In-Reply-To: <1588915803.68.0.575667736057.issue40558@roundup.psfhosted.org> Message-ID: <1588915943.15.0.186964726995.issue40558@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +19305 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19989 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 01:57:35 2020 From: report at bugs.python.org (Zachary Ware) Date: Fri, 08 May 2020 05:57:35 +0000 Subject: [issue40558] update CONTRIBUTING.rst docs In-Reply-To: <1588915803.68.0.575667736057.issue40558@roundup.psfhosted.org> Message-ID: <1588917455.16.0.0853602889298.issue40558@roundup.psfhosted.org> Zachary Ware added the comment: That redirect just didn't exist yet :). It now does, and I went ahead and added it for 3.9 ahead of time. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 02:51:12 2020 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 08 May 2020 06:51:12 +0000 Subject: [issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API In-Reply-To: <1588079870.34.0.984904607646.issue40421@roundup.psfhosted.org> Message-ID: <1588920672.64.0.913877124643.issue40421@roundup.psfhosted.org> Stefan Behnel added the comment: Adding to the list above: "f_lasti" is used in "libpython.py", which is an almost exact copy of the one in CPython's "Tools/gdb/" for debugging Python code in gdb. If that implementation changes, we can probably adapt, especially since it uses runtime generated code. I don't find a C function for this necessary at this point, given that CPython will also need to access its own internals here in some way. "f_localsplus" is used in the FASTCALL implementation and seems specific to Py3.6/7(?) which lacks the vectorcall protocol. So I guess it won't impact 3.8+ anymore. (The reason why its access is so complex is that StacklessPython has a slightly different frame struct, but we need to be binary(!) compatible with both.) "f_back" is used in the coroutine implementation for correct exception traceback building, and the usage is pretty much copied from CPython. I doubt that there is much use for setting it outside of "code that tries to reimplement CPython behaviour", but Cython has to do exactly that here. "f_lineno" is also used for traceback generation, because Cython creates frames when an exception occurs and needs to tell it what the current code line is. It's only used on newly created frames, although I can't guarantee that that will never change. Being able to read and set it seems reasonable. "f_trace" is obviously used for tracing/profiling, and there isn't currently a good C-API for that, besides talking to frame struct fields (which is quite efficient when it comes to performance). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 03:40:03 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 08 May 2020 07:40:03 +0000 Subject: [issue40559] Missing Py_DECREF in task_step_impl() in _asynciomodule.c Message-ID: <1588923603.03.0.898484918662.issue40559@roundup.psfhosted.org> New submission from Chris Jerdonek : There is a missing Py_DECREF in task_step_impl() in _asynciomodule.c: https://github.com/python/cpython/blob/02fa0ea9c1073e4476c9bde3d7112f5dd964aa57/Modules/_asynciomodule.c#L2641 It should have the form: if (clear_exc) { Py_DECREF(exc); } This was introduced here in 3.7: https://github.com/python/cpython/commit/bca4939d806170c3ca5d05f23710d11a8f1669cf I'm not sure of the likelihood of this ever getting triggered (it appears to be unlikely), but it should still be addressed. I will file a patch shortly. ---------- components: asyncio messages: 368425 nosy: asvetlov, chris.jerdonek, yselivanov priority: normal severity: normal status: open title: Missing Py_DECREF in task_step_impl() in _asynciomodule.c type: resource usage versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 03:54:28 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 08 May 2020 07:54:28 +0000 Subject: [issue40559] Missing Py_DECREF in task_step_impl() in _asynciomodule.c In-Reply-To: <1588923603.03.0.898484918662.issue40559@roundup.psfhosted.org> Message-ID: <1588924468.28.0.540774961331.issue40559@roundup.psfhosted.org> Chris Jerdonek added the comment: Here is the original issue: https://bugs.python.org/issue31185 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 04:01:58 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 08 May 2020 08:01:58 +0000 Subject: [issue40559] Missing Py_DECREF in task_step_impl() in _asynciomodule.c In-Reply-To: <1588923603.03.0.898484918662.issue40559@roundup.psfhosted.org> Message-ID: <1588924918.93.0.579052188205.issue40559@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- keywords: +patch pull_requests: +19306 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19990 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 04:07:36 2020 From: report at bugs.python.org (mirii1994) Date: Fri, 08 May 2020 08:07:36 +0000 Subject: [issue40544] Formatter exception when using logging.config.fileConfig In-Reply-To: <1588839744.95.0.946020207504.issue40544@roundup.psfhosted.org> Message-ID: <1588925256.25.0.863251246412.issue40544@roundup.psfhosted.org> Change by mirii1994 : ---------- keywords: +patch pull_requests: +19307 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 04:17:05 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 08 May 2020 08:17:05 +0000 Subject: [issue31185] Miscellaneous errors in asyncio speedup module In-Reply-To: <1502468898.65.0.496074575123.issue31185@psf.upfronthosting.co.za> Message-ID: <1588925825.37.0.18682696026.issue31185@roundup.psfhosted.org> Chris Jerdonek added the comment: FYI, there is a missing Py_DECREF from this change: https://bugs.python.org/issue40559 (though it's an obscure code path as mentioned elsewhere in these comments) ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 04:37:48 2020 From: report at bugs.python.org (Lars) Date: Fri, 08 May 2020 08:37:48 +0000 Subject: [issue40560] uuid.uuid4().hex not random Message-ID: <1588927068.65.0.578551628055.issue40560@roundup.psfhosted.org> New submission from Lars : Hi everybody I just noticed that the uuid.uuid4().hex command does not create fully random hex values. The character on the 13th position is always 4 and the 17th position is equally distributed 8,9,a,b. One million uuids follow following distribution. {'0': 62312, '1': 62626, '2': 62308, '3': 62801, '4': 62173, '5': 62622, '6': 62527, '7': 62310, '8': 62574, '9': 62314, 'a': 62575, 'b': 62472, 'c': 62500, 'd': 62229, 'e': 62813, 'f': 62844} {'0': 62239, '1': 63002, '2': 62551, '3': 62601, '4': 62075, '5': 62314, '6': 62584, '7': 62184, '8': 62359, '9': 62637, 'a': 63100, 'b': 62782, 'c': 62097, 'd': 62359, 'e': 62487, 'f': 62629} {'0': 62647, '1': 62649, '2': 62924, '3': 62555, '4': 62683, '5': 62435, '6': 62403, '7': 63010, '8': 62235, '9': 62412, 'a': 62320, 'b': 62081, 'c': 62795, 'd': 62329, 'e': 62420, 'f': 62102} {'0': 62641, '1': 62772, '2': 62458, '3': 62483, '4': 62201, '5': 62564, '6': 62307, '7': 62822, '8': 62102, '9': 62284, 'a': 62561, 'b': 62749, 'c': 62264, 'd': 62732, 'e': 62445, 'f': 62615} {'0': 62433, '1': 62815, '2': 62761, '3': 62355, '4': 62526, '5': 62464, '6': 62494, '7': 62116, '8': 62813, '9': 62556, 'a': 62722, 'b': 62440, 'c': 62634, 'd': 61967, 'e': 62425, 'f': 62479} {'0': 62544, '1': 62573, '2': 62774, '3': 62143, '4': 62814, '5': 62144, '6': 62207, '7': 62605, '8': 62567, '9': 62689, 'a': 62500, 'b': 62631, 'c': 62460, 'd': 62156, 'e': 62613, 'f': 62580} {'0': 62707, '1': 62315, '2': 62698, '3': 62260, '4': 62634, '5': 62145, '6': 62358, '7': 62725, '8': 61971, '9': 62559, 'a': 62341, 'b': 62846, 'c': 62650, 'd': 62527, 'e': 62712, 'f': 62552} {'0': 62477, '1': 62571, '2': 62672, '3': 62207, '4': 62798, '5': 62338, '6': 62381, '7': 62490, '8': 62478, '9': 62434, 'a': 62391, 'b': 62397, 'c': 62870, 'd': 62550, 'e': 62679, 'f': 62267} {'0': 62238, '1': 62361, '2': 62895, '3': 62525, '4': 62799, '5': 62763, '6': 62422, '7': 62621, '8': 62446, '9': 62160, 'a': 62636, 'b': 62601, 'c': 62331, 'd': 62342, 'e': 62156, 'f': 62704} {'0': 62668, '1': 62824, '2': 61820, '3': 62839, '4': 62107, '5': 62527, '6': 62497, '7': 62287, '8': 62881, '9': 62455, 'a': 62742, 'b': 62590, 'c': 62278, 'd': 62419, 'e': 62550, 'f': 62516} {'0': 62889, '1': 62561, '2': 62428, '3': 62696, '4': 63173, '5': 62220, '6': 62831, '7': 62762, '8': 62267, '9': 62065, 'a': 62737, 'b': 62064, 'c': 62520, 'd': 62593, 'e': 61960, 'f': 62234} {'0': 62441, '1': 62602, '2': 62799, '3': 62707, '4': 62200, '5': 62562, '6': 62359, '7': 62760, '8': 62530, '9': 62726, 'a': 62210, 'b': 62299, 'c': 62068, 'd': 62702, 'e': 62551, 'f': 62484} {'0': 0, '1': 0, '2': 0, '3': 0, '4': 1000000, '5': 0, '6': 0, '7': 0, '8': 0, '9': 0, 'a': 0, 'b': 0, 'c': 0, 'd': 0, 'e': 0, 'f': 0} {'0': 62660, '1': 62302, '2': 62128, '3': 62184, '4': 62560, '5': 62455, '6': 62847, '7': 62020, '8': 62474, '9': 62731, 'a': 61928, 'b': 62928, 'c': 62873, 'd': 62700, 'e': 62333, 'f': 62877} {'0': 62624, '1': 62754, '2': 62145, '3': 63135, '4': 62234, '5': 62211, '6': 62522, '7': 62568, '8': 62399, '9': 62343, 'a': 62628, 'b': 62299, 'c': 62575, 'd': 62551, 'e': 62516, 'f': 62496} {'0': 62395, '1': 62461, '2': 62466, '3': 62501, '4': 62121, '5': 62691, '6': 62874, '7': 62683, '8': 62553, '9': 62640, 'a': 62748, 'b': 62110, 'c': 62301, 'd': 62152, 'e': 62366, 'f': 62938} {'0': 0, '1': 0, '2': 0, '3': 0, '4': 0, '5': 0, '6': 0, '7': 0, '8': 251093, '9': 249017, 'a': 249806, 'b': 250084, 'c': 0, 'd': 0, 'e': 0, 'f': 0} {'0': 62685, '1': 62833, '2': 61989, '3': 62360, '4': 62187, '5': 62702, '6': 62745, '7': 62988, '8': 62085, '9': 62504, 'a': 62657, 'b': 62472, 'c': 62194, 'd': 62381, 'e': 62474, 'f': 62744} {'0': 63046, '1': 62392, '2': 62144, '3': 62466, '4': 62042, '5': 62444, '6': 62820, '7': 62685, '8': 62528, '9': 62596, 'a': 62354, 'b': 62885, 'c': 62151, 'd': 62183, 'e': 62568, 'f': 62696} {'0': 62775, '1': 62743, '2': 61955, '3': 62635, '4': 62272, '5': 62251, '6': 62697, '7': 62829, '8': 62668, '9': 62860, 'a': 62579, 'b': 62267, 'c': 62457, 'd': 62267, 'e': 62288, 'f': 62457} {'0': 62195, '1': 62646, '2': 62442, '3': 62798, '4': 62356, '5': 62739, '6': 62541, '7': 62298, '8': 62400, '9': 62496, 'a': 62418, 'b': 62329, 'c': 62786, 'd': 62668, 'e': 62183, 'f': 62705} {'0': 62390, '1': 62260, '2': 62653, '3': 62376, '4': 63093, '5': 62338, '6': 62342, '7': 62834, '8': 62499, '9': 62300, 'a': 62585, 'b': 62358, 'c': 62625, 'd': 62720, 'e': 62433, 'f': 62194} {'0': 62224, '1': 62687, '2': 62713, '3': 62294, '4': 62880, '5': 62143, '6': 62584, '7': 62577, '8': 62526, '9': 62433, 'a': 62771, 'b': 62751, 'c': 62546, 'd': 62465, 'e': 62192, 'f': 62214} {'0': 62567, '1': 62452, '2': 62627, '3': 62544, '4': 62417, '5': 62019, '6': 62439, '7': 62482, '8': 62420, '9': 62874, 'a': 62716, 'b': 62342, 'c': 62550, 'd': 62387, 'e': 62672, 'f': 62492} {'0': 62314, '1': 62519, '2': 62718, '3': 62564, '4': 62209, '5': 62574, '6': 63005, '7': 62524, '8': 62115, '9': 62935, 'a': 62558, 'b': 62266, 'c': 62186, 'd': 61994, 'e': 62924, 'f': 62595} {'0': 62564, '1': 62153, '2': 62690, '3': 62979, '4': 62226, '5': 62520, '6': 62391, '7': 62340, '8': 62323, '9': 62260, 'a': 62433, 'b': 62860, 'c': 62526, 'd': 62725, 'e': 62853, 'f': 62157} {'0': 62362, '1': 62677, '2': 62611, '3': 62040, '4': 62471, '5': 62357, '6': 62707, '7': 62403, '8': 62644, '9': 62516, 'a': 62395, 'b': 62521, 'c': 62543, 'd': 62762, 'e': 62271, 'f': 62720} {'0': 62645, '1': 62458, '2': 62556, '3': 62666, '4': 62522, '5': 62381, '6': 62372, '7': 62609, '8': 62760, '9': 62325, 'a': 62294, 'b': 62771, 'c': 62094, 'd': 62811, 'e': 62389, 'f': 62347} {'0': 62112, '1': 62630, '2': 62546, '3': 62684, '4': 62646, '5': 62590, '6': 62593, '7': 62800, '8': 62462, '9': 62216, 'a': 62166, 'b': 62629, 'c': 62160, 'd': 62106, 'e': 62567, 'f': 63093} {'0': 61958, '1': 62520, '2': 62275, '3': 62671, '4': 62677, '5': 62971, '6': 62886, '7': 62383, '8': 62533, '9': 62743, 'a': 62678, 'b': 62361, 'c': 62598, 'd': 62047, 'e': 62654, 'f': 62045} {'0': 62483, '1': 62714, '2': 62778, '3': 62095, '4': 62633, '5': 62754, '6': 62677, '7': 62335, '8': 62313, '9': 62631, 'a': 62604, 'b': 62282, 'c': 62564, 'd': 62597, 'e': 62222, 'f': 62318} {'0': 62413, '1': 62459, '2': 62568, '3': 62493, '4': 62413, '5': 62809, '6': 63157, '7': 62755, '8': 62592, '9': 62153, 'a': 62097, 'b': 62332, 'c': 62628, 'd': 62258, 'e': 62371, 'f': 62502} ---------- components: Extension Modules messages: 368428 nosy: KingUdo priority: normal severity: normal status: open title: uuid.uuid4().hex not random versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 05:15:35 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Fri, 08 May 2020 09:15:35 +0000 Subject: [issue40560] uuid.uuid4().hex not random In-Reply-To: <1588927068.65.0.578551628055.issue40560@roundup.psfhosted.org> Message-ID: <1588929335.04.0.605505566333.issue40560@roundup.psfhosted.org> R?mi Lapeyre added the comment: This is expected, while part of them are randomly generated, some bits are always set: https://tools.ietf.org/html/rfc4122#section-4.1.3. This let you know that the UUID you have is a version 4 just by looking at it, it's not a bug. ---------- components: +Library (Lib) -Extension Modules nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 05:39:04 2020 From: report at bugs.python.org (Lars) Date: Fri, 08 May 2020 09:39:04 +0000 Subject: [issue40560] uuid.uuid4().hex not random In-Reply-To: <1588927068.65.0.578551628055.issue40560@roundup.psfhosted.org> Message-ID: <1588930744.52.0.0569128378497.issue40560@roundup.psfhosted.org> Lars added the comment: Ok that makes sense. Thanks for letting me know. Should have read the doku more precisely. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 05:46:45 2020 From: report at bugs.python.org (Antoine Wecxsteen) Date: Fri, 08 May 2020 09:46:45 +0000 Subject: [issue40552] Enhance for loop and copy example in tutorial In-Reply-To: <1588884503.92.0.729674513869.issue40552@roundup.psfhosted.org> Message-ID: <1588931205.99.0.613384965692.issue40552@roundup.psfhosted.org> Change by Antoine Wecxsteen : ---------- keywords: +patch nosy: +awecx nosy_count: 2.0 -> 3.0 pull_requests: +19309 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19992 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 05:49:18 2020 From: report at bugs.python.org (Antoine Wecxsteen) Date: Fri, 08 May 2020 09:49:18 +0000 Subject: [issue40552] Enhance for loop and copy example in tutorial In-Reply-To: <1588884503.92.0.729674513869.issue40552@roundup.psfhosted.org> Message-ID: <1588931358.23.0.615006854877.issue40552@roundup.psfhosted.org> Antoine Wecxsteen added the comment: I've issued https://github.com/python/cpython/pull/19992. I've changed the names mdk suggested to give an example of using non-ascii characters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 06:54:42 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 08 May 2020 10:54:42 +0000 Subject: [issue40559] Missing Py_DECREF in task_step_impl() in _asynciomodule.c In-Reply-To: <1588923603.03.0.898484918662.issue40559@roundup.psfhosted.org> Message-ID: <1588935282.14.0.221986700705.issue40559@roundup.psfhosted.org> Chris Jerdonek added the comment: New changeset d2c349b190bcba21a4a38e6520a48ad97a9f1529 by Chris Jerdonek in branch 'master': bpo-40559: Add Py_DECREF to _asynciomodule.c:task_step_impl() (GH-19990) https://github.com/python/cpython/commit/d2c349b190bcba21a4a38e6520a48ad97a9f1529 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 06:54:59 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 08 May 2020 10:54:59 +0000 Subject: [issue40559] Missing Py_DECREF in task_step_impl() in _asynciomodule.c In-Reply-To: <1588923603.03.0.898484918662.issue40559@roundup.psfhosted.org> Message-ID: <1588935299.96.0.610034331888.issue40559@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +19310 pull_request: https://github.com/python/cpython/pull/19995 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 06:55:07 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 08 May 2020 10:55:07 +0000 Subject: [issue40559] Missing Py_DECREF in task_step_impl() in _asynciomodule.c In-Reply-To: <1588923603.03.0.898484918662.issue40559@roundup.psfhosted.org> Message-ID: <1588935307.1.0.287467159815.issue40559@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19311 pull_request: https://github.com/python/cpython/pull/19996 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 07:28:42 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 08 May 2020 11:28:42 +0000 Subject: [issue40559] Missing Py_DECREF in task_step_impl() in _asynciomodule.c In-Reply-To: <1588923603.03.0.898484918662.issue40559@roundup.psfhosted.org> Message-ID: <1588937322.58.0.200295669422.issue40559@roundup.psfhosted.org> Chris Jerdonek added the comment: New changeset 0e4a5e96f011989736bde824ab817146bd7c9cfc by Miss Islington (bot) in branch '3.8': [3.8] bpo-40559: Add Py_DECREF to _asynciomodule.c:task_step_impl() (GH-19990) https://github.com/python/cpython/commit/0e4a5e96f011989736bde824ab817146bd7c9cfc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 07:30:34 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 08 May 2020 11:30:34 +0000 Subject: [issue40559] Missing Py_DECREF in task_step_impl() in _asynciomodule.c In-Reply-To: <1588923603.03.0.898484918662.issue40559@roundup.psfhosted.org> Message-ID: <1588937434.57.0.172162223134.issue40559@roundup.psfhosted.org> Chris Jerdonek added the comment: New changeset 25014289887cb521c1041df4773c839d3fbf784e by Miss Islington (bot) in branch '3.7': [3.7] bpo-40559: Add Py_DECREF to _asynciomodule.c:task_step_impl() (GH-19990) https://github.com/python/cpython/commit/25014289887cb521c1041df4773c839d3fbf784e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 07:47:23 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 08 May 2020 11:47:23 +0000 Subject: [issue40559] Missing Py_DECREF in task_step_impl() in _asynciomodule.c In-Reply-To: <1588923603.03.0.898484918662.issue40559@roundup.psfhosted.org> Message-ID: <1588938443.82.0.0231435491579.issue40559@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 08:34:40 2020 From: report at bugs.python.org (Brad Solomon) Date: Fri, 08 May 2020 12:34:40 +0000 Subject: [issue40561] Provide docstrings for public-facing webbrowser functions Message-ID: <1588941280.97.0.150032786212.issue40561@roundup.psfhosted.org> New submission from Brad Solomon : Currently 'pydoc webbrowser.open' simply displays the function signature without a useful explanation of what 'new' does (and the parameter name/value set is not intuitive by name alone). ---------- assignee: docs at python components: Documentation messages: 368435 nosy: bsolomon1124, docs at python priority: normal severity: normal status: open title: Provide docstrings for public-facing webbrowser functions type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 08:35:33 2020 From: report at bugs.python.org (Brad Solomon) Date: Fri, 08 May 2020 12:35:33 +0000 Subject: [issue40561] Provide docstrings for public-facing webbrowser functions In-Reply-To: <1588941280.97.0.150032786212.issue40561@roundup.psfhosted.org> Message-ID: <1588941333.87.0.0470118770795.issue40561@roundup.psfhosted.org> Change by Brad Solomon : ---------- keywords: +patch pull_requests: +19312 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19999 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 09:01:17 2020 From: report at bugs.python.org (Furkan Onder) Date: Fri, 08 May 2020 13:01:17 +0000 Subject: [issue34431] Docs does not eval allows code object as argument In-Reply-To: <1534608199.83.0.56676864532.issue34431@psf.upfronthosting.co.za> Message-ID: <1588942877.56.0.986272373018.issue34431@roundup.psfhosted.org> Change by Furkan Onder : ---------- keywords: +patch nosy: +furkanonder nosy_count: 4.0 -> 5.0 pull_requests: +19313 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20000 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 09:16:27 2020 From: report at bugs.python.org (hai shi) Date: Fri, 08 May 2020 13:16:27 +0000 Subject: [issue40558] update CONTRIBUTING.rst docs In-Reply-To: <1588915803.68.0.575667736057.issue40558@roundup.psfhosted.org> Message-ID: <1588943787.21.0.226410136541.issue40558@roundup.psfhosted.org> hai shi added the comment: > That redirect just didn't exist yet :). It now does, and I went ahead and added it for 3.9 ahead of time. Thanks, Zachary. It worked. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 09:40:17 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 08 May 2020 13:40:17 +0000 Subject: [issue40532] Persmission error In-Reply-To: <1588775325.08.0.437728334126.issue40532@roundup.psfhosted.org> Message-ID: <1588945217.86.0.26934495642.issue40532@roundup.psfhosted.org> Eric V. Smith added the comment: I'm going to close this. @Coder436: If you have more information that points to a python bug, please attach it and reopen this issue. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 09:44:01 2020 From: report at bugs.python.org (Domenico Ragusa) Date: Fri, 08 May 2020 13:44:01 +0000 Subject: [issue40506] add support for os.Pathlike filenames in zipfile.ZipFile.writestr In-Reply-To: <1588644723.41.0.516863649113.issue40506@roundup.psfhosted.org> Message-ID: <1588945441.0.0.951357092225.issue40506@roundup.psfhosted.org> Change by Domenico Ragusa : ---------- pull_requests: +19314 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20002 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 09:58:16 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 08 May 2020 13:58:16 +0000 Subject: [issue39685] Python 3.8 regression Socket operation on non-socket In-Reply-To: <1582092460.6.0.713532643736.issue39685@roundup.psfhosted.org> Message-ID: <1588946296.79.0.747877571111.issue39685@roundup.psfhosted.org> Christian Heimes added the comment: I don't consider this a regression. socket.fromfd() and socket(fd) never supported non-socket fds. It just happens to work in some cases by chance. It looks like sshuttle got lucky in the past. It never called a function that ultimately requires a socket fd. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 10:06:32 2020 From: report at bugs.python.org (Eisuke Kawashima) Date: Fri, 08 May 2020 14:06:32 +0000 Subject: [issue40426] Unable to use lowercase hexadecimal digits for percent encoding In-Reply-To: <1588097651.68.0.271507304283.issue40426@roundup.psfhosted.org> Message-ID: <1588946792.83.0.647803677288.issue40426@roundup.psfhosted.org> Eisuke Kawashima added the comment: I require lower hex digits for percent encoding, which is allowed by the RFC. Small modifications of the codes can achieve it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 10:19:05 2020 From: report at bugs.python.org (Big Stone) Date: Fri, 08 May 2020 14:19:05 +0000 Subject: [issue39645] Expand concurrent.futures.Future's public API In-Reply-To: <1581838685.03.0.542500965222.issue39645@roundup.psfhosted.org> Message-ID: <1588947545.78.0.358592010096.issue39645@roundup.psfhosted.org> Big Stone added the comment: it seems this feature would interest Dask team. https://github.com/dask/distributed/issues/3695 ---------- nosy: +Big Stone _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 10:27:09 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 08 May 2020 14:27:09 +0000 Subject: [issue40426] Unable to use lowercase hexadecimal digits for percent encoding In-Reply-To: <1588097651.68.0.271507304283.issue40426@roundup.psfhosted.org> Message-ID: <1588948029.46.0.476276434965.issue40426@roundup.psfhosted.org> Christian Heimes added the comment: I'm -0 on the new argument. Why do you require a lower case string here? ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 10:35:12 2020 From: report at bugs.python.org (Simon Willison) Date: Fri, 08 May 2020 14:35:12 +0000 Subject: [issue40562] SEO: differentiate between Python 2 and Python 3 docs on Google SERP Message-ID: <1588948512.43.0.0539170221338.issue40562@roundup.psfhosted.org> New submission from Simon Willison : When I search Google for a Python related term (e.g. "sqlite3 row" - see attached screenshot) I get back two results - one for the Python 2 documentation and one for the Python 3 documentation. There is currently no indicator which result is for which version of Python. Comparing https://docs.python.org/3/library/sqlite3.html with https://docs.python.org/2/library/sqlite3.html I think the problem is the way the title elements are designed: sqlite3 ? DB-API 2.0 interface for SQLite databases ? Python 3.8.3rc1 documentation v.s. 11.13. sqlite3 ? DB-API 2.0 interface for SQLite databases - Python 2.7.18 documentation As you can see in the attached screenshot, Google (at least in my desktop browser) chooses to truncate those titles before they get to the bit indicating the version of Python. It may be worth consulting with Google directly about the best way to address this. Moving the Python version indicator to the start of the title may or may not be the best approach. ---------- assignee: docs at python components: Documentation files: sqlite3_row_-_Google_Search.png messages: 368442 nosy: docs at python, simonw priority: normal severity: normal status: open title: SEO: differentiate between Python 2 and Python 3 docs on Google SERP versions: Python 3.9 Added file: https://bugs.python.org/file49141/sqlite3_row_-_Google_Search.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 10:50:27 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 08 May 2020 14:50:27 +0000 Subject: [issue40426] Unable to use lowercase hexadecimal digits for percent encoding In-Reply-To: <1588097651.68.0.271507304283.issue40426@roundup.psfhosted.org> Message-ID: <1588949427.1.0.335781808475.issue40426@roundup.psfhosted.org> Serhiy Storchaka added the comment: But they are not required, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 10:52:45 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 08 May 2020 14:52:45 +0000 Subject: [issue40426] Unable to use lowercase hexadecimal digits for percent encoding In-Reply-To: <1588097651.68.0.271507304283.issue40426@roundup.psfhosted.org> Message-ID: <1588949565.4.0.871710409362.issue40426@roundup.psfhosted.org> Christian Heimes added the comment: No, they are not required. RFC 3986 recommends upper case and says that upper and lower case percent encoding are equivalent: The uppercase hexadecimal digits 'A' through 'F' are equivalent to the lowercase digits 'a' through 'f', respectively. If two URIs differ only in the case of hexadecimal digits used in percent-encoded octets, they are equivalent. For consistency, URI producers and normalizers should use uppercase hexadecimal digits for all percent- encodings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 10:53:18 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 08 May 2020 14:53:18 +0000 Subject: [issue40541] Add optional weights parameter to random.sample() In-Reply-To: <1588804520.3.0.249071627671.issue40541@roundup.psfhosted.org> Message-ID: <1588949598.81.0.22548628595.issue40541@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 81a5fc38e81b424869f4710f48e9371dfa2d3b77 by Raymond Hettinger in branch 'master': bpo-40541: Add optional *counts* parameter to random.sample() (GH-19970) https://github.com/python/cpython/commit/81a5fc38e81b424869f4710f48e9371dfa2d3b77 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 10:53:54 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 08 May 2020 14:53:54 +0000 Subject: [issue40541] Add optional weights parameter to random.sample() In-Reply-To: <1588804520.3.0.249071627671.issue40541@roundup.psfhosted.org> Message-ID: <1588949634.32.0.751244067319.issue40541@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 10:55:55 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Fri, 08 May 2020 14:55:55 +0000 Subject: [issue40563] Support pathlike objects on dbm/shelve Message-ID: <1588949755.54.0.0616905460961.issue40563@roundup.psfhosted.org> New submission from Batuhan Taskaya : >>> dbm.open("/tmp/x.db", "n").close() >>> from pathlib import Path >>> tmp = Path("/tmp") >>> dbm.open(tmp / "x.db", "n").close() Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.9/dbm/__init__.py", line 95, in open return mod.open(file, flag, mode) TypeError: open() argument 1 must be str, not PosixPath ---------- components: Library (Lib) keywords: easy messages: 368446 nosy: BTaskaya priority: normal severity: normal status: open title: Support pathlike objects on dbm/shelve versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 11:08:54 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 08 May 2020 15:08:54 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1588950534.29.0.00496265152209.issue40334@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +19315 pull_request: https://github.com/python/cpython/pull/20003 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 11:12:23 2020 From: report at bugs.python.org (Hakan) Date: Fri, 08 May 2020 15:12:23 +0000 Subject: [issue40563] Support pathlike objects on dbm/shelve In-Reply-To: <1588949755.54.0.0616905460961.issue40563@roundup.psfhosted.org> Message-ID: <1588950743.2.0.258384156162.issue40563@roundup.psfhosted.org> Hakan added the comment: I work on this issue to fix it. ---------- nosy: +hakancelik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 11:36:43 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 08 May 2020 15:36:43 +0000 Subject: [issue40562] SEO: differentiate between Python 2 and Python 3 docs on Google SERP In-Reply-To: <1588948512.43.0.0539170221338.issue40562@roundup.psfhosted.org> Message-ID: <1588952203.09.0.915984095506.issue40562@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +mdk, willingc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 11:45:48 2020 From: report at bugs.python.org (Simon Willison) Date: Fri, 08 May 2020 15:45:48 +0000 Subject: [issue40562] SEO: differentiate between Python 2 and Python 3 docs on Google SERP In-Reply-To: <1588948512.43.0.0539170221338.issue40562@roundup.psfhosted.org> Message-ID: <1588952748.68.0.144484027516.issue40562@roundup.psfhosted.org> Simon Willison added the comment: I asked about this on Twitter and got a couple of tips from Google engineers: https://twitter.com/simonw/status/1258767730263552000 It sounds like a good solution would be to explicitly design the breadcrumbs using this mechanism: https://developers.google.com/search/docs/data-types/breadcrumb?hl=en#json-ld Maybe "docs.python.org > Python 3.8 > sqlite3" would be a good fix here? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 11:47:01 2020 From: report at bugs.python.org (Xavier) Date: Fri, 08 May 2020 15:47:01 +0000 Subject: [issue40564] Using zipfile.Path with several files prematurely closes zip Message-ID: <1588952821.29.0.991302590341.issue40564@roundup.psfhosted.org> New submission from Xavier : Given a .zip file with more than one inner file, when reading those inner files using zipfile.Path the zip module closes the .zip file prematurely, causing an error. Given the following code (example zipfile is attached, but any should work). with zipfile.ZipFile('foo.zip') as file: for name in ['file-1.txt', 'file-2.txt']: p = zipfile.Path(file, name) with p.open() as inner: print(list(inner)) # ValueError: seek of closed file But the following code does not fail: with zipfile.ZipFile('foo.zip') as file: for name in ['file-1.txt', 'file-2.txt']: with file.open(name) as inner: print(list(inner)) # Works! Python 3.8.2 macOS 10.15.4. ---------- components: IO files: zipfile.zip messages: 368449 nosy: bustawin priority: normal severity: normal status: open title: Using zipfile.Path with several files prematurely closes zip type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file49142/zipfile.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 12:06:59 2020 From: report at bugs.python.org (=?utf-8?b?aGFsaWwgaWJyYWhpbSB5xLFsZMSxcsSxbQ==?=) Date: Fri, 08 May 2020 16:06:59 +0000 Subject: [issue40565] is comparison returns False while ids are the same. Message-ID: <1588954019.78.0.804890045362.issue40565@roundup.psfhosted.org> New submission from halil ibrahim y?ld?r?m : While id(a[:]) and id(a[0:3]) are the same however is comparison returns False. I thought it could be a bug. >>> a = [1, 2, 3] >>> id(a[:]) == id(a[0:3]) True >>> a[:] is a[0:3] False ---------- files: 2020-05-07_16-47-56-afa654f51735fad98b3a593a2ea539fd.png messages: 368450 nosy: ihalil95 priority: normal pull_requests: 19316 severity: normal status: open title: is comparison returns False while ids are the same. type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file49143/2020-05-07_16-47-56-afa654f51735fad98b3a593a2ea539fd.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 12:10:47 2020 From: report at bugs.python.org (rb) Date: Fri, 08 May 2020 16:10:47 +0000 Subject: [issue31861] add aiter() and anext() functions to operator module In-Reply-To: <1508851575.6.0.213398074469.issue31861@psf.upfronthosting.co.za> Message-ID: <1588954247.8.0.35948396429.issue31861@roundup.psfhosted.org> Change by rb : ---------- nosy: +rb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 12:21:11 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 08 May 2020 16:21:11 +0000 Subject: [issue40565] is comparison returns False while ids are the same. In-Reply-To: <1588954019.78.0.804890045362.issue40565@roundup.psfhosted.org> Message-ID: <1588954871.73.0.548403330608.issue40565@roundup.psfhosted.org> Eric V. Smith added the comment: This isn't doing what you think. Because you throw away the object after computing its id, the same memory is reused and you get the same id. Consider: >>> a = [1,2,3] >>> b = [3,4,5] >>> id(a[:]) == id(b[:]) True There's no problem here, but it does show that you need to be careful with "is" and "id". ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 12:37:38 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 08 May 2020 16:37:38 +0000 Subject: [issue40566] Apply PEP 573 to abc module Message-ID: <1588955858.55.0.304534831437.issue40566@roundup.psfhosted.org> New submission from Dong-hee Na : Since PEP 573 is landed, we can apply the PEP 573 to abc module. ---------- assignee: corona10 components: Interpreter Core messages: 368452 nosy: corona10, vstinner priority: normal severity: normal status: open title: Apply PEP 573 to abc module type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 12:40:03 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 08 May 2020 16:40:03 +0000 Subject: [issue40566] Apply PEP 573 to abc module In-Reply-To: <1588955858.55.0.304534831437.issue40566@roundup.psfhosted.org> Message-ID: <1588956003.46.0.193093919884.issue40566@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +19317 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20005 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 12:52:16 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 08 May 2020 16:52:16 +0000 Subject: [issue40564] Using zipfile.Path with several files prematurely closes zip In-Reply-To: <1588952821.29.0.991302590341.issue40564@roundup.psfhosted.org> Message-ID: <1588956736.97.0.797490231807.issue40564@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: +jaraco _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 14:51:03 2020 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Fri, 08 May 2020 18:51:03 +0000 Subject: [issue40567] asyncio.StreadReader `async for line in reader` is not documented Message-ID: <1588963863.42.0.83198949226.issue40567@roundup.psfhosted.org> New submission from ???? ????????? : Actually it works. But it is not documented. Please ad docs. ---------- components: asyncio messages: 368453 nosy: asvetlov, socketpair, yselivanov priority: normal severity: normal status: open title: asyncio.StreadReader `async for line in reader` is not documented versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 14:51:13 2020 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Fri, 08 May 2020 18:51:13 +0000 Subject: [issue40567] asyncio.StreadReader `async for line in reader` is not documented In-Reply-To: <1588963863.42.0.83198949226.issue40567@roundup.psfhosted.org> Message-ID: <1588963873.36.0.0809275813972.issue40567@roundup.psfhosted.org> Change by ???? ????????? : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 15:08:57 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 08 May 2020 19:08:57 +0000 Subject: [issue40568] Modify -c command-line option to accept multiple inputs Message-ID: <1588964937.68.0.986339822686.issue40568@roundup.psfhosted.org> New submission from Raymond Hettinger : It would be nice to write this: $ python -c 'from math import *' 'print(e**(1j * pi))' Instead of this: $ python -c 'from math import *; print(e**(1j * pi))' (-1+1.22464679915e-16j) That would also make it possible input an indented block: $ python -c 'with open("somefile.txt") as f:' ' s = f.read()' ' print(len(s))' This feature would be especially useful in bash scripts. FWIW, the timeit module already supports this convenience: $ python -m timeit -s 'from math import sqrt' -s 'x = 5' 'y = x ** 2' 'z = sqrt(y)' 10000000 loops, best of 3: 0.0819 usec per loop ---------- components: Interpreter Core messages: 368454 nosy: rhettinger priority: normal severity: normal status: open title: Modify -c command-line option to accept multiple inputs type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 15:15:58 2020 From: report at bugs.python.org (Eisuke Kawashima) Date: Fri, 08 May 2020 19:15:58 +0000 Subject: [issue40426] Unable to use lowercase hexadecimal digits for percent encoding In-Reply-To: <1588097651.68.0.271507304283.issue40426@roundup.psfhosted.org> Message-ID: <1588965358.38.0.985812732331.issue40426@roundup.psfhosted.org> Eisuke Kawashima added the comment: > Why do you require a lower case string here? Well, I want to use urllib.parse.quote to escape special characters, such as ()[]#*/\, in filenames, and for visibility lower hex digits are preferable. PR 19766 does not break compatibility. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 15:16:46 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Fri, 08 May 2020 19:16:46 +0000 Subject: [issue40568] Modify -c command-line option to accept multiple inputs In-Reply-To: <1588964937.68.0.986339822686.issue40568@roundup.psfhosted.org> Message-ID: <1588965406.24.0.892217206218.issue40568@roundup.psfhosted.org> Batuhan Taskaya added the comment: @rhettinger can you clarify how does this arguments act on argv? Should they be hidden like the first argument, or should they remain visible as a passing argument? $ python -c 'import sys;print(sys.argv)' ['-c'] $ python -c 'import sys;print(sys.argv)' 'print("another")' 'print("another1")' ['-c', 'print("another")', 'print("another1")'] ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 15:24:39 2020 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 08 May 2020 19:24:39 +0000 Subject: [issue40503] PEP 615: Add zoneinfo module In-Reply-To: <1588618281.16.0.913416553136.issue40503@roundup.psfhosted.org> Message-ID: <1588965879.58.0.600067000231.issue40503@roundup.psfhosted.org> Change by Paul Ganssle : ---------- pull_requests: +19318 pull_request: https://github.com/python/cpython/pull/20006 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 15:31:34 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 08 May 2020 19:31:34 +0000 Subject: [issue40565] is comparison returns False while ids are the same. In-Reply-To: <1588954019.78.0.804890045362.issue40565@roundup.psfhosted.org> Message-ID: <1588966294.23.0.472405196061.issue40565@roundup.psfhosted.org> Terry J. Reedy added the comment: python-list mailing list, mail.python.org, is one good place to ask "Is this a bug?" ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 15:56:47 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 08 May 2020 19:56:47 +0000 Subject: [issue40569] Add optional weights to random.sample() Message-ID: <1588967807.85.0.49094872953.issue40569@roundup.psfhosted.org> New submission from Raymond Hettinger : Weighted sampling without replacement isn't easy for a user to do with the current tooling. There is a StackOverflow question about how to do it. Also, this service is currently offered by numpy. Use it like this: >>> sample(['katniss', 'prim', 'gale', 'peeta'] , weights=[20, 1, 42, 10], k=2) ['prim', 'peeta'] Here's an efficient implementation similar to how numpy does it: --- a/Lib/random.py +++ b/Lib/random.py @@ -331,7 +331,7 @@ class Random(_random.Random): j = _int(random() * (i+1)) x[i], x[j] = x[j], x[i] - def sample(self, population, k, *, counts=None): + def sample(self, population, k, *, counts=None, weights=None): """Chooses k unique random elements from a population sequence or set. Returns a new list containing elements from the population while @@ -392,6 +392,18 @@ class Random(_random.Random): if not isinstance(population, _Sequence): raise TypeError("Population must be a sequence. For dicts or sets, use sorted(d).") n = len(population) + if weights is not None: + if counts is not None: + raise TypeError('Cannot specify both counts and weights') + weights = list(weights) + positions = range(n) + indices = [] + while (needed := k - len(indices)): + for i in choices(positions, weights, k=needed): + if weights[i]: + weights[i] = 0.0 + indices.append(i) + return [population[i] for i in indices] if counts is not None: cum_counts = list(_accumulate(counts)) if len(cum_counts) != n: ---------- components: Library (Lib) messages: 368458 nosy: mark.dickinson, rhettinger, tim.peters priority: normal severity: normal status: open title: Add optional weights to random.sample() type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 16:02:20 2020 From: report at bugs.python.org (David Tucker) Date: Fri, 08 May 2020 20:02:20 +0000 Subject: [issue40570] len(platform.uname()) has changed in Python 3.9 Message-ID: <1588968140.85.0.743964408101.issue40570@roundup.psfhosted.org> New submission from David Tucker : https://github.com/python/cpython/commit/518835f3354d6672e61c9f52348c1e4a2533ea00#diff-47c8e5750258a08a6dd9de3e9c3774acL741-R804 That diff changed len(platform.uname()) to 5 (from 6). I noticed because we have some code that checks for 6 strs (arguably unnecessary), but I can also think of contrived examples that would break (e.g. platform.uname()[-3]). Interestingly, platform.uname()[5] still works. Was this effect intentional? ---------- components: Library (Lib) messages: 368459 nosy: tucked priority: normal severity: normal status: open title: len(platform.uname()) has changed in Python 3.9 type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 16:10:40 2020 From: report at bugs.python.org (jack1142) Date: Fri, 08 May 2020 20:10:40 +0000 Subject: [issue34790] Deprecate passing coroutine objects to asyncio.wait() In-Reply-To: <1537807353.36.0.956365154283.issue34790@psf.upfronthosting.co.za> Message-ID: <1588968640.51.0.455718615195.issue34790@roundup.psfhosted.org> Change by jack1142 : ---------- nosy: +jack1142 nosy_count: 7.0 -> 8.0 pull_requests: +19319 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20008 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 16:21:49 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 08 May 2020 20:21:49 +0000 Subject: [issue40474] Code coverage report not entirely accurate In-Reply-To: <1588381882.86.0.0551558198731.issue40474@roundup.psfhosted.org> Message-ID: <1588969309.41.0.325605292683.issue40474@roundup.psfhosted.org> Terry J. Reedy added the comment: Use git to find out who previously edited the file and request reviews from at least a couple. The 2 recommendations on the PR may be based on that, but good to check. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 16:24:20 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 08 May 2020 20:24:20 +0000 Subject: [issue40481] Add include and exclude filters to zipapp cli In-Reply-To: <1588500459.46.0.573895829132.issue40481@roundup.psfhosted.org> Message-ID: <1588969460.95.0.48668924572.issue40481@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +paul.moore _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 16:37:44 2020 From: report at bugs.python.org (David Tucker) Date: Fri, 08 May 2020 20:37:44 +0000 Subject: [issue40570] len(platform.uname()) has changed in Python 3.9 In-Reply-To: <1588968140.85.0.743964408101.issue40570@roundup.psfhosted.org> Message-ID: <1588970264.91.0.485883732686.issue40570@roundup.psfhosted.org> Change by David Tucker : ---------- keywords: +patch pull_requests: +19320 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20009 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 16:38:54 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 08 May 2020 20:38:54 +0000 Subject: [issue40543] Tamil locale is using outdated encoding In-Reply-To: <1588837308.8.0.873026053476.issue40543@roundup.psfhosted.org> Message-ID: <1588970334.65.0.307727528399.issue40543@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +benjamin.peterson, ezio.melotti, lemburg, vstinner stage: -> needs patch type: -> enhancement versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 16:42:43 2020 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 08 May 2020 20:42:43 +0000 Subject: [issue40503] PEP 615: Add zoneinfo module In-Reply-To: <1588618281.16.0.913416553136.issue40503@roundup.psfhosted.org> Message-ID: <1588970563.22.0.751384369884.issue40503@roundup.psfhosted.org> Paul Ganssle added the comment: I've separated this into two separate PRs, one for docs and one for tests/implementation. I have not yet implemented the logic for the ability to configure the TZPATH at compile time because I'm not quite sure how to start on that. How are other compile-time options implemented? Do I need to do something special to handle both Windows and POSIX systems? Is there already a configuration file somewhere that I should use for this? Adding Thomas to the nosy list because he's the only one listed for "autoconf/makefiles" ? don't know if that extends to the Windows build as well. ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 16:53:32 2020 From: report at bugs.python.org (Alexander Overvoorde) Date: Fri, 08 May 2020 20:53:32 +0000 Subject: [issue40550] Popen.terminate fails with ProcessLookupError under certain conditions In-Reply-To: <1588881684.43.0.416849020134.issue40550@roundup.psfhosted.org> Message-ID: <1588971212.18.0.266090507183.issue40550@roundup.psfhosted.org> Alexander Overvoorde added the comment: I'm not sure that it is expected since Popen.send_signal does contain the following check: ``` def send_signal(self, sig): """Send a signal to the process.""" # Skip signalling a process that we know has already died. if self.returncode is None: os.kill(self.pid, sig) ``` Additionally, the following program does not raise a ProcessLookupError despite the program already having exited: ``` import subprocess import time proc = subprocess.Popen(["sh", "-c", "exit 0"]) time.sleep(5) proc.terminate() ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 16:54:49 2020 From: report at bugs.python.org (Jelle Zijlstra) Date: Fri, 08 May 2020 20:54:49 +0000 Subject: [issue40397] Refactor typing._GenericAlias In-Reply-To: <1587918915.07.0.818996162208.issue40397@roundup.psfhosted.org> Message-ID: <1588971289.41.0.376316223792.issue40397@roundup.psfhosted.org> Jelle Zijlstra added the comment: The most recent change here caused a regression. The following file: ``` from typing import Generic, TypeVar, Union class CannotTransform(Exception): pass T = TypeVar("T") E = TypeVar("E", bound=Exception) class Ok(Generic[T]): pass class Err(Generic[E]): pass Result = Union[Ok[T], Err[E]] TResult = Result[T, CannotTransform] TMatchResult = TResult[int] ``` Now fails with: ``` Traceback (most recent call last): File "/Users/jzijlstra-mpbt/py/cpython/Lib/../../black/black.py", line 22, in TMatchResult = TResult[int] File "/Users/jzijlstra-mpbt/py/cpython/Lib/typing.py", line 244, in inner return func(*args, **kwds) File "/Users/jzijlstra-mpbt/py/cpython/Lib/typing.py", line 704, in __getitem__ arg = arg[subargs] File "/Users/jzijlstra-mpbt/py/cpython/Lib/typing.py", line 244, in inner return func(*args, **kwds) File "/Users/jzijlstra-mpbt/py/cpython/Lib/typing.py", line 695, in __getitem__ _check_generic(self, params) File "/Users/jzijlstra-mpbt/py/cpython/Lib/typing.py", line 194, in _check_generic raise TypeError(f"{cls} is not a generic class") TypeError: __main__.Err[__main__.CannotTransform] is not a generic class ``` Before commit c1c7d8ead9eb214a6149a43e31a3213c52448877 it was fine. This was found when we added 3.9-dev to CI for Black (https://github.com/psf/black/pull/1393). ---------- nosy: +Jelle Zijlstra priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 16:58:35 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Fri, 08 May 2020 20:58:35 +0000 Subject: [issue40502] PyNode_New() does not initialize n->n_col_offset In-Reply-To: <1588616818.22.0.942372238929.issue40502@roundup.psfhosted.org> Message-ID: <1588971515.22.0.531260925474.issue40502@roundup.psfhosted.org> Joannah Nanjekye added the comment: New changeset d10091aa171250c67a5079abfe26b8b3964ea39a by Joannah Nanjekye in branch 'master': bpo-40502: Initialize n->n_col_offset (GH-19988) https://github.com/python/cpython/commit/d10091aa171250c67a5079abfe26b8b3964ea39a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 17:01:31 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Fri, 08 May 2020 21:01:31 +0000 Subject: [issue40502] PyNode_New() does not initialize n->n_col_offset In-Reply-To: <1588616818.22.0.942372238929.issue40502@roundup.psfhosted.org> Message-ID: <1588971691.46.0.949162996273.issue40502@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 17:13:21 2020 From: report at bugs.python.org (Zachary Ware) Date: Fri, 08 May 2020 21:13:21 +0000 Subject: [issue40568] Modify -c command-line option to accept multiple inputs In-Reply-To: <1588964937.68.0.986339822686.issue40568@roundup.psfhosted.org> Message-ID: <1588972401.0.0.940156523513.issue40568@roundup.psfhosted.org> Zachary Ware added the comment: This can be accomplished already by just including newlines in the string: $ cat multiline_python_bash_script.sh #!/bin/bash python3 -c ' from math import * print(e**(1j * pi)) import sys print(sys.argv)' echo "here's some random text" > somefile.txt python3 -c ' with open("somefile.txt") as f: print(len(f.read())) import sys print(sys.argv)' python3 - << EOF import sys print("Here's another way to do it, without restrictions on quotes") print(sys.argv) EOF $ ./multiline_python_bash_script.sh (-1+1.2246467991473532e-16j) ['-c'] 24 ['-c'] Here's another way to do it, without restrictions on quotes ['-'] $ python3 -c " > print('Interactive test:') > print('Multi-line works') > " Interactive test: Multi-line works None of these options is particularly *pretty*, but if it's at the point the ugliness bothers you it should probably be its own file to be executed :). On the other hand, none of these options really works on Windows, as far as I know. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 17:16:48 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Fri, 08 May 2020 21:16:48 +0000 Subject: [issue40550] Popen.terminate fails with ProcessLookupError under certain conditions In-Reply-To: <1588881684.43.0.416849020134.issue40550@roundup.psfhosted.org> Message-ID: <1588972608.47.0.713818148304.issue40550@roundup.psfhosted.org> Filipe La?ns added the comment: This is a simple time-of-check - time-of-action issue, which is why I suggested that it shouldn't be fixed. I was not aware send_signal did have this check, which tells us it is supposed to be suported(?). Anyway, to fix it we need to catch the exception and check for errno == 3 so that we can ignore it. Optimally we would want to have an atomic operation here, but no such thing exists. There is still the very faint possibility that after your process exits a new process will take its id and we kill it instead. We should keep the returncode check and just ignore the exception when errno == 3. This is the best option. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 17:18:11 2020 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 08 May 2020 21:18:11 +0000 Subject: [issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) In-Reply-To: <1569848255.08.0.155489980043.issue38323@roundup.psfhosted.org> Message-ID: <1588972691.23.0.911217912429.issue38323@roundup.psfhosted.org> Kyle Stanley added the comment: > There are more MultiLoopWatcher tests which hang randomly, it's not only test_close_kill_running(). What other MultiLoopWatcher tests are currently having random hangs? From searching "MultiLoopWatcher" on bpo, I'm only finding this issue. For now, I'll just work on a PR to temporarily skip `test_close_kill_running()` until we can find a fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 17:20:58 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Fri, 08 May 2020 21:20:58 +0000 Subject: [issue40550] Popen.terminate fails with ProcessLookupError under certain conditions In-Reply-To: <1588881684.43.0.416849020134.issue40550@roundup.psfhosted.org> Message-ID: <1588972858.4.0.47247962616.issue40550@roundup.psfhosted.org> Change by Filipe La?ns : ---------- keywords: +patch pull_requests: +19321 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20010 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 17:21:14 2020 From: report at bugs.python.org (Zachary Ware) Date: Fri, 08 May 2020 21:21:14 +0000 Subject: [issue40570] len(platform.uname()) has changed in Python 3.9 In-Reply-To: <1588968140.85.0.743964408101.issue40570@roundup.psfhosted.org> Message-ID: <1588972874.65.0.474288028179.issue40570@roundup.psfhosted.org> Change by Zachary Ware : ---------- nosy: +jaraco, lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 17:21:14 2020 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 08 May 2020 21:21:14 +0000 Subject: [issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) In-Reply-To: <1569848255.08.0.155489980043.issue38323@roundup.psfhosted.org> Message-ID: <1588972874.56.0.989687201815.issue38323@roundup.psfhosted.org> Kyle Stanley added the comment: > What other MultiLoopWatcher tests are currently having random hangs? Oh, never mind. I see `test_stdin_stdout` is also hanging in https://bugs.python.org/issue38182. I would like to take a closer look at that one before skipping it as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 17:22:40 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 08 May 2020 21:22:40 +0000 Subject: [issue40571] Make lru_cache(maxsize=None) more discoverable Message-ID: <1588972960.42.0.924669050455.issue40571@roundup.psfhosted.org> New submission from Raymond Hettinger : The recent discussions on python-ideas showed that people have a hard time finding the infinity-cache option for lru_cache(). Also, in the context of straight caching without limits, the name *lru_cache()* makes the tool seem complex and heavy when in fact, it is simple, lightweight, and fast (doing no more than a simple dictionary lookup). We could easily solve both problems with a helper function: def cache(func): 'Simple unbounded cache. Sometimes called "memoize".' return lru_cache(maxsize=None, typed=False) It would be used like this: @cache def configure_server(): ... return server_instance There was some discussion about a completely new decorator with different semantics (holding a lock across a call to an arbitrary user function and being limited to zero argument functions). It all the examples that were presented, this @cache decorator would suffice. None of examples presented actually locking behavior. ---------- components: Library (Lib) messages: 368469 nosy: rhettinger priority: normal severity: normal status: open title: Make lru_cache(maxsize=None) more discoverable type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 17:26:34 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Fri, 08 May 2020 21:26:34 +0000 Subject: [issue40550] Popen.terminate fails with ProcessLookupError under certain conditions In-Reply-To: <1588881684.43.0.416849020134.issue40550@roundup.psfhosted.org> Message-ID: <1588973194.76.0.46912594983.issue40550@roundup.psfhosted.org> Filipe La?ns added the comment: I submitted a patch. As explained above, this only mitigates the time-of-check/time-of-action issue in case the process doesn't exist, it *is not* a proper fix for the issue. But don't see any way to properly fix it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 17:31:50 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 08 May 2020 21:31:50 +0000 Subject: [issue40571] Make lru_cache(maxsize=None) more discoverable In-Reply-To: <1588972960.42.0.924669050455.issue40571@roundup.psfhosted.org> Message-ID: <1588973510.67.0.392492227726.issue40571@roundup.psfhosted.org> Raymond Hettinger added the comment: FWIW, this doesn't preclude the other proposal if it ever gains traction and moves forward. This just takes existing functionality and improves clarity and discoverability. The core issue is that if you only want a simple unbounded cache, it isn't obvious that that behavior is buried in the lru_cache() API. In hindsight, this always should have been separate functionality. And some day we may deprecate the maxsize=None option which is somewhat opaque. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 17:37:08 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 08 May 2020 21:37:08 +0000 Subject: [issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors In-Reply-To: <1588867521.75.0.200197181166.issue40546@roundup.psfhosted.org> Message-ID: <1588973828.6.0.0716946748145.issue40546@roundup.psfhosted.org> Terry J. Reedy added the comment: I verified that 3.8 puts the caret under '|', and agree that this is bug that should be fixed at least in a new version. Other such bugs have been fixed in the past. tk Text widgets have 1-based line numbers and 0-based column numbers. The latter is appropriate since column indexes mostly serve as slice positions rather than as character positions. IDLE changes the background of the error character to red, so it must be subtracting 1 to get the beginning of the slice to be colored. There was once a bug about this, so having the CPython behavior be consistent and documented would be good even if not a language feature. (For some reason I have not yet tracked down, IDLE colors the \n in 3.8 as well as 3.9, but is also correct and consistent for other exceptions where the two versions report the same column.) On a related note: Since the exceptions raised by compile are not restricted to SyntaxError (or Warning), it would be nice to have them restricted to a definite list that is documented. Both code.InteractiveInterpreter and IDLE have try-compile-except with (different) tuples extended as uncaught exceptions are reported. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 17:40:27 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 08 May 2020 21:40:27 +0000 Subject: [issue40544] Formatter exception when using logging.config.fileConfig In-Reply-To: <1588839744.95.0.946020207504.issue40544@roundup.psfhosted.org> Message-ID: <1588974027.71.0.0202813032298.issue40544@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 17:41:34 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 08 May 2020 21:41:34 +0000 Subject: [issue40547] 2to3 raise can silently remove code from old 2.4 string exceptions In-Reply-To: <1588869434.41.0.260360648069.issue40547@roundup.psfhosted.org> Message-ID: <1588974094.82.0.821450801763.issue40547@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 17:55:57 2020 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 08 May 2020 21:55:57 +0000 Subject: [issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors In-Reply-To: <1588867521.75.0.200197181166.issue40546@roundup.psfhosted.org> Message-ID: <1588974957.28.0.529964316833.issue40546@roundup.psfhosted.org> Guido van Rossum added the comment: @Terry: Thanks for confirming the bug in the old parser. Regarding whether column offsets should be 0-based or 1-based: I agree with Tk, but my hand was forced for SyntaxError: we found that it was already using 1-based offsets and we found correct-looking code elsewhere that depended on this, so we had to change the few cases where it was using 0-based offsets, alas. I think I also looked at how vim and Emacs interpret column numbers, and found that both expect 1-based offsets in compiler error messages of the form "file:line:col: message". IIRC I had to do a deep-dive on this subject when we added column offsets to mypy error messages. But it's a pain! @Lysandros: I wonder if this is the fix we're looking for? diff --git a/Lib/traceback.py b/Lib/traceback.py index bf34bbab8a..0e286f60bc 100644 --- a/Lib/traceback.py +++ b/Lib/traceback.py @@ -582,7 +582,7 @@ class TracebackException: yield ' {}\n'.format(badline.strip()) if offset is not None: caretspace = badline.rstrip('\n') - offset = min(len(caretspace), offset) - 1 + offset = min(len(caretspace) + 1, offset) - 1 caretspace = caretspace[:offset].lstrip() # non-space whitespace (likes tabs) must be kept for alignment caretspace = ((c.isspace() and c or ' ') for c in caretspace) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 17:58:03 2020 From: report at bugs.python.org (Jean-Christophe Fillion-Robin) Date: Fri, 08 May 2020 21:58:03 +0000 Subject: [issue38728] Update PC/pyconfig.h to support disabling auto linking In-Reply-To: <1573080091.42.0.697826916573.issue38728@roundup.psfhosted.org> Message-ID: <1588975083.4.0.418003588968.issue38728@roundup.psfhosted.org> Jean-Christophe Fillion-Robin added the comment: Associated pull request has been updated, CLA signed and it is ready for final review and integration. Thanks so much for your time, ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 18:00:01 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 08 May 2020 22:00:01 +0000 Subject: [issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs In-Reply-To: <1588884932.92.0.367303002443.issue40553@roundup.psfhosted.org> Message-ID: <1588975201.5.0.757995062992.issue40553@roundup.psfhosted.org> Raymond Hettinger added the comment: Zain, do you happen to be working in a Dropbox synced directory when you observe the failure? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 18:28:51 2020 From: report at bugs.python.org (Eric Snow) Date: Fri, 08 May 2020 22:28:51 +0000 Subject: [issue40572] Support basic asynchronous cross-interpreter operations. Message-ID: <1588976931.16.0.539865430025.issue40572@roundup.psfhosted.org> New submission from Eric Snow : (This is a continuation of the work from bpo-33608. That issue ended up with a lot of baggage and clutter (due to problems that have since been resolved), so we closed it. This issue is where we're picking it up fresh.) When two interpreters are cooperating, there are sometimes operations that one of them needs the other to perform. Thus far this is limited to mutation or release of data/objects owned by that "other" interpreter. We need safe, reliable public C-API to facilitate such operations. All the necessary machinery already exists ("pending calls"), exposed in the internal C-API: _Py_AddPendingCall(). (There is a public Py_AddPendingCall(), but it should be removed.) That API adds a function to a per-interpreter queue, from which it is executed later (asynchronously) by the ceval loop of the interpreter's main thread. The challenge is that the repercussions of such async operations within the eval loop are not fully explored. We have some confidence because this is the same machinery used to handle signals. However, it's better avoid as much complexity in those async operations as possible. That is why we don't just expose `_Py_AddPendingCall()` in the public C-API. Instead the plan is to add a small number of public C-API functions that are each specific to a focused use case, ideally with with little/no chance of errors or other side effects. Initially we will target `Py_DECREF()`, `PyMem_Free()`, and `PyBuffer_Release()`. If we need more then we can assess those needs later. ---------- assignee: eric.snow components: C API messages: 368476 nosy: eric.snow, vstinner priority: normal severity: normal stage: needs patch status: open title: Support basic asynchronous cross-interpreter operations. type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 18:35:10 2020 From: report at bugs.python.org (Furkan Onder) Date: Fri, 08 May 2020 22:35:10 +0000 Subject: [issue1944] Document PyUnicode_* API In-Reply-To: <1201415203.65.0.272410099804.issue1944@psf.upfronthosting.co.za> Message-ID: <1588977310.24.0.462171229843.issue1944@roundup.psfhosted.org> Change by Furkan Onder : ---------- nosy: +furkanonder nosy_count: 8.0 -> 9.0 pull_requests: +19322 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20011 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 18:38:02 2020 From: report at bugs.python.org (Eric Snow) Date: Fri, 08 May 2020 22:38:02 +0000 Subject: [issue40572] Support basic asynchronous cross-interpreter operations. In-Reply-To: <1588976931.16.0.539865430025.issue40572@roundup.psfhosted.org> Message-ID: <1588977482.74.0.212514626431.issue40572@roundup.psfhosted.org> Change by Eric Snow : ---------- keywords: +patch pull_requests: +19323 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20012 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 18:43:57 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 08 May 2020 22:43:57 +0000 Subject: [issue40426] Unable to use lowercase hexadecimal digits for percent encoding In-Reply-To: <1588097651.68.0.271507304283.issue40426@roundup.psfhosted.org> Message-ID: <1588977837.49.0.924918645033.issue40426@roundup.psfhosted.org> Christian Heimes added the comment: There is no need to add a new flag to quote. You can easily archive your goal with a simple regular expression substitution: >>> import re, urllib.parse >>> s = urllib.parse.quote("Example|#?") >>> s 'Example%7C%23%3F' >>> re.sub("%[0-9A-F]{2}", lambda q: q.group(0).lower(), s) 'Example%7c%23%3f' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 18:49:08 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 08 May 2020 22:49:08 +0000 Subject: [issue40557] Move captured_stdin(), captured_stdout(), and captured_stderr() to the public API. In-Reply-To: <1588914723.68.0.692041381493.issue40557@roundup.psfhosted.org> Message-ID: <1588978148.32.0.280890898904.issue40557@roundup.psfhosted.org> Terry J. Reedy added the comment: I am rather sure that test.support is going to remain private. So the concrete proposal should be to move them into the unittest package somewhere, perhaps in a new unittest.utils/support/helpers module, for battle-tested helper functions. I strongly suggest that you make such a proposal on the python-ideas list, both to get support from users and also from a coredev that might review and merge if approved. A new module should require a PEP, which should include some criteria for what might go into such a module. What some coredevs will rightly fear is an avalanche of proposals to various person's favorite thing from test.support, or even elsewhere. Why these 3 things and not other things or even everything? Take a look at PEP 1 for what should be covered even in a pre-PEP. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 18:50:17 2020 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 08 May 2020 22:50:17 +0000 Subject: [issue30250] StringIO module truncate behavior of current position In-Reply-To: <1493803286.93.0.729183089652.issue30250@psf.upfronthosting.co.za> Message-ID: <1588978217.89.0.312227093295.issue30250@roundup.psfhosted.org> Zackery Spytz added the comment: Python 2 is EOL. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 18:55:36 2020 From: report at bugs.python.org (Zachary Ware) Date: Fri, 08 May 2020 22:55:36 +0000 Subject: [issue40425] Refleak in CDataObject In-Reply-To: <1588095498.31.0.363636876654.issue40425@roundup.psfhosted.org> Message-ID: <1588978536.13.0.683566351856.issue40425@roundup.psfhosted.org> Zachary Ware added the comment: This looks like a simple reference cycle, as far as I can tell; I don't see an actual refleak. Reproducing using Mark's code from StackOverflow (adjusted): $ ./python.exe -X showrefcount Python 3.9.0a6+ (heads/master-dirty:d10091aa17, May 8 2020, 17:43:51) [Clang 10.0.1 (clang-1001.0.46.4)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> [48551 refs, 15489 blocks] >>> from ctypes import * [53774 refs, 17227 blocks] >>> s = create_string_buffer(1<<30);del s [53832 refs, 17254 blocks] >>> s = create_string_buffer(1<<30);del s [53832 refs, 17255 blocks] >>> s = create_string_buffer(1<<30);del s [53832 refs, 17254 blocks] >>> s = create_string_buffer(1<<30);s = cast(s, c_void_p);del s [53839 refs, 17258 blocks] >>> s = create_string_buffer(1<<30);s = cast(s, c_void_p);del s [53844 refs, 17262 blocks] >>> import gc [54078 refs, 17315 blocks] >>> gc.collect() 13 [54030 refs, 17182 blocks] >>> [54030 refs, 17199 blocks] >>> s = create_string_buffer(1<<30);del s [54077 refs, 17227 blocks] >>> gc.collect() 9 [54030 refs, 17182 blocks] >>> s = create_string_buffer(1<<30);s = cast(s, c_void_p);del s;gc.collect() 11 [54030 refs, 17182 blocks] >>> s = create_string_buffer(1<<30);s = cast(s, c_void_p);del s;gc.collect() 11 [54030 refs, 17182 blocks] I'll freely admit that I'm way out of my depth here, but this doesn't look like a bug as far as I can tell. `ctypes` seems to be creating some cyclic references internally, but a collection clears them right up. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 18:55:48 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 08 May 2020 22:55:48 +0000 Subject: [issue40557] Move captured_stdin(), captured_stdout(), and captured_stderr() to the public API. In-Reply-To: <1588914723.68.0.692041381493.issue40557@roundup.psfhosted.org> Message-ID: <1588978548.1.0.986404156352.issue40557@roundup.psfhosted.org> Terry J. Reedy added the comment: The proposal should include the idea that the functions in test.support be replaced with from unittest.helpers import * # or from unittest.helpers import captured_stdin, ... so that a) no other changes need be made to existing tests and b) the possibility remains of someday wrapping or replacing the public version, again without necessarily changing existing tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 19:00:51 2020 From: report at bugs.python.org (Zachary Ware) Date: Fri, 08 May 2020 23:00:51 +0000 Subject: [issue30250] StringIO module truncate behavior of current position In-Reply-To: <1493803286.93.0.729183089652.issue30250@psf.upfronthosting.co.za> Message-ID: <1588978851.32.0.304755413692.issue30250@roundup.psfhosted.org> Change by Zachary Ware : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 19:02:59 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 08 May 2020 23:02:59 +0000 Subject: [issue40561] Provide docstrings for public-facing webbrowser functions In-Reply-To: <1588941280.97.0.150032786212.issue40561@roundup.psfhosted.org> Message-ID: <1588978979.12.0.735243222947.issue40561@roundup.psfhosted.org> Terry J. Reedy added the comment: Missing docstrings are almost a bug, but I am not sure if we backport additions. This needs the attention of a coredev to review, approve, and merge, but there is no particular 'webbrowser' maintainer. If no one shows up, you might use git to find those who have most recently committed to the module and request reviews on the PR. ---------- nosy: +terry.reedy versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 19:08:15 2020 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 08 May 2020 23:08:15 +0000 Subject: [issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) In-Reply-To: <1569848255.08.0.155489980043.issue38323@roundup.psfhosted.org> Message-ID: <1588979295.8.0.603640022163.issue38323@roundup.psfhosted.org> Change by Kyle Stanley : ---------- pull_requests: +19324 pull_request: https://github.com/python/cpython/pull/20013 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 19:09:54 2020 From: report at bugs.python.org (Zain Said) Date: Fri, 08 May 2020 23:09:54 +0000 Subject: [issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs In-Reply-To: <1588884932.92.0.367303002443.issue40553@roundup.psfhosted.org> Message-ID: <1588979394.24.0.782139657643.issue40553@roundup.psfhosted.org> Zain Said added the comment: I posted my issue on Experts Exchange and they suggested to go to system preferences>Security&Privacy>go to privacy tab on the top>scroll down to Full Disk Access>Add IDLE and Python>then check off the box next to it> Since then my issue with IDLE not being able to save (save as) new programs has gone away. Maybe try this and let me know if this solves you're issue. Also I'm fairly new to python and coding in general and i rarely use terminal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 19:18:07 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 08 May 2020 23:18:07 +0000 Subject: [issue40569] Add optional weights to random.sample() In-Reply-To: <1588967807.85.0.49094872953.issue40569@roundup.psfhosted.org> Message-ID: <1588979887.4.0.765338058289.issue40569@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +19325 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20014 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 19:20:29 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 08 May 2020 23:20:29 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1588980029.72.0.0814966999711.issue39791@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset 7f7e706d78ab968a1221c6179dfdba714860bd12 by Jason R. Coombs in branch 'master': bpo-39791: Add files() to importlib.resources (GH-19722) https://github.com/python/cpython/commit/7f7e706d78ab968a1221c6179dfdba714860bd12 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 19:21:53 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Fri, 08 May 2020 23:21:53 +0000 Subject: [issue40425] Refleak in CDataObject In-Reply-To: <1588095498.31.0.363636876654.issue40425@roundup.psfhosted.org> Message-ID: <1588980113.55.0.212018970198.issue40425@roundup.psfhosted.org> Change by Filipe La?ns : ---------- nosy: +FFY00 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 19:29:07 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 08 May 2020 23:29:07 +0000 Subject: [issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs In-Reply-To: <1588884932.92.0.367303002443.issue40553@roundup.psfhosted.org> Message-ID: <1588980547.21.0.682788629858.issue40553@roundup.psfhosted.org> Ned Deily added the comment: That enabling FullDiskAccess makes a difference makes some sense but that is not something we should be recommending without better understanding what's going on here. We still need a reproducible test case; I still am not able to reproduce. Raymond, your hint about Dropbox is promising; can you say more, i.e. do you see hangs if you the folder you are saving to is within your Dropbox folder hierarchy? Zain, do you use Dropbox? And do either of you have your Documents folder stored in iCloud: System Preferences -> Apple ID (top right) -> iCloud -> iCloud Drive (Options) -> Documents -> Desktop & Documents Folders (checked) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 19:34:28 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 08 May 2020 23:34:28 +0000 Subject: [issue40570] len(platform.uname()) has changed in Python 3.9 In-Reply-To: <1588968140.85.0.743964408101.issue40570@roundup.psfhosted.org> Message-ID: <1588980868.53.0.937716753108.issue40570@roundup.psfhosted.org> Jason R. Coombs added the comment: It was intentional to address issue35967, although it was meant to remain compatible. Is len(uname()) an important behavior to retain? It feels like an implementation detail to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 19:37:31 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 08 May 2020 23:37:31 +0000 Subject: [issue40570] len(platform.uname()) has changed in Python 3.9 In-Reply-To: <1588968140.85.0.743964408101.issue40570@roundup.psfhosted.org> Message-ID: <1588981051.33.0.803988082465.issue40570@roundup.psfhosted.org> Jason R. Coombs added the comment: If it is important to retain the `len`, it's probably also important to retain the `[-N]` accesses and possibly other behaviors of a length 6 tuple. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 19:41:59 2020 From: report at bugs.python.org (Zain Said) Date: Fri, 08 May 2020 23:41:59 +0000 Subject: [issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs In-Reply-To: <1588884932.92.0.367303002443.issue40553@roundup.psfhosted.org> Message-ID: <1588981319.85.0.348291755584.issue40553@roundup.psfhosted.org> Zain Said added the comment: Ned, I do not use DropBox nor do i have Desktop & Documents Folders checked under my iCloud settings. Someone else in the community reached out to me and suggested that if IDLE is acting up its not worth the hassle. And that they're alternatives. I came a across an editor called Atom. Seems interesting. Might give it a try. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 19:47:53 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 08 May 2020 23:47:53 +0000 Subject: [issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs In-Reply-To: <1588884932.92.0.367303002443.issue40553@roundup.psfhosted.org> Message-ID: <1588981673.3.0.0555154091046.issue40553@roundup.psfhosted.org> Terry J. Reedy added the comment: When I click Full Disk Access in Mohave, I see an empty box with a Header something like "All app to access Mail, ..., and all user data". None of it has anything obviously to do with the user Documents folder. Nor does it seem appropriate for a non-top-admin user on a multiuser machine. Below the box are [+][-] buttons. [+] opens the standard open dialog to select an app to add. There is nothing like [ ] Add Python and IDLE Ned, is Catalina known to have tightened up some security settings? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 19:49:32 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 08 May 2020 23:49:32 +0000 Subject: [issue40570] len(platform.uname()) has changed in Python 3.9 In-Reply-To: <1588968140.85.0.743964408101.issue40570@roundup.psfhosted.org> Message-ID: <1588981772.15.0.52891239881.issue40570@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- pull_requests: +19326 pull_request: https://github.com/python/cpython/pull/20015 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 19:59:25 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 08 May 2020 23:59:25 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1588982365.27.0.073184819634.issue39791@roundup.psfhosted.org> Jason R. Coombs added the comment: I've merged PR 19722. Some follow up actions I'd like to do: - Add hooks for `.files()` on built-in loaders. - Replace `loader.get_resource_reader()` with adapters around `.files()` for built-in loaders. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 20:26:35 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 09 May 2020 00:26:35 +0000 Subject: [issue40570] len(platform.uname()) has changed in Python 3.9 In-Reply-To: <1588968140.85.0.743964408101.issue40570@roundup.psfhosted.org> Message-ID: <1588983995.93.0.393320204099.issue40570@roundup.psfhosted.org> Jason R. Coombs added the comment: Thanks David for the report and the draft PR (which helped me validate my thinking on the matter). In PR 20015, I've included additional tests. I've also re-written the compatibility functions to rely on the main `__iter__` override. Another situation that's likely to be incompatible is pickleability. Is that important? I'm tempted to make deprecated the use of `uname_result` for anything other than attribute access (maybe with the ability to cast to a tuple, i.e. `tuple(res)`). The problem with namedtuples is that although they provide backward-compatibility for legacy behavior which returned tuples, they also bring that legacy as debt. By deprecating "access by index", that would constrain the interface to two basic usages: attribute access and `iter()` of all values. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 20:34:35 2020 From: report at bugs.python.org (Alexander Overvoorde) Date: Sat, 09 May 2020 00:34:35 +0000 Subject: [issue40550] Popen.terminate fails with ProcessLookupError under certain conditions In-Reply-To: <1588881684.43.0.416849020134.issue40550@roundup.psfhosted.org> Message-ID: <1588984475.07.0.899708004535.issue40550@roundup.psfhosted.org> Alexander Overvoorde added the comment: I understand that it's not a perfect solution, but at least it's a little bit closer. Thanks for your patch :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 20:57:32 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 09 May 2020 00:57:32 +0000 Subject: [issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs In-Reply-To: <1588884932.92.0.367303002443.issue40553@roundup.psfhosted.org> Message-ID: <1588985852.62.0.123601025869.issue40553@roundup.psfhosted.org> Terry J. Reedy added the comment: What is acting up here is the Catalina system SaveAs dialog on some systems with some settings when closing after being asked to display the current contents of the target location, allow the content to be variously filtered or not, and add a default extension. (I use all of these features.) I looked at 3 Apple apps, Safari, Maps, and they omit the content display, and hence filtering. It it is only the display that is bugged, they would not show the problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 22:00:40 2020 From: report at bugs.python.org (Inada Naoki) Date: Sat, 09 May 2020 02:00:40 +0000 Subject: [issue40551] PRs should be rebased on top of master before running the build/tests In-Reply-To: <1588882193.5.0.928762641921.issue40551@roundup.psfhosted.org> Message-ID: <1588989640.22.0.812494133222.issue40551@roundup.psfhosted.org> Inada Naoki added the comment: I don't think this is a real issue we should solve: * Travis-CI, at least, does test against "merge commit", not HEAD of PR branch. * As you said already, master branch grow after PR is created anyway. * We run CI and buildbots against master branch too. So we can find breakage soon when something go wrong. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 22:43:07 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 09 May 2020 02:43:07 +0000 Subject: [issue40551] PRs should be rebased on top of master before running the build/tests In-Reply-To: <1588882193.5.0.928762641921.issue40551@roundup.psfhosted.org> Message-ID: <1588992187.3.0.762250313386.issue40551@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: See also https://mail.python.org/archives/list/python-committers at python.org/thread/WEU5CQKIA4LIHWHT53YA7HHNUY5H2FUT/. This was a problem with other CI GitHub actions when a change had to be merged to master with which all PRs need to be manually rebased to pass. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 22:57:00 2020 From: report at bugs.python.org (Inada Naoki) Date: Sat, 09 May 2020 02:57:00 +0000 Subject: [issue40551] PRs should be rebased on top of master before running the build/tests In-Reply-To: <1588882193.5.0.928762641921.issue40551@roundup.psfhosted.org> Message-ID: <1588993020.09.0.994150495332.issue40551@roundup.psfhosted.org> Inada Naoki added the comment: > See also https://mail.python.org/archives/list/python-committers at python.org/thread/WEU5CQKIA4LIHWHT53YA7HHNUY5H2FUT/. This was a problem with other CI GitHub actions when a change had to be merged to master with which all PRs need to be manually rebased to pass. This is an example of "master branch grow after PR is created anyway." This issue proposes " this only works at the time the pull request is created." It doesn't help that case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 23:14:12 2020 From: report at bugs.python.org (Moriyoshi Koizumi) Date: Sat, 09 May 2020 03:14:12 +0000 Subject: [issue40573] inspect.iscorutinefunction() returns False for unittest.mock.AsyncMock instances Message-ID: <1588994052.01.0.365173220946.issue40573@roundup.psfhosted.org> New submission from Moriyoshi Koizumi : inspect.iscoroutinefunction() returns False for unittest.mock.AsyncMock instances while asyncio.iscoroutinefunction() returns True. ``` >>> import unittest.mock >>> import inspect >>> import asyncio >>> inspect.iscoroutinefunction(unittest.mock.AsyncMock()) False >>> asyncio.iscoroutinefunction(unittest.mock.AsyncMock()) True ``` Confirmed with 3.8.2 and 3.9dev ---------- components: Tests messages: 368497 nosy: moriyoshi priority: normal severity: normal status: open title: inspect.iscorutinefunction() returns False for unittest.mock.AsyncMock instances type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 8 23:52:54 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 09 May 2020 03:52:54 +0000 Subject: [issue40573] inspect.iscorutinefunction() returns False for unittest.mock.AsyncMock instances In-Reply-To: <1588994052.01.0.365173220946.issue40573@roundup.psfhosted.org> Message-ID: <1588996374.45.0.465713143529.issue40573@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +lisroach, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 00:03:39 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 09 May 2020 04:03:39 +0000 Subject: [issue40573] inspect.iscorutinefunction() returns False for unittest.mock.AsyncMock instances In-Reply-To: <1588994052.01.0.365173220946.issue40573@roundup.psfhosted.org> Message-ID: <1588997019.36.0.787144847124.issue40573@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I couldn't reproduce the change in result for consecutive calls on master branch. They should return the same value. ./python Python 3.9.0a6+ (heads/master:7f7e706d78, May 9 2020, 04:00:36) [GCC 7.5.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import unittest.mock >>> import inspect >>> import asyncio >>> inspect.iscoroutinefunction(unittest.mock.AsyncMock()) False >>> inspect.iscoroutinefunction(unittest.mock.AsyncMock()) False >>> inspect.iscoroutinefunction(unittest.mock.AsyncMock()) False ---------- components: +Library (Lib) -Tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 00:08:44 2020 From: report at bugs.python.org (Thomas Caswell) Date: Sat, 09 May 2020 04:08:44 +0000 Subject: [issue40574] segfault causing regression from PEP 573 implementation Message-ID: <1588997324.8.0.612961250405.issue40574@roundup.psfhosted.org> New submission from Thomas Caswell : https://github.com/python/cpython/commit/e1becf46b4e3ba6d7d32ebf4bbd3e0804766a423 causes pyqt5 to segfault an accessing an attribute To reproduce this: pip install pyqt5 pip install sip python -c "import PyQt5.QtCore; PyQt5.QtCore.Qt.Key_Control" # this segfaults Setting up faulthandler gives: jupiter at 23:54 ? python -X faulthandler -c "import PyQt5.QtCore; PyQt5.QtCore.Qt.Key_Control" Fatal Python error: Segmentation fault Current thread 0x00007f52111cd740 (most recent call first): Segmentation fault (core dumped) It is likely that this should also be reported to riverbank as a pyqt/sip bug, but I'm starting here. I apologize for not having a simpler reproducing case. jupiter at 00:01 ? git bisect log git bisect start # good: [2d8757758d0d75882fef0fe0e3c74c4756b3e81e] bpo-40286: Remove C implementation of Random.randbytes() (GH-19797) git bisect good 2d8757758d0d75882fef0fe0e3c74c4756b3e81e # bad: [d10091aa171250c67a5079abfe26b8b3964ea39a] bpo-40502: Initialize n->n_col_offset (GH-19988) git bisect bad d10091aa171250c67a5079abfe26b8b3964ea39a # good: [c3f001461d5794c81cf5f70e08ae5435fe935ceb] bpo-40491: Fix typo in syntax error for numeric literals (GH-19893) git bisect good c3f001461d5794c81cf5f70e08ae5435fe935ceb # good: [c21c51235aa8061da6b0593d6f857f42fd92fd8b] bpo-40355: Improve error messages in ast.literal_eval with malformed Dict nodes (GH-19868) git bisect good c21c51235aa8061da6b0593d6f857f42fd92fd8b # good: [c1c7d8ead9eb214a6149a43e31a3213c52448877] bpo-40397: Refactor typing._GenericAlias (GH-19719) git bisect good c1c7d8ead9eb214a6149a43e31a3213c52448877 # bad: [c068b53a0ca6ebf740d98e422569d2f705e54f93] bpo-38787: Update structures.rst docs (PEP 573) (GH-19980) git bisect bad c068b53a0ca6ebf740d98e422569d2f705e54f93 # good: [4638c6429575bd6de26b12b2af5df74d6568b553] bpo-40334: Error message for invalid default args in function call (GH-19973) git bisect good 4638c6429575bd6de26b12b2af5df74d6568b553 # bad: [8963a7f1f84a05412178b56629508b660d38861b] bpo-40545: Export _PyErr_GetTopmostException() function (GH-19978) git bisect bad 8963a7f1f84a05412178b56629508b660d38861b # bad: [e1becf46b4e3ba6d7d32ebf4bbd3e0804766a423] bpo-38787: C API for module state access from extension methods (PEP 573) (GH-19936) git bisect bad e1becf46b4e3ba6d7d32ebf4bbd3e0804766a423 # first bad commit: [e1becf46b4e3ba6d7d32ebf4bbd3e0804766a423] bpo-38787: C API for module state access from extension methods (PEP 573) (GH-19936) ---------- components: C API messages: 368499 nosy: tcaswell priority: normal severity: normal status: open title: segfault causing regression from PEP 573 implementation versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 00:14:47 2020 From: report at bugs.python.org (Thomas Caswell) Date: Sat, 09 May 2020 04:14:47 +0000 Subject: [issue40574] segfault causing regression from PEP 573 implementation In-Reply-To: <1588997324.8.0.612961250405.issue40574@roundup.psfhosted.org> Message-ID: <1588997687.38.0.210759247379.issue40574@roundup.psfhosted.org> Thomas Caswell added the comment: Sorry, forgot to add this is on Linux. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 00:44:43 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 09 May 2020 04:44:43 +0000 Subject: [issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) In-Reply-To: <1569848255.08.0.155489980043.issue38323@roundup.psfhosted.org> Message-ID: <1588999483.35.0.238102838658.issue38323@roundup.psfhosted.org> Chris Jerdonek added the comment: I looked into this a little after reproducing it locally. What I found is that MultiLoopChildWatcher._sig_chld() *is* called. It's just that it's only called immediately after timeout=5 has elapsed. (The timeout=5 was added by Andrew here: https://github.com/python/cpython/blob/7f7e706d78ab968a1221c6179dfdba714860bd12/Lib/test/test_asyncio/test_subprocess.py#L480 ) Consider this line in asyncio.tasks.wait_for(), which is to trigger the timeout: https://github.com/python/cpython/blob/7f7e706d78ab968a1221c6179dfdba714860bd12/Lib/asyncio/tasks.py#L476 timeout_handle = loop.call_later(timeout, _release_waiter, waiter) I put some debug statements inside _release_waiter, and I found that _sig_chld() is called after the timeout has elapsed and before _release_waiter starts. So basically, it looks like CPython is holding onto the signal, and waiting for the loop to do something more before running the handler and calling the _sig_chld(). The code base already has logic to skip running signal handlers in various cases, but I don't know whether it relates to this issue: https://github.com/python/cpython/blob/7f7e706d78ab968a1221c6179dfdba714860bd12/Python/ceval.c#L1410-L1425 It seems like there are a number of issues on the tracker related to signals (some solved and others not, e.g. https://bugs.python.org/issue21895 ). So it looks to me like this could point to a deeper issue between asyncio and CPython's signal handling. ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 04:09:43 2020 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 09 May 2020 08:09:43 +0000 Subject: [issue40570] len(platform.uname()) has changed in Python 3.9 In-Reply-To: <1588983995.93.0.393320204099.issue40570@roundup.psfhosted.org> Message-ID: <0d547c1c-12fa-b66a-6866-0a5b96bbc0d9@egenix.com> Marc-Andre Lemburg added the comment: Hi Jason, to achieve better backwards compatibility, it's probably better to use the approach taken for CodeInfo in the codecs.py module: class CodecInfo(tuple): """Codec details when looking up the codec registry""" def __new__(cls, encode, decode, streamreader=None, streamwriter=None, incrementalencoder=None, incrementaldecoder=None, name=None, *, _is_text_encoding=None): self = tuple.__new__(cls, (encode, decode, streamreader, streamwriter)) self.name = name self.encode = encode self.decode = decode self.incrementalencoder = incrementalencoder self.incrementaldecoder = incrementaldecoder self.streamwriter = streamwriter self.streamreader = streamreader if _is_text_encoding is not None: self._is_text_encoding = _is_text_encoding return self def __repr__(self): return "<%s.%s object for encoding %s at %#x>" % \ (self.__class__.__module__, self.__class__.__qualname__, self.name, id(self)) This used to be a 4 entry tuple and was extended to hold additional fields. To the outside, it still looks like a 4-tuple in all aspects, but attribute access permits accessing the additional fields. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Experts (#1, May 09 2020) >>> Python Projects, Coaching and Support ... https://www.egenix.com/ >>> Python Product Development ... https://consulting.egenix.com/ ________________________________________________________________________ ::: We implement business ideas - efficiently in both time and costs ::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 https://www.egenix.com/company/contact/ https://www.malemburg.com/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 04:32:03 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 09 May 2020 08:32:03 +0000 Subject: [issue40566] Apply PEP 573 to abc module In-Reply-To: <1588955858.55.0.304534831437.issue40566@roundup.psfhosted.org> Message-ID: <1589013123.92.0.752525267856.issue40566@roundup.psfhosted.org> miss-islington added the comment: New changeset 77c614624b6bf2145bef69830d0f499d8b55ec0c by Dong-hee Na in branch 'master': bpo-40566: Apply PEP 573 to abc module (GH-20005) https://github.com/python/cpython/commit/77c614624b6bf2145bef69830d0f499d8b55ec0c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 04:34:19 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 09 May 2020 08:34:19 +0000 Subject: [issue40566] Apply PEP 573 to abc module In-Reply-To: <1588955858.55.0.304534831437.issue40566@roundup.psfhosted.org> Message-ID: <1589013259.85.0.953126651215.issue40566@roundup.psfhosted.org> Dong-hee Na added the comment: I am now closing the issue. Thanks for the review ---------- nosy: +christian.heimes resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 05:08:25 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Sat, 09 May 2020 09:08:25 +0000 Subject: [issue40551] PRs should be rebased on top of master before running the build/tests In-Reply-To: <1588882193.5.0.928762641921.issue40551@roundup.psfhosted.org> Message-ID: <1589015305.3.0.0340192081725.issue40551@roundup.psfhosted.org> Filipe La?ns added the comment: > * Travis-CI, at least, does test against "merge commit", not HEAD of PR branch. Where? https://github.com/python/cpython/blob/master/.travis.yml > * As you said already, master branch grow after PR is created anyway. > This issue proposes " this only works at the time the pull request is created." It doesn't help that case. Please note that the proposed fix is just that. I detailed that we should do something else, but this was the first step. > * We run CI and buildbots against master branch too. So we can find breakage soon when something go wrong. Right, but then it might not be trivial to add a fix or revert changes. If more changes are merged before someone deals with the breakage, it might become very difficult to fix, at this point you are playing whack-a-mole reverting patches... So, I disagree with you. This is a real issue. It's not a matter of if, it's a matter of when. And a matter of, how bad will it be when it happens? There are two ways we could go about this: * Automatically No-one merges anything manually, they add a tag or comment to trigger the build bot. The bot will restart the tests and merge if they pass. * Semi-automatically When someone approves the patch, the tests will automatically be re-triggered, it then is on the developer to make sure there are no major differences from master at the time of merging, to avoid any issues. The tests can be triggered manually, but perhaps it would be best to introduce a `/test` command in the bots to do this, avoiding the developer to go through a few UI jumps. If this is chosen, all current developers should be notified, and this added to the dev wiki. It also should be noted during the onboard process for new developers. Please note in both situations, automatically rebasing PRs *is* the first step. After that, it's just figuring out a suitable model to re-trigger the checks before merging. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 05:47:09 2020 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 09 May 2020 09:47:09 +0000 Subject: [issue40575] _PyDict_GetItemIdWithError() should call _PyDict_GetItem_KnownHash() Message-ID: <1589017629.56.0.630851682841.issue40575@roundup.psfhosted.org> New submission from Stefan Behnel : _PyDict_GetItemIdWithError() looks up interned strings, which always have their hash value initialised. It can call _PyDict_GetItem_KnownHash() directly. ---------- messages: 368506 nosy: scoder priority: low severity: normal stage: needs patch status: open title: _PyDict_GetItemIdWithError() should call _PyDict_GetItem_KnownHash() type: performance versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 05:51:41 2020 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 09 May 2020 09:51:41 +0000 Subject: [issue40575] _PyDict_GetItemIdWithError() should call _PyDict_GetItem_KnownHash() In-Reply-To: <1589017629.56.0.630851682841.issue40575@roundup.psfhosted.org> Message-ID: <1589017901.28.0.211550577356.issue40575@roundup.psfhosted.org> Change by Stefan Behnel : ---------- components: +Interpreter Core keywords: +easy (C) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 06:23:34 2020 From: report at bugs.python.org (Inada Naoki) Date: Sat, 09 May 2020 10:23:34 +0000 Subject: [issue40551] PRs should be rebased on top of master before running the build/tests In-Reply-To: <1589015305.3.0.0340192081725.issue40551@roundup.psfhosted.org> Message-ID: Inada Naoki added the comment: On Sat, May 9, 2020 at 6:08 PM Filipe La?ns wrote: > > > * Travis-CI, at least, does test against "merge commit", not HEAD of PR branch. > > Where? https://github.com/python/cpython/blob/master/.travis.yml https://docs.travis-ci.com/user/pull-requests/ "Rather than build the commits that have been pushed to the branch the pull request is from, we build the merge between the source branch and the upstream branch." > * Automatically > * Semi-automatically Both are fine, but... > > Please note in both situations, automatically rebasing PRs *is* the first step. After that, it's just figuring out a suitable model to re-trigger the checks before merging. Bot shouldn't use rebase, but merge master branch. Rebase in pull request branch break the pull request sometime. See this thread: https://discuss.python.org/t/info-rebase-origin-master-push-f-workflow-corrupts-pull-request-rarely/2558/7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 06:30:31 2020 From: report at bugs.python.org (Sam Lijin) Date: Sat, 09 May 2020 10:30:31 +0000 Subject: [issue40576] Align docs for list.sort, sorted, and on the website Message-ID: <1589020231.08.0.0102454961056.issue40576@roundup.psfhosted.org> New submission from Sam Lijin : It's mildly confusing to see `pydoc sorted` and `pydoc list.sort` to look so different, esp. since sorted just delegates to list.sort. By extension, https://docs.python.org/3/library/functions.html#sorted should also be aligned with this, but I'm not super familiar with what the distinction content in the docstrings and the website is intended to be, if there is any guiding philosophy there. sorted() appears to have been documented as an afterthought as part of this commit: https://github.com/python/cpython/commit/f9e227e5a9d7a74393ef259c861660c3d1f36f83 list.sort was last updated in 2018 by https://github.com/python/cpython/pull/8516 I have an incoming PR for this. ---------- assignee: docs at python components: Documentation messages: 368508 nosy: docs at python, sxlijin priority: normal severity: normal status: open title: Align docs for list.sort, sorted, and on the website type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 06:30:42 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 09 May 2020 10:30:42 +0000 Subject: [issue40426] Unable to use lowercase hexadecimal digits for percent encoding In-Reply-To: <1588097651.68.0.271507304283.issue40426@roundup.psfhosted.org> Message-ID: <1589020242.08.0.627116557484.issue40426@roundup.psfhosted.org> Serhiy Storchaka added the comment: Concur with Christian. Heh, I was going to propose the same. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 06:41:37 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Sat, 09 May 2020 10:41:37 +0000 Subject: [issue40551] PRs should be rebased on top of master before running the build/tests In-Reply-To: <1588882193.5.0.928762641921.issue40551@roundup.psfhosted.org> Message-ID: <1589020897.58.0.521256323654.issue40551@roundup.psfhosted.org> Filipe La?ns added the comment: > "Rather than build the commits that have been pushed to the branch the pull request is from, we build the merge between the source branch and the upstream branch." Okay, great. But this still only happens for Linux. And still has the same problem, the build needs to be re-triggered. > Both are fine, but... ... > Bot shouldn't use rebase, but merge master branch. Rebase in pull request branch break the pull request sometime. See this thread: https://discuss.python.org/t/info-rebase-origin-master-push-f-workflow-corrupts-pull-request-rarely/2558/7 Okay, so maybe I was not clear enough here. The PR would be rebased locally in the CI runs before building and running the tests. Nothing would ever be pushed. We don't really want users have to pull their branch before making changes, also the users might not give us write access to their branch. What I am proposing is to do here the same as Travis apparently does, and then maybe figure out a workflow where we (semi-/)automatically re-trigger the CI, to make everything works correctly with master. This is a low risk change. Rethinking the core workflow is the difficult part. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 06:42:11 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 09 May 2020 10:42:11 +0000 Subject: [issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) In-Reply-To: <1569848255.08.0.155489980043.issue38323@roundup.psfhosted.org> Message-ID: <1589020931.41.0.421550157352.issue38323@roundup.psfhosted.org> Chris Jerdonek added the comment: I'm attaching a stand-alone script that can reproduce the issue. It doesn't use unittest or even MultiLoopChildWatcher. It starts an event loop and then repeatedly calls loop.subprocess_exec() with 0.2 seconds in between until the "hang" happens (which shows up as a timeout). I recommend running the script for about 15 seconds, and if it doesn't happen, re-run it again. You might need to run it a half-dozen or dozen times to see the hang, but it can also happen right away. I'm sure the script can be cleaned up and simplified a lot more. This is just a start. I wanted to see how much of the cruft I could strip out quickly. This is what the output looks like after one of the hangs: [81]: 16.77 /.../cpython/Lib/subprocess.py:1048: ResourceWarning: subprocess 3282 is still running _warn("subprocess %s is still running" % self.pid, ResourceWarning: Enable tracemalloc to get the object allocation traceback killing pid: 3283 BaseSubprocessTransport: awaiting in _wait _sig_child: started releasing waiter: okay okay [82]: 16.99 /.../cpython/Lib/subprocess.py:1048: ResourceWarning: subprocess 3283 is still running _warn("subprocess %s is still running" % self.pid, ResourceWarning: Enable tracemalloc to get the object allocation traceback killing pid: 3284 BaseSubprocessTransport: awaiting in _wait _sig_child: started releasing waiter: **TIMEOUT** not okay: **TIMEOUT** You can ignore the ResourceWarnings. You can also see at the end that the _sig_child() handler was called even in the timeout case (right before the loop.call_later(TIMEOUT, ...) callback began). ---------- Added file: https://bugs.python.org/file49144/test-kill.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 06:43:43 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Sat, 09 May 2020 10:43:43 +0000 Subject: [issue40551] PRs should be rebased on top of master before running the build/tests In-Reply-To: <1588882193.5.0.928762641921.issue40551@roundup.psfhosted.org> Message-ID: <1589021023.87.0.41293855336.issue40551@roundup.psfhosted.org> Filipe La?ns added the comment: > re-trigger the CI, to make everything works correctly with master. *re-trigger the CI, to make *sure* everything works correctly with master. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 07:22:29 2020 From: report at bugs.python.org (Abhinav Vikram) Date: Sat, 09 May 2020 11:22:29 +0000 Subject: [issue40577] Spyder doesn't launch from Anaconda on MacBook Message-ID: <1589023349.3.0.301161845856.issue40577@roundup.psfhosted.org> New submission from Abhinav Vikram : I just installed Anaconda to start coding in Python. However, after installing, the moment I launch Spyder I get the error "Python quit unexpectedly" error. I have tried running "conda update --all" and even reinstalling anaconda but no help. Just for sanity check i looked up python version in the Terminal it is 3.7.6. If anyone can suggest a way to fix it it'll be most helpful. Process: python [6870] Path: /opt/anaconda3/python.app/Contents/MacOS/python Identifier: python Version: 0 Code Type: X86-64 (Native) Parent Process: ??? [6869] Responsible: python [6870] User ID: 501 Date/Time: 2020-05-09 16:12:47.228 +0530 OS Version: Mac OS X 10.13.6 (17G12034) Time Awake Since Boot: 19000 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes: 0x0000000000000001, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Signal: Illegal instruction: 4 Termination Reason: Namespace SIGNAL, Code 0x4 Terminating Process: exc handler [0] Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 _multiarray_umath.cpython-37m-darwin.so 0x00000001075b144b npy_cpu_supports + 139 1 _multiarray_umath.cpython-37m-darwin.so 0x000000010742f0fe InitOperators + 94 2 _multiarray_umath.cpython-37m-darwin.so 0x000000010742dc00 PyInit__multiarray_umath + 160 3 com.continuum.python 0x0000000105bc3c1d _PyImport_LoadDynamicModuleWithSpec + 557 4 com.continuum.python 0x0000000105bc3033 _imp_create_dynamic + 243 5 com.continuum.python 0x0000000105a57c0f _PyMethodDef_RawFastCallDict + 255 6 com.continuum.python 0x0000000105a5931d PyCFunction_Call + 61 7 com.continuum.python 0x0000000105b93d9d _PyEval_EvalFrameDefault + 46845 8 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 9 com.continuum.python 0x0000000105a58a03 _PyFunction_FastCallKeywords + 195 10 com.continuum.python 0x0000000105b95d67 call_function + 183 11 com.continuum.python 0x0000000105b92b92 _PyEval_EvalFrameDefault + 42226 12 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 13 com.continuum.python 0x0000000105b95d67 call_function + 183 14 com.continuum.python 0x0000000105b92afc _PyEval_EvalFrameDefault + 42076 15 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 16 com.continuum.python 0x0000000105b95d67 call_function + 183 17 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 18 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 19 com.continuum.python 0x0000000105b95d67 call_function + 183 20 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 21 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 22 com.continuum.python 0x0000000105b95d67 call_function + 183 23 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 24 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 25 com.continuum.python 0x0000000105a5a978 object_vacall + 248 26 com.continuum.python 0x0000000105a5ab83 _PyObject_CallMethodIdObjArgs + 243 27 com.continuum.python 0x0000000105bbc798 PyImport_ImportModuleLevelObject + 3640 28 com.continuum.python 0x0000000105b91919 _PyEval_EvalFrameDefault + 37497 29 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 30 com.continuum.python 0x0000000105b81e9b builtin_exec + 347 31 com.continuum.python 0x0000000105a57c0f _PyMethodDef_RawFastCallDict + 255 32 com.continuum.python 0x0000000105a5931d PyCFunction_Call + 61 33 com.continuum.python 0x0000000105b93d9d _PyEval_EvalFrameDefault + 46845 34 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 35 com.continuum.python 0x0000000105a58a03 _PyFunction_FastCallKeywords + 195 36 com.continuum.python 0x0000000105b95d67 call_function + 183 37 com.continuum.python 0x0000000105b92b92 _PyEval_EvalFrameDefault + 42226 38 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 39 com.continuum.python 0x0000000105b95d67 call_function + 183 40 com.continuum.python 0x0000000105b92afc _PyEval_EvalFrameDefault + 42076 41 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 42 com.continuum.python 0x0000000105b95d67 call_function + 183 43 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 44 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 45 com.continuum.python 0x0000000105b95d67 call_function + 183 46 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 47 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 48 com.continuum.python 0x0000000105a5a978 object_vacall + 248 49 com.continuum.python 0x0000000105a5ab83 _PyObject_CallMethodIdObjArgs + 243 50 com.continuum.python 0x0000000105bbc798 PyImport_ImportModuleLevelObject + 3640 51 com.continuum.python 0x0000000105b809d5 builtin___import__ + 149 52 com.continuum.python 0x0000000105a59388 PyCFunction_Call + 168 53 com.continuum.python 0x0000000105b93d9d _PyEval_EvalFrameDefault + 46845 54 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 55 com.continuum.python 0x0000000105a58a03 _PyFunction_FastCallKeywords + 195 56 com.continuum.python 0x0000000105b95d67 call_function + 183 57 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 58 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 59 com.continuum.python 0x0000000105a577c7 _PyFunction_FastCallDict + 231 60 com.continuum.python 0x0000000105a5a978 object_vacall + 248 61 com.continuum.python 0x0000000105a5ab83 _PyObject_CallMethodIdObjArgs + 243 62 com.continuum.python 0x0000000105bbbd03 PyImport_ImportModuleLevelObject + 931 63 com.continuum.python 0x0000000105b91919 _PyEval_EvalFrameDefault + 37497 64 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 65 com.continuum.python 0x0000000105b81e9b builtin_exec + 347 66 com.continuum.python 0x0000000105a57c0f _PyMethodDef_RawFastCallDict + 255 67 com.continuum.python 0x0000000105a5931d PyCFunction_Call + 61 68 com.continuum.python 0x0000000105b93d9d _PyEval_EvalFrameDefault + 46845 69 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 70 com.continuum.python 0x0000000105a58a03 _PyFunction_FastCallKeywords + 195 71 com.continuum.python 0x0000000105b95d67 call_function + 183 72 com.continuum.python 0x0000000105b92b92 _PyEval_EvalFrameDefault + 42226 73 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 74 com.continuum.python 0x0000000105b95d67 call_function + 183 75 com.continuum.python 0x0000000105b92afc _PyEval_EvalFrameDefault + 42076 76 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 77 com.continuum.python 0x0000000105b95d67 call_function + 183 78 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 79 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 80 com.continuum.python 0x0000000105b95d67 call_function + 183 81 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 82 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 83 com.continuum.python 0x0000000105a5a978 object_vacall + 248 84 com.continuum.python 0x0000000105a5ab83 _PyObject_CallMethodIdObjArgs + 243 85 com.continuum.python 0x0000000105bbc798 PyImport_ImportModuleLevelObject + 3640 86 com.continuum.python 0x0000000105b809d5 builtin___import__ + 149 87 com.continuum.python 0x0000000105a59388 PyCFunction_Call + 168 88 com.continuum.python 0x0000000105b93d9d _PyEval_EvalFrameDefault + 46845 89 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 90 com.continuum.python 0x0000000105a58a03 _PyFunction_FastCallKeywords + 195 91 com.continuum.python 0x0000000105b95d67 call_function + 183 92 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 93 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 94 com.continuum.python 0x0000000105a577c7 _PyFunction_FastCallDict + 231 95 com.continuum.python 0x0000000105a5a978 object_vacall + 248 96 com.continuum.python 0x0000000105a5ab83 _PyObject_CallMethodIdObjArgs + 243 97 com.continuum.python 0x0000000105bbbd03 PyImport_ImportModuleLevelObject + 931 98 com.continuum.python 0x0000000105b91919 _PyEval_EvalFrameDefault + 37497 99 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 100 com.continuum.python 0x0000000105b81e9b builtin_exec + 347 101 com.continuum.python 0x0000000105a57c0f _PyMethodDef_RawFastCallDict + 255 102 com.continuum.python 0x0000000105a5931d PyCFunction_Call + 61 103 com.continuum.python 0x0000000105b93d9d _PyEval_EvalFrameDefault + 46845 104 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 105 com.continuum.python 0x0000000105a58a03 _PyFunction_FastCallKeywords + 195 106 com.continuum.python 0x0000000105b95d67 call_function + 183 107 com.continuum.python 0x0000000105b92b92 _PyEval_EvalFrameDefault + 42226 108 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 109 com.continuum.python 0x0000000105b95d67 call_function + 183 110 com.continuum.python 0x0000000105b92afc _PyEval_EvalFrameDefault + 42076 111 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 112 com.continuum.python 0x0000000105b95d67 call_function + 183 113 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 114 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 115 com.continuum.python 0x0000000105b95d67 call_function + 183 116 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 117 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 118 com.continuum.python 0x0000000105a5a978 object_vacall + 248 119 com.continuum.python 0x0000000105a5ab83 _PyObject_CallMethodIdObjArgs + 243 120 com.continuum.python 0x0000000105bbc798 PyImport_ImportModuleLevelObject + 3640 121 com.continuum.python 0x0000000105b809d5 builtin___import__ + 149 122 com.continuum.python 0x0000000105a59388 PyCFunction_Call + 168 123 com.continuum.python 0x0000000105b93d9d _PyEval_EvalFrameDefault + 46845 124 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 125 com.continuum.python 0x0000000105a58a03 _PyFunction_FastCallKeywords + 195 126 com.continuum.python 0x0000000105b95d67 call_function + 183 127 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 128 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 129 com.continuum.python 0x0000000105a577c7 _PyFunction_FastCallDict + 231 130 com.continuum.python 0x0000000105a5a978 object_vacall + 248 131 com.continuum.python 0x0000000105a5ab83 _PyObject_CallMethodIdObjArgs + 243 132 com.continuum.python 0x0000000105bbbd03 PyImport_ImportModuleLevelObject + 931 133 com.continuum.python 0x0000000105b91919 _PyEval_EvalFrameDefault + 37497 134 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 135 com.continuum.python 0x0000000105b81e9b builtin_exec + 347 136 com.continuum.python 0x0000000105a57c0f _PyMethodDef_RawFastCallDict + 255 137 com.continuum.python 0x0000000105a5931d PyCFunction_Call + 61 138 com.continuum.python 0x0000000105b93d9d _PyEval_EvalFrameDefault + 46845 139 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 140 com.continuum.python 0x0000000105a58a03 _PyFunction_FastCallKeywords + 195 141 com.continuum.python 0x0000000105b95d67 call_function + 183 142 com.continuum.python 0x0000000105b92b92 _PyEval_EvalFrameDefault + 42226 143 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 144 com.continuum.python 0x0000000105b95d67 call_function + 183 145 com.continuum.python 0x0000000105b92afc _PyEval_EvalFrameDefault + 42076 146 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 147 com.continuum.python 0x0000000105b95d67 call_function + 183 148 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 149 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 150 com.continuum.python 0x0000000105b95d67 call_function + 183 151 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 152 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 153 com.continuum.python 0x0000000105a5a978 object_vacall + 248 154 com.continuum.python 0x0000000105a5ab83 _PyObject_CallMethodIdObjArgs + 243 155 com.continuum.python 0x0000000105bbc798 PyImport_ImportModuleLevelObject + 3640 156 com.continuum.python 0x0000000105b809d5 builtin___import__ + 149 157 com.continuum.python 0x0000000105a58bd8 _PyMethodDef_RawFastCallKeywords + 392 158 com.continuum.python 0x0000000105b95de2 call_function + 306 159 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 160 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 161 com.continuum.python 0x0000000105b81e9b builtin_exec + 347 162 com.continuum.python 0x0000000105a57c0f _PyMethodDef_RawFastCallDict + 255 163 com.continuum.python 0x0000000105a5931d PyCFunction_Call + 61 164 com.continuum.python 0x0000000105b93d9d _PyEval_EvalFrameDefault + 46845 165 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 166 com.continuum.python 0x0000000105a58a03 _PyFunction_FastCallKeywords + 195 167 com.continuum.python 0x0000000105b95d67 call_function + 183 168 com.continuum.python 0x0000000105b92b92 _PyEval_EvalFrameDefault + 42226 169 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 170 com.continuum.python 0x0000000105b95d67 call_function + 183 171 com.continuum.python 0x0000000105b92afc _PyEval_EvalFrameDefault + 42076 172 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 173 com.continuum.python 0x0000000105b95d67 call_function + 183 174 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 175 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 176 com.continuum.python 0x0000000105b95d67 call_function + 183 177 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 178 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 179 com.continuum.python 0x0000000105a5a978 object_vacall + 248 180 com.continuum.python 0x0000000105a5ab83 _PyObject_CallMethodIdObjArgs + 243 181 com.continuum.python 0x0000000105bbc798 PyImport_ImportModuleLevelObject + 3640 182 com.continuum.python 0x0000000105b91919 _PyEval_EvalFrameDefault + 37497 183 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 184 com.continuum.python 0x0000000105b81e9b builtin_exec + 347 185 com.continuum.python 0x0000000105a57c0f _PyMethodDef_RawFastCallDict + 255 186 com.continuum.python 0x0000000105a5931d PyCFunction_Call + 61 187 com.continuum.python 0x0000000105b93d9d _PyEval_EvalFrameDefault + 46845 188 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 189 com.continuum.python 0x0000000105a58a03 _PyFunction_FastCallKeywords + 195 190 com.continuum.python 0x0000000105b95d67 call_function + 183 191 com.continuum.python 0x0000000105b92b92 _PyEval_EvalFrameDefault + 42226 192 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 193 com.continuum.python 0x0000000105b95d67 call_function + 183 194 com.continuum.python 0x0000000105b92afc _PyEval_EvalFrameDefault + 42076 195 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 196 com.continuum.python 0x0000000105b95d67 call_function + 183 197 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 198 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 199 com.continuum.python 0x0000000105b95d67 call_function + 183 200 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 201 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 202 com.continuum.python 0x0000000105a5a978 object_vacall + 248 203 com.continuum.python 0x0000000105a5ab83 _PyObject_CallMethodIdObjArgs + 243 204 com.continuum.python 0x0000000105bbc798 PyImport_ImportModuleLevelObject + 3640 205 com.continuum.python 0x0000000105b809d5 builtin___import__ + 149 206 com.continuum.python 0x0000000105a59388 PyCFunction_Call + 168 207 com.continuum.python 0x0000000105b93d9d _PyEval_EvalFrameDefault + 46845 208 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 209 com.continuum.python 0x0000000105a58a03 _PyFunction_FastCallKeywords + 195 210 com.continuum.python 0x0000000105b95d67 call_function + 183 211 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 212 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 213 com.continuum.python 0x0000000105a577c7 _PyFunction_FastCallDict + 231 214 com.continuum.python 0x0000000105a5a978 object_vacall + 248 215 com.continuum.python 0x0000000105a5ab83 _PyObject_CallMethodIdObjArgs + 243 216 com.continuum.python 0x0000000105bbbd03 PyImport_ImportModuleLevelObject + 931 217 com.continuum.python 0x0000000105b91919 _PyEval_EvalFrameDefault + 37497 218 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 219 com.continuum.python 0x0000000105b81e9b builtin_exec + 347 220 com.continuum.python 0x0000000105a57c0f _PyMethodDef_RawFastCallDict + 255 221 com.continuum.python 0x0000000105a5931d PyCFunction_Call + 61 222 com.continuum.python 0x0000000105b93d9d _PyEval_EvalFrameDefault + 46845 223 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 224 com.continuum.python 0x0000000105a58a03 _PyFunction_FastCallKeywords + 195 225 com.continuum.python 0x0000000105b95d67 call_function + 183 226 com.continuum.python 0x0000000105b92b92 _PyEval_EvalFrameDefault + 42226 227 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 228 com.continuum.python 0x0000000105b95d67 call_function + 183 229 com.continuum.python 0x0000000105b92afc _PyEval_EvalFrameDefault + 42076 230 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 231 com.continuum.python 0x0000000105b95d67 call_function + 183 232 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 233 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 234 com.continuum.python 0x0000000105b95d67 call_function + 183 235 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 236 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 237 com.continuum.python 0x0000000105a5a978 object_vacall + 248 238 com.continuum.python 0x0000000105a5ab83 _PyObject_CallMethodIdObjArgs + 243 239 com.continuum.python 0x0000000105bbc798 PyImport_ImportModuleLevelObject + 3640 240 com.continuum.python 0x0000000105b91919 _PyEval_EvalFrameDefault + 37497 241 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 242 com.continuum.python 0x0000000105b81e9b builtin_exec + 347 243 com.continuum.python 0x0000000105a57c0f _PyMethodDef_RawFastCallDict + 255 244 com.continuum.python 0x0000000105a5931d PyCFunction_Call + 61 245 com.continuum.python 0x0000000105b93d9d _PyEval_EvalFrameDefault + 46845 246 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 247 com.continuum.python 0x0000000105a58a03 _PyFunction_FastCallKeywords + 195 248 com.continuum.python 0x0000000105b95d67 call_function + 183 249 com.continuum.python 0x0000000105b92b92 _PyEval_EvalFrameDefault + 42226 250 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 251 com.continuum.python 0x0000000105b95d67 call_function + 183 252 com.continuum.python 0x0000000105b92afc _PyEval_EvalFrameDefault + 42076 253 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 254 com.continuum.python 0x0000000105b95d67 call_function + 183 255 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 256 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 257 com.continuum.python 0x0000000105b95d67 call_function + 183 258 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 259 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 260 com.continuum.python 0x0000000105a5a978 object_vacall + 248 261 com.continuum.python 0x0000000105a5ab83 _PyObject_CallMethodIdObjArgs + 243 262 com.continuum.python 0x0000000105bbc798 PyImport_ImportModuleLevelObject + 3640 263 com.continuum.python 0x0000000105b91919 _PyEval_EvalFrameDefault + 37497 264 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 265 com.continuum.python 0x0000000105b81e9b builtin_exec + 347 266 com.continuum.python 0x0000000105a57c0f _PyMethodDef_RawFastCallDict + 255 267 com.continuum.python 0x0000000105a5931d PyCFunction_Call + 61 268 com.continuum.python 0x0000000105b93d9d _PyEval_EvalFrameDefault + 46845 269 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 270 com.continuum.python 0x0000000105a58a03 _PyFunction_FastCallKeywords + 195 271 com.continuum.python 0x0000000105b95d67 call_function + 183 272 com.continuum.python 0x0000000105b92b92 _PyEval_EvalFrameDefault + 42226 273 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 274 com.continuum.python 0x0000000105b95d67 call_function + 183 275 com.continuum.python 0x0000000105b92afc _PyEval_EvalFrameDefault + 42076 276 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 277 com.continuum.python 0x0000000105b95d67 call_function + 183 278 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 279 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 280 com.continuum.python 0x0000000105b95d67 call_function + 183 281 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 282 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 283 com.continuum.python 0x0000000105a5a978 object_vacall + 248 284 com.continuum.python 0x0000000105a5ab83 _PyObject_CallMethodIdObjArgs + 243 285 com.continuum.python 0x0000000105bbc798 PyImport_ImportModuleLevelObject + 3640 286 com.continuum.python 0x0000000105b91919 _PyEval_EvalFrameDefault + 37497 287 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 288 com.continuum.python 0x0000000105b81e9b builtin_exec + 347 289 com.continuum.python 0x0000000105a57c0f _PyMethodDef_RawFastCallDict + 255 290 com.continuum.python 0x0000000105a5931d PyCFunction_Call + 61 291 com.continuum.python 0x0000000105b93d9d _PyEval_EvalFrameDefault + 46845 292 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 293 com.continuum.python 0x0000000105a58a03 _PyFunction_FastCallKeywords + 195 294 com.continuum.python 0x0000000105b95d67 call_function + 183 295 com.continuum.python 0x0000000105b92b92 _PyEval_EvalFrameDefault + 42226 296 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 297 com.continuum.python 0x0000000105b95d67 call_function + 183 298 com.continuum.python 0x0000000105b92afc _PyEval_EvalFrameDefault + 42076 299 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 300 com.continuum.python 0x0000000105b95d67 call_function + 183 301 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 302 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 303 com.continuum.python 0x0000000105b95d67 call_function + 183 304 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 305 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 306 com.continuum.python 0x0000000105a5a978 object_vacall + 248 307 com.continuum.python 0x0000000105a5ab83 _PyObject_CallMethodIdObjArgs + 243 308 com.continuum.python 0x0000000105bbc798 PyImport_ImportModuleLevelObject + 3640 309 com.continuum.python 0x0000000105b91919 _PyEval_EvalFrameDefault + 37497 310 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 311 com.continuum.python 0x0000000105b81e9b builtin_exec + 347 312 com.continuum.python 0x0000000105a57c0f _PyMethodDef_RawFastCallDict + 255 313 com.continuum.python 0x0000000105a5931d PyCFunction_Call + 61 314 com.continuum.python 0x0000000105b93d9d _PyEval_EvalFrameDefault + 46845 315 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 316 com.continuum.python 0x0000000105a58a03 _PyFunction_FastCallKeywords + 195 317 com.continuum.python 0x0000000105b95d67 call_function + 183 318 com.continuum.python 0x0000000105b92b92 _PyEval_EvalFrameDefault + 42226 319 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 320 com.continuum.python 0x0000000105b95d67 call_function + 183 321 com.continuum.python 0x0000000105b92afc _PyEval_EvalFrameDefault + 42076 322 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 323 com.continuum.python 0x0000000105b95d67 call_function + 183 324 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 325 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 326 com.continuum.python 0x0000000105b95d67 call_function + 183 327 com.continuum.python 0x0000000105b93ad4 _PyEval_EvalFrameDefault + 46132 328 com.continuum.python 0x0000000105a582d5 function_code_fastcall + 117 329 com.continuum.python 0x0000000105a5a978 object_vacall + 248 330 com.continuum.python 0x0000000105a5ab83 _PyObject_CallMethodIdObjArgs + 243 331 com.continuum.python 0x0000000105bbc798 PyImport_ImportModuleLevelObject + 3640 332 com.continuum.python 0x0000000105b91919 _PyEval_EvalFrameDefault + 37497 333 com.continuum.python 0x0000000105b8746e _PyEval_EvalCodeWithName + 414 334 com.continuum.python 0x0000000105beace0 PyRun_FileExFlags + 256 335 com.continuum.python 0x0000000105bea157 PyRun_SimpleFileExFlags + 391 336 com.continuum.python 0x0000000105c17dc3 pymain_main + 9635 337 com.continuum.python 0x0000000105a2af2d main + 125 338 libdyld.dylib 0x00007fff6c4bb015 start + 1 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x00000001076a0650 rbx: 0x00000001076341f1 rcx: 0x0000000000000000 rdx: 0x00000000bfebfbff rdi: 0x00000001076341f9 rsi: 0x00000001076341f9 rbp: 0x00007ffeea1c62c0 rsp: 0x00007ffeea1c62b0 r8: 0x0000000000000000 r9: 0x00000000000001ff r10: 0x00007f83e581a028 r11: 0x000000000041d9fc r12: 0x0000000107316da0 r13: 0x0000000107319790 r14: 0x0000000107327f00 r15: 0x000000010731f0b0 rip: 0x00000001075b144b rfl: 0x0000000000010246 cr2: 0x00000001076341ed ---------- components: macOS messages: 368513 nosy: Abhinav Vikram, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Spyder doesn't launch from Anaconda on MacBook type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 07:24:50 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 09 May 2020 11:24:50 +0000 Subject: [issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) In-Reply-To: <1569848255.08.0.155489980043.issue38323@roundup.psfhosted.org> Message-ID: <1589023490.26.0.709589717938.issue38323@roundup.psfhosted.org> Chris Jerdonek added the comment: I'm attaching a slightly simpler version of the script. ---------- Added file: https://bugs.python.org/file49145/test-kill2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 07:29:11 2020 From: report at bugs.python.org (Christian Heimes) Date: Sat, 09 May 2020 11:29:11 +0000 Subject: [issue40577] Spyder doesn't launch from Anaconda on MacBook In-Reply-To: <1589023349.3.0.301161845856.issue40577@roundup.psfhosted.org> Message-ID: <1589023751.51.0.206641893391.issue40577@roundup.psfhosted.org> Christian Heimes added the comment: This is a bug in a 3rd party module, not in CPython. Please report the issue with Anaconda and Spyder. ---------- nosy: +christian.heimes resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 07:39:39 2020 From: report at bugs.python.org (Inada Naoki) Date: Sat, 09 May 2020 11:39:39 +0000 Subject: [issue40575] _PyDict_GetItemIdWithError() should call _PyDict_GetItem_KnownHash() In-Reply-To: <1589017629.56.0.630851682841.issue40575@roundup.psfhosted.org> Message-ID: <1589024379.18.0.404946114235.issue40575@roundup.psfhosted.org> Change by Inada Naoki : ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 08:39:41 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 09 May 2020 12:39:41 +0000 Subject: [issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) In-Reply-To: <1569848255.08.0.155489980043.issue38323@roundup.psfhosted.org> Message-ID: <1589027981.15.0.621261689071.issue38323@roundup.psfhosted.org> Chris Jerdonek added the comment: I'm adding Nathaniel in case he can recognize this as one of the signal handler cases he's already come across. ---------- nosy: +njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 09:06:38 2020 From: report at bugs.python.org (Sam Lijin) Date: Sat, 09 May 2020 13:06:38 +0000 Subject: [issue40576] Align docs for list.sort, sorted, and on the website In-Reply-To: <1589020231.08.0.0102454961056.issue40576@roundup.psfhosted.org> Message-ID: <1589029598.4.0.961908483146.issue40576@roundup.psfhosted.org> Change by Sam Lijin : ---------- keywords: +patch pull_requests: +19327 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20017 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 10:06:56 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 09 May 2020 14:06:56 +0000 Subject: [issue40578] Deprecate numeric item access for platform.uname() Message-ID: <1589033216.57.0.707246281717.issue40578@roundup.psfhosted.org> New submission from Jason R. Coombs : In issue40570, I learned that some users are still relying on legacy tuple-like behaviors of `platform.uname()`, namely the access by item position and length: ``` platform.uname()[0] len(platform.uname()) ``` I propose to deprecate these behaviors and constrain the supported interface to the following: ``` platform.uname().attribute items = tuple(platform.uname()) ``` In other words, the `uname_result` would only support access of the items by attribute or iteration of all attributes. Any users wishing to access items by position or to calculate the length of the result would need to explicitly construct a tuple from the result. ---------- messages: 368517 nosy: jaraco, lemburg priority: normal severity: normal status: open title: Deprecate numeric item access for platform.uname() type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 10:08:22 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 09 May 2020 14:08:22 +0000 Subject: [issue40570] len(platform.uname()) has changed in Python 3.9 In-Reply-To: <1588968140.85.0.743964408101.issue40570@roundup.psfhosted.org> Message-ID: <1589033302.67.0.851230308683.issue40570@roundup.psfhosted.org> Jason R. Coombs added the comment: Thanks Marc-Andre for the suggestion, but I don't think that approach is viable here. The whole point of issue35967 was to defer the execution of the `.processor` behavior until it was requested. The intention is not to extend the tuple, but to shorten it (at least not to require the last element to be provided at construction time). Perhaps I'm missing something here, so feel free to provide a more concrete example of what you have in mind. Just be cautious not to violate the intention (https://github.com/python/cpython/blob/77c614624b6bf2145bef69830d0f499d8b55ec0c/Lib/platform.py#L784-L787). I created issue40578 to track deprecation of uname for positional access. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 10:12:45 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 09 May 2020 14:12:45 +0000 Subject: [issue40570] len(platform.uname()) has changed in Python 3.9 In-Reply-To: <1588968140.85.0.743964408101.issue40570@roundup.psfhosted.org> Message-ID: <1589033565.15.0.393820730051.issue40570@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset 2c3d508c5fabe40dac848fb9ae558069f0576879 by Jason R. Coombs in branch 'master': bpo-40570: Improve compatibility of uname_result with late-bound .platform (#20015) https://github.com/python/cpython/commit/2c3d508c5fabe40dac848fb9ae558069f0576879 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 10:14:14 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 09 May 2020 14:14:14 +0000 Subject: [issue40570] len(platform.uname()) has changed in Python 3.9 In-Reply-To: <1588968140.85.0.743964408101.issue40570@roundup.psfhosted.org> Message-ID: <1589033654.2.0.87408958458.issue40570@roundup.psfhosted.org> Jason R. Coombs added the comment: I've gone ahead and merged PR 20015 to fix the issue, but I'm happy to revisit if a better approach is proposed. ---------- keywords: +3.9regression -patch resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 10:17:35 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 09 May 2020 14:17:35 +0000 Subject: [issue40576] Align docs for list.sort, sorted, and on the website In-Reply-To: <1589020231.08.0.0102454961056.issue40576@roundup.psfhosted.org> Message-ID: <1589033855.26.0.146071297522.issue40576@roundup.psfhosted.org> Eric V. Smith added the comment: sorted() does not just delegate to list.sort(): it sorts any iterable. >>> sorted({0:1,2:3,-1:4}) [-1, 0, 2] I think your change conflates the two by pointing to list.sort() from sorted(). ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 10:25:38 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 09 May 2020 14:25:38 +0000 Subject: [issue37573] asyncio: freeze when using MultiLoopChildWatcher on Solaris In-Reply-To: <1562936255.66.0.924337077063.issue37573@roundup.psfhosted.org> Message-ID: <1589034338.89.0.341635409447.issue37573@roundup.psfhosted.org> Chris Jerdonek added the comment: This looks like a duplicate of #38323: https://bugs.python.org/issue38323 ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 10:26:45 2020 From: report at bugs.python.org (Sam Lijin) Date: Sat, 09 May 2020 14:26:45 +0000 Subject: [issue40576] Align docs for list.sort, sorted, and on the website In-Reply-To: <1589020231.08.0.0102454961056.issue40576@roundup.psfhosted.org> Message-ID: <1589034405.25.0.338233110295.issue40576@roundup.psfhosted.org> Sam Lijin added the comment: I do clarify that they're not the same thing and that `sorted` accepts any iterable: https://github.com/python/cpython/pull/20017/files#diff-30d76a3dc0c885f86917b7d307ccf279 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 10:33:07 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 09 May 2020 14:33:07 +0000 Subject: [issue40578] Deprecate numeric item access for platform.uname() In-Reply-To: <1589033216.57.0.707246281717.issue40578@roundup.psfhosted.org> Message-ID: <1589034787.12.0.965523290558.issue40578@roundup.psfhosted.org> Jason R. Coombs added the comment: In https://github.com/jaraco/cpython/tree/bc73729eb9, I started drafting a proposed implementation to address this concern, but ran into a snag - the tests immediately reveal that `tuple(platform.uname())` invokes `__len__`, triggering the deprecation warning... so deprecating it while supporting `tuple(result)` may not be possible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 11:00:43 2020 From: report at bugs.python.org (Andrew Black) Date: Sat, 09 May 2020 15:00:43 +0000 Subject: [issue40579] Second argument to iterator.next not described Message-ID: <1589036443.24.0.81733349638.issue40579@roundup.psfhosted.org> New submission from Andrew Black : The documentation for the built-in function next (which calls the __next__ method on an iterator) discusses its behavior when the iterator is exhausted. It talks about the StopIteration exception. However, it does not say anything about calling next with two arguments. See the library documentation at https://docs.python.org/3/library/stdtypes.html#iterator-types My impression was that the presence of the second argument would suppress the StopIteration exception; instead next would return the value of the second argument. That is the way that list iterators behave, for example. This behavior should be documented. ---------- assignee: docs at python components: Documentation messages: 368525 nosy: Andrew Black, docs at python priority: normal severity: normal status: open title: Second argument to iterator.next not described type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 11:20:03 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 09 May 2020 15:20:03 +0000 Subject: [issue40576] Align docs for list.sort, sorted, and on the website In-Reply-To: <1589020231.08.0.0102454961056.issue40576@roundup.psfhosted.org> Message-ID: <1589037603.49.0.526524164788.issue40576@roundup.psfhosted.org> Eric V. Smith added the comment: I still think it's a mistake to point to list.sort() from sorted(). If anything I think it should be the other way around. We'll see what other people think. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 11:20:33 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sat, 09 May 2020 15:20:33 +0000 Subject: [issue40579] Second argument to iterator.next not described In-Reply-To: <1589036443.24.0.81733349638.issue40579@roundup.psfhosted.org> Message-ID: <1589037633.22.0.370795489481.issue40579@roundup.psfhosted.org> R?mi Lapeyre added the comment: It's documented here: https://docs.python.org/3/library/functions.html#next ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 12:07:35 2020 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 09 May 2020 16:07:35 +0000 Subject: [issue40570] len(platform.uname()) has changed in Python 3.9 In-Reply-To: <1589033302.67.0.851230308683.issue40570@roundup.psfhosted.org> Message-ID: Marc-Andre Lemburg added the comment: Ok, let me add some more context: When I wrote the uname interface I was aware that calling the API will take some resources. That's why I added the cache. IMO, that was enough as optimization. Now, you added a late binding optimization for the whole uname return tuple to save the effort of going out to the system and figure our the value using separate APIs or even shell access. I think this would have been better implemented in the various uname() consumers (https://github.com/python/cpython/blob/77c614624b6bf2145bef69830d0f499d8b55ec0c/Lib/platform.py#L898 and below), using a variant of the uname() API, say _uname(), which leaves out the processor information for those APIs which don't need it and only provide the late binding in processor() (which could then also fill in the cache value for uname(). The uname() API would then still do the full lookup, but applications could then use the specialized API to query only the information they need. I don't think that deprecating standard tuple access is an option for the uname() return value, since it's documented to be a tuple. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Experts (#1, May 09 2020) >>> Python Projects, Coaching and Support ... https://www.egenix.com/ >>> Python Product Development ... https://consulting.egenix.com/ ________________________________________________________________________ ::: We implement business ideas - efficiently in both time and costs ::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 https://www.egenix.com/company/contact/ https://www.malemburg.com/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 12:31:11 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 09 May 2020 16:31:11 +0000 Subject: [issue40579] Second argument to iterator.next not described In-Reply-To: <1589036443.24.0.81733349638.issue40579@roundup.psfhosted.org> Message-ID: <1589041871.28.0.22950547129.issue40579@roundup.psfhosted.org> Raymond Hettinger added the comment: The next() function has a different signature than the __next__() method. The former takes one or two arguments. That latter only takes one. >>> it = iter('abcde') >>> next(it) 'a' >>> next(it, 'default') 'b' >>> it.__next__() 'c' >>> it.__next__('default') Traceback (most recent call last): File "", line 1, in it.__next__('default') TypeError: expected 0 arguments, got 1 ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 13:06:15 2020 From: report at bugs.python.org (Paul Ganssle) Date: Sat, 09 May 2020 17:06:15 +0000 Subject: [issue40536] Addition of a "list of available time zones" function to zoneinfo In-Reply-To: <1588785591.81.0.248136692657.issue40536@roundup.psfhosted.org> Message-ID: <1589043975.53.0.0595614493177.issue40536@roundup.psfhosted.org> Paul Ganssle added the comment: I have an initial implementation against the reference implementation here: https://github.com/pganssle/zoneinfo/pull/60 Once GH-19909 is merged, I will turn that into a PR against CPython. For the first pass I went with: 1. free-standing function 2. returning set() 3. no cache 4. available_timezones() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 13:19:53 2020 From: report at bugs.python.org (Brad Solomon) Date: Sat, 09 May 2020 17:19:53 +0000 Subject: [issue40561] Provide docstrings for public-facing webbrowser functions In-Reply-To: <1588941280.97.0.150032786212.issue40561@roundup.psfhosted.org> Message-ID: <1589044793.48.0.667714382209.issue40561@roundup.psfhosted.org> Change by Brad Solomon : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 13:20:28 2020 From: report at bugs.python.org (Brad Solomon) Date: Sat, 09 May 2020 17:20:28 +0000 Subject: [issue40561] Provide docstrings for public-facing webbrowser functions In-Reply-To: <1588941280.97.0.150032786212.issue40561@roundup.psfhosted.org> Message-ID: <1589044828.85.0.560744246243.issue40561@roundup.psfhosted.org> Brad Solomon added the comment: The module source notes "Maintained by Georg Brandl." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 13:54:39 2020 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 09 May 2020 17:54:39 +0000 Subject: [issue40575] _PyDict_GetItemIdWithError() should call _PyDict_GetItem_KnownHash() In-Reply-To: <1589017629.56.0.630851682841.issue40575@roundup.psfhosted.org> Message-ID: <1589046879.62.0.137781743826.issue40575@roundup.psfhosted.org> Change by Stefan Behnel : ---------- keywords: +patch pull_requests: +19329 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20018 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 14:50:20 2020 From: report at bugs.python.org (Nathaniel Smith) Date: Sat, 09 May 2020 18:50:20 +0000 Subject: [issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) In-Reply-To: <1589027981.15.0.621261689071.issue38323@roundup.psfhosted.org> Message-ID: Nathaniel Smith added the comment: I don't have any particular insight into the bug, but I do have an observation: this seems like an awful lot of energy to spend on some code that's not even used by default. Would it make sense to deprecate it and stick with ThreadedChildWatcher? On Sat, May 9, 2020, 05:39 Chris Jerdonek wrote: > > Chris Jerdonek added the comment: > > I'm adding Nathaniel in case he can recognize this as one of the signal > handler cases he's already come across. > > ---------- > nosy: +njs > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 14:58:32 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 09 May 2020 18:58:32 +0000 Subject: [issue40561] Provide docstrings for public-facing webbrowser functions In-Reply-To: <1588941280.97.0.150032786212.issue40561@roundup.psfhosted.org> Message-ID: <1589050712.61.0.9355493157.issue40561@roundup.psfhosted.org> Terry J. Reedy added the comment: Except is isn't, as he has been inactive for years. Git log may or may not show more recent commits. My dev machine is being repaired but should be back soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 15:12:26 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 09 May 2020 19:12:26 +0000 Subject: [issue40570] len(platform.uname()) has changed in Python 3.9 In-Reply-To: <1588968140.85.0.743964408101.issue40570@roundup.psfhosted.org> Message-ID: <1589051546.48.0.333872586187.issue40570@roundup.psfhosted.org> Jason R. Coombs added the comment: > you added a late binding optimization for the whole uname return tuple to save the effort of ... shell access. It wasn't to save the effort and it wasn't an optimization. There was a fundamental race condition where it became impossible to implement a `uname` command using Python because `platform.system()` (or anything else that delegated to `platform.uname()`) would unconditionally shell out to `uname`, and this would happen early, before a library could intercept the behavior. See issue35967 for more details on the motivation and challenges. > I think this would have been better implemented... This idea is interesting, but I believe it also falls prey to the same race condition if any code calls `platform.uname()` before a Python-based uname implementation has a chance to monkeypatch the behavior. May I suggest that you either revive the conversation in issue35967 or open a new ticket to discuss improving the implementation so that the details aren't lost in this ticket, which was specifically about compatibility issues? > I don't think that deprecating standard tuple access is an option for the uname() return value, since it's documented to be a tuple. I'll address this concern in the ticket I opened about the deprecation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 15:17:34 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 09 May 2020 19:17:34 +0000 Subject: [issue40397] Refactor typing._GenericAlias In-Reply-To: <1587918915.07.0.818996162208.issue40397@roundup.psfhosted.org> Message-ID: <1589051854.85.0.488848728134.issue40397@roundup.psfhosted.org> Guido van Rossum added the comment: @Serhiy can you look at this? A possible fix might be: diff --git a/Lib/typing.py b/Lib/typing.py index 681ab6d21e..adcef1e82b 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -701,7 +701,8 @@ class _GenericAlias(_BaseGenericAlias, _root=True): arg = subst[arg] elif isinstance(arg, (_BaseGenericAlias, GenericAlias)): subargs = tuple(subst[x] for x in arg.__parameters__) - arg = arg[subargs] + if subargs: + arg = arg[subargs] new_args.append(arg) return self.copy_with(tuple(new_args)) The immediate cause of the problem seems to be that we call arg[subargs] with subargs being (). So arg is a _GenericAlias but its __parameters__ is (). I'm not sure what path was taken previously. :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 15:22:57 2020 From: report at bugs.python.org (Glenn Travis) Date: Sat, 09 May 2020 19:22:57 +0000 Subject: [issue40580] Macintosh Documentation Still Bad Message-ID: <1589052177.46.0.304784096206.issue40580@roundup.psfhosted.org> New submission from Glenn Travis : This was reported two years ago, and still is not fixed https://bugs.python.org/issue32824#msg312028 and the documentation is even older. It starts off referencing "Mac OS X 10.8" and Apple Documents that are archived. Then the section referencing using the Finder and Python Launcher does not work with macOS Catalina. Can this finally be corrected? ---------- messages: 368536 nosy: TotallyLost priority: normal severity: normal status: open title: Macintosh Documentation Still Bad type: resource usage versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 15:23:30 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 09 May 2020 19:23:30 +0000 Subject: [issue40578] Deprecate numeric item access for platform.uname() In-Reply-To: <1589033216.57.0.707246281717.issue40578@roundup.psfhosted.org> Message-ID: <1589052210.4.0.40101790694.issue40578@roundup.psfhosted.org> Jason R. Coombs added the comment: In issue40570, Marc-Andre writes: > I don't think that deprecating standard tuple access is an option for the uname() return value, since it's documented to be a tuple. My thinking here is that as part of the deprecation, the documentation would be updated to reflect the recommended and long-term supported usage (attribute access + iterability), including the recommended way to adapt if one wants a tuple. The guidance would eliminate or indicate as deprecated the index-based access. Then, by way of the DeprecationWarning, those still relying on item-access would be encouraged to update their implementation to use the preferred form. By doing this, `platform` goes from having 3 right ways to do something: ``` system = platform.system() system = platfurm.uname().system system = platform.uname()[0] ``` to just the first two. I don't see how documenting something makes it permanent, though I acknowledge it does affect how one approaches any deprecation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 15:39:09 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sat, 09 May 2020 19:39:09 +0000 Subject: [issue40580] Macintosh Documentation Still Bad In-Reply-To: <1589052177.46.0.304784096206.issue40580@roundup.psfhosted.org> Message-ID: <1589053149.96.0.0694085620731.issue40580@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi Gleen, this looks like there already exists an issue for this problem, please use it instead of opening a new one. Can you please open a new Pull-Request for solving this issue? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 15:40:36 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 09 May 2020 19:40:36 +0000 Subject: [issue40580] Macintosh Documentation Still Bad In-Reply-To: <1589052177.46.0.304784096206.issue40580@roundup.psfhosted.org> Message-ID: <1589053236.71.0.490660104575.issue40580@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Docs: Using Python on a Macintosh has bad info per Apple site _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 16:12:53 2020 From: report at bugs.python.org (Glenn Travis) Date: Sat, 09 May 2020 20:12:53 +0000 Subject: [issue40580] Macintosh Documentation Still Bad In-Reply-To: <1589053149.96.0.0694085620731.issue40580@roundup.psfhosted.org> Message-ID: <029B8124-5E5F-440F-ADF7-15330A098CB4@comcast.net> Glenn Travis added the comment: Thank you for your reply. I just wanted to renew or recall attention to the older one. It seems to have been dormant for too long. A C program is like a fast dance on a newly waxed dance floor by people carrying razors. -W.R. And now for something completely different. -M.P > On May 9, 2020, at 2:39 PM, R?mi Lapeyre wrote: > > > R?mi Lapeyre added the comment: > > Hi Gleen, this looks like there already exists an issue for this problem, please use it instead of opening a new one. > > Can you please open a new Pull-Request for solving this issue? > > ---------- > nosy: +remi.lapeyre > > _______________________________________ > Python tracker > > _______________________________________ ---------- nosy: +Old Sub Sailor _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 16:43:17 2020 From: report at bugs.python.org (Mike) Date: Sat, 09 May 2020 20:43:17 +0000 Subject: [issue40581] scipy's differential_evolution bug Message-ID: <1589056997.86.0.98493009825.issue40581@roundup.psfhosted.org> New submission from Mike : I have a random bug with scipy's optimize . I use it in the context of SageMath (Python 3.7.3). I checked 3 algorithms : shgo, dual_annealing and full_optimize. All don't work well (at all !). I optimise with a 3 parameters functions with given bounds. The algorithm randomly sends to my error function the "1e-8" value for any of the 3 parameters. I displayed the vector + error to understand it. AS you can see, in this case, the first parameter is 1e-8 whereas it is outside the bounds. Sometimes it happens for the second parameter, or the 3rd .... ------ [3.95049282e-19 3.03055607e-20 1.96212098e+29] 0.0030238733573031864 [3.95273920e-19 3.05821352e-20 1.90997635e+29] 0.002957956545311753 [3.95037412e-19 3.04080173e-20 1.93312145e+29] 0.0029572689364709224 sage.all_cmdline:33: IntegrationWarning: The occurrence of roundoff error is detected, which prevents the requested tolerance from being achieved. The error may be underestimated. [1.00000000e-08 3.04080173e-20 1.93312145e+29] 1.0713560755245306 Overflow [3.95037412e-19 3.04080173e-20 1.93312145e+29] 0.0029572689364709224 ----- The behaviour is the same for all of them. However the value inserted is not always the same, I noticed 3 : 1e-10, 1e-8 and 1.49011612e-08 Moreover, all do not send nice values. For example, the full_optimize always send values close to the highest bound. Perhaps are the value computed with a simple linear average and I guess it should not be the case. my bounds are : bounds = [(1*e,4*e),(0.1*e,0.5*e),(1e5,1e40)] with e=1.6e-19 Is there an alternative for optimization in python ? regards, Mike ---------- messages: 368540 nosy: mmyara priority: normal severity: normal status: open title: scipy's differential_evolution bug versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 17:00:59 2020 From: report at bugs.python.org (Glenn Travis) Date: Sat, 09 May 2020 21:00:59 +0000 Subject: [issue40580] Macintosh Documentation Still Bad In-Reply-To: <1589052177.46.0.304784096206.issue40580@roundup.psfhosted.org> Message-ID: <1589058059.74.0.0691764972014.issue40580@roundup.psfhosted.org> Glenn Travis added the comment: Pull - Request? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 17:02:19 2020 From: report at bugs.python.org (Glenn Travis) Date: Sat, 09 May 2020 21:02:19 +0000 Subject: [issue32824] Docs: Using Python on a Macintosh has bad info per Apple site In-Reply-To: <1518392554.24.0.467229070634.issue32824@psf.upfronthosting.co.za> Message-ID: <1589058139.28.0.506689754029.issue32824@roundup.psfhosted.org> Glenn Travis added the comment: So, how do we wake this sleeping concern up? ---------- nosy: +TotallyLost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 17:06:28 2020 From: report at bugs.python.org (Christian Heimes) Date: Sat, 09 May 2020 21:06:28 +0000 Subject: [issue40581] scipy's differential_evolution bug In-Reply-To: <1589056997.86.0.98493009825.issue40581@roundup.psfhosted.org> Message-ID: <1589058388.04.0.908821909963.issue40581@roundup.psfhosted.org> Christian Heimes added the comment: SciPy and Sage are 3rd party extensions to CPython and not maintained by us. Please report the issue with SciPi, https://www.scipy.org/scipylib/bug-report.html ---------- nosy: +christian.heimes resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 17:14:16 2020 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 09 May 2020 21:14:16 +0000 Subject: [issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) In-Reply-To: <1569848255.08.0.155489980043.issue38323@roundup.psfhosted.org> Message-ID: <1589058856.62.0.490378602784.issue38323@roundup.psfhosted.org> Kyle Stanley added the comment: > Would it make sense to deprecate it and stick with ThreadedChildWatcher? I had proposed deprecating it in another bpo issue, but it was brought up that MutliLoopWatcher had only been added recently in 3.8. So, it might be a bit too soon to deprecate it already. Although I suppose that if there are several complex and difficult to resolve issues with the implementation, it may very well be less damaging to deprecate it now rather than after it's gained a decent a decent amount of usage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 17:15:08 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sat, 09 May 2020 21:15:08 +0000 Subject: [issue32824] Docs: Using Python on a Macintosh has bad info per Apple site In-Reply-To: <1518392554.24.0.467229070634.issue32824@psf.upfronthosting.co.za> Message-ID: <1589058908.57.0.416427811064.issue32824@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi Gleen, the best way forward is to propose an improvement to the current documentation. It will get reviewed and merge if appropriate. The source for this part is at https://github.com/python/cpython/blob/master/Doc/using/mac.rst and you can find the information needed to contribute in the Python Dev Guide: https://devguide.python.org/. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 17:16:45 2020 From: report at bugs.python.org (Mike) Date: Sat, 09 May 2020 21:16:45 +0000 Subject: [issue40581] scipy's differential_evolution bug In-Reply-To: <1589058388.04.0.908821909963.issue40581@roundup.psfhosted.org> Message-ID: <586E4AA9-690A-4A06-9E52-36E6E9CC0446@gmail.com> Mike added the comment: ok thank you Christian. I will do. > Le 9 mai 2020 ? 23:06, Christian Heimes a ?crit : > > > Christian Heimes added the comment: > > SciPy and Sage are 3rd party extensions to CPython and not maintained by us. Please report the issue with SciPi, https://www.scipy.org/scipylib/bug-report.html > > ---------- > nosy: +christian.heimes > resolution: -> third party > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 17:28:47 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 09 May 2020 21:28:47 +0000 Subject: [issue40576] Align docs for list.sort, sorted, and on the website In-Reply-To: <1589020231.08.0.0102454961056.issue40576@roundup.psfhosted.org> Message-ID: <1589059727.96.0.819060511027.issue40576@roundup.psfhosted.org> Raymond Hettinger added the comment: To me, the PR isn't an improvement. It makes the docs much more verbose without really adding information. We already link to the sorting-howto which already discusses the pragmatics that arise in actual applications. Also, there is no special benefit to cross-linking the list.sort() and sorted() docs. While their implementation share a common foundation, that is just an implementation detail that is irrelevant from a user's point of view. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 17:36:32 2020 From: report at bugs.python.org (Glenn Travis) Date: Sat, 09 May 2020 21:36:32 +0000 Subject: [issue32824] Docs: Using Python on a Macintosh has bad info per Apple site In-Reply-To: <1589058908.57.0.416427811064.issue32824@roundup.psfhosted.org> Message-ID: <39E9F42F-B133-4064-8A9B-7C2DB6A28140@comcast.net> Glenn Travis added the comment: Thank you Remi > On May 9, 2020, at 4:15 PM, R?mi Lapeyre wrote: > > > R?mi Lapeyre added the comment: > > Hi Gleen, the best way forward is to propose an improvement to the current documentation. It will get reviewed and merge if appropriate. > > The source for this part is at https://github.com/python/cpython/blob/master/Doc/using/mac.rst and you can find the information needed to contribute in the Python Dev Guide: https://devguide.python.org/. > > ---------- > nosy: +remi.lapeyre > > _______________________________________ > Python tracker > > _______________________________________ ---------- nosy: +Old Sub Sailor _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 17:40:44 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 09 May 2020 21:40:44 +0000 Subject: [issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) In-Reply-To: <1569848255.08.0.155489980043.issue38323@roundup.psfhosted.org> Message-ID: <1589060444.14.0.60511769816.issue38323@roundup.psfhosted.org> Chris Jerdonek added the comment: > this seems like an awful lot of energy to spend on some code that's not even used by default. True, but it seems likely to me that this signals :) a deeper, more general issue about CPython / signals (which is why I spent time on it). For example, my reproducer script doesn't use MultiLoopWatcher. I'd like to see if it can be reproduced with signals other than SIGCHLD, too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 18:09:39 2020 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 09 May 2020 22:09:39 +0000 Subject: [issue26817] Docs for StringIO should link to io.BytesIO In-Reply-To: <1461245485.84.0.279459146406.issue26817@psf.upfronthosting.co.za> Message-ID: <1589062179.91.0.679617600153.issue26817@roundup.psfhosted.org> Zackery Spytz added the comment: Python 2 is EOL. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 18:27:11 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 09 May 2020 22:27:11 +0000 Subject: [issue40578] Deprecate numeric item access for platform.uname() In-Reply-To: <1589033216.57.0.707246281717.issue40578@roundup.psfhosted.org> Message-ID: <1589063231.81.0.128505464405.issue40578@roundup.psfhosted.org> Steven D'Aprano added the comment: You have given no justification for removing item access for the fields except "some users are still relying on ... access by item position and length". Normally the fact that some people are doing this would be reason to reject this backwards-compatibility breaking change. Why is it a problem that people are using something which is documented as a tuple as a tuple? ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 18:42:14 2020 From: report at bugs.python.org (Brad Solomon) Date: Sat, 09 May 2020 22:42:14 +0000 Subject: [issue40561] Provide docstrings for public-facing webbrowser functions In-Reply-To: <1588941280.97.0.150032786212.issue40561@roundup.psfhosted.org> Message-ID: <1589064134.6.0.344413442856.issue40561@roundup.psfhosted.org> Brad Solomon added the comment: To no surprise, not a lot of activity with the module over the last few years as it is fairly cut-and-dry. $ git shortlog -sn --since '5 years ago' Lib/webbrowser.py 3 Serhiy Storchaka 1 David Steele 1 Guido van Rossum 1 Michael Haas 1 Nick Coghlan 1 Steve Dower 1 Bumsik Kim 1 Zhiming Wang ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 18:52:06 2020 From: report at bugs.python.org (Fantix King) Date: Sat, 09 May 2020 22:52:06 +0000 Subject: [issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled In-Reply-To: <1492073709.93.0.33740565749.issue30064@psf.upfronthosting.co.za> Message-ID: <1589064726.36.0.0263551289158.issue30064@roundup.psfhosted.org> Fantix King added the comment: Following the discussion - looks like `add_reader()` will cancel the previous `handle` on the same `fd` if found, so I think it is reasonable to solve this cancellation-race issue by checking if the `handle` is cancelled as shown in the attached patch (tests in uvloop passed with this patch). WDTY? ---------- nosy: +fantix Added file: https://bugs.python.org/file49146/cancelled-sock-recv-race.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 19:39:06 2020 From: report at bugs.python.org (Ruairidh MacLeod) Date: Sat, 09 May 2020 23:39:06 +0000 Subject: [issue40582] Inconsistent exceptions caused by typing + tuple subclasses Message-ID: <1589067546.73.0.526678062232.issue40582@roundup.psfhosted.org> New submission from Ruairidh MacLeod : When incorrectly defining a function with a typed List[T] argument where T is a tuple instance, a TypeError is correctly raised: t = (1,) def f(a: List[t]): ... # => TypeError: Parameters to generic types must be types. Got 1. When t is an instance of a tuple subclass though, and one of its items is an empty string, a SyntaxError is raised instead in the typing module: class T(tuple): def __new__(cls): return tuple.__new__(cls, ("",)) t = T() def f(a: List[t]): ... # => SyntaxError: Forward reference must be an expression -- got '' Full stack trace: Traceback (most recent call last): File "/opt/python37/lib/python3.7/typing.py", line 449, in __init__ code = compile(arg, '', 'eval') File "", line 0 ^ SyntaxError: unexpected EOF while parsing During handling of the above exception, another exception occurred: Traceback (most recent call last): File "test.py", line 5, in def f(a: List[call]): File "/opt/python37/lib/python3.7/typing.py", line 254, in inner return func(*args, **kwds) File "/opt/python37/lib/python3.7/typing.py", line 631, in __getitem__ params = tuple(_type_check(p, msg) for p in params) File "/opt/python37/lib/python3.7/typing.py", line 631, in params = tuple(_type_check(p, msg) for p in params) File "/opt/python37/lib/python3.7/typing.py", line 132, in _type_check return ForwardRef(arg) File "/opt/python37/lib/python3.7/typing.py", line 451, in __init__ raise SyntaxError(f"Forward reference must be an expression -- got {arg!r}") SyntaxError: Forward reference must be an expression -- got '' Lastly, a different TypeError is raised for an empty subclass: class C(tuple): ... c = C() def f(a: List[c]): ... # => TypeError: Too few parameters for typing.List; actual 0, expected 1 This exception behavior seems inconsistent, although it's definitely a minor issue. ---------- components: Interpreter Core messages: 368554 nosy: rkm priority: normal severity: normal status: open title: Inconsistent exceptions caused by typing + tuple subclasses type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 19:51:14 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 09 May 2020 23:51:14 +0000 Subject: [issue40571] Make lru_cache(maxsize=None) more discoverable In-Reply-To: <1588972960.42.0.924669050455.issue40571@roundup.psfhosted.org> Message-ID: <1589068274.38.0.70507708987.issue40571@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +19330 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20019 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 20:37:19 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 10 May 2020 00:37:19 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1589071039.42.0.117454959634.issue40334@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +19331 pull_request: https://github.com/python/cpython/pull/20020 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 20:42:35 2020 From: report at bugs.python.org (Zachary Ware) Date: Sun, 10 May 2020 00:42:35 +0000 Subject: [issue26817] Docs for StringIO should link to io.BytesIO In-Reply-To: <1461245485.84.0.279459146406.issue26817@psf.upfronthosting.co.za> Message-ID: <1589071355.1.0.413981243739.issue26817@roundup.psfhosted.org> Change by Zachary Ware : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 20:46:04 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 10 May 2020 00:46:04 +0000 Subject: [issue40561] Provide docstrings for public-facing webbrowser functions In-Reply-To: <1588941280.97.0.150032786212.issue40561@roundup.psfhosted.org> Message-ID: <1589071564.36.0.187131288931.issue40561@roundup.psfhosted.org> Terry J. Reedy added the comment: I just got my development machine back, so I will handle this. I first determined that code and doc are same in all 3 versions (except for audit event bit, which I am willing to leave out). ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 20:48:39 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 10 May 2020 00:48:39 +0000 Subject: [issue40397] Refactor typing._GenericAlias In-Reply-To: <1587918915.07.0.818996162208.issue40397@roundup.psfhosted.org> Message-ID: <1589071719.81.0.243317809748.issue40397@roundup.psfhosted.org> Guido van Rossum added the comment: I think I have a shorter repro, not involving unions: from typing import * T = TypeVar("T") S = TypeVar("S") U = TypeVar("U") class A(Generic[T]): ... class B(Generic[T]): ... class C(Generic[T, S]): ... print(C[A[U], B[int]][str]) Fails in the same place, works in 3.8 (I didn't check just before the offending commit), and the same fix works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 21:16:26 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 10 May 2020 01:16:26 +0000 Subject: [issue40561] Provide docstrings for public-facing webbrowser functions In-Reply-To: <1588941280.97.0.150032786212.issue40561@roundup.psfhosted.org> Message-ID: <1589073386.48.0.702164149025.issue40561@roundup.psfhosted.org> Terry J. Reedy added the comment: Current open doc: https://docs.python.org/3.9/library/webbrowser.html#webbrowser.open ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 21:17:18 2020 From: report at bugs.python.org (Glenn Travis) Date: Sun, 10 May 2020 01:17:18 +0000 Subject: [issue32824] Docs: Using Python on a Macintosh has bad info per Apple site In-Reply-To: <39E9F42F-B133-4064-8A9B-7C2DB6A28140@comcast.net> Message-ID: <195B18A4-134B-482B-8812-3140D3C3D0A3@comcast.net> Glenn Travis added the comment: Thank you, but how in the world does one know where to look or find that document at github. I tried to search earlier and got hundreds of listings for python doc. Sent from my iPhone > On May 9, 2020, at 16:36, Glenn Travis wrote: > > ?Thank you Remi > > >> On May 9, 2020, at 4:15 PM, R?mi Lapeyre wrote: >> >> >> R?mi Lapeyre added the comment: >> >> Hi Gleen, the best way forward is to propose an improvement to the current documentation. It will get reviewed and merge if appropriate. >> >> The source for this part is at https://github.com/python/cpython/blob/master/Doc/using/mac.rst and you can find the information needed to contribute in the Python Dev Guide: https://devguide.python.org/. >> >> ---------- >> nosy: +remi.lapeyre >> >> _______________________________________ >> Python tracker >> >> _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 21:19:05 2020 From: report at bugs.python.org (David Heiberg) Date: Sun, 10 May 2020 01:19:05 +0000 Subject: [issue40569] Add optional weights to random.sample() In-Reply-To: <1588967807.85.0.49094872953.issue40569@roundup.psfhosted.org> Message-ID: <1589073545.64.0.107361695887.issue40569@roundup.psfhosted.org> David Heiberg added the comment: Just playing around with this and I think one thing to consider is how to handle negative weights. Should they even be allowed? One interesting behaviour I encountered with the current draft is the following: >>> r.sample(['katniss', 'prim', 'gale', 'peeta'] , weights=[-2,1,1,1], k=1) ['peeta'] This will always return ['peeta'], or whatever happens to be in the last index. I believe this is because in `choices`, the `cum_weights` list would be [-2, -1, 0, 1], causing it to only be able to select the last value in the population. Looking into random.choices, it suggests that the weights were designed with negative ones in mind. However they were not accounted for and end up influencing the weights of the indexes around it. Another example is this: >>> r.choices(['alice', 'bob', 'camile', 'david'], weights=[1, 1, -2, 1]) ['alice'] This will always return ['alice'], showing that the negative weight of 'camile' is affecting indexes around it. Is there something I am missing? Otherwise this seems like it may warrant its own bug. ---------- nosy: +dheiberg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 21:26:05 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 10 May 2020 01:26:05 +0000 Subject: [issue40582] Inconsistent exceptions caused by typing + tuple subclasses In-Reply-To: <1589067546.73.0.526678062232.issue40582@roundup.psfhosted.org> Message-ID: <1589073965.82.0.442220703038.issue40582@roundup.psfhosted.org> Dennis Sweeney added the comment: I think the behavior is consistent between tuple and an empty subclass: >>> from typing import List >>> class T(tuple): pass ====== Empty tuple/T ====== >>> List[()] Traceback (most recent call last): ... TypeError: Too few parameters for typing.List; actual 0, expected 1 >>> List[T()] Traceback (most recent call last): ... TypeError: Too few parameters for typing.List; actual 0, expected 1 ====== tuple/T whose only entry is 1 ====== >>> List[(1,)] Traceback (most recent call last): ... TypeError: Parameters to generic types must be types. Got 1. >>> List[T((1,))] Traceback (most recent call last): ... TypeError: Parameters to generic types must be types. Got 1. ====== tuple/T whose only entry is "" ====== >>> List[T(("",))] Traceback (most recent call last): ... SyntaxError: unexpected EOF while parsing During handling of the above exception, another exception occurred: Traceback (most recent call last): ... SyntaxError: Forward reference must be an expression -- got '' >>> List[("",)] Traceback (most recent call last): ... SyntaxError: unexpected EOF while parsing During handling of the above exception, another exception occurred: Traceback (most recent call last): ... SyntaxError: Forward reference must be an expression -- got '' ====== tuple/T whose only entry can rightly become a forward reference ====== >>> List[("Foo",)] typing.List[ForwardRef('Foo')] >>> List[T(("Foo",))] typing.List[ForwardRef('Foo')] Your ``return tuple.__new__(cls, ("",))`` constructor is just always returning the same as ``T(("",))`` ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 21:53:34 2020 From: report at bugs.python.org (Nathaniel Smith) Date: Sun, 10 May 2020 01:53:34 +0000 Subject: [issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) In-Reply-To: <1589060444.14.0.60511769816.issue38323@roundup.psfhosted.org> Message-ID: Nathaniel Smith added the comment: How do you know that your reproducer is showing the same bug, or anything related to signals? IIUC subprocess waiting by default doesn't involve a signal handler. On Sat, May 9, 2020, 14:40 Chris Jerdonek wrote: > > Chris Jerdonek added the comment: > > > this seems like an awful lot of energy to spend on some code > that's not even used by default. > > True, but it seems likely to me that this signals :) a deeper, more > general issue about CPython / signals (which is why I spent time on it). > For example, my reproducer script doesn't use MultiLoopWatcher. I'd like to > see if it can be reproduced with signals other than SIGCHLD, too. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 22:39:39 2020 From: report at bugs.python.org (Henk-Jaap Wagenaar) Date: Sun, 10 May 2020 02:39:39 +0000 Subject: [issue40569] Add optional weights to random.sample() In-Reply-To: <1588967807.85.0.49094872953.issue40569@roundup.psfhosted.org> Message-ID: <1589078379.79.0.331139793263.issue40569@roundup.psfhosted.org> Henk-Jaap Wagenaar added the comment: @rhettinger: I like this proposal. @dheiberg: to me, it seems negative weights are explicitly not supported, from: https://docs.python.org/3/library/random.html#random.choices "Weights are assumed to be non-negative." Unless I am missing something. In my mind negative weights make no sense and the fact it produces garbage in your example is garbage-in-garbage-out. Maybe an enhancement could be made (but it would be breaking for some abusing the behaviour you showed) for it to error (or do something sane? If such a thing exists) but that should be a separate issue. ---------- nosy: +cryvate _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 23:27:33 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 10 May 2020 03:27:33 +0000 Subject: [issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) In-Reply-To: <1569848255.08.0.155489980043.issue38323@roundup.psfhosted.org> Message-ID: <1589081253.96.0.230030852578.issue38323@roundup.psfhosted.org> Chris Jerdonek added the comment: I came up with the script by (1) running the test locally and seeing the same hang, (2) moving the test function to its own script separate from the unit tests and seeing the same hang, and (3) successively stripping away code while continuing to check for the same hang. So it should be equivalent. As for why it's related to signals, it's because of what the script does (it's not waiting on a subprocess). All it does is start an event loop and then do the following repeatedly: 1. starts a subprocess that sleeps indefinitely 2. create an empty future 3. set a SIGCHLD handler that calls set_result() on the future 4. use call_later() to terminate the future after 5 seconds 4. kill the subprocess 5. await on the future Almost all of the time, (5) completes immediately (because the handler is called immediately). But sometimes, (5) takes 5 seconds (which means the timeout fired). And in the cases it takes 5 seconds, I'm able to observe both that (a) Python received the SIGCHLD right away, and (b) the signal handler only gets called when the loop is woken up by the call_later(). So during the await in (5), it seems like Python is holding onto the signal for 5 seconds without calling its signal handler. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 23:30:53 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 10 May 2020 03:30:53 +0000 Subject: [issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) In-Reply-To: <1569848255.08.0.155489980043.issue38323@roundup.psfhosted.org> Message-ID: <1589081453.72.0.0210288576321.issue38323@roundup.psfhosted.org> Chris Jerdonek added the comment: > 4. use call_later() to terminate the future after 5 seconds You should read that as "3.5" (I inserted it later). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 9 23:41:56 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 10 May 2020 03:41:56 +0000 Subject: [issue40569] Add optional weights to random.sample() In-Reply-To: <1588967807.85.0.49094872953.issue40569@roundup.psfhosted.org> Message-ID: <1589082116.24.0.529854996359.issue40569@roundup.psfhosted.org> Raymond Hettinger added the comment: Negative weights are undefined for choices() as well. Just like bisect() and merge() don't verify their inputs are sorted. Usually, full scan precondition checks are expensive in pure python and aren't worth penalizing correct code. As Henk-Jaap points-out, negative weights are just a special case of meaningless inputs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 00:34:57 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 10 May 2020 04:34:57 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1589085297.83.0.804370222468.issue40334@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset ac7a92cc0a821699df48bc2e30a02c25d6338f78 by Pablo Galindo in branch 'master': bpo-40334: Avoid collisions between parser variables and grammar variables (GH-19987) https://github.com/python/cpython/commit/ac7a92cc0a821699df48bc2e30a02c25d6338f78 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 00:40:45 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 10 May 2020 04:40:45 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1589085645.46.0.572325315362.issue40334@roundup.psfhosted.org> Guido van Rossum added the comment: FWIW I propose that we add another Misc/NEWS for the same issue summarizing what happened between alpha6 and beta1. (A lot!) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 01:45:23 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 10 May 2020 05:45:23 +0000 Subject: [issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs In-Reply-To: <1588884932.92.0.367303002443.issue40553@roundup.psfhosted.org> Message-ID: <1589089523.47.0.0439025443672.issue40553@roundup.psfhosted.org> Terry J. Reedy added the comment: I asked about other people's experiences on python-list and got 2 responses so far. --- On macOS The default Save/Save as dialogs are short, only displaying a few major folders along with Favorites and Recents. That dialog doesn?t display folder contents. However, you can get an expanded dialog by clicking on the little arrow to the right of the Where box. Using that dialog allows one to select any folder and displays folder contents. I tried using both Save and Save as, and was unable to duplicate the problem with either the short or the long dialog. Python 3.8.2 macOS Catalina 10.15.4 Bev in TX --- Fairly recently, Tk has got many bugfixes because of changes in OSX. Here is the file that implements the file dialogs: https://core.tcl-lang.org/tk/artifact/d72cdfbcbfaa717f and the history: https://core.tcl-lang.org/tk/finfo?name=macosx/tkMacOSXDialog.c&m=d72cdfbcbfaa717f As you can see, it has been touched two days ago (!) to restore some window behaviour, which was switched of because of Catalina last August (this commit) https://core.tcl-lang.org/tk/info/59b1d265c2444112 Christian Gollwitzer --- Ned, what is your latest experience with 8.6.10? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 03:40:57 2020 From: report at bugs.python.org (Saumitro Dasgupta) Date: Sun, 10 May 2020 07:40:57 +0000 Subject: [issue40583] Runtime type annotation mutation leads to inconsistent behavior Message-ID: <1589096457.86.0.369001499523.issue40583@roundup.psfhosted.org> New submission from Saumitro Dasgupta : Adding type annotations at runtime may lead to inconsistent results. Consider the following example: class Base: base: int class Alpha(Base): pass class Beta(Base): foobar: int # Case 1: This mutates Base's __annotations__ Alpha.__annotations__['injected'] = bool assert Alpha.__annotations__ is Base.__annotations__ # Case 2: This mutates Beta's own copy of __annotations__ Beta.__annotations__['injected'] = bool Such mutations of __annotations__ seem to be perfectly legal (https://www.python.org/dev/peps/pep-0526/#runtime-effects-of-type-annotations). However: 1. In case 1, this leads to the accidental mutation of Base's annotations. Not entirely certain if that's expected, but seems undesirable. 2. There are further differences when looking at `__dict__['__annotations__']`: for Alpha, there is no __annotations__ entry in __dict__. However, for Beta, it's set to `{'foobar': , 'injected': }`. This discrepancy leads to further inconsistent results. In particular, when transforming these classes to dataclasses, which specifically looks at __dict__['__annotations__'](https://github.com/python/cpython/blob/3.8/Lib/dataclasses.py#L856). Converting Alpha to a dataclass leads to no fields. Converting Beta to a dataclass leads to two fields (foobar and injected). It's worth noting that typing.get_type_hints produces reasonable results here. ---------- components: Interpreter Core, Library (Lib) messages: 368569 nosy: Saumitro Dasgupta priority: normal severity: normal status: open title: Runtime type annotation mutation leads to inconsistent behavior type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 04:53:19 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 10 May 2020 08:53:19 +0000 Subject: [issue40397] Refactor typing._GenericAlias In-Reply-To: <1587918915.07.0.818996162208.issue40397@roundup.psfhosted.org> Message-ID: <1589100799.8.0.616987317022.issue40397@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset fcb285609a2e55f2dc63dcfbb32e4e2fddf71546 by Serhiy Storchaka in branch 'master': bpo-40397: Remove __args__ and __parameters__ from _SpecialGenericAlias (GH-19984) https://github.com/python/cpython/commit/fcb285609a2e55f2dc63dcfbb32e4e2fddf71546 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 05:04:24 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 10 May 2020 09:04:24 +0000 Subject: [issue40397] Refactor typing._GenericAlias In-Reply-To: <1587918915.07.0.818996162208.issue40397@roundup.psfhosted.org> Message-ID: <1589101464.63.0.631763281669.issue40397@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you Jelle for your report. There is even simpler example: Dict[Tuple[T], List[int]][str] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 05:05:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 10 May 2020 09:05:33 +0000 Subject: [issue40549] Convert posixmodule.c to multiphase initialization (PEP 489) In-Reply-To: <1588874748.21.0.997527577662.issue40549@roundup.psfhosted.org> Message-ID: <1589101533.06.0.850759843388.issue40549@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 1c2fa781560608aa4be50c748d4b3f403cfa5035 by Victor Stinner in branch 'master': bpo-40549: Convert posixmodule.c to multiphase init (GH-19982) https://github.com/python/cpython/commit/1c2fa781560608aa4be50c748d4b3f403cfa5035 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 05:06:09 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 10 May 2020 09:06:09 +0000 Subject: [issue40574] segfault causing regression from PEP 573 implementation In-Reply-To: <1588997324.8.0.612961250405.issue40574@roundup.psfhosted.org> Message-ID: <1589101569.29.0.196105272341.issue40574@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +corona10, petr.viktorin, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 05:06:35 2020 From: report at bugs.python.org (David Heiberg) Date: Sun, 10 May 2020 09:06:35 +0000 Subject: [issue40569] Add optional weights to random.sample() In-Reply-To: <1589082116.24.0.529854996359.issue40569@roundup.psfhosted.org> Message-ID: David Heiberg added the comment: Ahh I see, thanks for clearing that up! On Sun, May 10, 2020, 04:41 Raymond Hettinger wrote: > > Raymond Hettinger added the comment: > > Negative weights are undefined for choices() as well. Just like bisect() > and merge() don't verify their inputs are sorted. Usually, full scan > precondition checks are expensive in pure python and aren't worth > penalizing correct code. As Henk-Jaap points-out, negative weights are just > a special case of meaningless inputs. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 05:16:01 2020 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 10 May 2020 09:16:01 +0000 Subject: [issue37986] Improve perfomance of PyLong_FromDouble() In-Reply-To: <1567155641.35.0.135066549616.issue37986@roundup.psfhosted.org> Message-ID: <1589102161.2.0.478201963476.issue37986@roundup.psfhosted.org> Mark Dickinson added the comment: New changeset 86a93fddf72a2711aca99afa0c5374c8d6b4a321 by Sergey Fedoseev in branch 'master': bpo-37986: Improve perfomance of PyLong_FromDouble() (GH-15611) https://github.com/python/cpython/commit/86a93fddf72a2711aca99afa0c5374c8d6b4a321 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 05:16:51 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 10 May 2020 09:16:51 +0000 Subject: [issue40574] segfault causing regression from PEP 573 implementation In-Reply-To: <1588997324.8.0.612961250405.issue40574@roundup.psfhosted.org> Message-ID: <1589102211.5.0.444535674516.issue40574@roundup.psfhosted.org> STINNER Victor added the comment: I tried to install pyqt5 on Python compiled from source: make ./python -m venv env env/bin/python -m pip install sip env/bin/python -m pip install pyqt5 But I failed to install pyqt5: vstinner at apu$ env/bin/python -m pip install pyqt5 Collecting pyqt5 /home/vstinner/python/master/env/lib/python3.9/site-packages/pip/_vendor/msgpack/fallback.py:133: DeprecationWarning: encoding is deprecated, Use raw=False instead. unpacker = Unpacker(None, max_buffer_size=len(packed), **kwargs) Using cached https://files.pythonhosted.org/packages/4d/81/b9a66a28fb9a7bbeb60e266f06ebc4703e7e42b99e3609bf1b58ddd232b9/PyQt5-5.14.2.tar.gz Installing build dependencies ... done Getting requirements to build wheel ... done Preparing wheel metadata ... error ERROR: Command errored out with exit status 1: command: /home/vstinner/python/master/env/bin/python /home/vstinner/python/master/env/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpzl766kxn cwd: /tmp/pip-install-a2jym86c/pyqt5 Complete output (33 lines): Traceback (most recent call last): File "/home/vstinner/python/master/env/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 64, in prepare_metadata_for_build_wheel hook = backend.prepare_metadata_for_build_wheel AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/vstinner/python/master/env/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in main() File "/home/vstinner/python/master/env/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 197, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/home/vstinner/python/master/env/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 66, in prepare_metadata_for_build_wheel return _get_wheel_metadata_from_wheel(backend, metadata_directory, File "/home/vstinner/python/master/env/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 95, in _get_wheel_metadata_from_wheel whl_basename = backend.build_wheel(metadata_directory, config_settings) File "/tmp/pip-build-env-w2h9381n/overlay/lib/python3.9/site-packages/sipbuild/api.py", line 51, in build_wheel project = AbstractProject.bootstrap('pep517') File "/tmp/pip-build-env-w2h9381n/overlay/lib/python3.9/site-packages/sipbuild/abstract_project.py", line 82, in bootstrap project.setup(pyproject, tool, tool_description) File "/tmp/pip-build-env-w2h9381n/overlay/lib/python3.9/site-packages/sipbuild/project.py", line 410, in setup self.apply_user_defaults(tool) File "project.py", line 62, in apply_user_defaults super().apply_user_defaults(tool) File "/tmp/pip-build-env-w2h9381n/overlay/lib/python3.9/site-packages/pyqtbuild/project.py", line 86, in apply_user_defaults super().apply_user_defaults(tool) File "/tmp/pip-build-env-w2h9381n/overlay/lib/python3.9/site-packages/sipbuild/project.py", line 215, in apply_user_defaults self.builder.apply_user_defaults(tool) File "/tmp/pip-build-env-w2h9381n/overlay/lib/python3.9/site-packages/pyqtbuild/builder.py", line 67, in apply_user_defaults raise PyProjectOptionException('qmake', sipbuild.pyproject.PyProjectOptionException /home/vstinner/python/master/Lib/tempfile.py:818: ResourceWarning: Implicitly cleaning up _warnings.warn(warn_message, ResourceWarning) ---------------------------------------- ERROR: Command errored out with exit status 1: /home/vstinner/python/master/env/bin/python /home/vstinner/python/master/env/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpzl766kxn Check the logs for full command output. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 05:21:34 2020 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 10 May 2020 09:21:34 +0000 Subject: [issue37986] Improve perfomance of PyLong_FromDouble() In-Reply-To: <1567155641.35.0.135066549616.issue37986@roundup.psfhosted.org> Message-ID: <1589102494.52.0.24840692955.issue37986@roundup.psfhosted.org> Change by Mark Dickinson : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 05:35:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 10 May 2020 09:35:24 +0000 Subject: [issue40574] segfault causing regression from PEP 573 implementation In-Reply-To: <1588997324.8.0.612961250405.issue40574@roundup.psfhosted.org> Message-ID: <1589103324.47.0.312205165201.issue40574@roundup.psfhosted.org> STINNER Victor added the comment: Ah, if I install Python, I can install PyQt5. I installed PyQt5: python -X faulthandler -c "import PyQt5.QtCore; PyQt5.QtCore.Qt.Key_Control"" doesn't crash. I also tested the following hello world, it doesn't crash neither. --- # https://pythonprogramminglanguage.com/pyqt5-hello-world/ import sys from PyQt5 import QtCore, QtWidgets from PyQt5.QtWidgets import QMainWindow, QLabel, QGridLayout, QWidget from PyQt5.QtCore import QSize class HelloWindow(QMainWindow): def __init__(self): QMainWindow.__init__(self) self.setMinimumSize(QSize(640, 480)) self.setWindowTitle("Hello world - pythonprogramminglanguage.com") centralWidget = QWidget(self) self.setCentralWidget(centralWidget) gridLayout = QGridLayout(self) centralWidget.setLayout(gridLayout) title = QLabel("Hello World from PyQt", self) title.setAlignment(QtCore.Qt.AlignCenter) gridLayout.addWidget(title, 0, 0) if __name__ == "__main__": app = QtWidgets.QApplication(sys.argv) mainWin = HelloWindow() mainWin.show() sys.exit( app.exec_() ) --- I built Python with: ./configure --cache-file=../python-config.cache --with-pydebug CFLAGS=-O0 --prefix=/opt/py39 --with-system-expat --with-system-ffi make make install What is your OS? How did you build Python? Which SIP and PyQt5 versions did you try? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 05:38:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 10 May 2020 09:38:33 +0000 Subject: [issue40574] segfault causing regression from PEP 573 implementation (PyQt5) In-Reply-To: <1588997324.8.0.612961250405.issue40574@roundup.psfhosted.org> Message-ID: <1589103513.86.0.732646992218.issue40574@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: segfault causing regression from PEP 573 implementation -> segfault causing regression from PEP 573 implementation (PyQt5) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 05:38:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 10 May 2020 09:38:27 +0000 Subject: [issue38787] PEP 573: Module State Access from C Extension Methods In-Reply-To: <1573655440.57.0.563143759574.issue38787@roundup.psfhosted.org> Message-ID: <1589103507.07.0.277014601564.issue38787@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-40574: segfault causing regression from PEP 573 implementation (PyQt5). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 05:39:15 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 10 May 2020 09:39:15 +0000 Subject: [issue40397] Refactor typing._GenericAlias In-Reply-To: <1587918915.07.0.818996162208.issue40397@roundup.psfhosted.org> Message-ID: <1589103555.88.0.830354582663.issue40397@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +19332 pull_request: https://github.com/python/cpython/pull/20021 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 05:41:19 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 10 May 2020 09:41:19 +0000 Subject: [issue40397] Refactor typing._GenericAlias In-Reply-To: <1587918915.07.0.818996162208.issue40397@roundup.psfhosted.org> Message-ID: <1589103679.6.0.992738945825.issue40397@roundup.psfhosted.org> Serhiy Storchaka added the comment: Even simpler: Dict[T, List[int]][str]. Dict[T, list[int]][str] also fails. But dict[T, list[int]][str] works as expected (and there are tests). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 05:46:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 10 May 2020 09:46:48 +0000 Subject: [issue40574] segfault causing regression from PEP 573 implementation (PyQt5) In-Reply-To: <1588997324.8.0.612961250405.issue40574@roundup.psfhosted.org> Message-ID: <1589104008.61.0.907990048294.issue40574@roundup.psfhosted.org> STINNER Victor added the comment: I also with: ./configure --prefix=/opt/py39 --with-system-expat --with-system-ffi I still cannot reproduce the crash. I tested Python at commit 1c2fa781560608aa4be50c748d4b3f403cfa5035. I tested on Fedora 32 (GCC 10.0.1). $ /opt/py39/bin/python3.9 -m pip freeze pyflakes==2.2.0 pyperf==2.0.0 PyQt5==5.14.2 PyQt5-sip==12.7.2 $ /opt/py39/bin/python3.9 -VV Python 3.9.0a6+ (heads/master:1c2fa78156, May 10 2020, 11:37:38) [GCC 10.0.1 20200430 (Red Hat 10.0.1-0.14)] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 05:55:40 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 10 May 2020 09:55:40 +0000 Subject: [issue38787] PEP 573: Module State Access from C Extension Methods In-Reply-To: <1573655440.57.0.563143759574.issue38787@roundup.psfhosted.org> Message-ID: <1589104540.93.0.359092115454.issue38787@roundup.psfhosted.org> STINNER Victor added the comment: The posix/nt and _abc modules now use the PEP 573 APIs: * posix/nt: commit 1c2fa781560608aa4be50c748d4b3f403cfa5035 (bpo-40549) * _abc: commit 77c614624b6bf2145bef69830d0f499d8b55ec0c (bpo-40566) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 05:56:10 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 10 May 2020 09:56:10 +0000 Subject: [issue40549] Convert posixmodule.c to multiphase initialization (PEP 489) In-Reply-To: <1588874748.21.0.997527577662.issue40549@roundup.psfhosted.org> Message-ID: <1589104570.32.0.559345367163.issue40549@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 06:01:06 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 10 May 2020 10:01:06 +0000 Subject: [issue40556] test__xxsubinterpreters leaked [1486, 1484, 1484, 1484] references In-Reply-To: <1588907065.92.0.443788591369.issue40556@roundup.psfhosted.org> Message-ID: <1589104866.83.0.178772758157.issue40556@roundup.psfhosted.org> STINNER Victor added the comment: FYI I also reported the issue to https://bugs.python.org/issue32604#msg368395 which introduched the regression. But you can keep this issue open until it's fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 06:10:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 10 May 2020 10:10:52 +0000 Subject: [issue1944] Document PyUnicode_* API In-Reply-To: <1201415203.65.0.272410099804.issue1944@psf.upfronthosting.co.za> Message-ID: <1589105452.02.0.122243077367.issue1944@roundup.psfhosted.org> STINNER Victor added the comment: """ Following functions likely should be wrapped with "#ifndef Py_LIMITED_API": _PyUnicode_ClearStaticStrings _PyUnicode_EQ _PyUnicode_FromId """ It's already the case since at least Python 3.7. Extract of Python 3.7 Include/unicodeobject.h: #ifndef Py_LIMITED_API /* Return an interned Unicode object for an Identifier; may fail if there is no memory.*/ PyAPI_FUNC(PyObject*) _PyUnicode_FromId(_Py_Identifier*); /* Clear all static strings. */ PyAPI_FUNC(void) _PyUnicode_ClearStaticStrings(void); /* Fast equality check when the inputs are known to be exact unicode types and where the hash values are equal (i.e. a very probable match) */ PyAPI_FUNC(int) _PyUnicode_EQ(PyObject *, PyObject *); #endif /* !Py_LIMITED_API */ ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 06:39:51 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 10 May 2020 10:39:51 +0000 Subject: [issue40397] Refactor typing._GenericAlias In-Reply-To: <1587918915.07.0.818996162208.issue40397@roundup.psfhosted.org> Message-ID: <1589107191.73.0.377486471742.issue40397@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 0122d48681b1df27015cf396559fb283ba364d6d by Serhiy Storchaka in branch 'master': bpo-40397: Fix subscription of nested generic alias without parameters. (GH-20021) https://github.com/python/cpython/commit/0122d48681b1df27015cf396559fb283ba364d6d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 06:54:25 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 10 May 2020 10:54:25 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1589108065.22.0.571613731377.issue40257@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +19333 pull_request: https://github.com/python/cpython/pull/20022 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 08:02:26 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 10 May 2020 12:02:26 +0000 Subject: [issue40583] Runtime type annotation mutation leads to inconsistent behavior In-Reply-To: <1589096457.86.0.369001499523.issue40583@roundup.psfhosted.org> Message-ID: <1589112146.49.0.213408981376.issue40583@roundup.psfhosted.org> Change by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 08:14:38 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 10 May 2020 12:14:38 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1589112878.7.0.673465059117.issue40257@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 2fbc57af851814df567fb51054cb6f6a399f814a by Serhiy Storchaka in branch 'master': bpo-40257: Tweak docstrings for special generic aliases. (GH-20022) https://github.com/python/cpython/commit/2fbc57af851814df567fb51054cb6f6a399f814a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 08:34:31 2020 From: report at bugs.python.org (Ruairidh MacLeod) Date: Sun, 10 May 2020 12:34:31 +0000 Subject: [issue40582] Inconsistent exceptions caused by typing + tuple subclasses In-Reply-To: <1589067546.73.0.526678062232.issue40582@roundup.psfhosted.org> Message-ID: <1589114071.67.0.646371497352.issue40582@roundup.psfhosted.org> Ruairidh MacLeod added the comment: The original code for this was: ``` from typing import List from unittest.mock import call def f(n: List[call]): ... ``` Which produces "SyntaxError: Forward reference must be an expression -- got ''". I think my only query is whether this behavior is ok, or whether it should produce the clearer "TypeError: Parameters to generic types must be types" message instead? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 09:51:40 2020 From: report at bugs.python.org (hai shi) Date: Sun, 10 May 2020 13:51:40 +0000 Subject: [issue40574] segfault causing regression from PEP 573 implementation (PyQt5) In-Reply-To: <1588997324.8.0.612961250405.issue40574@roundup.psfhosted.org> Message-ID: <1589118700.01.0.776627120205.issue40574@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 10:32:14 2020 From: report at bugs.python.org (Jelle Zijlstra) Date: Sun, 10 May 2020 14:32:14 +0000 Subject: [issue40397] Refactor typing._GenericAlias In-Reply-To: <1587918915.07.0.818996162208.issue40397@roundup.psfhosted.org> Message-ID: <1589121134.15.0.41175046235.issue40397@roundup.psfhosted.org> Jelle Zijlstra added the comment: Thanks Serhyi! I can confirm that the issue I posted is fixed. ---------- priority: release blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 10:36:23 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 10 May 2020 14:36:23 +0000 Subject: [issue40582] Inconsistent exceptions caused by typing + tuple subclasses In-Reply-To: <1589067546.73.0.526678062232.issue40582@roundup.psfhosted.org> Message-ID: <1589121383.96.0.696596628301.issue40582@roundup.psfhosted.org> Change by Dennis Sweeney : ---------- nosy: +gvanrossum, levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 10:42:01 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 10 May 2020 14:42:01 +0000 Subject: [issue40582] Inconsistent exceptions caused by typing + tuple subclasses In-Reply-To: <1589067546.73.0.526678062232.issue40582@roundup.psfhosted.org> Message-ID: <1589121721.89.0.247366311764.issue40582@roundup.psfhosted.org> Guido van Rossum added the comment: I recommend taking this to a user forum or list. I see no but in typing.py here. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 10:47:20 2020 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 10 May 2020 14:47:20 +0000 Subject: [issue38787] PEP 573: Module State Access from C Extension Methods In-Reply-To: <1573655440.57.0.563143759574.issue38787@roundup.psfhosted.org> Message-ID: <1589122040.32.0.266713434943.issue38787@roundup.psfhosted.org> Change by Stefan Behnel : ---------- pull_requests: +19334 pull_request: https://github.com/python/cpython/pull/20024 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 11:59:00 2020 From: report at bugs.python.org (Thomas Caswell) Date: Sun, 10 May 2020 15:59:00 +0000 Subject: [issue40574] segfault causing regression from PEP 573 implementation (PyQt5) In-Reply-To: <1588997324.8.0.612961250405.issue40574@roundup.psfhosted.org> Message-ID: <1589126340.46.0.488576426947.issue40574@roundup.psfhosted.org> Thomas Caswell added the comment: The script I used for the bisect was: --- TARGET_ENV=bisect_env rm -r ~/.pybuild/$TARGET_ENV || true git clean -xfd ./configure --prefix=/home/tcaswell/.pybuild/$TARGET_ENV make -j 9 make install ~/.pybuild/$TARGET_ENV/bin/python3 -m venv --copies --clear ~/.virtualenvs/$TARGET_ENV popd source ~/.virtualenvs/$TARGET_ENV/bin/activate pip install --upgrade pip echo $PATH pushd ../sip # this was at "tip" in the hg repo pip install . pip install pyqt5 popd python -c "import PyQt5.QtCore; PyQt5.QtCore.Qt.Key_Control" retVal=$? if [ $retVal -ne 0 ]; then exit 1 fi --- I'm on a relatively up-to-date Arch ? gcc --version gcc (Arch Linux 9.3.0-1) 9.3.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --- updating pip is a key step (that I thoughtlessly carried over from my normal build process) because that lets it see manylinux2014 wheels and does not try to build pyqt5 from source. python3.9 -m pip freeze packaging==20.3 pyparsing==2.4.7 PyQt5==5.14.2 PyQt5-sip==12.7.2 sip==5.2.0 six==1.14.0 toml==0.10.0 ? python3.9 -VV Python 3.9.0a6+ (heads/master-7-g1c2fa78156:1c2fa78156, May 10 2020, 11:11:03) [GCC 9.3.0] ---- I'm also having issues getting pyqt5 to compile from the tarball, what do you mean by "Ah, if I install Python, I can install PyQt5. I installed PyQt5:"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 13:05:51 2020 From: report at bugs.python.org (Furkan Onder) Date: Sun, 10 May 2020 17:05:51 +0000 Subject: [issue19956] inspect.getsource(obj.foo) fails when foo is an injected method constructed from another method In-Reply-To: <1386804440.21.0.0153040236788.issue19956@psf.upfronthosting.co.za> Message-ID: <1589130351.95.0.395856910788.issue19956@roundup.psfhosted.org> Change by Furkan Onder : ---------- nosy: +furkanonder nosy_count: 6.0 -> 7.0 pull_requests: +19335 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20025 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 13:07:23 2020 From: report at bugs.python.org (hai shi) Date: Sun, 10 May 2020 17:07:23 +0000 Subject: [issue40584] PyType_FromModuleAndSpec function should add the process of tp_vectorcall_offset Message-ID: <1589130443.67.0.341454082707.issue40584@roundup.psfhosted.org> New submission from hai shi : some typeobject using `tp_vectorcall_offset`, if we use `PyType_FromModuleAndSpec` to create the the typeobject, it will be faild due to `PyType_FromModuleAndSpec` lack the process of `tp_vectorcall_offset`. so we should adding some process like https://github.com/python/cpython/blob/master/Objects/typeobject.c#L2966-L2976. ---------- components: Interpreter Core messages: 368589 nosy: petr.viktorin, shihai1991, vstinner priority: normal severity: normal status: open title: PyType_FromModuleAndSpec function should add the process of tp_vectorcall_offset versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 13:11:32 2020 From: report at bugs.python.org (hai shi) Date: Sun, 10 May 2020 17:11:32 +0000 Subject: [issue40584] PyType_FromModuleAndSpec function should add the process of tp_vectorcall_offset In-Reply-To: <1589130443.67.0.341454082707.issue40584@roundup.psfhosted.org> Message-ID: <1589130692.79.0.443872117795.issue40584@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +19336 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20026 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 13:45:13 2020 From: report at bugs.python.org (Furkan Onder) Date: Sun, 10 May 2020 17:45:13 +0000 Subject: [issue23677] Mention dict and set comps in library reference In-Reply-To: <1426495855.1.0.56894829498.issue23677@psf.upfronthosting.co.za> Message-ID: <1589132713.58.0.551864296252.issue23677@roundup.psfhosted.org> Change by Furkan Onder : ---------- nosy: +furkanonder nosy_count: 8.0 -> 9.0 pull_requests: +19337 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20027 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 14:23:31 2020 From: report at bugs.python.org (Furkan Onder) Date: Sun, 10 May 2020 18:23:31 +0000 Subject: [issue23677] Mention dict and set comps in library reference In-Reply-To: <1426495855.1.0.56894829498.issue23677@psf.upfronthosting.co.za> Message-ID: <1589135011.46.0.611077698118.issue23677@roundup.psfhosted.org> Furkan Onder added the comment: PR has been sent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 14:23:39 2020 From: report at bugs.python.org (Furkan Onder) Date: Sun, 10 May 2020 18:23:39 +0000 Subject: [issue19956] inspect.getsource(obj.foo) fails when foo is an injected method constructed from another method In-Reply-To: <1386804440.21.0.0153040236788.issue19956@psf.upfronthosting.co.za> Message-ID: <1589135019.44.0.916897279295.issue19956@roundup.psfhosted.org> Furkan Onder added the comment: PR has been sent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 14:46:41 2020 From: report at bugs.python.org (Thomas Caswell) Date: Sun, 10 May 2020 18:46:41 +0000 Subject: [issue40574] segfault causing regression from PEP 573 implementation (PyQt5) In-Reply-To: <1588997324.8.0.612961250405.issue40574@roundup.psfhosted.org> Message-ID: <1589136401.27.0.0365726640143.issue40574@roundup.psfhosted.org> Thomas Caswell added the comment: I think I have figured out the problem. I had a locally built and cached wheel of PyQt5-sip from before PEP573 went in. If that wheel is used for later commits I get the segfault, if I rebuilt the wheel from source it works. I am not sure if this is an expected sharp edge (wheels are be expected to be good between commits prior to a release) or not. ----- Below is a script that will build everything (sip, pyqt5, pyqt5-sip) from source and install them into a virtual env. ---- #! /usr/bin/bash set -e set -o xtrace rm -r ~/.pybuild/py39 || true pushd cpython git clean -xfd ./configure --prefix=/home/tcaswell/.pybuild/py39 make -j 9 make install popd ~/.pybuild/py39/bin/python3 -m venv --copies --clear ~/.virtualenvs/py39 source ~/.virtualenvs/py39/bin/activate pip install --upgrade pip echo $PATH pushd PyQt5 pip install sip --no-binary sip rm -rf PyQt5-5.14.2 tar -xzf PyQt5-5.14.2.tar.gz pushd PyQt5-5.14.2 python configure.py --confirm-license # patch the one palce that does not respect the venv settings sed -i 's|$(INSTALL_ROOT)/usr|$(INSTALL_ROOT)/$(HOME)/.virtualenvs/py39/usr|g' Makefile make -j 9 make install popd popd pip install PyQt5-sip --no-binary PyQt5-sip python -c "import PyQt5.QtCore; PyQt5.QtCore.Qt.Key_Control" ---- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 15:30:18 2020 From: report at bugs.python.org (Sergey Fedoseev) Date: Sun, 10 May 2020 19:30:18 +0000 Subject: [issue40302] Add pycore_byteswap.h internal header file with _Py_bswap32() function In-Reply-To: <1587046975.76.0.701994468055.issue40302@roundup.psfhosted.org> Message-ID: <1589139018.14.0.178223879618.issue40302@roundup.psfhosted.org> Change by Sergey Fedoseev : ---------- nosy: +sir-sigurd nosy_count: 3.0 -> 4.0 pull_requests: +19338 pull_request: https://github.com/python/cpython/pull/15659 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 15:55:28 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 10 May 2020 19:55:28 +0000 Subject: [issue40561] Add docstrings for webbrowser open functions In-Reply-To: <1588941280.97.0.150032786212.issue40561@roundup.psfhosted.org> Message-ID: <1589140528.7.0.843639401904.issue40561@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- title: Provide docstrings for public-facing webbrowser functions -> Add docstrings for webbrowser open functions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 17:44:18 2020 From: report at bugs.python.org (B. L. Alterman) Date: Sun, 10 May 2020 21:44:18 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1589147058.85.0.770473241619.issue33725@roundup.psfhosted.org> Change by B. L. Alterman : ---------- nosy: +blalterman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 17:44:16 2020 From: report at bugs.python.org (B. L. Alterman) Date: Sun, 10 May 2020 21:44:16 +0000 Subject: [issue40106] multiprocessor spawn In-Reply-To: <1585518578.2.0.0489480686513.issue40106@roundup.psfhosted.org> Message-ID: <1589147056.52.0.15737387458.issue40106@roundup.psfhosted.org> Change by B. L. Alterman : ---------- nosy: +blalterman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 18:30:50 2020 From: report at bugs.python.org (Matthias Bussonnier) Date: Sun, 10 May 2020 22:30:50 +0000 Subject: [issue38872] Document exec symbol for codeop.compile_command In-Reply-To: <1574298846.26.0.835938077059.issue38872@roundup.psfhosted.org> Message-ID: <1589149850.01.0.577458231667.issue38872@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 18:50:12 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 10 May 2020 22:50:12 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1589151012.08.0.166459485952.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: There is some discrepancy with the codeop module when running with the new parser: ./python -c "import codeop; codeop.CommandCompiler()('raise = 2\n\n', symbol='exec')" (No error) ./python -Xoldparser -c "import codeop; codeop.CommandCompiler()('raise = 2\n\n', symbol='exec')" ... File "", line 1 raise = 2 ^ SyntaxError: invalid syntax ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 19:03:35 2020 From: report at bugs.python.org (Matthias Bussonnier) Date: Sun, 10 May 2020 23:03:35 +0000 Subject: [issue40585] compile_command exec not raising syntax error with new PGEN Parser Message-ID: <1589151814.99.0.293887376017.issue40585@roundup.psfhosted.org> New submission from Matthias Bussonnier : compile_command used to produce syntax error in exec mode: ``` $ python -c "import codeop; codeop.compile_command('raise = 2', symbol='exec')" Traceback (most recent call last): File "", line 1, in File "...python3.8/codeop.py", line 125, in compile_command return _maybe_compile(_compile, source, filename, symbol) File "...python3.8/codeop.py", line 100, in _maybe_compile raise err1 File "...python3.8/codeop.py", line 87, in _maybe_compile code1 = compiler(source + "\n", filename, symbol) File "...python3.8/codeop.py", line 105, in _compile return compile(source, filename, symbol, PyCF_DONT_IMPLY_DEDENT) File "", line 1 raise = 2 ^ SyntaxError: invalid syntax ``` This happens to not be the case anymore in master, where it simply return `None` for above invalid input. ``` $ python -c "import codeop; codeop.CommandCompiler()('raise = 2', symbol='exec')" ``` or many other: ``` $ python Python 3.9.0a6+ (heads/master:2cc9b8486d, May 10 2020, 15:52:00) [Clang 9.0.0 (clang-900.0.39.2)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import codeop; >>> codeop.compile_command('def a-b', symbol='exec') >>> codeop.compile_command('await?', symbol='exec') >>> codeop.compile_command('=!=', symbol='exec') >>> codeop.compile_command('a await raise b', symbol='exec') >>> codeop.compile_command('a await raise b?+1', symbol='exec') ``` It is problematic as this is used in many places to decide whether code is valid, and for example in IPython to know wether we should insert a new line, or try to execute the code. It seem to be due to the new PGEN parser as setting PYTHONOLDPARSER solve the issue: ``` $ PYTHONOLDPARSER=1 python -c "import codeop; codeop.CommandCompiler()('raise = 2', symbol='exec')" Traceback (most recent call last): File "", line 1, in File "/Users/bussonniermatthias/dev/cpython/Lib/codeop.py", line 171, in __call__ return _maybe_compile(self.compiler, source, filename, symbol) File "/Users/bussonniermatthias/dev/cpython/Lib/codeop.py", line 100, in _maybe_compile raise err1 File "/Users/bussonniermatthias/dev/cpython/Lib/codeop.py", line 87, in _maybe_compile code1 = compiler(source + "\n", filename, symbol) File "/Users/bussonniermatthias/dev/cpython/Lib/codeop.py", line 136, in __call__ codeob = compile(source, filename, symbol, self.flags, True) File "", line 1 raise = 2 ^ SyntaxError: invalid syntax ``` `single` and `eval` appear to behave fine. ---------- components: Interpreter Core messages: 368594 nosy: mbussonn priority: normal severity: normal status: open title: compile_command exec not raising syntax error with new PGEN Parser versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 19:06:31 2020 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 10 May 2020 23:06:31 +0000 Subject: [issue31203] socket.IP_PKTINFO is missing from python In-Reply-To: <1502722784.42.0.622750235869.issue31203@psf.upfronthosting.co.za> Message-ID: <1589151991.13.0.507348537762.issue31203@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 4.0 -> 5.0 pull_requests: +19339 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/20029 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 19:07:47 2020 From: report at bugs.python.org (Matthias Bussonnier) Date: Sun, 10 May 2020 23:07:47 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1589152067.48.0.362142924151.issue40334@roundup.psfhosted.org> Matthias Bussonnier added the comment: Thanks Pablo for replying to my tweet, a couple of other non-failing case in https://bugs.python.org/issue40585 that I filled concurrently to your message. (also using this occasion to thanks all of you for your work on the new parser) ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 19:09:05 2020 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 10 May 2020 23:09:05 +0000 Subject: [issue31203] socket.IP_PKTINFO is missing from python In-Reply-To: <1502722784.42.0.622750235869.issue31203@psf.upfronthosting.co.za> Message-ID: <1589152145.56.0.851610428263.issue31203@roundup.psfhosted.org> Change by Zackery Spytz : ---------- versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 19:12:20 2020 From: report at bugs.python.org (Matthias Bussonnier) Date: Sun, 10 May 2020 23:12:20 +0000 Subject: [issue38872] Document exec symbol for codeop.compile_command In-Reply-To: <1574298846.26.0.835938077059.issue38872@roundup.psfhosted.org> Message-ID: <1589152340.35.0.216100470899.issue38872@roundup.psfhosted.org> Matthias Bussonnier added the comment: See the `compile()` documentation for the difference between eval/single/exec: https://docs.python.org/3/library/functions.html#compile `exec` is meant for multiline program, for example you would "exec" the string read from a file to get a module. I don't think we should re-document what each of these does, but list the possible values that compile_command/CommandCompiler() can take. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 19:20:36 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 10 May 2020 23:20:36 +0000 Subject: [issue40585] compile_command exec not raising syntax error with new PGEN Parser In-Reply-To: <1589151814.99.0.293887376017.issue40585@roundup.psfhosted.org> Message-ID: <1589152836.73.0.737630732289.issue40585@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch nosy: +pablogsal nosy_count: 1.0 -> 2.0 pull_requests: +19340 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20030 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 19:21:17 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 10 May 2020 23:21:17 +0000 Subject: [issue40585] compile_command exec not raising syntax error with new PGEN Parser In-Reply-To: <1589151814.99.0.293887376017.issue40585@roundup.psfhosted.org> Message-ID: <1589152877.41.0.470449100843.issue40585@roundup.psfhosted.org> Guido van Rossum added the comment: Let's analyze this here rather than in issue40334 (which is getting top-heavy :-). ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 19:44:03 2020 From: report at bugs.python.org (Matthias Bussonnier) Date: Sun, 10 May 2020 23:44:03 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1589154243.07.0.470353106947.issue40334@roundup.psfhosted.org> Matthias Bussonnier added the comment: Seem to not be in the new parser but simply in codeop in particular `def _maybe_compile` The logic seem weird (but weird logic usually have a reason), it try to compile thrice by appending many `\n`. 1) Why do that and not return the first successful compile directly ? I'm not sure. 2) It does compare the repr of error when compile(source + "\n") and compile(source+'\n\n') and only raise if both are identical (which they are not in the new parser, they differ by `\n`...) SyntaxError('invalid syntax', ('', 1, 6, 'def a-b')) vs SyntaxError('invalid syntax', ('', 1, 6, 'def a-b\n')) This logic seem to go back to the 2000s. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 20:10:29 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 11 May 2020 00:10:29 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1589155829.52.0.322821972328.issue40334@roundup.psfhosted.org> Guido van Rossum added the comment: It definitely has its reasons -- there are pernicious edge cases. Probably revealed by the tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 20:41:36 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 11 May 2020 00:41:36 +0000 Subject: [issue40585] compile_command exec not raising syntax error with new PGEN Parser In-Reply-To: <1589151814.99.0.293887376017.issue40585@roundup.psfhosted.org> Message-ID: <1589157696.64.0.833264274313.issue40585@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 5b956ca42de37c761562e9c9aeb96a0e67606e33 by Pablo Galindo in branch 'master': bpo-40585: Normalize errors messages in codeop when comparing them (GH-20030) https://github.com/python/cpython/commit/5b956ca42de37c761562e9c9aeb96a0e67606e33 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 20:41:39 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 11 May 2020 00:41:39 +0000 Subject: [issue40585] compile_command exec not raising syntax error with new PGEN Parser In-Reply-To: <1589151814.99.0.293887376017.issue40585@roundup.psfhosted.org> Message-ID: <1589157699.96.0.432040803636.issue40585@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 Sun May 10 20:50:31 2020 From: report at bugs.python.org (Gianni Mariani) Date: Mon, 11 May 2020 00:50:31 +0000 Subject: [issue40586] Pydoc should support https for hyperlinks. Message-ID: <1589158231.48.0.0342376329959.issue40586@roundup.psfhosted.org> New submission from Gianni Mariani : pydoc has a regex hard coded for supporting hyperlinks. It supports http and ftp. It should support https. ---------- components: Demos and Tools messages: 368601 nosy: owebeeone priority: normal severity: normal status: open title: Pydoc should support https for hyperlinks. 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 May 10 22:04:31 2020 From: report at bugs.python.org (B. L. Alterman) Date: Mon, 11 May 2020 02:04:31 +0000 Subject: [issue40106] multiprocessor spawn In-Reply-To: <1585518578.2.0.0489480686513.issue40106@roundup.psfhosted.org> Message-ID: <1589162671.07.0.896454277905.issue40106@roundup.psfhosted.org> B. L. Alterman added the comment: @Mouse, using "multiprocess" instead of "multiprocessing" will not work if you're passing a class that inherits from ABC. "dill" is one of "multiprocess"'s dependencies and "dill" can't pickle an _abc_data object (https://github.com/uqfoundation/dill/issues/332) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 22:51:56 2020 From: report at bugs.python.org (Gianni Mariani) Date: Mon, 11 May 2020 02:51:56 +0000 Subject: [issue40586] Pydoc should support https for hyperlinks. In-Reply-To: <1589158231.48.0.0342376329959.issue40586@roundup.psfhosted.org> Message-ID: <1589165516.36.0.18520552808.issue40586@roundup.psfhosted.org> Change by Gianni Mariani : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 23:20:21 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 11 May 2020 03:20:21 +0000 Subject: [issue40585] compile_command exec not raising syntax error with new PGEN Parser In-Reply-To: <1589151814.99.0.293887376017.issue40585@roundup.psfhosted.org> Message-ID: <1589167221.41.0.918950417358.issue40585@roundup.psfhosted.org> Change by Guido van Rossum : ---------- stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 23:40:31 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 11 May 2020 03:40:31 +0000 Subject: [issue40585] compile_command exec not raising syntax error with new PGEN Parser In-Reply-To: <1589151814.99.0.293887376017.issue40585@roundup.psfhosted.org> Message-ID: <1589168431.52.0.680692282139.issue40585@roundup.psfhosted.org> Change by Guido van Rossum : ---------- stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 23:56:20 2020 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 11 May 2020 03:56:20 +0000 Subject: [issue40587] [regression] inspect.getdoc not returning docstring. Message-ID: <1589169380.19.0.988807060363.issue40587@roundup.psfhosted.org> New submission from Matthias Bussonnier : In python 3.8: ``` >>> class A(object): ... """standard docstring""" ... pass ... >>> import inspect >>> inspect.getdoc(A()) 'standard docstring' ``` In 3.9: ``` $ python Python 3.9.0a6+ (heads/master:5b956ca42d, May 10 2020, 20:31:26) [Clang 9.0.0 (clang-900.0.39.2)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> class A(object): KeyboardInterrupt >>> class A(object): ... """standard docstring""" ... pass ... >>> import inspect >>> inspect.getdoc(A()) >>> ``` ---------- messages: 368603 nosy: mbussonn priority: normal severity: normal status: open title: [regression] inspect.getdoc not returning docstring. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 10 23:56:39 2020 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 11 May 2020 03:56:39 +0000 Subject: [issue40587] [regression] inspect.getdoc not returning docstring. In-Reply-To: <1589169380.19.0.988807060363.issue40587@roundup.psfhosted.org> Message-ID: <1589169399.17.0.950148846985.issue40587@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- components: +Interpreter Core versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 00:04:38 2020 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 11 May 2020 04:04:38 +0000 Subject: [issue40575] _PyDict_GetItemIdWithError() should call _PyDict_GetItem_KnownHash() In-Reply-To: <1589017629.56.0.630851682841.issue40575@roundup.psfhosted.org> Message-ID: <1589169878.54.0.357040913979.issue40575@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset 6067d4bc3ce5ff4cfa5b47ceecc84a3941bc031c by scoder in branch 'master': bpo-40575: Avoid unnecessary overhead in _PyDict_GetItemIdWithError() (GH-20018) https://github.com/python/cpython/commit/6067d4bc3ce5ff4cfa5b47ceecc84a3941bc031c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 00:05:13 2020 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 11 May 2020 04:05:13 +0000 Subject: [issue40587] [regression] inspect.getdoc not returning docstring. In-Reply-To: <1589169380.19.0.988807060363.issue40587@roundup.psfhosted.org> Message-ID: <1589169913.91.0.727836803544.issue40587@roundup.psfhosted.org> Matthias Bussonnier added the comment: That will break a lot o the interactive usage for the scientific ecossytem Imho, For example anyone that get a Pandas Dataframe and try to get help on it either via help(df), or `df?` in IPython/Jupyter. Might be purposeful (https://bugs.python.org/issue40257) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 00:07:28 2020 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 11 May 2020 04:07:28 +0000 Subject: [issue40575] _PyDict_GetItemIdWithError() should call _PyDict_GetItem_KnownHash() In-Reply-To: <1589017629.56.0.630851682841.issue40575@roundup.psfhosted.org> Message-ID: <1589170048.37.0.0150660569811.issue40575@roundup.psfhosted.org> Change by Stefan Behnel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 00:26:13 2020 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 11 May 2020 04:26:13 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1589171173.03.0.936166158418.issue40257@roundup.psfhosted.org> Matthias Bussonnier added the comment: This is going to potentially break a lot of interactive usage in the Scientific ecosystem. A a lot of people are going to do: df = load('my.csv') df?? To ask for help and will get nothing. Even for subclass, I want to argue that a docstring for a superclass is better than no docstring. This will be devastating for many users. ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 00:31:21 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 11 May 2020 04:31:21 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1589171481.08.0.937484624659.issue40257@roundup.psfhosted.org> Guido van Rossum added the comment: Okay, let's reopen. @Matthias, can you clarify your example? What's load()? And what does df?? do? ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 00:35:54 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 11 May 2020 04:35:54 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1589171754.74.0.953260653231.issue40257@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: https://bugs.python.org/issue40587 has been opened. Copy paste of the report as below : In python 3.8: ``` >>> class A(object): ... """standard docstring""" ... pass ... >>> import inspect >>> inspect.getdoc(A()) 'standard docstring' ``` In 3.9: ``` $ python Python 3.9.0a6+ (heads/master:5b956ca42d, May 10 2020, 20:31:26) [Clang 9.0.0 (clang-900.0.39.2)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> class A(object): KeyboardInterrupt >>> class A(object): ... """standard docstring""" ... pass ... >>> import inspect >>> inspect.getdoc(A()) >>> ``` ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 00:56:14 2020 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 11 May 2020 04:56:14 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1589172974.2.0.965500229985.issue40257@roundup.psfhosted.org> Matthias Bussonnier added the comment: > can you clarify your example? What's load()? And what does df?? do? It was vague on purpose, `load()` would be for example `load_csv()` from `pandas` that return a `pandas.DataFrame`. The point being that users typically won't really know the type of what they will get, they may get a DataFrame, but they may get a subclass if for example they use `dask` to do distributed computing. `?` or `??` is the way to get help in IPython/Jupyter, we try to pull as much information as we can and under the hood call `inspect.getdoc()`. Assuming In [4]: class A: ...: "doc" In [5]: class B(A): ...: pass In [6]: b = B() Python 3.8 gives: In [9]: b? Type: B String form: <__main__.B object at 0x104be7d00> Docstring: Class docstring: doc Python 3.9 give In [4]: b? Type: B String form: <__main__.B object at 0x10a0b7140> Docstring: We do already pull docs from the superclass of the instance if no doc is found on current object, but now we get even less for the user. We could of course publish patch and walk the hierarchy ourselves, but it will require many users to upgrade (which you of course know they are not good at). (Here i'm using `?`, `??` try to pull even more informations like the source, known subclasses and other stuff) (Will try to get examples with actual code, but I haven't had time to build pandas or other scientific package on 3.9 yet). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 00:58:29 2020 From: report at bugs.python.org (Shengjun Zhu) Date: Mon, 11 May 2020 04:58:29 +0000 Subject: [issue40588] Creating Virtual Environments Does Not Work (Not Creating Folder) Message-ID: <1589173109.69.0.907519965881.issue40588@roundup.psfhosted.org> New submission from Shengjun Zhu : I followed the instructions, run "python3 -m venv tutorial-env" , but the command doesn't create any directory. https://docs.python.org/3.8/tutorial/venv.html I followed the instructions in the post below to remove the "Application Execution Aliases" for python.exe and python3.exe. That got rid of the exe files in WindowsApps. However, now when I type where python3 in CMD, I get: INFO: Could not find files for the given pattern(s). https://superuser.com/questions/1437590/typing-python-on-windows-10-version-1903-command-prompt-opens-microsoft-stor I changed python3 in the command to python, it worked. python -m venv tutorial-env I think in version python3.8, instead python3 , we should use python, right? ---------- assignee: docs at python components: Documentation messages: 368610 nosy: Shengjun Zhu, docs at python priority: normal severity: normal status: open title: Creating Virtual Environments Does Not Work (Not Creating Folder) versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 01:00:31 2020 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Mon, 11 May 2020 05:00:31 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1589173231.95.0.396726254373.issue40257@roundup.psfhosted.org> Vedran ?a?i? added the comment: Of course, I thought that 2. inspect.getdoc() returns the object's own docstring. means it returns the object's own docstring _if it has one_. If it doesn't, then it should still return the docstring of its class, of course! I have no problem with the fact that help(1) gives the same help as help(int). Of course, same as with the above (subclasses), we might want to emphasize the fact that the help is for the class and not for the object itself, but just returning nothing is in no way an improvement. Guido, load is probably from Pandas, df is a relatively standard abbreviation for "dataframe" (an instance of a class DataFrame, with many various methods), and obj?? in Jupyter opens the help for obj in a subwindow, enabling you to browse it and close when you're done with it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 01:01:30 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 11 May 2020 05:01:30 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1589173290.37.0.556290445667.issue40257@roundup.psfhosted.org> Guido van Rossum added the comment: Can you all please decide which issue to use? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 01:09:40 2020 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Mon, 11 May 2020 05:09:40 +0000 Subject: [issue40589] Missing path-like versionchanged in shutil.rmtree Message-ID: <1589173780.72.0.321228140828.issue40589@roundup.psfhosted.org> New submission from Ville Skytt? : shutil.rmtree takes a path-like object starting from 3.6 (due to internal use of os.lstat which does that too). ---------- assignee: docs at python components: Documentation messages: 368613 nosy: docs at python, scop priority: normal severity: normal status: open title: Missing path-like versionchanged in shutil.rmtree _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 01:11:16 2020 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Mon, 11 May 2020 05:11:16 +0000 Subject: [issue40589] Missing path-like versionchanged in shutil.rmtree In-Reply-To: <1589173780.72.0.321228140828.issue40589@roundup.psfhosted.org> Message-ID: <1589173876.64.0.925021573179.issue40589@roundup.psfhosted.org> Change by Ville Skytt? : ---------- keywords: +patch pull_requests: +19341 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20032 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 01:44:58 2020 From: report at bugs.python.org (Dima Tisnek) Date: Mon, 11 May 2020 05:44:58 +0000 Subject: [issue40590] test_subprocess stuck on Windows, x64 Message-ID: <1589175898.73.0.75396943112.issue40590@roundup.psfhosted.org> New submission from Dima Tisnek : The windows test got stuck in my PR, and I'm pretty sure my change is not to blame. The test log looks like this: 0:11:10 load avg: 6.42 [421/423] test_importlib passed 0:11:40 load avg: 5.40 running: test_subprocess (58.5 sec), test_multiprocessing_spawn (53.0 sec) 0:12:10 load avg: 5.48 running: test_subprocess (1 min 28 sec), test_multiprocessing_spawn (1 min 23 sec) 0:12:40 load avg: 5.44 running: test_subprocess (1 min 58 sec), test_multiprocessing_spawn (1 min 53 sec) 0:12:57 load avg: 4.58 [422/423] test_multiprocessing_spawn passed (2 min 10 sec) -- running: test_subprocess (2 min 16 sec) 0:13:27 load avg: 2.89 running: test_subprocess (2 min 46 sec) 0:13:57 load avg: 2.11 running: test_subprocess (3 min 16 sec) 0:14:27 load avg: 1.54 running: test_subprocess (3 min 46 sec) ... 5:53:33 load avg: 0.48 running: test_subprocess (5 hour 42 min) 5:54:03 load avg: 0.51 running: test_subprocess (5 hour 43 min) 5:54:33 load avg: 0.31 running: test_subprocess (5 hour 43 min) Terminate batch job (Y/N)? https://github.com/python/cpython/pull/19402/checks?check_run_id=658308339 ---------- components: Tests messages: 368614 nosy: Dima.Tisnek, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: test_subprocess stuck on Windows, x64 versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 02:37:32 2020 From: report at bugs.python.org (Inada Naoki) Date: Mon, 11 May 2020 06:37:32 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1589179052.04.0.249447779585.issue36346@roundup.psfhosted.org> Inada Naoki added the comment: New changeset d5d9a718662e67e2b1ac7874dda9df2d8d71d415 by Inada Naoki in branch 'master': bpo-36346: array: Don't use deprecated APIs (GH-19653) https://github.com/python/cpython/commit/d5d9a718662e67e2b1ac7874dda9df2d8d71d415 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 03:43:55 2020 From: report at bugs.python.org (wyz23x2) Date: Mon, 11 May 2020 07:43:55 +0000 Subject: [issue40591] \r broken in IDLE Message-ID: <1589183035.92.0.395871361419.issue40591@roundup.psfhosted.org> New submission from wyz23x2 : When you run this code: import time for i in range(10): print(f"\r{i}", end='', flush=True) time.sleep(1) print('\n') On CMD it prints 0 at the first time, then it will erase it and print the increased i. But on IDLE it just prints "0123456789" -- that isn't right. ---------- assignee: terry.reedy components: IDLE messages: 368616 nosy: terry.reedy, wyz23x2 priority: normal severity: normal status: open title: \r broken in IDLE type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 03:53:14 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 11 May 2020 07:53:14 +0000 Subject: [issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad In-Reply-To: <1487329309.81.0.182915384821.issue29587@psf.upfronthosting.co.za> Message-ID: <1589183594.51.0.176955340896.issue29587@roundup.psfhosted.org> Chris Jerdonek added the comment: Would someone be able to approve / take a look at this small PR addressing another aspect of this issue? https://github.com/python/cpython/pull/19858 I'm hoping it can be part of 3.9, and the deadline is just a week away. It builds on the already merged PR to address an "Example 3" of this issue (the "yield from" case as opposed to the "yield" case, which the merged PR addressed): Example 3: def f(): yield def g(): try: raise KeyError('a') except Exception: yield from f() gen = g() gen.send(None) gen.throw(ValueError) ---------------------- Output without PR: Traceback (most recent call last): File "/.../test-example3.py", line 12, in gen.throw(ValueError) File "/.../test-example3.py", line 8, in g yield from f() File "/.../test-example3.py", line 2, in f yield ValueError ---------------------- Output with PR: Traceback (most recent call last): File "/.../test-example3.py", line 6, in g raise KeyError('a') KeyError: 'a' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/.../test-example3.py", line 12, in gen.throw(ValueError) File "/.../test-example3.py", line 8, in g yield from f() File "/.../test-example3.py", line 2, in f yield ValueError ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 04:16:37 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 11 May 2020 08:16:37 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1589184997.95.0.742804130688.issue40257@roundup.psfhosted.org> Serhiy Storchaka added the comment: help(1) as well as help(int) output the help for int. The only difference is that the former has the first line "Help on int object:", and the latter -- "Help on class int in module builtins:". If IPython wants to output the help on the instance, it should change the implementation of `?` and `??`. It would be better if it correctly attribute the source of the docstring: the object itself, its class or its superclass. It was difficult to distinguish these cases before, now it is easier. By the way, I just tried IPython 5.5.0 with Python 3.6.9, and it does not output the docstring either: In [1]: a = 1 In [2]: a?? Type: int String form: 1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 04:23:55 2020 From: report at bugs.python.org (Thomas Wouters) Date: Mon, 11 May 2020 08:23:55 +0000 Subject: [issue40503] PEP 615: Add zoneinfo module In-Reply-To: <1588618281.16.0.913416553136.issue40503@roundup.psfhosted.org> Message-ID: <1589185435.78.0.0419631617169.issue40503@roundup.psfhosted.org> Thomas Wouters added the comment: The normal way to do this (for make/autoconf) is to add a --with-tzpath argument to configure.ac, and a make variable to pass it to the compilation of anything that needs it. You can then access it from Python code with sysconfig.get_config_var(). In configure.ac, AC_SUBST(TZPATH) makes configure replace @TZPATH@ in the Makefile with the value you set to $TZPATH in configure.ac. You then either add that to the global PY_CFLAGS_NODIST, or modify the build rule for the module that needs it to pass it along. (See for example how GITTAG/GITVERSION/GITBRANCH are passed to Modules/getbuildinfo.o.) AC_ARG_WITH() is how you add a new --with-* argument to configure. The usual way people do this is by copying one of the other AC_ARG_WITH blocks and modifying it to suit their needs. It's a mixture of m4 and shell that can be a bit annoying to get right, but it's pretty flexible. Run autoreconf to regenerate configure. You can manually check that the shell in configure makes sense. Something will have to be done on the Windows side as well, but I'm not sure what. Adding Steve Dower for that. ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 04:50:15 2020 From: report at bugs.python.org (=?utf-8?q?Dawid_Gos=C5=82awski?=) Date: Mon, 11 May 2020 08:50:15 +0000 Subject: [issue40592] `Shutil.which` incosistent with windows's `where` Message-ID: <1589187015.71.0.593402074503.issue40592@roundup.psfhosted.org> New submission from Dawid Gos?awski : Shutil's which implementation does not work correctly when someone set's empty item in `PATHEXT` environment variable. Example: set PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.RB;.RBW; I'm not 100% sure how I got this in my PATHEXT config, I wasn't changing that so maybe some bugged uninstaller not removed it's extension correctly. This makes things confusing as Windows will find correctly binary, but Python will return nothing, due to this part: ``` if any(cmd.lower().endswith(ext.lower()) for ext in pathext): files = [cmd] ``` pathext is initialized as `pathext = os.environ.get("PATHEXT", "").split(os.pathsep)`, which ends producing '' as last element Because any string ends with empty string (''), files list will have plain version added like `git`, which will then fail executable check. Workaround is to use full name `git.exe` Filtering out empty strings would fix that. ---------- components: Library (Lib) messages: 368620 nosy: alkuzad priority: normal severity: normal status: open title: `Shutil.which` incosistent with windows's `where` _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 04:53:28 2020 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 11 May 2020 08:53:28 +0000 Subject: [issue40584] PyType_FromModuleAndSpec function should add the process of tp_vectorcall_offset In-Reply-To: <1589130443.67.0.341454082707.issue40584@roundup.psfhosted.org> Message-ID: <1589187208.56.0.952894516597.issue40584@roundup.psfhosted.org> Petr Viktorin added the comment: That seems reasonable. See the discussion around https://bugs.python.org/issue38140 for context. Note that __dictoffset__ and __weaklistoffset__ are also exposed as members (in PyMemberDef type_members) and documented (Doc/c-api/structures.rst). A new __vectorcalloffset__ should have that as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 06:05:51 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 11 May 2020 10:05:51 +0000 Subject: [issue40592] `Shutil.which` incosistent with windows's `where` In-Reply-To: <1589187015.71.0.593402074503.issue40592@roundup.psfhosted.org> Message-ID: <1589191551.94.0.19341692807.issue40592@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 06:49:33 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 11 May 2020 10:49:33 +0000 Subject: [issue40593] Improve error reporting for invalid character in source code Message-ID: <1589194173.64.0.264266598183.issue40593@roundup.psfhosted.org> New submission from Serhiy Storchaka : Currently you get SyntaxError with message "invalid character in identifier" in two cases: 1. The source code contains some non-ASCII non-identifier character. Usually it happens when you copy code from internet page or PDF file which was "improved" by some enhachaizer which replaces spaces with non-breacking spaces, ASCII minus with a dash or Unicode minus, ASCII quotes with fancy Unicode quotes. They do not look like a part of identifier at all. The error message also does not say what character is invalid, and it is hard to find the culprit because they look too similar to correct characters (especially with some monospace fonts). See https://mail.python.org/archives/list/python-ideas at python.org/thread/ILMNJ46EAL4ENYK7LLDLGIMYQKZAMMWU/ for discussion. 2. Other case is very special -- when the source code contains the declaration for the utf-8 encoding followed by non-UTF-8 bytes sequences. It is rarely happen in real world. The proposed PR improves errors for these cases. >>> print(123?45) File "", line 1 print(123?45) ^ SyntaxError: invalid character '?' (U+2014) * The error message no longer contains misleading "in identifier". * The error message contains the invalid character, literal and its hexcode. * The caret points on the invalid character. Previously it pointed on the last non-ascii or non-alphabetical character followed the invalid character (5 in the above example). * For the special case of non-decodable UTF-8 sequence the syntax error message is more informative: "(unicode error) 'utf-8' codec can't decode byte 0xff ...". Although this case needs further improvements. ---------- components: Interpreter Core messages: 368622 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Improve error reporting for invalid character in source code type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 06:53:20 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 11 May 2020 10:53:20 +0000 Subject: [issue40593] Improve error reporting for invalid character in source code In-Reply-To: <1589194173.64.0.264266598183.issue40593@roundup.psfhosted.org> Message-ID: <1589194400.69.0.530930756543.issue40593@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +19342 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20033 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 07:53:50 2020 From: report at bugs.python.org (David Bell) Date: Mon, 11 May 2020 11:53:50 +0000 Subject: [issue40594] urljoin since 3.5 incorrectly filters out double slashes Message-ID: <1589198030.38.0.614579410038.issue40594@roundup.psfhosted.org> New submission from David Bell : In Python 3.5 the urljoin function was rewritten to be RFC 3986 compliant and fix long standing issues. In the initial rewrite duplicate slashes were added by accident, and so code was added to prevent that. The discussion is here: https://bugs.python.org/issue22118 The code within urljoin is this: # filter out elements that would cause redundant slashes on re-joining # the resolved_path segments[1:-1] = filter(None, segments[1:-1]) This seems sensible, you would not want double slashes in a URL, right? The problem is: double slashes are perfectly legal in a URI/URL, and for reasons I don't understand, they are in use in the wild. The code above was written to remove them because urljoin accidentally introduced them, the problem is that it also removes intentional double slashes: >>> urljoin("http://www.example.com/", "this//double/path") 'http://www.example.com/this/double/path' Where as the expected result should be: 'http://www.example.com/this//double/path' I suggest that the fix for this is to remove the aforementioned filter code, e.g. remove this: # filter out elements that would cause redundant slashes on re-joining # the resolved_path segments[1:-1] = filter(None, segments[1:-1]) ...and remove this code too: if base_parts[-1] != '': # the last item is not a directory, so will not be taken into account # in resolving the relative path del base_parts[-1] and instead simply add: del base_parts[-1] ...because the last part of the split base URL should always be deleted. If the last element of the list (the base URL split) is an empty string, then the URL ended with a slash, and so we should remove the last element otherwise a double slash will occur when we combine it with the second parameter to urljoin. If the last element is not an empty string then the last part of the URL was not a directory, and should be removed. Thus the last element should always be removed. By following this logic the "remove all double slashes" filter is not necessary, because the cause of the accidental addition of double slashes is removed. ---------- components: Library (Lib) messages: 368623 nosy: David Bell priority: normal severity: normal status: open title: urljoin since 3.5 incorrectly filters out double slashes 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 Mon May 11 10:34:52 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 11 May 2020 14:34:52 +0000 Subject: [issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors In-Reply-To: <1588867521.75.0.200197181166.issue40546@roundup.psfhosted.org> Message-ID: <1589207692.54.0.545715853145.issue40546@roundup.psfhosted.org> Lysandros Nikolaou added the comment: Guido: > I wonder if this is the fix we're looking for? I think this is the most sensible thing to do, yes. I guess, we also have to change both parsers to match this behaviour, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 10:46:42 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 11 May 2020 14:46:42 +0000 Subject: [issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors In-Reply-To: <1588867521.75.0.200197181166.issue40546@roundup.psfhosted.org> Message-ID: <1589208402.07.0.0744261994903.issue40546@roundup.psfhosted.org> Guido van Rossum added the comment: I would carefully think about the meaning of that line and see if there are other permutations, e.g. min(Len(blah), offset - 1) ? It would,be nice to specify what we need here from both parsers and from both code chunks for error printing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 10:50:47 2020 From: report at bugs.python.org (Glenn Travis) Date: Mon, 11 May 2020 14:50:47 +0000 Subject: [issue40477] Launcher on Catalina In-Reply-To: <1588435279.1.0.0339863635356.issue40477@roundup.psfhosted.org> Message-ID: <1589208647.6.0.32635156438.issue40477@roundup.psfhosted.org> Glenn Travis added the comment: I tried to report this concern under Documentation, but got shot down as duplicate. I have the same results. I tried to make Launcher the default "Open With" application for a script, also tried dragging (and Option dragging) the script to the Launcher, neither worked. I have received several results: 1. Nothing happens 2. Preference window opens 3. Launcher window with a run button opens; the run button does nothing. ---------- nosy: +TotallyLost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 11:07:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 11 May 2020 15:07:24 +0000 Subject: [issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files In-Reply-To: <1588583321.75.0.545037270294.issue40495@roundup.psfhosted.org> Message-ID: <1589209644.49.0.0886233182745.issue40495@roundup.psfhosted.org> STINNER Victor added the comment: Is it possible that the PYC file of optimization level 0 content is modified if the PY file content changed, with would make PYC files or optimization level 1 and 2 inconsistent? Christian Heimes: > Python's import system is fully compatible with this approach. importlib never directly writes to a .pyc file. Instead it always creates a new temporary file next to the .pyc file and then overrides the .pyc file with an atomic file system operation. See _write_atomic() in Lib/importlib/_bootstrap_external.py. It seems like importlib doesn't have the issue because it doesn't open PYC file to write its content, but _write_atomic() creates a *new* file and then call os.replace() to rename the temporary file to the PYC final name. Alright, I think that I understood :-) -- PYC file became more complicated with PEP 552. Here are my own notes to try to understand how it's supposed to be used. Python 3.9 now has _imp.check_hash_based_pycs string which can be overriden by --check-hash-based-pycs command line option. It can have 3 values: * "always" * "never" * "default" These values are defined by the PEP 552: * "never" causes the interpreter to always assume hash-based pycs are valid * "default" means the check_source flag in hash-based pycs determines invalidation * "always" causes the interpreter to hash the source file for invalidation regardless of value of check_source bit When a PYC file is created, it has a "check_source" bit: * Bit set: If the check_source flag is set, Python will determine the validity of the pyc by hashing the source file and comparing the hash with the expected hash in the pyc. If the pyc needs to be regenerated, it will be regenerated as a hash-based pyc again with the check_source flag set. * Bit unset, Python will simply load the pyc without checking the hash of the source file. The expectation in this case is that some external system (e.g., the local Linux distribution?s package manager) is responsible for keeping pycs up to date, so Python itself doesn?t have to check. I mostly copied/pasted the PEP 552 :-) py_compile and compileall have a new invalidation_mode which can have 3 values: class PycInvalidationMode(Enum): TIMESTAMP CHECKED_HASH UNCHECKED_HASH The default is compiled in py_compile by: def _get_default_invalidation_mode(): if os.environ.get('SOURCE_DATE_EPOCH'): return PycInvalidationMode.CHECKED_HASH else: return PycInvalidationMode.TIMESTAMP importlib: SourceLoader.get_code(filename) uses: flags = _classify_pyc(data, fullname, exc_details) bytes_data = memoryview(data)[16:] hash_based = flags & 0b1 != 0 if hash_based: check_source = flags & 0b10 != 0 if (_imp.check_hash_based_pycs != 'never' and (check_source or _imp.check_hash_based_pycs == 'always')): source_bytes = self.get_data(source_path) source_hash = _imp.source_hash( _RAW_MAGIC_NUMBER, source_bytes, ) _validate_hash_pyc(data, source_hash, fullname, exc_details) else: _validate_timestamp_pyc( data, source_mtime, st['size'], fullname, exc_details, ) ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 11:13:02 2020 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 11 May 2020 15:13:02 +0000 Subject: [issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files In-Reply-To: <1588583321.75.0.545037270294.issue40495@roundup.psfhosted.org> Message-ID: <1589209982.94.0.356645724534.issue40495@roundup.psfhosted.org> Miro Hron?ok added the comment: > Is it possible that the PYC file of optimization level 0 content is modified if the PY file content changed, with would make PYC files or optimization level 1 and 2 inconsistent? ... Note that there is a test exactly for this, in case the implementation is changed in the future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 11:13:23 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 11 May 2020 15:13:23 +0000 Subject: [issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files In-Reply-To: <1588583321.75.0.545037270294.issue40495@roundup.psfhosted.org> Message-ID: <1589210003.14.0.554481606227.issue40495@roundup.psfhosted.org> STINNER Victor added the comment: While reviewing PR 19901, I was confused by py_compile and compileall documentation which is outdated: it doesn't mention that optimize argument can be a list of integers. https://docs.python.org/dev/library/py_compile.html#py_compile.compile "optimize controls the optimization level and is passed to the built-in compile() function. The default of -1 selects the optimization level of the current interpreter." https://docs.python.org/dev/library/compileall.html#compileall.compile_dir "optimize specifies the optimization level for the compiler. It is passed to the built-in compile() function." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 11:29:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 11 May 2020 15:29:17 +0000 Subject: [issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files In-Reply-To: <1588583321.75.0.545037270294.issue40495@roundup.psfhosted.org> Message-ID: <1589210957.09.0.628932854863.issue40495@roundup.psfhosted.org> STINNER Victor added the comment: Currently, it's possible to implement this optimization using the Unix command "hardlink". Example: hardlink -c -v /usr/lib64/python3.8/__pycache__/*.pyc On my Fedora 32, this command says: Directories: 1 Objects: 520 Regular files: 519 Comparisons: 133 Linked: 133 Saved: 2220032 For example, string.cpython-38.pyc and string.cpython-38.opt-1.pyc become hard links. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 11:32:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 11 May 2020 15:32:49 +0000 Subject: [issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files In-Reply-To: <1588583321.75.0.545037270294.issue40495@roundup.psfhosted.org> Message-ID: <1589211169.23.0.194784044003.issue40495@roundup.psfhosted.org> STINNER Victor added the comment: > Currently, it's possible to implement this optimization using the Unix command "hardlink". PR 19901 avoids the dependency on external "hardlink" command. In practice, PR 19901 only impacts newly written PYC files, whereas using manually the "hardlink" command cannot track which files are not or not. "hardlink" command is less practice, PR 19901 avoids modifying PYC files that we don't "own". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 12:24:39 2020 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 11 May 2020 16:24:39 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1589214279.42.0.0717438234157.issue40257@roundup.psfhosted.org> Matthias Bussonnier added the comment: > Can you all please decide which issue to use? We can stay here, I opened the other issue before figuring out this was the cause. > If IPython wants to output the help on the instance, it should change the implementation of `?` and `??`. It would be better if it correctly attribute the source of the docstring: the object itself, its class or its superclass. It was difficult to distinguish these cases before, now it is easier. Sure I can do that, but this issue feel like a important semantic change of `inspect.getdoc()`, it may be documented but there is no warning or deprecation of behavior. It is also likely to affect untested code (documentation generation). If you decide that this change of behavior is the one you want I'll be happy to support you ??I just want to make sure the impact on the rest of the ecosystem. IPython/Jupyter is likely not the only one to rely on inspect.getdoc behavior, I'm thinking pycharm, spyder, sphinx will likely be impacted. I can see `inspect.getdoc()` in the source of even scipy/numpy and rarely in tests. I would prefer new functions with clearer behavior and for example returning a sequence of tuple (docs, where it comes from) potentially deprecating inspect.getdocs() than a change of behavior that remove data where their used to be some > I just tried IPython 5.5.0 (You may want to update to 5.10, and do you have reason to still be on 5 and not 7 ?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 12:37:58 2020 From: report at bugs.python.org (hai shi) Date: Mon, 11 May 2020 16:37:58 +0000 Subject: [issue40584] PyType_FromModuleAndSpec function should add the process of tp_vectorcall_offset In-Reply-To: <1589130443.67.0.341454082707.issue40584@roundup.psfhosted.org> Message-ID: <1589215078.52.0.278341986195.issue40584@roundup.psfhosted.org> hai shi added the comment: > Note that __dictoffset__ and __weaklistoffset__ are also exposed as members (in PyMemberDef type_members) and documented (Doc/c-api/structures.rst). A new __vectorcalloffset__ should have that as well. Thanks for your comment, petr. And I updated the doc in PR20026. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 12:57:33 2020 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 11 May 2020 16:57:33 +0000 Subject: [issue40503] PEP 615: Add zoneinfo module In-Reply-To: <1588618281.16.0.913416553136.issue40503@roundup.psfhosted.org> Message-ID: <1589216253.91.0.921084354962.issue40503@roundup.psfhosted.org> Change by Paul Ganssle : ---------- pull_requests: +19343 pull_request: https://github.com/python/cpython/pull/20034 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 13:01:42 2020 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 11 May 2020 17:01:42 +0000 Subject: [issue40503] PEP 615: Add zoneinfo module In-Reply-To: <1588618281.16.0.913416553136.issue40503@roundup.psfhosted.org> Message-ID: <1589216502.77.0.766506606897.issue40503@roundup.psfhosted.org> Paul Ganssle added the comment: Thanks Thomas, that was super helpful. I've created GH-20034 to add in the compile-time arguments on POSIX systems at least, do you mind having a look? For the moment I have made it non-configurable on Windows, but I think the right thing to do is to add an argument to PCbuild\build.bat. Hopefully Steve can point me in the right direction for mapping that argument (or something else) to a new config variable in sysconfig. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 13:14:31 2020 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 11 May 2020 17:14:31 +0000 Subject: [issue40536] Addition of a "list of available time zones" function to zoneinfo In-Reply-To: <1588785591.81.0.248136692657.issue40536@roundup.psfhosted.org> Message-ID: <1589217271.89.0.795440908126.issue40536@roundup.psfhosted.org> Change by Paul Ganssle : ---------- keywords: +patch pull_requests: +19344 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19909 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 13:15:34 2020 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 11 May 2020 17:15:34 +0000 Subject: [issue40536] Addition of a "list of available time zones" function to zoneinfo In-Reply-To: <1588785591.81.0.248136692657.issue40536@roundup.psfhosted.org> Message-ID: <1589217334.15.0.953334856355.issue40536@roundup.psfhosted.org> Change by Paul Ganssle : ---------- pull_requests: -19344 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 13:19:58 2020 From: report at bugs.python.org (Taylor Robie) Date: Mon, 11 May 2020 17:19:58 +0000 Subject: [issue40595] AttributeError from type annotation Message-ID: <1589217598.74.0.170713443577.issue40595@roundup.psfhosted.org> New submission from Taylor Robie : Consider the following: ``` import re class MyClass(object): def re(self): pass def foo(self, m: re.Match): pass ``` Even though `re` and `MyClass.re` are distinct namespaces, the type annotation misses that fact (presumably there is an issue with how it is parsing the AST) and attempts to access MyClass.re.Match, resulting in: `AttributeError: 'function' object has no attribute 'Match'` Commenting out the definition of `MyClass.re` or reversing the definition order resolves the issue. ---------- components: Interpreter Core messages: 368635 nosy: robieta priority: normal severity: normal status: open title: AttributeError from type annotation type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 13:29:57 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 11 May 2020 17:29:57 +0000 Subject: [issue40591] \r broken in IDLE In-Reply-To: <1589183035.92.0.395871361419.issue40591@roundup.psfhosted.org> Message-ID: <1589218197.85.0.877569492326.issue40591@roundup.psfhosted.org> Terry J. Reedy added the comment: This is known, has been discussed on previous issues (can't find numbers now), and is not a bug. Your code outputs a stream of 21 characters to 'file' sys.stdout, which for code executed by IDLE is, by default, directed to Shell. The effect of outputting Ascii control characters to a display device depends on the device. On a hard-copy printing terminal, the source from which \r in particular was taken, the effect of your code would be the 10 digits printed on top of each other. In an edit box on a screen, such as this Comment box on Firefox, characters are normally just inserted as received. If I type 0, Left, 1, Left, ...., 9, the result is '9876543210'. The current intended Shell behavior is what you see -- display (or not) chars as received. Changes have been rejected in the past but I am considering adding a 'terminal' mode. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 13:50:16 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 11 May 2020 17:50:16 +0000 Subject: [issue40596] str.isidentifier() does not work with non-BMP non-canonicalized strings on Windows Message-ID: <1589219416.15.0.470461181739.issue40596@roundup.psfhosted.org> New submission from Serhiy Storchaka : >>> import _testcapi >>> u = '\U0001d580\U0001d593\U0001d58e\U0001d588\U0001d594\U0001d589\U0001d58a' >>> u.isidentifier() True >>> _testcapi.unicode_legacy_string(u).isidentifier() False ---------- components: Interpreter Core messages: 368637 nosy: serhiy.storchaka, vstinner priority: normal severity: normal status: open title: str.isidentifier() does not work with non-BMP non-canonicalized strings on Windows type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 13:55:50 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 11 May 2020 17:55:50 +0000 Subject: [issue40596] str.isidentifier() does not work with non-BMP non-canonicalized strings on Windows In-Reply-To: <1589219416.15.0.470461181739.issue40596@roundup.psfhosted.org> Message-ID: <1589219750.28.0.160920557698.issue40596@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +19345 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20035 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 14:12:17 2020 From: report at bugs.python.org (Pete Wicken) Date: Mon, 11 May 2020 18:12:17 +0000 Subject: [issue28577] ipaddress.ip_network(...).hosts() returns nothing for an IPv4 /32 In-Reply-To: <1477983724.8.0.857875109595.issue28577@psf.upfronthosting.co.za> Message-ID: <1589220737.95.0.697535791407.issue28577@roundup.psfhosted.org> Pete Wicken added the comment: The patch for this has been merged - I guess this can be closed now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 14:50:21 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 11 May 2020 18:50:21 +0000 Subject: [issue40561] Add docstrings for webbrowser open functions In-Reply-To: <1588941280.97.0.150032786212.issue40561@roundup.psfhosted.org> Message-ID: <1589223021.5.0.411146909388.issue40561@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset ef7973a981ff8f4687ef3fdb85a69fa15aa11fe5 by Brad Solomon in branch 'master': bpo-40561: Add docstrings for webbrowser open functions (GH-19999) https://github.com/python/cpython/commit/ef7973a981ff8f4687ef3fdb85a69fa15aa11fe5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 14:50:41 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 11 May 2020 18:50:41 +0000 Subject: [issue40561] Add docstrings for webbrowser open functions In-Reply-To: <1588941280.97.0.150032786212.issue40561@roundup.psfhosted.org> Message-ID: <1589223041.64.0.803753900378.issue40561@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19347 pull_request: https://github.com/python/cpython/pull/20037 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 14:50:33 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 11 May 2020 18:50:33 +0000 Subject: [issue40561] Add docstrings for webbrowser open functions In-Reply-To: <1588941280.97.0.150032786212.issue40561@roundup.psfhosted.org> Message-ID: <1589223033.86.0.135733023343.issue40561@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +19346 pull_request: https://github.com/python/cpython/pull/20036 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 14:52:39 2020 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 11 May 2020 18:52:39 +0000 Subject: [issue40595] AttributeError from type annotation In-Reply-To: <1589217598.74.0.170713443577.issue40595@roundup.psfhosted.org> Message-ID: <1589223159.0.0.0651517051942.issue40595@roundup.psfhosted.org> Eric V. Smith added the comment: This is not an annotations-only issue. This is no different from: import re class MyClass(object): def re(self): pass m = re.Match Which gives the same error. It's being evaluated at class scope. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 15:00:19 2020 From: report at bugs.python.org (Arkadiusz Hiler) Date: Mon, 11 May 2020 19:00:19 +0000 Subject: [issue40597] generated email message exceeds RFC-mandated limit of 998 characters Message-ID: <1589223619.93.0.38032538849.issue40597@roundup.psfhosted.org> New submission from Arkadiusz Hiler : RFC5322[0] in section 2.1.1 mandates that the line cannot be longer than 998 characters and should not be longer than 78 characters (excluding CRLF). When we use raw_data_manager (default for EmailPolicy, EmailMessage) it does the correct thing as long as the message contains characters outside of 7bit US-ASCII set - base64 or qp Content-Transfer-Encoding which respects the line wrapping at 78 characters. However if our message is limited the characters from the 7bit US-ASCII set no transfer encoding is applied, and such messages can easily go beyond 78 or even 998 characters. [0]: https://tools.ietf.org/html/rfc5322.html#section-2.1.1 ---------- components: email messages: 368641 nosy: barry, ivyl, r.david.murray priority: normal severity: normal status: open title: generated email message exceeds RFC-mandated limit of 998 characters 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 Mon May 11 15:06:39 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 11 May 2020 19:06:39 +0000 Subject: [issue40561] Add docstrings for webbrowser open functions In-Reply-To: <1588941280.97.0.150032786212.issue40561@roundup.psfhosted.org> Message-ID: <1589223999.31.0.575368327933.issue40561@roundup.psfhosted.org> miss-islington added the comment: New changeset 61b49a00e755136586e991c971c47f38bb5e4d23 by Miss Islington (bot) in branch '3.7': bpo-40561: Add docstrings for webbrowser open functions (GH-19999) https://github.com/python/cpython/commit/61b49a00e755136586e991c971c47f38bb5e4d23 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 15:09:14 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 11 May 2020 19:09:14 +0000 Subject: [issue40561] Add docstrings for webbrowser open functions In-Reply-To: <1588941280.97.0.150032786212.issue40561@roundup.psfhosted.org> Message-ID: <1589224154.02.0.259250110296.issue40561@roundup.psfhosted.org> miss-islington added the comment: New changeset a63c61168588937c482435d0432c753de4844c46 by Miss Islington (bot) in branch '3.8': bpo-40561: Add docstrings for webbrowser open functions (GH-19999) https://github.com/python/cpython/commit/a63c61168588937c482435d0432c753de4844c46 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 15:10:54 2020 From: report at bugs.python.org (Arkadiusz Hiler) Date: Mon, 11 May 2020 19:10:54 +0000 Subject: [issue40597] generated email message exceeds RFC-mandated limit of 998 characters In-Reply-To: <1589223619.93.0.38032538849.issue40597@roundup.psfhosted.org> Message-ID: <1589224254.81.0.0117610837415.issue40597@roundup.psfhosted.org> Change by Arkadiusz Hiler : ---------- keywords: +patch pull_requests: +19348 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20038 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 15:14:13 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 11 May 2020 19:14:13 +0000 Subject: [issue40561] Add docstrings for webbrowser open functions In-Reply-To: <1588941280.97.0.150032786212.issue40561@roundup.psfhosted.org> Message-ID: <1589224453.44.0.741747800702.issue40561@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 15:19:25 2020 From: report at bugs.python.org (Taylor Robie) Date: Mon, 11 May 2020 19:19:25 +0000 Subject: [issue40595] AttributeError from type annotation In-Reply-To: <1589217598.74.0.170713443577.issue40595@roundup.psfhosted.org> Message-ID: <1589224765.22.0.0008848229366.issue40595@roundup.psfhosted.org> Taylor Robie added the comment: Ah, I see. If this is intended behavior (which is sounds like it is?) feel free to close. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 15:32:41 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 11 May 2020 19:32:41 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1589225561.11.0.933753319885.issue40334@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +19349 pull_request: https://github.com/python/cpython/pull/20039 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 16:02:25 2020 From: report at bugs.python.org (Ned Batchelder) Date: Mon, 11 May 2020 20:02:25 +0000 Subject: [issue40480] "fnmatch" exponential execution time In-Reply-To: <1588498627.36.0.0280402477391.issue40480@roundup.psfhosted.org> Message-ID: <1589227345.75.0.353105994998.issue40480@roundup.psfhosted.org> Ned Batchelder added the comment: This change has caused a problem for coverage.py. The full details are here: https://github.com/nedbat/coveragepy/issues/988#issuecomment-626926513 Coverage.py combines fnmatch-produced regexes by joining them with pipes into one larger regex. The \ group in the regexes now makes that larger regex invalid. ---------- nosy: +nedbat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 16:43:39 2020 From: report at bugs.python.org (R. David Murray) Date: Mon, 11 May 2020 20:43:39 +0000 Subject: [issue40597] generated email message exceeds RFC-mandated limit of 998 characters In-Reply-To: <1589223619.93.0.38032538849.issue40597@roundup.psfhosted.org> Message-ID: <1589229819.49.0.0643941469849.issue40597@roundup.psfhosted.org> R. David Murray added the comment: The PR looks good to me, but I describe the change differently. I'm not sure how I missed this in the original implementation, since I obviously checked it for the 8bit case. Too long ago to remember :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 16:48:11 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 11 May 2020 20:48:11 +0000 Subject: [issue19956] inspect.getsource(obj.foo) fails when foo is an injected method constructed from another method In-Reply-To: <1386804440.21.0.0153040236788.issue19956@psf.upfronthosting.co.za> Message-ID: <1589230091.07.0.383906501389.issue19956@roundup.psfhosted.org> Terry J. Reedy added the comment: I am working on an explanation of why I paused the PR. ---------- versions: +Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 16:54:17 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 11 May 2020 20:54:17 +0000 Subject: [issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs In-Reply-To: <1588884932.92.0.367303002443.issue40553@roundup.psfhosted.org> Message-ID: <1589230457.3.0.0547768940094.issue40553@roundup.psfhosted.org> Terry J. Reedy added the comment: Mat Wichmann responded "we had three of these in the last few weeks sent to webmaster at python.org. I just went back and pinged those folks with a request to look in on the issue, and contribute to it if they had anything new/useful to add." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 17:00:28 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 11 May 2020 21:00:28 +0000 Subject: [issue40503] PEP 615: Add zoneinfo module In-Reply-To: <1588618281.16.0.913416553136.issue40503@roundup.psfhosted.org> Message-ID: <1589230828.29.0.239975113806.issue40503@roundup.psfhosted.org> Serhiy Storchaka added the comment: Do we need the C implementation if there is the Python implementation? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 17:00:55 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 11 May 2020 21:00:55 +0000 Subject: [issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs In-Reply-To: <1588884932.92.0.367303002443.issue40553@roundup.psfhosted.org> Message-ID: <1589230855.33.0.178143079088.issue40553@roundup.psfhosted.org> Terry J. Reedy added the comment: Raymond, can you run the tests I suggested above? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 17:05:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 11 May 2020 21:05:11 +0000 Subject: [issue40596] str.isidentifier() does not work with non-BMP non-canonicalized strings on Windows In-Reply-To: <1589219416.15.0.470461181739.issue40596@roundup.psfhosted.org> Message-ID: <1589231111.63.0.892895462828.issue40596@roundup.psfhosted.org> STINNER Victor added the comment: It's maybe time to speed up the deprecation of the legacy C API using Py_UNICODE... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 17:06:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 11 May 2020 21:06:17 +0000 Subject: [issue40596] str.isidentifier() does not work with non-BMP non-canonicalized strings on Windows In-Reply-To: <1589219416.15.0.470461181739.issue40596@roundup.psfhosted.org> Message-ID: <1589231177.55.0.87671391151.issue40596@roundup.psfhosted.org> STINNER Victor added the comment: My previous change on this function: commit f3e7ea5b8c220cd63101e419d529c8563f9c6115 Author: Victor Stinner Date: Tue Feb 11 14:29:33 2020 +0100 bpo-39500: Document PyUnicode_IsIdentifier() function (GH-18397) PyUnicode_IsIdentifier() does not call Py_FatalError() anymore if the string is not ready. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 17:18:31 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 11 May 2020 21:18:31 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1589231911.12.0.964097165711.issue36346@roundup.psfhosted.org> STINNER Victor added the comment: > bpo-36346: array: Don't use deprecated APIs (GH-19653) Thanks INADA-san! Another nail into Py_UNICODE coffin! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 17:19:36 2020 From: report at bugs.python.org (Michael Garbutt) Date: Mon, 11 May 2020 21:19:36 +0000 Subject: [issue40598] round() does not return an integer when given a numpy float64 Message-ID: <1589231976.76.0.869776426798.issue40598@roundup.psfhosted.org> New submission from Michael Garbutt : The round() helptext states "The return value is an integer if ndigits is omitted or None. Otherwise the return value has the same type as the number." When given a numpy float64, the return type is also float64, rather than the expected int. >>> import numpy as np >>> value = np.float64(2.1) >>> round(value) 2.0 >>> type(round(value)) Observed in Python 3.8.2, output of pip freeze: certifi==2020.4.5.1 mkl-fft==1.0.15 mkl-random==1.1.0 mkl-service==2.3.0 numpy==1.18.1 six==1.14.0 Also in Python 3.7.2, output of pip freeze: ---------- components: Library (Lib) messages: 368654 nosy: MichaelCG8 priority: normal severity: normal status: open title: round() does not return an integer when given a numpy float64 type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 17:24:20 2020 From: report at bugs.python.org (Tim Peters) Date: Mon, 11 May 2020 21:24:20 +0000 Subject: [issue40480] "fnmatch" exponential execution time In-Reply-To: <1588498627.36.0.0280402477391.issue40480@roundup.psfhosted.org> Message-ID: <1589232260.88.0.824584539834.issue40480@roundup.psfhosted.org> Tim Peters added the comment: Ned, would it be possible to rewrite code of the form: if giant pasted regexp matches: to: if any(p matches for p in patterns): That should work under any version of Python. There's no guarantee that regexps _can_ be pasted together and still work, so I can't call this change "a bug". That pasting regexps together "worked" before was an implementation accident. I'd be happy to change it anyway, except I know of no way to use Python's re engine without backreferences that can avoid exponential-time behavior in some cases. In some other regexp engines, yes (e.g., as the code comments note, in those that support "atomic grouping"), but not in Python's. Nor does Python's re engine support reusing backreference names or numbers. So I know of no way to restore the ability to paste regexps together that wouldn't reintroduce the possiblity of exponential time failure :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 17:26:02 2020 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 11 May 2020 21:26:02 +0000 Subject: [issue40503] PEP 615: Add zoneinfo module In-Reply-To: <1588618281.16.0.913416553136.issue40503@roundup.psfhosted.org> Message-ID: <1589232362.85.0.0351652308586.issue40503@roundup.psfhosted.org> Paul Ganssle added the comment: I mean, theoretically we don't "need" it, but it's much, much faster, and without it nearly every operation that needs time zone offsets will be slower than pytz (which has a mechanism for caching). Also, I've already written it, so I see no reason why not use it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 17:26:59 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 11 May 2020 21:26:59 +0000 Subject: [issue40574] segfault causing regression from PEP 573 implementation (PyQt5) In-Reply-To: <1588997324.8.0.612961250405.issue40574@roundup.psfhosted.org> Message-ID: <1589232419.03.0.0635068217775.issue40574@roundup.psfhosted.org> STINNER Victor added the comment: > I think I have figured out the problem. I had a locally built and cached wheel of PyQt5-sip from before PEP573 went in. If that wheel is used for later commits I get the segfault, if I rebuilt the wheel from source it works. Hum, I'm not sure that I understand well. Is there a bug in Python or not? It seems when in my tests, pip of Python 3.9 installed wheel package marked as "python38". I understand that the ABI didn't change and we are all good. I suggest to close the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 17:38:53 2020 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 11 May 2020 21:38:53 +0000 Subject: [issue40503] PEP 615: Add zoneinfo module In-Reply-To: <1588618281.16.0.913416553136.issue40503@roundup.psfhosted.org> Message-ID: <1589233133.53.0.780783609113.issue40503@roundup.psfhosted.org> Paul Ganssle added the comment: Here are some benchmarks run using the latest implementation. The pure Python code is pretty optimized, but the C code is still ~4-5x faster. Running from_utc in zone Europe/Paris c_zoneinfo: mean: 494.82 ns ? 3.80 ns; min: 489.23 ns (k=5, N=500000) py_zoneinfo: mean: 2.48 ?s ? 79.17 ns; min: 2.42 ?s (k=5, N=100000) dateutil: mean: 10.41 ?s ? 209.97 ns; min: 10.17 ?s (k=5, N=50000) pytz: mean: 4.69 ?s ? 252.70 ns; min: 4.39 ?s (k=5, N=50000) Running to_utc in zone Europe/Paris c_zoneinfo: mean: 539.61 ns ? 25.68 ns; min: 514.39 ns (k=5, N=500000) py_zoneinfo: mean: 2.01 ?s ? 61.69 ns; min: 1.94 ?s (k=5, N=100000) dateutil: mean: 7.88 ?s ? 506.89 ns; min: 7.25 ?s (k=5, N=50000) pytz: mean: 773.02 ns ? 14.11 ns; min: 759.56 ns (k=5, N=500000) Running utcoffset in zone Europe/Paris c_zoneinfo: mean: 329.34 ns ? 36.31 ns; min: 302.88 ns (k=5, N=1000000) py_zoneinfo: mean: 1.57 ?s ? 9.58 ns; min: 1.55 ?s (k=5, N=200000) dateutil: mean: 6.28 ?s ? 86.61 ns; min: 6.16 ?s (k=5, N=50000) pytz: mean: 461.47 ns ? 2.07 ns; min: 458.91 ns (k=5, N=500000) `utcoffset()` is very likely to be called possibly many times in certain hot loops (including implicitly as it's part of hash and equality checks). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 17:39:22 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 11 May 2020 21:39:22 +0000 Subject: [issue40584] PyType_FromModuleAndSpec function should add the process of tp_vectorcall_offset In-Reply-To: <1589130443.67.0.341454082707.issue40584@roundup.psfhosted.org> Message-ID: <1589233162.03.0.503177739513.issue40584@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 86d69444e7cfe758212956df0be0ec7b8a4251a6 by Hai Shi in branch 'master': bpo-40584: Update PyType_FromModuleAndSpec() to process tp_vectorcall_offset (GH-20026) https://github.com/python/cpython/commit/86d69444e7cfe758212956df0be0ec7b8a4251a6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 17:41:15 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 11 May 2020 21:41:15 +0000 Subject: [issue40584] PyType_FromModuleAndSpec function should add the process of tp_vectorcall_offset In-Reply-To: <1589130443.67.0.341454082707.issue40584@roundup.psfhosted.org> Message-ID: <1589233275.56.0.979895111613.issue40584@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Hai Shi! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 17:41:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 11 May 2020 21:41:29 +0000 Subject: [issue40584] PyType_FromModuleAndSpec function should add the process of tp_vectorcall_offset In-Reply-To: <1589130443.67.0.341454082707.issue40584@roundup.psfhosted.org> Message-ID: <1589233289.93.0.802229003082.issue40584@roundup.psfhosted.org> Change by STINNER Victor : ---------- stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 17:48:22 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 11 May 2020 21:48:22 +0000 Subject: [issue40500] test_multiprocessing_fork leaks processes on PPC64LE RHEL8 LTO + PGO 3.x In-Reply-To: <1588595930.94.0.324889959771.issue40500@roundup.psfhosted.org> Message-ID: <1589233702.36.0.518803734974.issue40500@roundup.psfhosted.org> STINNER Victor added the comment: PPC64LE RHEL8 LTO + PGO 3.x: https://buildbot.python.org/all/#/builders/450/builds/361 0:02:28 load avg: 6.47 [398/423/1] test_multiprocessing_spawn failed (env changed) (2 min 3 sec) -- running: test_asyncio (51.1 sec), test_peg_generator (47.7 sec), test_concurrent_futures (53.3 sec) Warning -- multiprocessing.Manager still has [, ] active children after 5.115746586991008 seconds Warning -- multiprocessing.Manager still has [, ] active children after 5.117473499994958 seconds Warning -- multiprocessing.Manager still has [, ] active children after 5.116073776007397 seconds ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 17:53:09 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 11 May 2020 21:53:09 +0000 Subject: [issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs In-Reply-To: <1588884932.92.0.367303002443.issue40553@roundup.psfhosted.org> Message-ID: <1589233989.28.0.495909583183.issue40553@roundup.psfhosted.org> Ned Deily added the comment: >To debug, and test Raymond's hypothesis, someone please try this minimal (IDLE-free) code to show the dialog and print the return. >This does not display a preview, even after selecting a location, such as Documents, on the 3rd line. Terry, I'm not sure I know what you mean here by preview. Do you mean the Column view of the Save sheet? As "Bev in TX" explained in the quote you supplied earlier, the standard macOS Save or Save As save sheet which nearly all macOS apps use including Tk in IDLE has several settings, settings that are usually remembered across application invocations. By default initially, a compact display is given with boxes for Save As, Tags, and a pull-down Where list of folders. To its right, there should be an button with a "V" icon. When pressed, the "V" changes to a "^" and the Save sheet expands to show more stuff. What stuff it shows depends on the setting of the view options which can be accessed by clicking on the button with an array of six little squares on it, usually towards the upper left side of the Save sheet. In it are the three main Show Items as options: "Icons", "List", "Columns". There are other options in there, too. So when discussing the appearance of macOS Open or Save dialog sheets, one has to be really precise about what options are in effect for that particular Save. Those are under the control of the user and, again, are remembered by the operating system. Note also that for Save using he column view, the system does not show previews of existing files; it does for Open files, which you should be able to see if you substitute tk_getOpenFile in your test code. In any case, I ran your test on both 10.15 and 10.14 and so far have still seen no problems, no hanging. I don't doubt these reports that people are seeing hangs but we still need to be able to reproduce them. FWIW, for every macOS Python installer before it is permitted to be released, I run a smoke test that, among other things, does essentially does what is reported here: launch IDLE.app, open a new file window, add a few lines including a print function, preess F5 to Run bringing up the Save dialog, Save the file, and verify that the expected output shows up in the IDLE shell window. Each installer is tested on at least one macOS system level, always the latest release and usually at least one older release. In years of doing this, I've never seen a hang like those being reported. So that's why I'm particularly curious about this because there is a lot of baseline experience over many releases of macOS, Python, and Tk for that matter. We'll keep searching. But it would still be *really* helpful if, as I requested before, someone who does see these hangs and can reliably reproduce them, documents *exactly* all the steps to do so, from exactly how IDLE is launches to exactly how the Save dialog is invoked (by menu bar or keyboard shortcut or ...) and what options of the Save dialog are in effect. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 17:54:16 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 11 May 2020 21:54:16 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1589234056.43.0.970674422709.issue40334@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 27c0d9b54abaa4112d5a317b8aa78b39ad60a808 by Shantanu in branch 'master': bpo-40334: produce specialized errors for invalid del targets (GH-19911) https://github.com/python/cpython/commit/27c0d9b54abaa4112d5a317b8aa78b39ad60a808 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 18:10:51 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 11 May 2020 22:10:51 +0000 Subject: [issue40599] Improve error messages with expected keywords Message-ID: <1589235051.21.0.907092056655.issue40599@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : Using the new parser, we could improve the plain "syntax error" messages with the tokens/keywords that would have made the parser advance. There is a proof of concept in https://github.com/python/cpython/pull/20039 you can play with. I would like to get some initial opinions on the idea before going deeper in the issue :) ---------- components: Interpreter Core messages: 368664 nosy: gvanrossum, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: Improve error messages with expected keywords versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 18:11:07 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 11 May 2020 22:11:07 +0000 Subject: [issue40599] Improve error messages with expected keywords In-Reply-To: <1589235051.21.0.907092056655.issue40599@roundup.psfhosted.org> Message-ID: <1589235067.18.0.806469724859.issue40599@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +19350 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20039 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 18:11:40 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 11 May 2020 22:11:40 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1589235100.2.0.703633621513.issue40334@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: -19349 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 18:12:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 11 May 2020 22:12:29 +0000 Subject: [issue40600] Add an option to disallow creating more than one instance of a module Message-ID: <1589235149.46.0.0630975096351.issue40600@roundup.psfhosted.org> New submission from STINNER Victor : When a C extension module is created with PyModuleDef_Init(), it becomes possible to create more than one instance of the module. It would take significant effort to modify some extensions to make their code fully ready to have two isolated module. For example, the atexit module calls _Py_PyAtExit() to register itself into the PyInterpreterState. If the module is created more than once, the most recently created module wins, and calls registered on other atexit instances are ignore: see bpo-40288. One simple option would be to simply disallow loading the module more than once per interpreter. Also, some extensions are not fully compatible with subinterpreters. It may be interesting to allow to load them in a subinterpreter if it's not already loaded in another interpreter, like another subinterpreter or the main interpreter. It would be only load it once per Python *process*. For example, numpy would be a good candidate for such option. I'm not sure fow a module should announced in its definition that it should not be loaded more than once. ---------- components: Extension Modules messages: 368665 nosy: corona10, eric.snow, vstinner priority: normal severity: normal status: open title: Add an option to disallow creating more than one instance of a module versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 18:12:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 11 May 2020 22:12:52 +0000 Subject: [issue40288] atexit module should not be loaded more than once per interpreter In-Reply-To: <1586917009.7.0.806642420762.issue40288@roundup.psfhosted.org> Message-ID: <1589235172.91.0.243561710795.issue40288@roundup.psfhosted.org> STINNER Victor added the comment: I created bpo-40600: "Add an option to disallow creating more than one instance of a module". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 18:23:25 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 11 May 2020 22:23:25 +0000 Subject: [issue40601] [C API] Hide static types from the limited C API Message-ID: <1589235805.82.0.0888479979707.issue40601@roundup.psfhosted.org> New submission from STINNER Victor : "Statically allocated types" prevents to get per-interpreter GIL: bpo-40512. These types are currently shared by all interpreters. Eric Snow proposed the idea of creating a heap allocated type in subintepreters. But we should take care of direct usage of the statically allocated type. For example, Objects/longobject.c defines "PyTypeObject PyLong_Type = {...};". This type is exposed in the limited C API (!) in Include/longobject.c: PyAPI_DATA(PyTypeObject) PyLong_Type; It's used but such macro: #define PyLong_CheckExact(op) Py_IS_TYPE(op, &PyLong_Type) I don't think that these types are directly accessed in C extensions built with the limited C API. My expectation is that the type is only exposed for "CheckExact" macros. Currently, 100 statically allocated types are declared in Python header files: $ grep -F '(PyTypeObject)' Include/ -R Include/cpython/fileobject.h:PyAPI_DATA(PyTypeObject) PyStdPrinter_Type; (...) Include/object.h:PyAPI_DATA(PyTypeObject) PySuper_Type; /* built-in 'super' */ Include/methodobject.h:PyAPI_DATA(PyTypeObject) PyCFunction_Type; Most of them seem to be exposed in the limited C API. I propose to break the limited C API backward compatibility on purpose by removing these type definitions form the limited C API. For "CheckExact" macros, we can continue to provide them in the limited C API but as function calls. So a built C extension would no longer access directly the type, but only do function calls. ---------- components: C API messages: 368667 nosy: vstinner priority: normal severity: normal status: open title: [C API] Hide static types from the limited C API versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 18:23:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 11 May 2020 22:23:47 +0000 Subject: [issue40601] [C API] Hide static types from the limited C API In-Reply-To: <1589235805.82.0.0888479979707.issue40601@roundup.psfhosted.org> Message-ID: <1589235827.49.0.834272979981.issue40601@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-40077: "Convert static types to PyType_FromSpec()". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 18:23:59 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 11 May 2020 22:23:59 +0000 Subject: [issue40077] Convert static types to PyType_FromSpec() In-Reply-To: <1585238684.65.0.246012172449.issue40077@roundup.psfhosted.org> Message-ID: <1589235839.98.0.0190361701091.issue40077@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-40601: [C API] Hide static types from the limited C API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 18:25:02 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 11 May 2020 22:25:02 +0000 Subject: [issue40512] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1589235902.97.0.0623678300078.issue40512@roundup.psfhosted.org> STINNER Victor added the comment: "Static" types are shared by all interpreters. We should convert them to heap allocated types using PyType_FromSpec(), see: * bpo-40077: Convert static types to PyType_FromSpec() * bpo-40601: [C API] Hide static types from the limited C API ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 18:25:49 2020 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 11 May 2020 22:25:49 +0000 Subject: [issue40598] round() does not return an integer when given a numpy float64 In-Reply-To: <1589231976.76.0.869776426798.issue40598@roundup.psfhosted.org> Message-ID: <1589235949.87.0.248210335846.issue40598@roundup.psfhosted.org> Eric V. Smith added the comment: Wouldn't float64's __round__ method be in complete control of this? For python's float: >>> x = 3.4 >>> type(x.__round__(1)) >>> type(x.__round__()) And Decimal: >>> from decimal import Decimal >>> x = Decimal('3.4') >>> type(x.__round__(1)) >>> type(x.__round__()) Of course, numpy may have good reasons for what they're doing. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 18:30:56 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 11 May 2020 22:30:56 +0000 Subject: [issue40598] round() does not return an integer when given a numpy float64 In-Reply-To: <1589231976.76.0.869776426798.issue40598@roundup.psfhosted.org> Message-ID: <1589236256.88.0.130120808271.issue40598@roundup.psfhosted.org> STINNER Victor added the comment: > The round() helptext states "The return value is an integer if ndigits is omitted or None. Otherwise the return value has the same type as the number." round(number) is documented to call number.__round__: https://docs.python.org/dev/library/functions.html#round For a general Python object number, round delegates to number.__round__. It's not a bug, Python works as expected. It's better to refer to the main documentation. Docstrings are short and incomplete on purpose. I close the issue. ---------- nosy: +vstinner resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 18:34:47 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 11 May 2020 22:34:47 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1589236487.22.0.330343894878.issue40257@roundup.psfhosted.org> Guido van Rossum added the comment: I'm making this a release blocker -- please everybody come to an agreement or ask on python-dev. ---------- priority: normal -> release blocker resolution: fixed -> remind _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 18:36:36 2020 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 11 May 2020 22:36:36 +0000 Subject: [issue38078] IDLE: Don't run internal code in user namespace. In-Reply-To: <1568079471.24.0.207748043003.issue38078@roundup.psfhosted.org> Message-ID: <1589236596.06.0.923021004619.issue38078@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 1.0 -> 2.0 pull_requests: +19351 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20040 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 18:44:46 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 11 May 2020 22:44:46 +0000 Subject: [issue40599] Improve error messages with expected keywords In-Reply-To: <1589235051.21.0.907092056655.issue40599@roundup.psfhosted.org> Message-ID: <1589237086.8.0.229469803303.issue40599@roundup.psfhosted.org> Guido van Rossum added the comment: Hmm... The errors get long, and by focusing only on keywords they can be misleading. E.g. >>> from x import a b c File "", line 1 from x import a b c ^ SyntaxError: Invalid syntax. Expected one of: as >>> But the most likely error is omission of a comma. >>> if x y: pass File "", line 1 if x y: pass ^ SyntaxError: Invalid syntax. Expected one of: not, is, or, in, and, if >>> But the most likely error is probably a comparison operator. And so on. Here's a nice one: >>> / File "", line 1 / ^ SyntaxError: Invalid syntax. Expected one of: for, pass, lambda, False, global, True, __new_parser__, if, raise, continue, not, break, while, None, del, nonlocal, import, assert, return, class, with, def, try, from, yield >>> (Huh, where did it get __new_parser__?) The beauty of Python's detail-free syntax error is that it doesn't tell you what it expects -- because parsers are dumb, what the parser expected is rarely what's wrong with your code -- and it requires the user to understand how the parser works to interpret the error message. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 18:45:18 2020 From: report at bugs.python.org (Thomas Caswell) Date: Mon, 11 May 2020 22:45:18 +0000 Subject: [issue40574] segfault causing regression from PEP 573 implementation (PyQt5) In-Reply-To: <1588997324.8.0.612961250405.issue40574@roundup.psfhosted.org> Message-ID: <1589237118.87.0.802366955675.issue40574@roundup.psfhosted.org> Thomas Caswell added the comment: The path is - on a commit prior to e1becf46b4e3ba6d7d32ebf4bbd3e0804766a423 install pyqt-sip. pip will build a wheel for you called PyQt5_sip-12.7.2-cp39-cp39-linux_x86_64.whl - on a commit after e1becf46b4e3ba6d7d32ebf4bbd3e0804766a423 if you do `pip install pyqt-sip` pip will discover the wheel from the previous install in it's cache and use it, but the ABI has changed (?) which leads to a segfault. If you do `pip install pyqt5-sip --no-binary pyqt5-sip` or clear the cache then things work correctly I suspect that this also means that wheels made with the early alphas will not work future 3.9 (pre-)releases, however I am not sure if that is a problem or not (given that it is all pre-releases). I am going to close this as I think if there is a bug, it would be better addressed in the packaging space. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 18:49:41 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 11 May 2020 22:49:41 +0000 Subject: [issue40601] [C API] Hide static types from the limited C API In-Reply-To: <1589235805.82.0.0888479979707.issue40601@roundup.psfhosted.org> Message-ID: <1589237381.24.0.351486868904.issue40601@roundup.psfhosted.org> STINNER Victor added the comment: > I propose to break the limited C API backward compatibility on purpose by removing these type definitions form the limited C API. Hum. How would a C extension subclass the Python int type (PyLong_Type) if it's no longer exposed? One option is to add one function per type, like: PyObject* Py_GetLongType(void); It would return a *strong reference* to the type (PyLong_Type). Another option is to get the type from builtins module or builtins dictionary (PyInterpreterState.builtins). But there is no simple C function to get a builtin object. It requires many calls, handle errors, etc. Maybe a generic helper like the following function would help: PyObject *Py_GetBuiltin(const char *name); Note: PyEval_GetBuiltins() exposes the builtins of the *current frame* which maybe not be what you may expect. Currently, Py_GetBuiltin(name) is not needed since basically *all* Python builtins are *directly* exposed in the C API... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 19:04:40 2020 From: report at bugs.python.org (Thomas Chan) Date: Mon, 11 May 2020 23:04:40 +0000 Subject: [issue31436] test_socket.SendfileUsingSendfileTest.testWithTimeoutTriggeredSend fails due to sendfile completing before timeout In-Reply-To: <1505255563.72.0.314933914484.issue31436@psf.upfronthosting.co.za> Message-ID: <1589238280.9.0.640154268951.issue31436@roundup.psfhosted.org> Change by Thomas Chan : ---------- nosy: +tchan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 19:04:38 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 11 May 2020 23:04:38 +0000 Subject: [issue40599] Improve error messages with expected keywords In-Reply-To: <1589235051.21.0.907092056655.issue40599@roundup.psfhosted.org> Message-ID: <1589238278.35.0.286610326928.issue40599@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > SyntaxError: Invalid syntax. Expected one of: for, pass, lambda, False, global, True, __new_parser__, if, raise, continue, not, break, while, None, del, nonlocal, import, assert, return, class, with, def, try, from, yield Haha, that is a good point. It also reveals the easter egg :) > The beauty of Python's detail-free syntax error is that it doesn't tell you what it expects -- because parsers are dumb, what the parser expected is rarely what's wrong with your code -- and it requires the user to understand how the parser works to interpret the error message. Right, I think will be very difficult to actually give you something very close to what the actual problem is. I started this draft based on some similar errors that I have seen in other parsers but is true that with the exception of rust, all other grammars I explored and played with were mucn simpler, so the errors were not super verbose. I think i will close the issue and the PR unless you think there is something worth exploring/discussing left, as it does not look that we can get something less verbose in an easy way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 19:04:52 2020 From: report at bugs.python.org (Thomas Chan) Date: Mon, 11 May 2020 23:04:52 +0000 Subject: [issue36702] test_dtrace failed In-Reply-To: <1556002133.06.0.696794109378.issue36702@roundup.psfhosted.org> Message-ID: <1589238292.37.0.111192771051.issue36702@roundup.psfhosted.org> Change by Thomas Chan : ---------- nosy: +tchan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 19:06:09 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 11 May 2020 23:06:09 +0000 Subject: [issue40599] Improve error messages with expected keywords In-Reply-To: <1589235051.21.0.907092056655.issue40599@roundup.psfhosted.org> Message-ID: <1589238369.45.0.294136164819.issue40599@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > (Huh, where did it get __new_parser__?) >From here: https://github.com/python/cpython/blob/master/Parser/pegen/parse.c#L67 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 19:06:41 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 11 May 2020 23:06:41 +0000 Subject: [issue40599] Improve error messages with expected keywords In-Reply-To: <1589235051.21.0.907092056655.issue40599@roundup.psfhosted.org> Message-ID: <1589238401.46.0.327228569032.issue40599@roundup.psfhosted.org> Guido van Rossum added the comment: I had hoped that error labels would get us closer to error recovery, but it appears that is still quite elusive. :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 19:10:25 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 11 May 2020 23:10:25 +0000 Subject: [issue40599] Improve error messages with expected keywords In-Reply-To: <1589235051.21.0.907092056655.issue40599@roundup.psfhosted.org> Message-ID: <1589238625.86.0.170824218906.issue40599@roundup.psfhosted.org> Lysandros Nikolaou added the comment: I also concur with Guido here. I have played around with other languages and I dislike getting a long list of expected tokens, that are not helpful, if not actually confusing sometimes. I think that the current generic SyntaxError description together with the error caret actually does a good job of directing someone to close where the error is, without providing too much information that might be misleading. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 19:18:40 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 11 May 2020 23:18:40 +0000 Subject: [issue39465] Design a subinterpreter friendly alternative to _Py_IDENTIFIER In-Reply-To: <1580135310.72.0.978238650594.issue39465@roundup.psfhosted.org> Message-ID: <1589239120.67.0.26706215901.issue39465@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +19352 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20043 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 19:26:12 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 11 May 2020 23:26:12 +0000 Subject: [issue40599] Improve error messages with expected keywords In-Reply-To: <1589235051.21.0.907092056655.issue40599@roundup.psfhosted.org> Message-ID: <1589239572.47.0.657107674809.issue40599@roundup.psfhosted.org> Guido van Rossum added the comment: In response to my PEG blogs last year someone showed me an entirely different algorithm, based on first looking for matching parentheses (and other matching things), then for operators by priority, and so on. The approach was designed with C in mind but looked like it would fit reasonably well with Python, once you view e.g. ':' as an operator of a certain priority, and figure out what to do with indentation. This would actually be closer to the old approach, accepting "a+1 = b" initially as an assignment and then rejecting "a+1" as a target. I wonder if we could (eventually) use this approach as a fallback when a syntax error is found. But it is an entirely different theoretical framework, so we should probably not hurry with this. IOW I'm okay with closing this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 19:36:42 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 11 May 2020 23:36:42 +0000 Subject: [issue40599] Improve error messages with expected keywords In-Reply-To: <1589235051.21.0.907092056655.issue40599@roundup.psfhosted.org> Message-ID: <1589240202.79.0.990394559833.issue40599@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 19:43:57 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 11 May 2020 23:43:57 +0000 Subject: [issue39465] Design a subinterpreter friendly alternative to _Py_IDENTIFIER In-Reply-To: <1580135310.72.0.978238650594.issue39465@roundup.psfhosted.org> Message-ID: <1589240637.8.0.994124225776.issue39465@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 4804b5b3df82e7892ca0550b02f902bcfc16bb48 by Victor Stinner in branch 'master': bpo-39465: Don't access directly _Py_Identifier members (GH-20043) https://github.com/python/cpython/commit/4804b5b3df82e7892ca0550b02f902bcfc16bb48 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 19:52:18 2020 From: report at bugs.python.org (Anthony Sottile) Date: Mon, 11 May 2020 23:52:18 +0000 Subject: [issue40480] "fnmatch" exponential execution time In-Reply-To: <1588498627.36.0.0280402477391.issue40480@roundup.psfhosted.org> Message-ID: <1589241138.3.0.841475801419.issue40480@roundup.psfhosted.org> Anthony Sottile added the comment: one way might be to give the groups "unique" names (perhaps hashing the input string?) ((this is what I attempted to do in a little bit of code which tried to "backport" (group)*+ and (group)++)) ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 20:00:57 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 12 May 2020 00:00:57 +0000 Subject: [issue40571] Make lru_cache(maxsize=None) more discoverable In-Reply-To: <1588972960.42.0.924669050455.issue40571@roundup.psfhosted.org> Message-ID: <1589241657.36.0.36702218848.issue40571@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 21cdb711e3b1975398c54141e519ead02670610e by Raymond Hettinger in branch 'master': bpo-40571: Make lru_cache(maxsize=None) more discoverable (GH-20019) https://github.com/python/cpython/commit/21cdb711e3b1975398c54141e519ead02670610e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 20:01:23 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 12 May 2020 00:01:23 +0000 Subject: [issue40571] Make lru_cache(maxsize=None) more discoverable In-Reply-To: <1588972960.42.0.924669050455.issue40571@roundup.psfhosted.org> Message-ID: <1589241683.5.0.196455947204.issue40571@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 May 11 20:01:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 May 2020 00:01:24 +0000 Subject: [issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h Message-ID: <1589241684.81.0.926948421821.issue40602@roundup.psfhosted.org> New submission from STINNER Victor : Python/mashal.c uses Modules/hashtable.h. Python/mashal.c indirectly gets Modules/hashtable.c implementation via Modules/_tracemalloc.c which is built as a builtin module. I propose to make the "hashtable" more standard: * Move Modules/hashtable.h to Include/internal/pycore_hashtable.h * Move Modules/hashtable.c to Python/hashtable.c Attached PR implements this change but also changes the default memory allocator to PyMem_Malloc/PyMem_Free which is faster than PyMem_RawMalloc/PyMem_RawFree (current default) for memory blocks <= 512 bytes. It remains an internal C API which cannot be used outside CPython. ---------- components: C API messages: 368685 nosy: vstinner priority: normal severity: normal status: open title: Move Modules/hashtable.h to Include/internal/pycore_hashtable.h versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 20:12:46 2020 From: report at bugs.python.org (Tim Peters) Date: Tue, 12 May 2020 00:12:46 +0000 Subject: [issue40480] "fnmatch" exponential execution time In-Reply-To: <1588498627.36.0.0280402477391.issue40480@roundup.psfhosted.org> Message-ID: <1589242366.76.0.341431578555.issue40480@roundup.psfhosted.org> Tim Peters added the comment: I don't want something probabilistic. Fix it or don't ;-) One thing that would work, but at the cost of non-determinism: do the same as now, but obtain the number part of the group name by applying next() to a module-global private instance of itertools.count(). That will keep the numbers increasing "forever", and across calls. The point to using .count() is that it's atomic (i.e., won't repeat a number if multiple threads happen to be constructing regexps simultaneously). It's a darned silly amount of effort, though ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 20:21:15 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 May 2020 00:21:15 +0000 Subject: [issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h In-Reply-To: <1589241684.81.0.926948421821.issue40602@roundup.psfhosted.org> Message-ID: <1589242875.59.0.346209516073.issue40602@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +19353 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20044 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 20:26:22 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 May 2020 00:26:22 +0000 Subject: [issue40574] segfault causing regression from PEP 573 implementation (PyQt5) In-Reply-To: <1588997324.8.0.612961250405.issue40574@roundup.psfhosted.org> Message-ID: <1589243182.81.0.677982887868.issue40574@roundup.psfhosted.org> STINNER Victor added the comment: The stable ABI should not change between Python 3.8 and 3.9. In practice, it seems like something changed. But without any gdb traceback, I cannot tell what. I suggest to try again when beta1 will be released. The ABI should be way more stable after beta1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 20:27:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 May 2020 00:27:04 +0000 Subject: [issue39465] Design a subinterpreter friendly alternative to _Py_IDENTIFIER In-Reply-To: <1580135310.72.0.978238650594.issue39465@roundup.psfhosted.org> Message-ID: <1589243224.98.0.54377005214.issue39465@roundup.psfhosted.org> STINNER Victor added the comment: I created bpo-40602: "Move Modules/hashtable.h to Include/internal/pycore_hashtable.h". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 20:29:24 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 12 May 2020 00:29:24 +0000 Subject: [issue39481] Implement PEP 585 (Type Hinting Generics In Standard Collections) In-Reply-To: <1580231817.93.0.47144630055.issue39481@roundup.psfhosted.org> Message-ID: <1589243364.36.0.0176655742946.issue39481@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- pull_requests: +19354 pull_request: https://github.com/python/cpython/pull/20045 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 20:42:23 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 May 2020 00:42:23 +0000 Subject: [issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h In-Reply-To: <1589241684.81.0.926948421821.issue40602@roundup.psfhosted.org> Message-ID: <1589244143.05.0.331870931813.issue40602@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b617993b7c0b0f6f679ef7003a62d0318b6d6af9 by Victor Stinner in branch 'master': bpo-40602: Rename hashtable.h to pycore_hashtable.h (GH-20044) https://github.com/python/cpython/commit/b617993b7c0b0f6f679ef7003a62d0318b6d6af9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 20:43:13 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 May 2020 00:43:13 +0000 Subject: [issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h In-Reply-To: <1589241684.81.0.926948421821.issue40602@roundup.psfhosted.org> Message-ID: <1589244193.87.0.666075770876.issue40602@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19355 pull_request: https://github.com/python/cpython/pull/20046 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 20:45:57 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Tue, 12 May 2020 00:45:57 +0000 Subject: [issue38872] Document exec symbol for codeop.compile_command In-Reply-To: <1574298846.26.0.835938077059.issue38872@roundup.psfhosted.org> Message-ID: <1589244357.26.0.148661199936.issue38872@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- keywords: +patch nosy: +nanjekyejoannah nosy_count: 4.0 -> 5.0 pull_requests: +19356 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20047 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 20:56:07 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 May 2020 00:56:07 +0000 Subject: [issue39465] Design a subinterpreter friendly alternative to _Py_IDENTIFIER In-Reply-To: <1580135310.72.0.978238650594.issue39465@roundup.psfhosted.org> Message-ID: <1589244967.67.0.276927138935.issue39465@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19357 pull_request: https://github.com/python/cpython/pull/20048 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 21:07:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 May 2020 01:07:44 +0000 Subject: [issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h In-Reply-To: <1589241684.81.0.926948421821.issue40602@roundup.psfhosted.org> Message-ID: <1589245664.11.0.381778826147.issue40602@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d0919f0d6bb757b6bcfd7b2e15656d318c9d5cd9 by Victor Stinner in branch 'master': bpo-40602: _Py_hashtable_new() uses PyMem_Malloc() (GH-20046) https://github.com/python/cpython/commit/d0919f0d6bb757b6bcfd7b2e15656d318c9d5cd9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 21:11:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 May 2020 01:11:46 +0000 Subject: [issue39465] Design a subinterpreter friendly alternative to _Py_IDENTIFIER In-Reply-To: <1580135310.72.0.978238650594.issue39465@roundup.psfhosted.org> Message-ID: <1589245906.85.0.122569439406.issue39465@roundup.psfhosted.org> Change by STINNER Victor : Added file: https://bugs.python.org/file49147/bench.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 21:12:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 May 2020 01:12:29 +0000 Subject: [issue39465] Design a subinterpreter friendly alternative to _Py_IDENTIFIER In-Reply-To: <1580135310.72.0.978238650594.issue39465@roundup.psfhosted.org> Message-ID: <1589245949.16.0.410721640174.issue39465@roundup.psfhosted.org> STINNER Victor added the comment: Attached bench.py: Micro-benchmark on _PyUnicode_FromId(). It requires attached bench.patch being applied. ---------- Added file: https://bugs.python.org/file49148/bench.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 21:13:09 2020 From: report at bugs.python.org (Tim Peters) Date: Tue, 12 May 2020 01:13:09 +0000 Subject: [issue40480] "fnmatch" exponential execution time In-Reply-To: <1588498627.36.0.0280402477391.issue40480@roundup.psfhosted.org> Message-ID: <1589245989.98.0.226624326904.issue40480@roundup.psfhosted.org> Change by Tim Peters : ---------- pull_requests: +19358 pull_request: https://github.com/python/cpython/pull/20049 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 21:20:02 2020 From: report at bugs.python.org (Chris Meyer) Date: Tue, 12 May 2020 01:20:02 +0000 Subject: [issue39010] ProactorEventLoop raises unhandled ConnectionResetError In-Reply-To: <1575924458.67.0.403977169674.issue39010@roundup.psfhosted.org> Message-ID: <1589246402.37.0.815294949664.issue39010@roundup.psfhosted.org> Chris Meyer added the comment: Here is another way to reproduce this (or an extremely similar) error without a loop. Since may be a race condition, I'm not sure this works 100% of the time on all machines - but it did on several machines I tried. ``` import asyncio loop = asyncio.get_event_loop() def func(): pass f = loop.run_in_executor(None, func) loop.stop() loop.run_forever() loop.stop() loop.run_forever() loop.stop() loop.run_forever() ``` ``` Error on reading from the event loop self pipe loop: Traceback (most recent call last): File "C:\Miniconda3\envs\py38\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 "C:\Miniconda3\envs\py38\lib\asyncio\proactor_events.py", line 768, in _loop_self_reading f.result() # may raise File "C:\Miniconda3\envs\py38\lib\asyncio\windows_events.py", line 808, in _poll value = callback(transferred, key, ov) File "C:\Miniconda3\envs\py38\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 ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 21:23:39 2020 From: report at bugs.python.org (Will Bradshaw) Date: Tue, 12 May 2020 01:23:39 +0000 Subject: [issue40603] slice does not slice Message-ID: <1589246619.29.0.982913175965.issue40603@roundup.psfhosted.org> New submission from Will Bradshaw : slice cannot be hashed which make some operations significantly more annoying. see https://groups.google.com/forum/#!topic/comp.lang.python/SvhkWwSDeIw ---------- components: ctypes files: patches.zip messages: 368693 nosy: Will Bradshaw priority: normal severity: normal status: open title: slice does not slice type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file49149/patches.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 21:29:33 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Tue, 12 May 2020 01:29:33 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1589246973.43.0.530996801524.issue40334@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +19359 pull_request: https://github.com/python/cpython/pull/20050 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 21:41:09 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 12 May 2020 01:41:09 +0000 Subject: [issue40603] slice not hashable In-Reply-To: <1589246619.29.0.982913175965.issue40603@roundup.psfhosted.org> Message-ID: <1589247669.44.0.563260786751.issue40603@roundup.psfhosted.org> Steven D'Aprano added the comment: Please re-upload the patch file as an uncompressed text file, as it is quite difficult for many people to view zip files in their browser. ---------- nosy: +steven.daprano title: slice does not slice -> slice not hashable _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 21:41:56 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 12 May 2020 01:41:56 +0000 Subject: [issue40603] slice not hashable In-Reply-To: <1589246619.29.0.982913175965.issue40603@roundup.psfhosted.org> Message-ID: <1589247716.75.0.764560708641.issue40603@roundup.psfhosted.org> Change by Steven D'Aprano : ---------- components: +Interpreter Core -ctypes type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 22:19:41 2020 From: report at bugs.python.org (Tim Peters) Date: Tue, 12 May 2020 02:19:41 +0000 Subject: [issue40480] "fnmatch" exponential execution time In-Reply-To: <1588498627.36.0.0280402477391.issue40480@roundup.psfhosted.org> Message-ID: <1589249981.06.0.266009432237.issue40480@roundup.psfhosted.org> Tim Peters added the comment: New changeset b1b4c790e7d3b5f4244450aefe3d8f01710c13f7 by Tim Peters in branch 'master': bpo-40480: restore ability to join fnmatch.translate() results (GH-20049) https://github.com/python/cpython/commit/b1b4c790e7d3b5f4244450aefe3d8f01710c13f7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 22:25:57 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 12 May 2020 02:25:57 +0000 Subject: [issue40603] slice not hashable In-Reply-To: <1589246619.29.0.982913175965.issue40603@roundup.psfhosted.org> Message-ID: <1589250357.74.0.402867600281.issue40603@roundup.psfhosted.org> Raymond Hettinger added the comment: This is a reasonable use case. +1 for making slice() hashable. Will, you're welcome to submit a PR. If not, I'm sure someone else would be happy to scoop this up :-) ---------- keywords: +easy (C) nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 22:32:47 2020 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 12 May 2020 02:32:47 +0000 Subject: [issue39481] Implement PEP 585 (Type Hinting Generics In Standard Collections) In-Reply-To: <1580231817.93.0.47144630055.issue39481@roundup.psfhosted.org> Message-ID: <1589250767.15.0.149457285557.issue39481@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset f3a5b7ada0c951f317dbd307de4b410e58d3e1b3 by Batuhan Taskaya in branch 'master': bpo-39481: remove generic classes from ipaddress/mmap (GH-20045) https://github.com/python/cpython/commit/f3a5b7ada0c951f317dbd307de4b410e58d3e1b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 22:37:54 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 12 May 2020 02:37:54 +0000 Subject: [issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs In-Reply-To: <1588884932.92.0.367303002443.issue40553@roundup.psfhosted.org> Message-ID: <1589251074.83.0.304720027475.issue40553@roundup.psfhosted.org> Terry J. Reedy added the comment: By 'preview', I meant the listing of existing file in the directory, such as Documents. IDLE displays this but, as I inferred and you and Bev confirmed, this is not standard on macOS, as there is a button (which I did not noticed before) to show or hide the file list and other stuff. (There is no such button on Windows.) So *if* it is the problem culprit for some people, we could, I presume, leave the pane initially hidden. Is the filelist pane a 'sheet'? Could the recent 'sheets' fix (Christian's comment) for these dialogs on Catalina be involved? What is your latest take on 8.6.10 for OSX? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 22:45:47 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 12 May 2020 02:45:47 +0000 Subject: [issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) In-Reply-To: <1569848255.08.0.155489980043.issue38323@roundup.psfhosted.org> Message-ID: <1589251547.75.0.945895669413.issue38323@roundup.psfhosted.org> Chris Jerdonek added the comment: I was able to simplify the script a lot more and continue to reproduce the hang. It's attached as test-kill3.py (80 lines). It doesn't use subprocess_exec() or a watcher anymore -- just subprocess.Popen() followed by popen.kill(), and then awaiting on a future. The right amount of time has to elapse between the popen.kill() and the await, so I introduced a random bit of variability in between. The right range / amount of time to put in between probably depends on the machine. (What you want is a narrow range right on the borderline, where sometimes the signal fires right before the await, and sometimes right after.) I also added a printf() statement at the beginning of signalmodule.c's trip_signal(), so I can see in the console whether the signal is firing before or after the await. In the timeout / hang case, the signal will be firing after. The hang is very infrequent with the script, though (less frequent than the original unittest). It can take multiple 1-minute runs. It seems similar issues have happened a number of times in the past around the signal-handling code. See e.g. https://bugs.python.org/issue30038 and changes to the neighboring code since then. ---------- Added file: https://bugs.python.org/file49150/test-kill3.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 23:32:57 2020 From: report at bugs.python.org (Danni) Date: Tue, 12 May 2020 03:32:57 +0000 Subject: [issue40603] slice not hashable In-Reply-To: <1589246619.29.0.982913175965.issue40603@roundup.psfhosted.org> Message-ID: <1589254377.01.0.807105219319.issue40603@roundup.psfhosted.org> Danni added the comment: Would be happy to help with this. Sent a PR soon ;) ---------- nosy: +isdanni _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 11 23:45:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 May 2020 03:45:24 +0000 Subject: [issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h In-Reply-To: <1589241684.81.0.926948421821.issue40602@roundup.psfhosted.org> Message-ID: <1589255124.87.0.433054234355.issue40602@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19360 pull_request: https://github.com/python/cpython/pull/20051 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 01:13:01 2020 From: report at bugs.python.org (Joongi Kim) Date: Tue, 12 May 2020 05:13:01 +0000 Subject: [issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled In-Reply-To: <1492073709.93.0.33740565749.issue30064@psf.upfronthosting.co.za> Message-ID: <1589260381.09.0.751360259555.issue30064@roundup.psfhosted.org> Joongi Kim added the comment: I just encountered this issue when doing "sys.exit(1)" on a Click-based CLI program that internally uses asyncio event loop via wrapped via a context manager, on Python 3.8.2. Using uvloop or adding "time.sleep(0.1)" before "sys.exit(1)" removes the error. ---------- nosy: +achimnol _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 01:17:25 2020 From: report at bugs.python.org (Joongi Kim) Date: Tue, 12 May 2020 05:17:25 +0000 Subject: [issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled In-Reply-To: <1492073709.93.0.33740565749.issue30064@psf.upfronthosting.co.za> Message-ID: <1589260645.83.0.510322655881.issue30064@roundup.psfhosted.org> Joongi Kim added the comment: And I suspect that this issue is something simliar to what I did in a recent janus PR: https://github.com/aio-libs/janus/blob/ec8592b91254971473b508313fb91b01623f13d7/janus/__init__.py#L84 to give a chance for specific callbacks to execute via an extra context switch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 01:28:07 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 12 May 2020 05:28:07 +0000 Subject: [issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled In-Reply-To: <1492073709.93.0.33740565749.issue30064@psf.upfronthosting.co.za> Message-ID: <1589261287.7.0.601626821025.issue30064@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +aeros _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 02:55:45 2020 From: report at bugs.python.org (Case Van Horsen) Date: Tue, 12 May 2020 06:55:45 +0000 Subject: [issue40604] Regression in 3.8.3rc1 - error in tests run via doctest Message-ID: <1589266545.17.0.802278962638.issue40604@roundup.psfhosted.org> New submission from Case Van Horsen : An error in the gmpy2 test suite was reported at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=960201 The test suite is run using doctest and has been running without issues for many years. The first failure occurs when running the following fragment: >>> x = xmpz(16) >>> iter = x.iter_bits() >>> [b for b in iter] [False, False, False, False, True] The output is as expected when run interactively on 3.8.3rc1 but generated the following error message: /home/case/local/lib/python3.8/doctest.py:1336: RuntimeWarning: coroutine '' was never awaited exec(compile(example.source, filename, "single", RuntimeWarning: Enable tracemalloc to get the object allocation traceback ********************************************************************** File "test_gmpy2_xmpz_misc.txt", line 91, in test_gmpy2_xmpz_misc.txt Failed example: [b for b in iter] Differences (ndiff with -expected +actual): - [False, False, False, False, True] ********************************************************************** Note the runtime warning for doctest.py. ---------- components: Library (Lib) messages: 368703 nosy: casevh priority: normal severity: normal status: open title: Regression in 3.8.3rc1 - error in tests run via doctest versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 03:18:54 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 12 May 2020 07:18:54 +0000 Subject: [issue40604] Regression in 3.8.3rc1 - error in tests run via doctest In-Reply-To: <1589266545.17.0.802278962638.issue40604@roundup.psfhosted.org> Message-ID: <1589267934.46.0.744822412209.issue40604@roundup.psfhosted.org> Batuhan Taskaya added the comment: See issue 39562 ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 03:40:30 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 12 May 2020 07:40:30 +0000 Subject: [issue40596] str.isidentifier() does not work with non-BMP non-canonicalized strings on Windows In-Reply-To: <1589219416.15.0.470461181739.issue40596@roundup.psfhosted.org> Message-ID: <1589269230.06.0.777198180349.issue40596@roundup.psfhosted.org> Serhiy Storchaka added the comment: I am not sure that changes in issue39500 was correct. It is easier to catch a bug if crash consistently when you pass a non-canonicalized strings then if silently return a wrong result for specific input on particular platform. Alternatively, you could reimplement correct handling of surrogate pairs in PyUnicode_IsIdentifier(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 04:19:01 2020 From: report at bugs.python.org (Isa) Date: Tue, 12 May 2020 08:19:01 +0000 Subject: =?utf-8?q?=5Bissue40605=5D_=C2=ABpython=C2=BB=3A_Aucun_fichier_ou_dossier?= =?utf-8?q?_de_ce_type?= Message-ID: <1589271541.65.0.191752664403.issue40605@roundup.psfhosted.org> New submission from Isa : OS: X-Ubuntu 20.04 LTS Python's version: 3.8.2 (default, Apr 27 2020, 15:53:34) [GCC 9.3.0] on linux Since the last update I receive the following message: /usr/bin/env: ?python?: Aucun fichier ou dossier de ce type Thank you in advance for helping. ---------- messages: 368706 nosy: sab1703 priority: normal severity: normal status: open title: ?python?: Aucun fichier ou dossier de ce type type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 04:29:04 2020 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Tue, 12 May 2020 08:29:04 +0000 Subject: =?utf-8?q?=5Bissue40605=5D_=C2=ABpython=C2=BB=3A_Aucun_fichier_ou_dossier?= =?utf-8?q?_de_ce_type?= In-Reply-To: <1589271541.65.0.191752664403.issue40605@roundup.psfhosted.org> Message-ID: <1589272144.23.0.0303957580219.issue40605@roundup.psfhosted.org> Vedran ?a?i? added the comment: How do you know which version of Python you have if you can't run it? :-) ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 04:34:03 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 12 May 2020 08:34:03 +0000 Subject: [issue40603] slice not hashable In-Reply-To: <1589246619.29.0.982913175965.issue40603@roundup.psfhosted.org> Message-ID: <1589272443.35.0.689213624406.issue40603@roundup.psfhosted.org> R?mi Lapeyre added the comment: I think slices were explicitly made not hashable to avoid issues to avoid issues with dictionaries, see discussion at https://mail.python.org/pipermail/python-list/2001-March/076101.html and issue 408326. The commit that did this is https://github.com/python/cpython/commit/a1351fbd884189329bbcb6c688ca992fc1afc3f6 Is this not needed anymore? Wouldn't this need to be discussed on python-ideas? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 04:38:01 2020 From: report at bugs.python.org (Isa) Date: Tue, 12 May 2020 08:38:01 +0000 Subject: =?utf-8?q?=5Bissue40605=5D_=C2=ABpython=C2=BB=3A_Aucun_fichier_ou_dossier?= =?utf-8?q?_de_ce_type?= In-Reply-To: <1589271541.65.0.191752664403.issue40605@roundup.psfhosted.org> Message-ID: <1589272681.04.0.00533024800359.issue40605@roundup.psfhosted.org> Isa added the comment: Good question ;D I don't know and I don't understand... When I type the commands to know the version, I receive this: ~$ python3 Python 3.8.2 (default, Apr 27 2020, 15:53:34) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. But when I want to use a programm with Python, I receive: /usr/bin/env: ?python?: Aucun fichier ou dossier de ce type ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 05:10:33 2020 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 12 May 2020 09:10:33 +0000 Subject: [issue33944] Deprecate and remove code execution in pth files In-Reply-To: <1529688140.44.0.56676864532.issue33944@psf.upfronthosting.co.za> Message-ID: <1589274633.17.0.211486602929.issue33944@roundup.psfhosted.org> Change by Nick Coghlan : ---------- title: Deprecate and remove pth files -> Deprecate and remove code execution in pth files _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 05:11:47 2020 From: report at bugs.python.org (Eric Wieser) Date: Tue, 12 May 2020 09:11:47 +0000 Subject: [issue40606] Copy property return annotations to __annotations__ Message-ID: <1589274707.18.0.747615311988.issue40606@roundup.psfhosted.org> New submission from Eric Wieser : Consider a class like class MyClass: x: int y: int Which has >>> MyClass.__annotations__ {'x': int, 'y': int} In future, it might change to class MyClass: @property def x(self) -> int: ... @functools.cached_property def x(self) -> int: ... Most code won't be able to tell the difference, as properties are already a mostly-transparent replacement for attributes - but any code looking at `__annotations__` will find it is now absent. It would be handy if `property.__set_name__` and `cachedproperty.__set_name__` could populate the `__annotations__` dict from their return type annotation. This isn't just hypothetically useful - `sphinx` master as of https://github.com/sphinx-doc/sphinx/pull/7564 is able to retrieve the type of any descriptor with this behavior. ---------- components: Library (Lib) messages: 368710 nosy: Eric Wieser priority: normal severity: normal status: open title: Copy property return annotations to __annotations__ type: enhancement versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 05:12:49 2020 From: report at bugs.python.org (Eric Wieser) Date: Tue, 12 May 2020 09:12:49 +0000 Subject: [issue40606] Copy property return annotations to __annotations__ In-Reply-To: <1589274707.18.0.747615311988.issue40606@roundup.psfhosted.org> Message-ID: <1589274769.74.0.150603664506.issue40606@roundup.psfhosted.org> Change by Eric Wieser : ---------- keywords: +patch nosy: +Eric.Wieser nosy_count: 1.0 -> 2.0 pull_requests: +19361 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20052 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 05:14:06 2020 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Tue, 12 May 2020 09:14:06 +0000 Subject: =?utf-8?q?=5Bissue40605=5D_=C2=ABpython=C2=BB=3A_Aucun_fichier_ou_dossier?= =?utf-8?q?_de_ce_type?= In-Reply-To: <1589271541.65.0.191752664403.issue40605@roundup.psfhosted.org> Message-ID: <1589274846.4.0.00359734532301.issue40605@roundup.psfhosted.org> Vedran ?a?i? added the comment: What do you mean by > when I want to use a programm with Python ? Do you write something like ~$ python3 myscript.py ? If so, maybe it's myscript.py that's missing, not Python itself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 05:20:22 2020 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 12 May 2020 09:20:22 +0000 Subject: [issue33944] Deprecate and remove code execution in pth files In-Reply-To: <1529688140.44.0.56676864532.issue33944@psf.upfronthosting.co.za> Message-ID: <1589275222.39.0.127276773958.issue33944@roundup.psfhosted.org> Nick Coghlan added the comment: While it's still not entirely accurate, I've tweaked the title on the issue to refer to the arbitrary code execution behavior. Getting "Make pth file sys.path modifications easier to debug" in there as well would be rather tricky :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 05:42:32 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 12 May 2020 09:42:32 +0000 Subject: [issue40593] Improve error reporting for invalid character in source code In-Reply-To: <1589194173.64.0.264266598183.issue40593@roundup.psfhosted.org> Message-ID: <1589276552.41.0.84370899547.issue40593@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 74ea6b5a7501fb393cd567fb21998d0bfeeb267c by Serhiy Storchaka in branch 'master': bpo-40593: Improve syntax errors for invalid characters in source code. (GH-20033) https://github.com/python/cpython/commit/74ea6b5a7501fb393cd567fb21998d0bfeeb267c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 05:42:56 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 12 May 2020 09:42:56 +0000 Subject: [issue40593] Improve error reporting for invalid character in source code In-Reply-To: <1589194173.64.0.264266598183.issue40593@roundup.psfhosted.org> Message-ID: <1589276576.84.0.285491251647.issue40593@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 May 12 05:46:43 2020 From: report at bugs.python.org (Isa) Date: Tue, 12 May 2020 09:46:43 +0000 Subject: =?utf-8?q?=5Bissue40605=5D_=C2=ABpython=C2=BB=3A_Aucun_fichier_ou_dossier?= =?utf-8?q?_de_ce_type?= In-Reply-To: <1589271541.65.0.191752664403.issue40605@roundup.psfhosted.org> Message-ID: <1589276803.83.0.922413603508.issue40605@roundup.psfhosted.org> Isa added the comment: Sorry. I had to write, "when I open a programm." And what I can't understand, too is: that file is in usr/bin!! Is there anything in what can explain that mess? ---------- Added file: https://bugs.python.org/file49151/env _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 05:46:13 2020 From: report at bugs.python.org (Ned Batchelder) Date: Tue, 12 May 2020 09:46:13 +0000 Subject: [issue40480] "fnmatch" exponential execution time In-Reply-To: <1588498627.36.0.0280402477391.issue40480@roundup.psfhosted.org> Message-ID: <1589276773.68.0.852317469321.issue40480@roundup.psfhosted.org> Ned Batchelder added the comment: Wow, thanks Tim. To be honest, I was coming around to your original point of view that it was too much to promise that these regexes could be combined the way I'm doing it. If we have to undo this latest change, I can live with it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 05:50:51 2020 From: report at bugs.python.org (Isa) Date: Tue, 12 May 2020 09:50:51 +0000 Subject: =?utf-8?q?=5Bissue40605=5D_=C2=ABpython=C2=BB=3A_Aucun_fichier_ou_dossier?= =?utf-8?q?_de_ce_type?= In-Reply-To: <1589271541.65.0.191752664403.issue40605@roundup.psfhosted.org> Message-ID: <1589277051.19.0.899410914686.issue40605@roundup.psfhosted.org> Isa added the comment: I understand less and less $ python3 myscript.py python3: can't open file 'myscript.py': [Errno 2] No such file or directory ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 06:00:26 2020 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Tue, 12 May 2020 10:00:26 +0000 Subject: =?utf-8?q?=5Bissue40605=5D_=C2=ABpython=C2=BB=3A_Aucun_fichier_ou_dossier?= =?utf-8?q?_de_ce_type?= In-Reply-To: <1589271541.65.0.191752664403.issue40605@roundup.psfhosted.org> Message-ID: <1589277626.65.0.161202743872.issue40605@roundup.psfhosted.org> Vedran ?a?i? added the comment: Of course the _env_ is in /usr/bin. It's _python_ that's not found. What program are you trying to run? And does it maybe start with #!/usr/bin/env python ? If yes, you should change it to python3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 06:30:37 2020 From: report at bugs.python.org (Isa) Date: Tue, 12 May 2020 10:30:37 +0000 Subject: =?utf-8?q?=5Bissue40605=5D_=C2=ABpython=C2=BB=3A_Aucun_fichier_ou_dossier?= =?utf-8?q?_de_ce_type?= In-Reply-To: <1589271541.65.0.191752664403.issue40605@roundup.psfhosted.org> Message-ID: <1589279437.29.0.0392076448308.issue40605@roundup.psfhosted.org> Isa added the comment: You're right! instead of python3 it's written python only. Thank you! I can't change them :( because I can't open them properly :(... Can I change the name of the python's file? or??? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 06:34:38 2020 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Tue, 12 May 2020 10:34:38 +0000 Subject: =?utf-8?q?=5Bissue40605=5D_=C2=ABpython=C2=BB=3A_Aucun_fichier_ou_dossier?= =?utf-8?q?_de_ce_type?= In-Reply-To: <1589271541.65.0.191752664403.issue40605@roundup.psfhosted.org> Message-ID: <1589279678.86.0.0688067469519.issue40605@roundup.psfhosted.org> Vedran ?a?i? added the comment: You surely can, but I don't know much about OS X. You can probably set some kind of alias (https://www.peachpit.com/articles/article.aspx?p=31442&seqNum=5). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 06:39:32 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 12 May 2020 10:39:32 +0000 Subject: [issue40596] str.isidentifier() does not work with non-BMP non-canonicalized strings on Windows In-Reply-To: <1589219416.15.0.470461181739.issue40596@roundup.psfhosted.org> Message-ID: <1589279972.4.0.359339967547.issue40596@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +19362 pull_request: https://github.com/python/cpython/pull/20053 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 06:50:50 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 12 May 2020 10:50:50 +0000 Subject: [issue40589] Missing path-like versionchanged in shutil.rmtree In-Reply-To: <1589173780.72.0.321228140828.issue40589@roundup.psfhosted.org> Message-ID: <1589280650.52.0.0959312479056.issue40589@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you for your PR Ville, but I think this change cannot be accept. There was a ton of functions which became supporting path-like objects in 3.6. We deliberately did not add versionchanged directives to them because it would just add a noise. shutil.rmtree() is not special. If we decide to add versionchanged for it, we would need to add versionchanged to many tens or hundreds of other functions and methods. ---------- nosy: +serhiy.storchaka resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 06:59:42 2020 From: report at bugs.python.org (Isa) Date: Tue, 12 May 2020 10:59:42 +0000 Subject: =?utf-8?q?=5Bissue40605=5D_=C2=ABpython=C2=BB=3A_Aucun_fichier_ou_dossier?= =?utf-8?q?_de_ce_type?= In-Reply-To: <1589271541.65.0.191752664403.issue40605@roundup.psfhosted.org> Message-ID: <1589281182.02.0.767206147042.issue40605@roundup.psfhosted.org> Isa added the comment: Thank you for having helped. I've contacted the support of the programms and had explained how to solve the issue. Now... let's go and see ;)... Have a nice day! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 07:32:10 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 May 2020 11:32:10 +0000 Subject: [issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h In-Reply-To: <1589241684.81.0.926948421821.issue40602@roundup.psfhosted.org> Message-ID: <1589283130.63.0.603610800685.issue40602@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 7c6e97077525f0ad3cfa0971028313b9079449fd by Victor Stinner in branch 'master': bpo-40602: Optimize _Py_hashtable for pointer keys (GH-20051) https://github.com/python/cpython/commit/7c6e97077525f0ad3cfa0971028313b9079449fd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 07:33:07 2020 From: report at bugs.python.org (Roman Skurikhin) Date: Tue, 12 May 2020 11:33:07 +0000 Subject: [issue40607] asyncio.wait_for should reraise future exception even if timeout expires Message-ID: <1589283187.27.0.827786043193.issue40607@roundup.psfhosted.org> New submission from Roman Skurikhin : In https://bugs.python.org/issue32751 asyncio.wait_for behaviour was changed that when we use timeout=... and the timeout expires, it waits until task is canceled. However, in some cases inner task can trigger exception while it handles cancellation. Check the following code: import asyncio async def ignore_cancel_and_raise(): try: await asyncio.sleep(20) except asyncio.CancelledError: raise Exception('Cancellation failed') async def main(): try: await asyncio.wait_for(ignore_cancel_and_raise(), timeout=1) except asyncio.TimeoutError: print('Timeout') asyncio.run(main()) It will print "Timeout" and log a warning that "Task exception was never retrieved". I think that in case inner task cancelation fails with some error, asyncio.wait_for should reraise it instead of silently losing it. ---------- components: asyncio messages: 368723 nosy: Roman Skurikhin, asvetlov, yselivanov priority: normal severity: normal status: open title: asyncio.wait_for should reraise future exception even if timeout expires type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 07:33:34 2020 From: report at bugs.python.org (Isa) Date: Tue, 12 May 2020 11:33:34 +0000 Subject: =?utf-8?q?=5Bissue40605=5D_=C2=ABpython=C2=BB=3A_Aucun_fichier_ou_dossier?= =?utf-8?q?_de_ce_type?= In-Reply-To: <1589271541.65.0.191752664403.issue40605@roundup.psfhosted.org> Message-ID: <1589283214.08.0.231592808643.issue40605@roundup.psfhosted.org> Isa added the comment: Their answer is: "Again: setup your environment so that python3 is available as python." Can you help in that matter cause I can do nothing, please?? The Operatery System is: X-Ubuntu 20.04 lts https://xubuntu.org/release/20-04/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 07:37:16 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 12 May 2020 11:37:16 +0000 Subject: [issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) In-Reply-To: <1569848255.08.0.155489980043.issue38323@roundup.psfhosted.org> Message-ID: <1589283436.58.0.119127172236.issue38323@roundup.psfhosted.org> Chris Jerdonek added the comment: I think I have a possible explanation for this now. In my reproducer script and in the original test, the wakeup file descriptor isn't set. I think this explains why the loop isn't waking up to call SIGCHLD's handler when the signal comes in. The reason the wakeup file descriptor isn't set in the original test is that MultiLoopChildWatcher registers the SIGCHLD handler using signal.signal(): https://github.com/python/cpython/blob/74ea6b5a7501fb393cd567fb21998d0bfeeb267c/Lib/asyncio/unix_events.py#L1261-L1267 rather than using loop.add_signal_handler(), which calls signal.set_wakeup_fd(): https://github.com/python/cpython/blob/74ea6b5a7501fb393cd567fb21998d0bfeeb267c/Lib/asyncio/unix_events.py#L95 Is there a reason MultiLoopChildWatcher.attach_loop() isn't calling loop.add_signal_handler()? Since attach_loop() has to be called from the main thread anyways, it seems like it could be okay. I also wonder if the documentation could perhaps be more specific as to the difference between loop.add_signal_handler() and signal.signal(). Currently, it just says callbacks registered with add_signal_handler() are "allowed to interact with the event loop": https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.add_signal_handler But it doesn't give any warnings about using signal.signal(). For example, it might be worth saying something about the possibility of hangs if add_signal_handler() isn't used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 07:40:32 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 12 May 2020 11:40:32 +0000 Subject: [issue37573] asyncio: freeze when using MultiLoopChildWatcher on Solaris In-Reply-To: <1562936255.66.0.924337077063.issue37573@roundup.psfhosted.org> Message-ID: <1589283632.94.0.889454100757.issue37573@roundup.psfhosted.org> Chris Jerdonek added the comment: Closing as a duplicate of #38323: https://bugs.python.org/issue38323 ---------- stage: -> resolved status: open -> closed superseder: -> asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 07:40:40 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 12 May 2020 11:40:40 +0000 Subject: [issue37573] asyncio: freeze when using MultiLoopChildWatcher on Solaris In-Reply-To: <1562936255.66.0.924337077063.issue37573@roundup.psfhosted.org> Message-ID: <1589283640.64.0.904310431668.issue37573@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- resolution: -> duplicate _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 08:09:27 2020 From: report at bugs.python.org (James Addison) Date: Tue, 12 May 2020 12:09:27 +0000 Subject: [issue18857] urlencode of a None value uses the string 'None' In-Reply-To: <1377633255.35.0.29938622913.issue18857@psf.upfronthosting.co.za> Message-ID: <1589285367.01.0.942985617719.issue18857@roundup.psfhosted.org> James Addison added the comment: NB: There appears to be some relevant discussion in https://github.com/whatwg/url/issues/469 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 09:06:24 2020 From: report at bugs.python.org (=?utf-8?q?Ionel_Cristian_M=C4=83rie=C8=99?=) Date: Tue, 12 May 2020 13:06:24 +0000 Subject: [issue14803] Add feature to allow code execution prior to __main__ invocation In-Reply-To: <1336981419.55.0.280530546632.issue14803@psf.upfronthosting.co.za> Message-ID: <1589288784.84.0.67786670638.issue14803@roundup.psfhosted.org> Ionel Cristian M?rie? added the comment: Note that coveragepy ain't the sole usecase for this. https://pypi.org/project/manhole/ - a debugging tool https://pypi.org/project/hunter/ - a tracer In addition to those there's https://pypi.org/project/pytest-cov/ which packages the pth trick so coverage works consistently in all scenarios without putting users through the trouble of messing their python installation. Also, the amount of activity and enthusiasm on changing something that already works while other inconsistencies in python's core like issue23990 are ignored is disheartening. ---------- nosy: +ionelmc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 09:10:51 2020 From: report at bugs.python.org (Roundup Robot) Date: Tue, 12 May 2020 13:10:51 +0000 Subject: [issue40607] asyncio.wait_for should reraise future exception even if timeout expires In-Reply-To: <1589283187.27.0.827786043193.issue40607@roundup.psfhosted.org> Message-ID: <1589289051.6.0.0325816682011.issue40607@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 3.0 -> 4.0 pull_requests: +19363 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20054 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 09:18:11 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 12 May 2020 13:18:11 +0000 Subject: [issue40596] str.isidentifier() does not work with non-BMP non-canonicalized strings on Windows In-Reply-To: <1589219416.15.0.470461181739.issue40596@roundup.psfhosted.org> Message-ID: <1589289491.0.0.109496407339.issue40596@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 5650e76f63a6f4ec55d00ec13f143d84a2efee39 by Serhiy Storchaka in branch 'master': bpo-40596: Fix str.isidentifier() for non-canonicalized strings containing non-BMP characters on Windows. (GH-20053) https://github.com/python/cpython/commit/5650e76f63a6f4ec55d00ec13f143d84a2efee39 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 09:19:12 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 12 May 2020 13:19:12 +0000 Subject: [issue40596] str.isidentifier() does not work with non-BMP non-canonicalized strings on Windows In-Reply-To: <1589219416.15.0.470461181739.issue40596@roundup.psfhosted.org> Message-ID: <1589289552.23.0.0973493939034.issue40596@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 May 12 09:43:02 2020 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 12 May 2020 13:43:02 +0000 Subject: [issue40574] segfault causing regression from PEP 573 implementation (PyQt5) In-Reply-To: <1588997324.8.0.612961250405.issue40574@roundup.psfhosted.org> Message-ID: <1589290982.51.0.535096749435.issue40574@roundup.psfhosted.org> Petr Viktorin added the comment: So, the failure is expected. Python's ABI can change until the 3.9.0 final release, so wheels built for different commits can be incompatible. This applies to alphas/betas as well, as you say. There is the PEP 384 stable ABI, which is much stricter (and more limited), but sip doesn't use it -- its wheels are specific to cp36/cp37/cp38: https://pypi.org/project/sip/#files Thanks for testing, though! Perhaps we need to communicate better that for the alphas/betas, everything needs to be rebuilt. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 10:09:18 2020 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 12 May 2020 14:09:18 +0000 Subject: [issue40601] [C API] Hide static types from the limited C API In-Reply-To: <1589235805.82.0.0888479979707.issue40601@roundup.psfhosted.org> Message-ID: <1589292558.81.0.638694084331.issue40601@roundup.psfhosted.org> Petr Viktorin added the comment: > For example, Objects/longobject.c defines "PyTypeObject PyLong_Type = {...};". This type is exposed in the limited C API (!) Technically, it is not, see https://www.python.org/dev/peps/pep-0384/#structures Structures like PyLong_Type are *not* part of the limited API. > I propose to break the limited C API backward compatibility on purpose by removing these type definitions form the limited C API. That could only be done in Python 4.0, or if we started C-API 4.0. But I don't think it's necessary here. ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 10:10:01 2020 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 12 May 2020 14:10:01 +0000 Subject: [issue33944] Deprecate and remove code execution in pth files In-Reply-To: <1529688140.44.0.56676864532.issue33944@psf.upfronthosting.co.za> Message-ID: <1589292601.73.0.227616955495.issue33944@roundup.psfhosted.org> Anthony Sottile added the comment: fwiw virtualenv 20.x uses `.pth` now as well to fix some issues with `venv`-based environments ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 10:12:45 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 12 May 2020 14:12:45 +0000 Subject: [issue38787] PEP 573: Module State Access from C Extension Methods In-Reply-To: <1573655440.57.0.563143759574.issue38787@roundup.psfhosted.org> Message-ID: <1589292765.3.0.112082183467.issue38787@roundup.psfhosted.org> miss-islington added the comment: New changeset 4c9ea093cd752a6687864674d34250653653f743 by scoder in branch 'master': bpo-38787: Add PyCFunction_CheckExact() macro for exact type checks (GH-20024) https://github.com/python/cpython/commit/4c9ea093cd752a6687864674d34250653653f743 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 10:54:46 2020 From: report at bugs.python.org (Tim Peters) Date: Tue, 12 May 2020 14:54:46 +0000 Subject: [issue40480] "fnmatch" exponential execution time In-Reply-To: <1588498627.36.0.0280402477391.issue40480@roundup.psfhosted.org> Message-ID: <1589295286.47.0.727312871905.issue40480@roundup.psfhosted.org> Tim Peters added the comment: Ned, I'm happy to do this. While the ability to join wasn't documented, it's not an unreasonable expectation. I'm not sure it's possible to fail _unless_ the regexps use named groups (and/or numbered backreferences) - and nobody in their right mind would expect regexps for such simple patterns to do such a thing ;-) So chances seem decent the regression your user stumbled into wouldn't be the only one to pop up. The fix was actually quite easy (and thanks to Anthony for nudging me in that direction!). The annoying part was writing a test given that the precise group names generated are no longer predictable :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 11:18:42 2020 From: report at bugs.python.org (hai shi) Date: Tue, 12 May 2020 15:18:42 +0000 Subject: [issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented In-Reply-To: <1585753703.83.0.0762180613721.issue40137@roundup.psfhosted.org> Message-ID: <1589296722.26.0.453367357089.issue40137@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +19364 pull_request: https://github.com/python/cpython/pull/20055 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 11:36:41 2020 From: report at bugs.python.org (hai shi) Date: Tue, 12 May 2020 15:36:41 +0000 Subject: [issue38787] PEP 573: Module State Access from C Extension Methods In-Reply-To: <1573655440.57.0.563143759574.issue38787@roundup.psfhosted.org> Message-ID: <1589297801.58.0.825877583991.issue38787@roundup.psfhosted.org> hai shi added the comment: In PR19982, petr have mentioned that `PyType_GetModule` can not worked if the type is the subtype. I try to use pep573 in functools, I get the error info from testcases: ====================================================================== ERROR: test_arg_combinations (test.test_functools.TestPartialCSubclass) ---------------------------------------------------------------------- Traceback (most recent call last): File "/temp/shihai/cpython/Lib/test/test_functools.py", line 109, in test_arg_combinations p = self.partial(capture) TypeError: PyType_GetModule: Type 'CPartialSubclass' has no associated module ====================================================================== ERROR: test_attributes (test.test_functools.TestPartialCSubclass) ---------------------------------------------------------------------- Traceback (most recent call last): File "/temp/shihai/cpython/Lib/test/test_functools.py", line 71, in test_attributes p = self.partial(capture, 1, 2, a=10, b=20) TypeError: PyType_GetModule: Type 'CPartialSubclass' has no associated module ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 11:52:44 2020 From: report at bugs.python.org (hai shi) Date: Tue, 12 May 2020 15:52:44 +0000 Subject: [issue40601] [C API] Hide static types from the limited C API In-Reply-To: <1589235805.82.0.0888479979707.issue40601@roundup.psfhosted.org> Message-ID: <1589298764.92.0.344870649695.issue40601@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 12:10:14 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 May 2020 16:10:14 +0000 Subject: [issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h In-Reply-To: <1589241684.81.0.926948421821.issue40602@roundup.psfhosted.org> Message-ID: <1589299814.03.0.51889940908.issue40602@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19365 pull_request: https://github.com/python/cpython/pull/20056 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 12:29:57 2020 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 12 May 2020 16:29:57 +0000 Subject: [issue22079] Ensure in PyType_Ready() that base class of static type is static In-Reply-To: <1406378199.04.0.952325428414.issue22079@psf.upfronthosting.co.za> Message-ID: <1589300997.93.0.127031479487.issue22079@roundup.psfhosted.org> Antoine Pitrou added the comment: The workaround that Cython had to added for this (temporarily enable Py_TPFLAGS_HEAPTYPE when calling PyType_Ready()) is fragile. It would be nice to rethink the approach here, or disable the check altogether. (or perhaps, expose another C API function - such as PyType_ReadyEx() - that allows disabling the check) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 12:46:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 May 2020 16:46:27 +0000 Subject: [issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h In-Reply-To: <1589241684.81.0.926948421821.issue40602@roundup.psfhosted.org> Message-ID: <1589301987.38.0.312835278743.issue40602@roundup.psfhosted.org> STINNER Victor added the comment: New changeset f453221c8b80e0570066a9375337f208d50e6406 by Victor Stinner in branch 'master': bpo-40602: Add _Py_HashPointerRaw() function (GH-20056) https://github.com/python/cpython/commit/f453221c8b80e0570066a9375337f208d50e6406 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 12:53:14 2020 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 12 May 2020 16:53:14 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1589302394.77.0.652386640445.issue40257@roundup.psfhosted.org> Matthias Bussonnier added the comment: I've sent a request for comments on python-dev https://mail.python.org/archives/list/python-dev at python.org/thread/6QO2XI5B7RVZDW3YZV24LYD75VGRITFU/ Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 13:27:57 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 May 2020 17:27:57 +0000 Subject: [issue40596] str.isidentifier() does not work with non-BMP non-canonicalized strings on Windows In-Reply-To: <1589219416.15.0.470461181739.issue40596@roundup.psfhosted.org> Message-ID: <1589304477.22.0.631678548848.issue40596@roundup.psfhosted.org> STINNER Victor added the comment: Thanks for the fix Serhiy! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 13:38:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 May 2020 17:38:54 +0000 Subject: [issue39465] Design a subinterpreter friendly alternative to _Py_IDENTIFIER In-Reply-To: <1580135310.72.0.978238650594.issue39465@roundup.psfhosted.org> Message-ID: <1589305134.09.0.873140814516.issue39465@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19366 pull_request: https://github.com/python/cpython/pull/20058 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 14:07:29 2020 From: report at bugs.python.org (Irit Katriel) Date: Tue, 12 May 2020 18:07:29 +0000 Subject: [issue40608] PY3.8 GC segfault (Py_TRASHCAN_SAFE_BEGIN/END are not backwards compatible) Message-ID: <1589306849.27.0.146369076662.issue40608@roundup.psfhosted.org> New submission from Irit Katriel : While migrating our codebase from python 3.7 to python 3.8, one of our unit tests segfaulted and I?ve narrowed it down to the change of typeobject.c in: commit 351c67416ba4451eb3928fa0b2e933c2f25df1a3 Author: Jeroen Demeyer Date: Fri May 10 19:21:11 2019 +0200 bpo-35983: skip trashcan for subclasses (GH-11841) It seems that Py_TRASHCAN_SAFE_BEGIN/END are not backwards compatible (as claimed in the comment above their definition in object.h). This patch has a unit test that currently fails, along with the change in typeobject.c that restores the code that broke it: https://github.com/iritkatriel/cpython/commit/d962dd7f800fdaaeacd5748c6e3d38bf1f5053c1 I believe that this change needs to be pushed until the Py_TRASHCAN_SAFE_BEGIN/END are removed and all users are forced to migrate to the new Py_TRASHCAN_BEGIN/END. ---------- components: Interpreter Core messages: 368740 nosy: iritkatriel, jdemeyer, pablogsal, pitrou priority: normal severity: normal status: open title: PY3.8 GC segfault (Py_TRASHCAN_SAFE_BEGIN/END are not backwards compatible) type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 14:07:39 2020 From: report at bugs.python.org (Thomas Caswell) Date: Tue, 12 May 2020 18:07:39 +0000 Subject: [issue40574] segfault causing regression from PEP 573 implementation (PyQt5) In-Reply-To: <1588997324.8.0.612961250405.issue40574@roundup.psfhosted.org> Message-ID: <1589306859.32.0.354580432188.issue40574@roundup.psfhosted.org> Thomas Caswell added the comment: That seems reasonable. To be pedantic, it is pyqt5-sip (not sip) that was the source of the problem. I am going to open an issue with pip to disable caching locally built wheels for pre-released versions of Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 14:54:17 2020 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 12 May 2020 18:54:17 +0000 Subject: [issue40608] PY3.8 GC segfault (Py_TRASHCAN_SAFE_BEGIN/END are not backwards compatible) In-Reply-To: <1589306849.27.0.146369076662.issue40608@roundup.psfhosted.org> Message-ID: <1589309657.2.0.799013482573.issue40608@roundup.psfhosted.org> Jeroen Demeyer added the comment: I need to check, but I think this is a duplicate of bpo-35983, which still has PR 12607 open. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 15:56:43 2020 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 12 May 2020 19:56:43 +0000 Subject: [issue22079] Ensure in PyType_Ready() that base class of static type is static In-Reply-To: <1406378199.04.0.952325428414.issue22079@psf.upfronthosting.co.za> Message-ID: <1589313403.18.0.34063501753.issue22079@roundup.psfhosted.org> Stefan Behnel added the comment: Since it's not clear from this ticket what the original problem was, is there a chance it could have been related to issue 35810? ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 18:21:00 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 12 May 2020 22:21:00 +0000 Subject: [issue38728] Update PC/pyconfig.h to support disabling auto linking In-Reply-To: <1573080091.42.0.697826916573.issue38728@roundup.psfhosted.org> Message-ID: <1589322060.14.0.173744280916.issue38728@roundup.psfhosted.org> Steve Dower added the comment: Thanks for the ping - sorry, I've been largely offline while I'm between internet providers. The change is fine, but I wonder whether we should document it somewhere? Most likely in the devguide, which is in a separate repo, but perhaps a mention in PCbuild/readme.txt too? Presumably you looked around for ideas before figuring out the issue - anywhere you might have found it? Just in the source code? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 18:29:22 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 12 May 2020 22:29:22 +0000 Subject: [issue40592] `Shutil.which` incosistent with windows's `where` In-Reply-To: <1589187015.71.0.593402074503.issue40592@roundup.psfhosted.org> Message-ID: <1589322562.2.0.139283515346.issue40592@roundup.psfhosted.org> Steve Dower added the comment: Sounds like a good opportunity for someone to make their first contribution. Post a message if you'd like to work on this (and a test), and we can help get through the PR process. ---------- keywords: +easy, newcomer friendly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 18:32:49 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 12 May 2020 22:32:49 +0000 Subject: [issue40501] Deprecate and remove ctypes usage in uuid In-Reply-To: <1588610043.03.0.653935213542.issue40501@roundup.psfhosted.org> Message-ID: <1589322769.14.0.684388547612.issue40501@roundup.psfhosted.org> Steve Dower added the comment: New changeset d6b727e2c947240804b8e434b305ba2890122550 by Steve Dower in branch 'master': bpo-40501: Replace ctypes code in uuid with native module (GH-19948) https://github.com/python/cpython/commit/d6b727e2c947240804b8e434b305ba2890122550 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 18:47:15 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 May 2020 22:47:15 +0000 Subject: [issue40609] _tracemalloc: remove pointer_t type Message-ID: <1589323635.37.0.444781514034.issue40609@roundup.psfhosted.org> New submission from STINNER Victor : In bpo-26588, I modified the _tracemalloc module to support tracing memory allocations in multiple "domains" for numpy. I modified hashtable.c to support keys larger than void*, and I modified _tracemalloc.c to use a new pointer_t structure which is made of (domain: unsigned int, ptr: void*). These changes made hashtable.c way more complicated than what it should be. I would like to reuse hashtable.c in more places. I am working on a change to remove the pointer_t type from _tracemalloc.c, and instead use a hash table for traces of domains other than the default domain (0). The new hash table maps a domain to a hash table: traces of a domain. tracemalloc_traces remains the default hash table for traces of the default domain. Since it's the most common case, it doesn't go through the new hash table. ---------- components: Library (Lib) messages: 368747 nosy: vstinner priority: normal severity: normal status: open title: _tracemalloc: remove pointer_t type versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 18:50:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 May 2020 22:50:12 +0000 Subject: [issue40609] _tracemalloc: remove pointer_t type In-Reply-To: <1589323635.37.0.444781514034.issue40609@roundup.psfhosted.org> Message-ID: <1589323812.85.0.757383824663.issue40609@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +19367 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20059 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 19:04:27 2020 From: report at bugs.python.org (Jack Jansen) Date: Tue, 12 May 2020 23:04:27 +0000 Subject: [issue40610] ctypes on Windows: error message on DLL load failure is misleading Message-ID: <1589324667.53.0.244331207103.issue40610@roundup.psfhosted.org> New submission from Jack Jansen : On Windows, when ctypes fails to load a DLL, the error message is misleading. If a dependency of the DLL cannot be found if appears as if the DLL itself cannot be found. This issue has always existed on Windows (and I know it is due to what the OS provides by default as its error message) but it is exacerbated by the DLL loading rules in Python 3.8 (the `os.add_dll_directory()` changes), because now importing a DLL into Python will follow different rules than those followed by, for example, command line utilities shipped with the DLL you are loading follow. An ideal fix would be a message of the form "xxx.dll failed to load because its dependency yyy.dll is not on the current Python DLL search path, see zzzz for details". But I am not well-versed enough in Windows APIs to know whether that is even possible. A fix that is minimal and at least not misleading would be a message "xxx.dll (or one of its dependencies) failed to load. See zzzz for details". ---------- components: ctypes messages: 368748 nosy: jackjansen priority: normal severity: normal status: open title: ctypes on Windows: error message on DLL load failure is misleading type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 19:29:17 2020 From: report at bugs.python.org (Ben Boeckel) Date: Tue, 12 May 2020 23:29:17 +0000 Subject: [issue38728] Update PC/pyconfig.h to support disabling auto linking In-Reply-To: <1573080091.42.0.697826916573.issue38728@roundup.psfhosted.org> Message-ID: <1589326157.56.0.298606286568.issue38728@roundup.psfhosted.org> Ben Boeckel added the comment: > Presumably you looked around for ideas before figuring out the issue Usually when "could not find foo.lib" popping up without any mention of "foo.lib" on the link line points directly to these "autolinking" "features" being the culprit. It's just something I've learned through experience. If there's an FAQ of common problems when building C extensions, it belongs there. While this functionality sounds nice in principle, it only really works if something also adds the directory to *look* for the library to the link line as well. But if you can get *that* to the link line, you may as well just add the ".lib" to the link line directly and not send the linker on a wild goose chase based on a header. In addition, nothing ties "find python.lib" to the one that actually goes with the header that's telling it to be found either, so you can get the wrong one too (probably not so much an issue for Python now that ABI flags are gone, but it's still a thing). Due to these behaviors and the lack of a link directory pragma (not that you could write a relocatable one in C preprocessor anyways), I find `#pragma comment(lib)` to just be a misfeature more than anything. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 19:37:07 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 May 2020 23:37:07 +0000 Subject: [issue40609] _tracemalloc: remove pointer_t type In-Reply-To: <1589323635.37.0.444781514034.issue40609@roundup.psfhosted.org> Message-ID: <1589326627.32.0.227738047006.issue40609@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 9e2ca1742076169089b818d0883688a2ddd9964a by Victor Stinner in branch 'master': bpo-40609: Rewrite how _tracemalloc handles domains (GH-20059) https://github.com/python/cpython/commit/9e2ca1742076169089b818d0883688a2ddd9964a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 19:48:31 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 May 2020 23:48:31 +0000 Subject: [issue40609] _tracemalloc: remove pointer_t type In-Reply-To: <1589323635.37.0.444781514034.issue40609@roundup.psfhosted.org> Message-ID: <1589327311.82.0.355286784304.issue40609@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19368 pull_request: https://github.com/python/cpython/pull/20060 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 20:02:46 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 13 May 2020 00:02:46 +0000 Subject: [issue40610] ctypes on Windows: error message on DLL load failure is misleading In-Reply-To: <1589324667.53.0.244331207103.issue40610@roundup.psfhosted.org> Message-ID: <1589328166.2.0.330258860911.issue40610@roundup.psfhosted.org> Eryk Sun added the comment: bpo-39393 improved the error message to mention "(or one of its dependencies)". That's the best we can reasonably do. A developer can monitor "loader snaps" messages in a debugger in order to discover the missing DLL and the directories where the loader looked for it. ---------- nosy: +eryksun resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Misleading error message upon dependent DLL resolution failure _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 20:02:56 2020 From: report at bugs.python.org (Joshua Bronson) Date: Wed, 13 May 2020 00:02:56 +0000 Subject: [issue31122] SSLContext.wrap_socket() throws OSError with errno == 0 In-Reply-To: <1501874201.48.0.0126792321555.issue31122@psf.upfronthosting.co.za> Message-ID: <1589328176.89.0.831193356204.issue31122@roundup.psfhosted.org> Change by Joshua Bronson : ---------- nosy: +jab _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 20:16:37 2020 From: report at bugs.python.org (Ethan Steinberg) Date: Wed, 13 May 2020 00:16:37 +0000 Subject: [issue40611] Add MAP_POPULATE to the mmap library Message-ID: <1589328997.25.0.34201550923.issue40611@roundup.psfhosted.org> New submission from Ethan Steinberg : This issue (and corresponding pull request) adds MAP_POPULATE to the set of flags exported by the mmap module. This flag is incredibly handy for speeding up data processing and is available on most Linux systems. ---------- components: Library (Lib) messages: 368752 nosy: Ethan Steinberg priority: normal severity: normal status: open title: Add MAP_POPULATE to the mmap library type: enhancement 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 May 12 20:21:47 2020 From: report at bugs.python.org (Roundup Robot) Date: Wed, 13 May 2020 00:21:47 +0000 Subject: [issue40611] Add MAP_POPULATE to the mmap library In-Reply-To: <1589328997.25.0.34201550923.issue40611@roundup.psfhosted.org> Message-ID: <1589329307.94.0.641804442382.issue40611@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +19369 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20061 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 20:26:08 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 May 2020 00:26:08 +0000 Subject: [issue40609] _tracemalloc: remove pointer_t type In-Reply-To: <1589323635.37.0.444781514034.issue40609@roundup.psfhosted.org> Message-ID: <1589329568.88.0.533137957548.issue40609@roundup.psfhosted.org> STINNER Victor added the comment: New changeset f9b3b582b86b9cce8d69ec7d03d716ec81c8264a by Victor Stinner in branch 'master': bpo-40609: Remove _Py_hashtable_t.key_size (GH-20060) https://github.com/python/cpython/commit/f9b3b582b86b9cce8d69ec7d03d716ec81c8264a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 20:28:23 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 May 2020 00:28:23 +0000 Subject: [issue40609] _tracemalloc: remove pointer_t type In-Reply-To: <1589323635.37.0.444781514034.issue40609@roundup.psfhosted.org> Message-ID: <1589329703.75.0.356314315007.issue40609@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19371 pull_request: https://github.com/python/cpython/pull/20062 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 20:50:25 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 May 2020 00:50:25 +0000 Subject: [issue40609] _tracemalloc: remove pointer_t type In-Reply-To: <1589323635.37.0.444781514034.issue40609@roundup.psfhosted.org> Message-ID: <1589331025.16.0.253945912102.issue40609@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 2d0a3d682f699cce8db6e30981d41d9125318726 by Victor Stinner in branch 'master': bpo-40609: Add destroy functions to _Py_hashtable (GH-20062) https://github.com/python/cpython/commit/2d0a3d682f699cce8db6e30981d41d9125318726 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 21:00:35 2020 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 13 May 2020 01:00:35 +0000 Subject: [issue35114] ssl.RAND_status docs describe it as returning True/False; actually returns 1/0 In-Reply-To: <1540906817.06.0.788709270274.issue35114@psf.upfronthosting.co.za> Message-ID: <1589331635.12.0.790347612989.issue35114@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 3.0 -> 4.0 pull_requests: +19372 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20063 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 21:01:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 May 2020 01:01:54 +0000 Subject: [issue40609] _tracemalloc: remove pointer_t type In-Reply-To: <1589323635.37.0.444781514034.issue40609@roundup.psfhosted.org> Message-ID: <1589331714.13.0.674235712177.issue40609@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19373 pull_request: https://github.com/python/cpython/pull/20064 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 21:52:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 May 2020 01:52:17 +0000 Subject: [issue40609] _tracemalloc: remove pointer_t type In-Reply-To: <1589323635.37.0.444781514034.issue40609@roundup.psfhosted.org> Message-ID: <1589334737.75.0.344137660562.issue40609@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d95bd4214c2babe851b02562d973d60c02e639b7 by Victor Stinner in branch 'master': bpo-40609: _tracemalloc allocates traces (GH-20064) https://github.com/python/cpython/commit/d95bd4214c2babe851b02562d973d60c02e639b7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 22:20:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 May 2020 02:20:11 +0000 Subject: [issue40609] _tracemalloc: remove pointer_t type In-Reply-To: <1589323635.37.0.444781514034.issue40609@roundup.psfhosted.org> Message-ID: <1589336411.67.0.330003222929.issue40609@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19374 pull_request: https://github.com/python/cpython/pull/20065 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 22:29:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 May 2020 02:29:27 +0000 Subject: [issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h In-Reply-To: <1589241684.81.0.926948421821.issue40602@roundup.psfhosted.org> Message-ID: <1589336967.62.0.757649951982.issue40602@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-40609: "_tracemalloc: remove pointer_t type". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 22:40:39 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 May 2020 02:40:39 +0000 Subject: [issue40609] _tracemalloc: remove pointer_t type In-Reply-To: <1589323635.37.0.444781514034.issue40609@roundup.psfhosted.org> Message-ID: <1589337639.43.0.747735169614.issue40609@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 5b0a30354d8a8bb39a05ce10ca4f5c78b729f25b by Victor Stinner in branch 'master': bpo-40609: _Py_hashtable_t values become void* (GH-20065) https://github.com/python/cpython/commit/5b0a30354d8a8bb39a05ce10ca4f5c78b729f25b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 22:46:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 May 2020 02:46:28 +0000 Subject: [issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h In-Reply-To: <1589241684.81.0.926948421821.issue40602@roundup.psfhosted.org> Message-ID: <1589337988.09.0.705337190866.issue40602@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19375 pull_request: https://github.com/python/cpython/pull/20066 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 12 23:36:30 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 May 2020 03:36:30 +0000 Subject: [issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h In-Reply-To: <1589241684.81.0.926948421821.issue40602@roundup.psfhosted.org> Message-ID: <1589340990.71.0.144917693932.issue40602@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 42bae3a3d9d79f28e6b3b619bd27296d125c4c2c by Victor Stinner in branch 'master': bpo-40602: Optimize _Py_hashtable_get_ptr() (GH-20066) https://github.com/python/cpython/commit/42bae3a3d9d79f28e6b3b619bd27296d125c4c2c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 00:18:55 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 13 May 2020 04:18:55 +0000 Subject: [issue40612] Make traceback module's formatting of SyntaxError more similar to system formatting Message-ID: <1589343535.08.0.511471445795.issue40612@roundup.psfhosted.org> New submission from Guido van Rossum : The traceback module formats several edge cases of SyntaxError different than CPython's default formatting. - There's an off-by-one error if the column offset (printed as a caret) points past the last character (example: 'a +='). The clipping is wrong and the caret points to the last character. - If the offset is <= 0, it appears the code silently adds the length of the source text. - The system formatting suppresses the caret if the offset is -1; the only way to suppress the caret with the traceback module is setting the offset to None (or setting the source text to None). - The system formatting can position the caret way past the end of the source text; the traceback module clips (also see the first bullet). I propose to make the traceback module behave the same way as the system module in all cases. I also propose to make both suppress the caret if the offset is <= 0. Finally I propose to make the system formatting limit the offset to just past the end of the source text. I propose not to bother changing anything in 3.8 or before. ---------- messages: 368759 nosy: gvanrossum, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: Make traceback module's formatting of SyntaxError more similar to system formatting versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 01:14:26 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 13 May 2020 05:14:26 +0000 Subject: [issue40607] asyncio.wait_for should reraise future exception even if timeout expires In-Reply-To: <1589283187.27.0.827786043193.issue40607@roundup.psfhosted.org> Message-ID: <1589346866.42.0.386744832435.issue40607@roundup.psfhosted.org> Chris Jerdonek added the comment: Also adding Nathaniel since he's the one that filed #32751. Nathaniel, do you agree that if an exception occurs while waiting for the cancellation, the exception should be what's raised instead of TimeoutError? ---------- nosy: +chris.jerdonek, njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 01:45:49 2020 From: report at bugs.python.org (Nathaniel Smith) Date: Wed, 13 May 2020 05:45:49 +0000 Subject: [issue40607] asyncio.wait_for should reraise future exception even if timeout expires In-Reply-To: <1589346866.42.0.386744832435.issue40607@roundup.psfhosted.org> Message-ID: Nathaniel Smith added the comment: makes sense to me On Tue, May 12, 2020 at 10:14 PM Chris Jerdonek wrote: > > > Chris Jerdonek added the comment: > > Also adding Nathaniel since he's the one that filed #32751. Nathaniel, do you agree that if an exception occurs while waiting for the cancellation, the exception should be what's raised instead of TimeoutError? > > ---------- > nosy: +chris.jerdonek, njs > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 02:26:25 2020 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 13 May 2020 06:26:25 +0000 Subject: [issue40613] gcc 10 emits warning for unused function: _xxsubinterpretersmodule In-Reply-To: <1589351176.2.0.303752022619.issue40613@roundup.psfhosted.org> Message-ID: <1589351185.34.0.317840256226.issue40613@roundup.psfhosted.org> Change by Dong-hee Na : ---------- title: gcc 10 emits error for unused function: _xxsubinterpretersmodule -> gcc 10 emits warning for unused function: _xxsubinterpretersmodule _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 02:26:16 2020 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 13 May 2020 06:26:16 +0000 Subject: [issue40613] gcc 10 emits error for unused function: _xxsubinterpretersmodule Message-ID: <1589351176.2.0.303752022619.issue40613@roundup.psfhosted.org> New submission from Dong-hee Na : /oss/cpython/Modules/_xxsubinterpretersmodule.c:1089:1: warning: ?_sharedexception_is_clear? defined but not used [-Wunused-function] 1089 | _sharedexception_is_clear(_sharedexception *she) | ^~~~~~~~~~~~~~~~~~~~~~~~~ /oss/cpython/Modules/_xxsubinterpretersmodule.c:601:1: warning: ?_tbsnapshot_is_clear? defined but not used [-Wunused-function] 601 | _tbsnapshot_is_clear(_tbsnapshot *tbs) | ^~~~~~~~~~~~~~~~~~~~ Both functions are used by the assert statement. IMHO, it should be replaced by if statement. ---------- components: C API messages: 368762 nosy: corona10, eric.snow, vstinner priority: normal severity: normal status: open title: gcc 10 emits error for unused function: _xxsubinterpretersmodule type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 03:17:35 2020 From: report at bugs.python.org (Shantanu) Date: Wed, 13 May 2020 07:17:35 +0000 Subject: [issue40614] ast.parse doesn't respect feature_version for debug f-strings Message-ID: <1589354255.32.0.89059001676.issue40614@roundup.psfhosted.org> New submission from Shantanu : ``` ~master ? python3.8 Python 3.8.2 (default, Apr 21 2020, 00:39:48) [Clang 11.0.0 (clang-1100.0.33.17)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import ast >>> ast.parse('''f"{x=}"''') # should work <_ast.Module object at 0x10f81af40> >>> ast.parse('''f"{x=}"''', feature_version=(3, 6)) # should fail, but doesn't <_ast.Module object at 0x10f857d00> ``` ---------- messages: 368763 nosy: hauntsaninja priority: normal severity: normal status: open title: ast.parse doesn't respect feature_version for debug f-strings type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 03:47:25 2020 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 13 May 2020 07:47:25 +0000 Subject: [issue40570] len(platform.uname()) has changed in Python 3.9 In-Reply-To: <1588968140.85.0.743964408101.issue40570@roundup.psfhosted.org> Message-ID: <1589356045.6.0.818906515652.issue40570@roundup.psfhosted.org> Marc-Andre Lemburg added the comment: Hi Jason, I think I have to review the whole set of changes again to understand what your motivation is/was. For https://bugs.python.org/issue35967 I had already stated that your use case is not special enough to make the platform.py logic more complex. BTW: Please don't open several different tickets for the same problem. It doesn't really help to see what is going on. I'll reopen the issue35967 to continue the discussion there. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 03:50:20 2020 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 13 May 2020 07:50:20 +0000 Subject: [issue35967] Better platform.processor support In-Reply-To: <1549895363.53.0.252912531241.issue35967@roundup.psfhosted.org> Message-ID: <1589356220.51.0.29408664373.issue35967@roundup.psfhosted.org> Marc-Andre Lemburg added the comment: Reopening the ticket, since the implementation makes backwards incompatible changes to platform.uname(): see https://bugs.python.org/issue40570 for a discussion on a better approach to lazy evaluation of getting the processor information. Before we head on into implementation details, could you please point me to the motivation why only the processor detail of uname() needs lazy evaluation ? Thanks. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 04:03:33 2020 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 13 May 2020 08:03:33 +0000 Subject: [issue40578] Deprecate numeric item access for platform.uname() In-Reply-To: <1589033216.57.0.707246281717.issue40578@roundup.psfhosted.org> Message-ID: <1589357013.1.0.00850977252561.issue40578@roundup.psfhosted.org> Marc-Andre Lemburg added the comment: I am closing this issue, since deprecations should really only be used when no other means are possible. The namedtuples returned by platform.uname() do support index access and so any implementation change altering this is surprising and backwards incompatible, potentially breaking existing code which makes reasonable use of the index interface (the namedtuple and processor attribute was introduced in Python 3.3, so code written for prior versions may well still use the perfectly reasonable index approach). You are essentially suggesting to change the return type, since you want to remove a standard tuple interface. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 04:33:22 2020 From: report at bugs.python.org (Ammar Askar) Date: Wed, 13 May 2020 08:33:22 +0000 Subject: [issue40543] Tamil locale is using outdated encoding In-Reply-To: <1588837308.8.0.873026053476.issue40543@roundup.psfhosted.org> Message-ID: <1589358802.69.0.0606841323336.issue40543@roundup.psfhosted.org> Ammar Askar added the comment: Hi Muthu, thanks for reporting this! Looks like this is related to issue20087 whereby the X11 locale data for TA_IN is using TSCII but the glibc supported file has the UTF-8 alias. Pending a resolution to that bug, I think your best course of action would be to try to get this corrected upstream in x11, the code is here: https://gitlab.freedesktop.org/xorg/lib/libx11/-/blob/master/nls/locale.alias.pre#L1078 and their issue tracker is here: https://gitlab.freedesktop.org/xorg/lib/libx11/-/issues Assuming that it gets accepted upstream, it should be simple enough to regenerate the locale module to use it. ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 04:41:11 2020 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 13 May 2020 08:41:11 +0000 Subject: [issue38787] PEP 573: Module State Access from C Extension Methods In-Reply-To: <1573655440.57.0.563143759574.issue38787@roundup.psfhosted.org> Message-ID: <1589359271.82.0.449645942542.issue38787@roundup.psfhosted.org> Petr Viktorin added the comment: I guess I'll need to clarify the documentation here. Call `PyType_GetModule` on the *defining class*, not on type(self). See the PEP for details. The associated module is not inherited; each class in the MRO can be defined in a different module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 05:00:10 2020 From: report at bugs.python.org (Ammar Askar) Date: Wed, 13 May 2020 09:00:10 +0000 Subject: [issue40551] PRs should be rebased on top of master before running the build/tests In-Reply-To: <1588882193.5.0.928762641921.issue40551@roundup.psfhosted.org> Message-ID: <1589360410.01.0.236880998336.issue40551@roundup.psfhosted.org> Ammar Askar added the comment: Just like Travis, Github actions also automatically rebases pull requests onto the latest master. As you can see from a recent workflow run, it uses the special ref: "refs/remote/pull/20047/merge" https://github.com/python/cpython/pull/20047/checks?check_run_id=665377507#step:2:898 What is this ref that Github provides? https://git-scm.com/book/en/v2/GitHub-Maintaining-a-Project > There?s also a refs/pull/#/merge ref on the GitHub side, > which represents the commit that would result if you push > the ?merge? button on the site. This can allow you to test > the merge before even hitting the button Unless there's real world examples of ongoing problems with PRs being merged with outdated test runs, I don't think this is worth complicating our CIs for. As Inada-san mentioned, the occasional slip through will eventually be caught by the buildbots and promptly reverted. Re-triggering the CI for very stale pull requests might be worth doing. I'm kinda opposed to an automated system because this creates an undue burden on our CI providers, Travis graciously provides us with extra time for our coverage builds to finish already. Re-running pull requests that might never be merged is a lot of added work for them. Maybe we can get one of the bots to tag old pull requests and then have some guidance in the core-dev guide to re-run the CIs manually when merging those PRs. ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 06:03:32 2020 From: report at bugs.python.org (Floris) Date: Wed, 13 May 2020 10:03:32 +0000 Subject: [issue39959] Bug on multiprocessing.shared_memory In-Reply-To: <1584128583.89.0.486447704556.issue39959@roundup.psfhosted.org> Message-ID: <1589364212.73.0.126272655883.issue39959@roundup.psfhosted.org> Floris added the comment: I confirm the same issue as Diogo. The provided workaround of unregistering the sharedmemory segment in the 'consuming' process, as suggested by Jeff, solves the issue where exiting the consuming process causes the tracker to incorrectly free the shared memory. Diogo's fix to shared_memory.py#L116 does just that (actually it avoids registering it in the first place) and therefor seems ok to me. ---------- nosy: +fvdnabee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 06:29:56 2020 From: report at bugs.python.org (Tal Einat) Date: Wed, 13 May 2020 10:29:56 +0000 Subject: [issue40331] Increase test coverage for the statistics module In-Reply-To: <1587313488.32.0.170257726917.issue40331@roundup.psfhosted.org> Message-ID: <1589365796.75.0.573279591378.issue40331@roundup.psfhosted.org> Tal Einat added the comment: New changeset b809717c1ead26b4e3693b8a5505dd8f8f666f08 by Tzanetos Balitsaris in branch 'master': bpo-40331: Increase test coverage for the statistics module (GH-19608) https://github.com/python/cpython/commit/b809717c1ead26b4e3693b8a5505dd8f8f666f08 ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 06:30:59 2020 From: report at bugs.python.org (Tal Einat) Date: Wed, 13 May 2020 10:30:59 +0000 Subject: [issue40331] Increase test coverage for the statistics module In-Reply-To: <1587313488.32.0.170257726917.issue40331@roundup.psfhosted.org> Message-ID: <1589365859.37.0.407510448072.issue40331@roundup.psfhosted.org> Tal Einat added the comment: Tzanetos, thanks for the report, PR, patience iterating through several rounds of code review comments, and overall great work! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 07:26:14 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 13 May 2020 11:26:14 +0000 Subject: [issue40331] Increase test coverage for the statistics module In-Reply-To: <1589365859.37.0.407510448072.issue40331@roundup.psfhosted.org> Message-ID: <20200513112115.GC5329@ando.pearwood.info> Steven D'Aprano added the comment: *blink* How did I miss this entire thing? Where was the code review? Thanks Tal for shepherding this through, and thanks Tzanetos for caring about the unit tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 07:36:19 2020 From: report at bugs.python.org (Tal Einat) Date: Wed, 13 May 2020 11:36:19 +0000 Subject: [issue40331] Increase test coverage for the statistics module In-Reply-To: <1587313488.32.0.170257726917.issue40331@roundup.psfhosted.org> Message-ID: <1589369779.01.0.881098519674.issue40331@roundup.psfhosted.org> Tal Einat added the comment: Steven, the conversation happened in the GitHub PR comments. The PR went through multiple iterations of code review, by both Kyle Stanley and myself, and I even waited an extra couple of weeks to see if anyone had any more comments before merging it... Perhaps you missed it because you're not in the CODEOWNERS so don't automatically get notified by GitHub? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 07:46:51 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 13 May 2020 11:46:51 +0000 Subject: [issue40331] Increase test coverage for the statistics module In-Reply-To: <1589369779.01.0.881098519674.issue40331@roundup.psfhosted.org> Message-ID: <20200513114152.GD5329@ando.pearwood.info> Steven D'Aprano added the comment: > Perhaps you missed it because you're not in the CODEOWNERS so don't > automatically get notified by GitHub? That's quite possible. I can't fix that as Github considers everything to do with my computer and browser too old. Until I can get a new computer, I'm effectively unable to use Github, so even if I was notified, I probably couldn't have done much. This wasn't a complaint, I'm grateful for everyone involved. Thanks again! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 07:49:46 2020 From: report at bugs.python.org (gaborbernat) Date: Wed, 13 May 2020 11:49:46 +0000 Subject: [issue40615] argparse Message-ID: <1589370586.91.0.862968954668.issue40615@roundup.psfhosted.org> New submission from gaborbernat : Consider the following code: from argparse import ArgumentParser parser = ArgumentParser() parser.add_argument("--clear-magic", action="store_true") print(parser.parse_args(["--clear"])) parser.add_argument("--clear", action="store_true") print(parser.parse_args(["--clear"])) This has the following output: Namespace(clear_magic=True) Namespace(clear=True, clear_magic=False) I find it surprising and confusing why the clear magic option is accepted when clear is not defined. I'm tempted to say it's a bug. This unstable behaviour is very surprising when iteratively building up the parser. Discovered with https://github.com/pypa/virtualenv/issues/1824#issuecomment-627919033 ---------- messages: 368776 nosy: gaborbernat priority: normal severity: normal status: open title: argparse _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 07:50:11 2020 From: report at bugs.python.org (gaborbernat) Date: Wed, 13 May 2020 11:50:11 +0000 Subject: [issue40615] unstable behaviour for options in argparse In-Reply-To: <1589370586.91.0.862968954668.issue40615@roundup.psfhosted.org> Message-ID: <1589370611.05.0.642694823005.issue40615@roundup.psfhosted.org> Change by gaborbernat : ---------- title: argparse -> unstable behaviour for options in argparse _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 08:18:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 May 2020 12:18:28 +0000 Subject: [issue40613] gcc 10 emits warning for unused function: _xxsubinterpretersmodule In-Reply-To: <1589351176.2.0.303752022619.issue40613@roundup.psfhosted.org> Message-ID: <1589372308.47.0.827141335529.issue40613@roundup.psfhosted.org> STINNER Victor added the comment: The two functions are only used in assertions. They should be surrounded by "#ifndef NDEBUG (...) #endif". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 08:19:25 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 13 May 2020 12:19:25 +0000 Subject: [issue40615] unstable behaviour for options in argparse In-Reply-To: <1589370586.91.0.862968954668.issue40615@roundup.psfhosted.org> Message-ID: <1589372365.77.0.574819552403.issue40615@roundup.psfhosted.org> Chris Jerdonek added the comment: Do you know about this section of the docs? https://docs.python.org/3/library/argparse.html#argument-abbreviations-prefix-matching ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 08:25:49 2020 From: report at bugs.python.org (gaborbernat) Date: Wed, 13 May 2020 12:25:49 +0000 Subject: [issue40615] unstable behaviour for options in argparse In-Reply-To: <1589370586.91.0.862968954668.issue40615@roundup.psfhosted.org> Message-ID: <1589372749.0.0.291509330353.issue40615@roundup.psfhosted.org> gaborbernat added the comment: I did not, nm then. Thanks for the link. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 08:28:09 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 13 May 2020 12:28:09 +0000 Subject: [issue40615] unstable behaviour for options in argparse In-Reply-To: <1589370586.91.0.862968954668.issue40615@roundup.psfhosted.org> Message-ID: <1589372889.95.0.2281820784.issue40615@roundup.psfhosted.org> Chris Jerdonek added the comment: One thing that's interesting is that you don't get the "ambiguous option" error if what's provided is an exact match (even if a prefix of both). For example, if you instead parsed "--clea", it would give the error: > error: ambiguous option: --clea could match --clear-magic, --clear ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 09:02:32 2020 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 13 May 2020 13:02:32 +0000 Subject: [issue40613] gcc 10 emits warning for unused function: _xxsubinterpretersmodule In-Reply-To: <1589351176.2.0.303752022619.issue40613@roundup.psfhosted.org> Message-ID: <1589374952.59.0.392578763482.issue40613@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +19376 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20069 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 09:14:25 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 13 May 2020 13:14:25 +0000 Subject: [issue40615] unstable behaviour for options in argparse In-Reply-To: <1589370586.91.0.862968954668.issue40615@roundup.psfhosted.org> Message-ID: <1589375665.9.0.282730624687.issue40615@roundup.psfhosted.org> Eric V. Smith added the comment: I wish the abbreviation behavior was opt-in instead of opt-out, but such is life. Closing as not a bug. ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 09:32:32 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 13 May 2020 13:32:32 +0000 Subject: [issue40331] Increase test coverage for the statistics module In-Reply-To: <1587313488.32.0.170257726917.issue40331@roundup.psfhosted.org> Message-ID: <1589376752.49.0.114740341619.issue40331@roundup.psfhosted.org> R?mi Lapeyre added the comment: >> Perhaps you missed it because you're not in the CODEOWNERS so don't >> automatically get notified by GitHub? > That's quite possible. I can't fix that as Github considers everything to do with my computer and browser too old. I don't think you need to use the Github interface to change this, you can update the .github/CODEOWNERS file and push the change in a new commit. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 09:38:35 2020 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 13 May 2020 13:38:35 +0000 Subject: [issue40613] gcc 10 emits warning for unused function: _xxsubinterpretersmodule In-Reply-To: <1589351176.2.0.303752022619.issue40613@roundup.psfhosted.org> Message-ID: <1589377115.02.0.60335734964.issue40613@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset fa0a66e62d087765dbc5c1b89d6149a23ecfb0a6 by Dong-hee Na in branch 'master': bpo-40613: Remove compiler warning from _xxsubinterpretersmodule (GH-20069) https://github.com/python/cpython/commit/fa0a66e62d087765dbc5c1b89d6149a23ecfb0a6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 09:39:53 2020 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 13 May 2020 13:39:53 +0000 Subject: [issue40613] gcc 10 emits warning for unused function: _xxsubinterpretersmodule In-Reply-To: <1589351176.2.0.303752022619.issue40613@roundup.psfhosted.org> Message-ID: <1589377193.79.0.0870961143242.issue40613@roundup.psfhosted.org> Dong-hee Na added the comment: The issue is now fixed. The PR was tested by me and Victor. Thanks for the suggestion and review Victor! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 11:30:23 2020 From: report at bugs.python.org (Christian KNITTL-FRANK) Date: Wed, 13 May 2020 15:30:23 +0000 Subject: [issue22598] Add mUTF-7 codec (UTF-7 modified for IMAP) In-Reply-To: <1412936657.2.0.48984767576.issue22598@psf.upfronthosting.co.za> Message-ID: <1589383822.99.0.976434591538.issue22598@roundup.psfhosted.org> Christian KNITTL-FRANK added the comment: I just stumbled over this too. Very eager to know if there are any news on the state of out-of-box support for the "mUTF-7" codec. ---------- nosy: +Christian KNITTL-FRANK _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 11:52:10 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Wed, 13 May 2020 15:52:10 +0000 Subject: [issue40551] PRs should be rebased on top of master before running the build/tests In-Reply-To: <1588882193.5.0.928762641921.issue40551@roundup.psfhosted.org> Message-ID: <1589385130.04.0.0796482091082.issue40551@roundup.psfhosted.org> Filipe La?ns added the comment: > Just like Travis, Github actions also automatically rebases pull requests onto the latest master. As you can see from a recent workflow run, it uses the special ref: "refs/remote/pull/20047/merge" https://github.com/python/cpython/pull/20047/checks?check_run_id=665377507#step:2:898 Thanks for letting me know. I did search through the documentation but I hadn't found anything regarding this. Well, I guess [1] hinted it but I did not pay enough attention :D > Unless there's real world examples of ongoing problems with PRs being merged with outdated test runs, I don't think this is worth complicating our CIs for. Although I understand your point, I think this is one of those cases where things can easily get out of hand. And when that happens, it could be very difficult to revert unless you catch it right away. There's too much noise for me to find examples, sorry. > As Inada-san mentioned, the occasional slip through will eventually be caught by the buildbots and promptly reverted. Re-triggering the CI for very stale pull requests might be worth doing. I'm kinda opposed to an automated system because this creates an undue burden on our CI providers, Travis graciously provides us with extra time for our coverage builds to finish already. Re-running pull requests that might never be merged is a lot of added work for them. Well, I was not really proposing that. I suggested to retrigger on approvals (and by this I mean approvals from core devs) or have a bot retriggering and merging automatically. > Maybe we can get one of the bots to tag old pull requests and then have some guidance in the core-dev guide to re-run the CIs manually when merging those PRs. Yes, this seems reasonable, and could be expanded in the future. I think we should document this and maybe add a bot command to allow devs to retrigger more easily (I was thinking they could just comment with /test). [1] https://github.com/actions/checkout#Checkout-pull-request-HEAD-commit-instead-of-merge-commit ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 12:17:57 2020 From: report at bugs.python.org (Ebraheem Akhter) Date: Wed, 13 May 2020 16:17:57 +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: <1589386677.1.0.803655432011.issue32545@roundup.psfhosted.org> Ebraheem Akhter added the comment: try this: https://www.zmdrivers.com/ ---------- nosy: +jugnugee2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 12:50:03 2020 From: report at bugs.python.org (Serge Matveenko) Date: Wed, 13 May 2020 16:50:03 +0000 Subject: [issue40616] Add `asyncio.BufferQueue` Message-ID: <1589388603.33.0.701691851283.issue40616@roundup.psfhosted.org> New submission from Serge Matveenko : It looks handy to be able to leverage `collections.deque` ability to be sized it `asyncio.Queue`. This could provide the ability to implement backpressure in the queue or just use it as a buffer in messaging systems. The implementation provided in the linked PR. ---------- components: asyncio messages: 368788 nosy: asvetlov, lig, yselivanov priority: normal pull_requests: 19377 severity: normal status: open title: Add `asyncio.BufferQueue` _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 13:10:22 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 13 May 2020 17:10:22 +0000 Subject: [issue40612] Make traceback module's formatting of SyntaxError more similar to system formatting In-Reply-To: <1589343535.08.0.511471445795.issue40612@roundup.psfhosted.org> Message-ID: <1589389822.16.0.483595720444.issue40612@roundup.psfhosted.org> Change by Guido van Rossum : ---------- keywords: +patch pull_requests: +19378 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20072 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 13:24:05 2020 From: report at bugs.python.org (hai shi) Date: Wed, 13 May 2020 17:24:05 +0000 Subject: [issue38787] PEP 573: Module State Access from C Extension Methods In-Reply-To: <1573655440.57.0.563143759574.issue38787@roundup.psfhosted.org> Message-ID: <1589390645.81.0.357346059747.issue38787@roundup.psfhosted.org> hai shi added the comment: > I guess I'll need to clarify the documentation here. > Call `PyType_GetModule` on the *defining class*, not on type(self). +1, I didn't notice this detail until I got the error. > The associated module is not inherited; each class in the MRO can be > defined in a different module. Thanks, pep have enough info, I need spend sometime to make sure I understand it clearly, Lol~. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 13:24:40 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 13 May 2020 17:24:40 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1589390680.23.0.223383664904.issue40257@roundup.psfhosted.org> ?ukasz Langa added the comment: Should this block 3.9.0b1, planned for Monday May 18th? ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 13:25:56 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 13 May 2020 17:25:56 +0000 Subject: [issue39651] Exceptions raised by EventLoop.call_soon_threadsafe In-Reply-To: <1581871318.96.0.350376923794.issue39651@roundup.psfhosted.org> Message-ID: <1589390756.52.0.77943457845.issue39651@roundup.psfhosted.org> ?ukasz Langa added the comment: This sadly missed 3.8.3 but I want this addressed for 3.8.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 13:50:55 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 13 May 2020 17:50:55 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1589392255.2.0.549688390845.issue40257@roundup.psfhosted.org> Guido van Rossum added the comment: I feel it should. At the very least, a decision should be made on how to move forward. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 14:30:27 2020 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 13 May 2020 18:30:27 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1589394627.31.0.0386119821277.issue40257@roundup.psfhosted.org> Change by Yury Selivanov : ---------- nosy: -yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 14:31:43 2020 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 13 May 2020 18:31:43 +0000 Subject: [issue40607] asyncio.wait_for should reraise future exception even if timeout expires In-Reply-To: <1589283187.27.0.827786043193.issue40607@roundup.psfhosted.org> Message-ID: <1589394703.04.0.126217005636.issue40607@roundup.psfhosted.org> Yury Selivanov added the comment: > I think that in case inner task cancelation fails with some error, asyncio.wait_for should reraise it instead of silently losing it. +1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 14:52:51 2020 From: report at bugs.python.org (Ilja Umov) Date: Wed, 13 May 2020 18:52:51 +0000 Subject: [issue40617] sqlite3: expose sqlite3_create_window_function Message-ID: <1589395971.17.0.715578976108.issue40617@roundup.psfhosted.org> New submission from Ilja Umov : Expose sqlite3_create_window_function as sqlite3.create_window_function. There already exists sqlite3.create_aggregate, which uses sqlite3_create_function_v2 and is conceptually similar. Window functions are available in sqlite starting from 2018-09-15 (3.25.0) release. References: https://www.sqlite.org/c3ref/create_function.html https://www.sqlite.org/changes.html ---------- components: Library (Lib) messages: 368794 nosy: Ilja Umov priority: normal severity: normal status: open title: sqlite3: expose sqlite3_create_window_function type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 14:55:16 2020 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 13 May 2020 18:55:16 +0000 Subject: [issue34790] Deprecate passing coroutine objects to asyncio.wait() In-Reply-To: <1537807353.36.0.956365154283.issue34790@psf.upfronthosting.co.za> Message-ID: <1589396116.15.0.947909003816.issue34790@roundup.psfhosted.org> Yury Selivanov added the comment: New changeset de92769d473d1c0955d36da2fc71462621326f00 by jack1142 in branch 'master': bpo-34790: add version of removal of explicit passing of coros to `asyncio.wait`'s documentation (#20008) https://github.com/python/cpython/commit/de92769d473d1c0955d36da2fc71462621326f00 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 15:36:39 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 13 May 2020 19:36:39 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1589398599.85.0.352945250278.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset a15c9b3a0524e5ca0434d2ad11076677824af941 by Lysandros Nikolaou in branch 'master': bpo-40334: Always show the caret on SyntaxErrors (GH-20050) https://github.com/python/cpython/commit/a15c9b3a0524e5ca0434d2ad11076677824af941 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 15:46:31 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 13 May 2020 19:46:31 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1589399191.02.0.715833374032.issue40257@roundup.psfhosted.org> ?ukasz Langa added the comment: OK, that was my intuition, too. I will block beta on it then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 15:56:58 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 13 May 2020 19:56:58 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1589399818.91.0.098515877063.issue40257@roundup.psfhosted.org> Serhiy Storchaka added the comment: I can just copy the implementation of inspect.getdoc() and related functions in pydoc for use in help(), and restore the old code in the inspect module. Of course it will mean that third-party tools will continue to show incorrect docstrings in some cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 15:59:37 2020 From: report at bugs.python.org (Paul Ganssle) Date: Wed, 13 May 2020 19:59:37 +0000 Subject: [issue40536] Addition of a "list of available time zones" function to zoneinfo In-Reply-To: <1588785591.81.0.248136692657.issue40536@roundup.psfhosted.org> Message-ID: <1589399977.43.0.347460930664.issue40536@roundup.psfhosted.org> Paul Ganssle added the comment: >From some discussion on the reference implementation PR, it seems that this may be a more complicated feature than I had bargained for: https://github.com/pganssle/zoneinfo/pull/60 The issue is that the current implementation picks up the posix/ and right/ directories as well as the posixrules file, none of which is *wrong* ? they are available time zones, after all ? but they're not really canonical zones. In `tzdata` we have a list of zones sourced from tzdata's `make zonenames`, which does not include the posix/ and right/ directories. There is `zone1970.tab` and `zone.tab`, but that has *too* strict of a subset ? it only includes canonical zones associated with a specific country, as far as I can tell, and not things like UTC. It also includes, for example, America/Nuuk but not America/Godthab (which was the canonical name up until 2020a). I'm considering postponing this feature to Python 3.10 so that we can have more time to figure out a decent API for this. ?ukasz: Question for you as release manager ? would you prefer that we put this in for 3.9 with the understanding that before the final release we may end up needing to remove it as a nuisance or change what it returns (and possibly flags that would be passed to it), or would that be too disruptive in the beta period? I'm confident that we can make a final decision before October, just not confident that we can make a final decision before Monday. ---------- assignee: -> p-ganssle nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 16:05:35 2020 From: report at bugs.python.org (Paul Ganssle) Date: Wed, 13 May 2020 20:05:35 +0000 Subject: [issue40503] PEP 615: Add zoneinfo module In-Reply-To: <1588618281.16.0.913416553136.issue40503@roundup.psfhosted.org> Message-ID: <1589400335.91.0.546464491383.issue40503@roundup.psfhosted.org> Paul Ganssle added the comment: Talked to Steve Dower in a sidebar about the issue with compile-time configuration, he is convinced that compile-time configuration is not something that would be useful or worth doing on Windows. I am indifferent on the matter, so I am fine with calling the compile-time configuration part of this done at this point. If anyone building Python for Windows shows up needing support for this, we can re-visit the issue ? I don't believe it's technically infeasible, just that the usage patterns of Python on Windows mean that it's not worth doing. So, once we've got a critical mass of reviews done for zoneinfo, I think this feature is done. ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 16:16:00 2020 From: report at bugs.python.org (Daniel Jewell) Date: Wed, 13 May 2020 20:16:00 +0000 Subject: [issue26175] Fully implement IOBase abstract on SpooledTemporaryFile In-Reply-To: <1453413274.25.0.536987988375.issue26175@psf.upfronthosting.co.za> Message-ID: <1589400960.78.0.549264248926.issue26175@roundup.psfhosted.org> Daniel Jewell added the comment: To add something additional here: The current documentation for tempfile.SpooledTemporaryFile indicates "This function operates exactly as?TemporaryFile()?does, except that data is spooled in memory until the file size exceeds?max_size[...]" (see https://docs.python.org/3/library/tempfile.html) Except that SpooledTemporaryFile *doesn't* act _exactly_ like TemporaryFile() - as documented here. TemporaryFile() returns an "_io.BufferedRandom" which implements all of the expected "file-like" goodies - like [.readable, .seekable, ...etc]. SpooledTemporaryFile does not. In comparing to the 2.x docs, the text for SpooledTemporaryFile() appears to be identical or nearly identical to the 3.8.x current docs. This goes in line with what has already been discussed here. At a _very minimum_ the documentation should be updated to reflect the current differences between TemporaryFile() and SpooledTemporaryFile(). Perhaps an easier change would be to extend TemporaryFile() to have a parameter that enables functionality similar to SpooledTemporaryFile? Namely, *memory-only* storage up to a max_size? Or perhaps there is an alternate solution that already exists? Ultimately, the functionality that appears to be missing is to be able to easily create a file-like object backed primarily by memory for reading/writing data ... (i.e. one 100% compatible with 'the usual' file objects returned by open()...) ---------- nosy: +danieljewell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 16:20:47 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 13 May 2020 20:20:47 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1589401247.4.0.590218868448.issue40257@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +19379 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/20073 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 17:50:29 2020 From: report at bugs.python.org (Lewis Ball) Date: Wed, 13 May 2020 21:50:29 +0000 Subject: [issue40474] Code coverage report not entirely accurate In-Reply-To: <1588381882.86.0.0551558198731.issue40474@roundup.psfhosted.org> Message-ID: <1589406629.41.0.771133582925.issue40474@roundup.psfhosted.org> Lewis Ball added the comment: I don't have triage permissions so I don't think I can request a review. Although @aeros has requested one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 18:03:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 May 2020 22:03:44 +0000 Subject: [issue38787] PEP 573: Module State Access from C Extension Methods In-Reply-To: <1573655440.57.0.563143759574.issue38787@roundup.psfhosted.org> Message-ID: <1589407424.08.0.141299526919.issue38787@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19380 pull_request: https://github.com/python/cpython/pull/20074 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 18:07:06 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 May 2020 22:07:06 +0000 Subject: [issue40549] Convert posixmodule.c to multiphase initialization (PEP 489) In-Reply-To: <1588874748.21.0.997527577662.issue40549@roundup.psfhosted.org> Message-ID: <1589407626.19.0.973090888702.issue40549@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19381 pull_request: https://github.com/python/cpython/pull/20075 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 18:23:32 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 13 May 2020 22:23:32 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1589408612.45.0.0783877968897.issue40334@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +19382 pull_request: https://github.com/python/cpython/pull/20076 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 18:28:14 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 13 May 2020 22:28:14 +0000 Subject: [issue35967] Better platform.processor support In-Reply-To: <1549895363.53.0.252912531241.issue35967@roundup.psfhosted.org> Message-ID: <1589408894.21.0.479736272871.issue35967@roundup.psfhosted.org> Jason R. Coombs added the comment: My bad. I probably could have been more proactive about providing a reproducer. The problem, as described above (msg335220) and in the associated cmdix ticket, is that invocation of `platform.(anything)` causes shelling out to execute "uname", so it's not possible to implement uname on Python unless one can guarantee that `platform.(anything)` is not invoked prior to the Python uname implementation executing. Here's a Dockerfile replicating the issue: ``` FROM ubuntu:focal # Install Python RUN apt update RUN apt install -y python3 RUN ln -s /usr/bin/python3 /usr/bin/python # Simulate something on the system that invokes platform early. RUN printf 'print(__import__("platform").system())' > sitecustomize.py ENV PYTHONPATH=/ # Create a stubbed 'uname' command build in Python ENV PATH=/:$PATH RUN printf '#!/usr/bin/env python\nprint("getting ready to patch platform", flush=True)' > uname RUN chmod u+x uname CMD uname ``` As you can see, this reproducer creates a _very_ simple 'uname' implementation. All it does is print that it's about to patch the platform module (because maybe that will make things work). Unfortunately, that behavior is never reached because before that code has a chance to run, `sitecustomize` is imported and calls `platform.system()`, which invokes `platform.uname()` which attempts to resolve the processor, which attempts to invoke `uname -p` (even on Windows), which invokes the stubbed uname command, and infinite recursion begins. The `sitecustomize` might seem a little contrived, except that a very similar behavior occurs in a very typical environment: - pip, when installing a package for editing, invokes setuptools to `develop` the package. - setuptools, when installing a package for developing, creates command-line entry points using a routine that imports `pkg_resources` to ensure that the relevant packages are present before invoking the command's functionality. - pkg_resources imports packaging to evaluate markers. - packaging uses `platform.system()` and other behaviors to evaluate the markers. So ultimately, the same behavior is triggered before the user's code is ever executed. But more importantly, why should "uname -p" be invoked in a subprocess on Windows to get "platform.system()"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 18:30:50 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 May 2020 22:30:50 +0000 Subject: [issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h In-Reply-To: <1589241684.81.0.926948421821.issue40602@roundup.psfhosted.org> Message-ID: <1589409050.81.0.16315593536.issue40602@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19383 pull_request: https://github.com/python/cpython/pull/20077 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 18:31:38 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 May 2020 22:31:38 +0000 Subject: [issue38787] PEP 573: Module State Access from C Extension Methods In-Reply-To: <1573655440.57.0.563143759574.issue38787@roundup.psfhosted.org> Message-ID: <1589409098.31.0.785216022932.issue38787@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 97e1568325e4d8eff2fc80eeb174b3f3e5d1c350 by Victor Stinner in branch 'master': bpo-38787: Fix Argument Clinic defining_class_converter (GH-20074) https://github.com/python/cpython/commit/97e1568325e4d8eff2fc80eeb174b3f3e5d1c350 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 18:36:41 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 May 2020 22:36:41 +0000 Subject: [issue39465] Design a subinterpreter friendly alternative to _Py_IDENTIFIER In-Reply-To: <1580135310.72.0.978238650594.issue39465@roundup.psfhosted.org> Message-ID: <1589409401.66.0.595296242122.issue39465@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19384 pull_request: https://github.com/python/cpython/pull/20078 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 19:09:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 May 2020 23:09:46 +0000 Subject: [issue40521] Make tuple, dict, frame free lists, unicode interned strings, unicode latin1 singletons per-interpreter In-Reply-To: <1588693682.5.0.219755904926.issue40521@roundup.psfhosted.org> Message-ID: <1589411386.33.0.873252058604.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19385 pull_request: https://github.com/python/cpython/pull/20081 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 19:11:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 May 2020 23:11:58 +0000 Subject: [issue39465] Design a subinterpreter friendly alternative to _Py_IDENTIFIER In-Reply-To: <1580135310.72.0.978238650594.issue39465@roundup.psfhosted.org> Message-ID: <1589411518.19.0.436708650467.issue39465@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d6fb53fe42d83a10f1372dd92ffaa6a01d2feffb by Victor Stinner in branch 'master': bpo-39465: Remove _PyUnicode_ClearStaticStrings() from C API (GH-20078) https://github.com/python/cpython/commit/d6fb53fe42d83a10f1372dd92ffaa6a01d2feffb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 19:13:37 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 May 2020 23:13:37 +0000 Subject: [issue40521] Make tuple, dict, frame free lists, unicode interned strings, unicode latin1 singletons per-interpreter In-Reply-To: <1588693682.5.0.219755904926.issue40521@roundup.psfhosted.org> Message-ID: <1589411617.16.0.0887529684029.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19386 pull_request: https://github.com/python/cpython/pull/20082 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 19:18:30 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 13 May 2020 23:18:30 +0000 Subject: [issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad In-Reply-To: <1487329309.81.0.182915384821.issue29587@psf.upfronthosting.co.za> Message-ID: <1589411910.99.0.843939215015.issue29587@roundup.psfhosted.org> Chris Jerdonek added the comment: New changeset 75cd8e48c62c97fdb9d9a94fd2335be06084471d by Chris Jerdonek in branch 'master': bpo-29587: Make gen.throw() chain exceptions with yield from (GH-19858) https://github.com/python/cpython/commit/75cd8e48c62c97fdb9d9a94fd2335be06084471d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 19:35:08 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 May 2020 23:35:08 +0000 Subject: [issue40521] Make tuple, dict, frame free lists, unicode interned strings, unicode latin1 singletons per-interpreter In-Reply-To: <1588693682.5.0.219755904926.issue40521@roundup.psfhosted.org> Message-ID: <1589412908.92.0.996406921948.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: I wrote a draft PR to make interned strings per-interpreter. It does crash because it requires to make method cache and _PyUnicode_FromId() (bpo-39465) compatible with subinterpreters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 19:48:41 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 May 2020 23:48:41 +0000 Subject: [issue40521] Make tuple, dict, frame free lists, unicode interned strings, unicode latin1 singletons per-interpreter In-Reply-To: <1588693682.5.0.219755904926.issue40521@roundup.psfhosted.org> Message-ID: <1589413721.86.0.624580554345.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 3d17c045b4c3d09b72bbd95ed78af1ae6f0d98d2 by Victor Stinner in branch 'master': bpo-40521: Add PyInterpreterState.unicode (GH-20081) https://github.com/python/cpython/commit/3d17c045b4c3d09b72bbd95ed78af1ae6f0d98d2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 20:15:04 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 14 May 2020 00:15:04 +0000 Subject: [issue40618] PEG Parser: Invalid targets for augassign and except succeed Message-ID: <1589415304.05.0.507277584586.issue40618@roundup.psfhosted.org> New submission from Lysandros Nikolaou : Tuples and lists, which are invalid augmented assignment targets, currently get successfully parsed, without failing. ? cpython git:(targets-fix) ? ./python -X oldparser Python 3.9.0a6+ (heads/master-dirty:75cd8e48c6, May 14 2020, 03:01:42) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> (a, b) += (1, 2) File "", line 1 SyntaxError: illegal expression for augmented assignment ? cpython git:(pr/20076) ./python Python 3.9.0a6+ (heads/pr/20076:bcf5be2772, May 14 2020, 02:15:37) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> (a, b) += 1 SystemError: invalid node type (26) for augmented assignment We also accept arbitrary targets in `except` clauses, while we should only be accepting NAME nodes: ? cpython git:(master) ./python Python 3.9.0a6+ (heads/master:75cd8e48c6, May 14 2020, 03:14:03) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> try: ... pass ... except Exception as a.b: ... pass ... [1] 135956 segmentation fault (core dumped) ./python ---------- assignee: lys.nikolaou components: Interpreter Core messages: 368809 nosy: gvanrossum, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: PEG Parser: Invalid targets for augassign and except succeed type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 20:22:39 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 14 May 2020 00:22:39 +0000 Subject: [issue40618] PEG Parser: Invalid targets for augassign and except succeed In-Reply-To: <1589415304.05.0.507277584586.issue40618@roundup.psfhosted.org> Message-ID: <1589415759.03.0.962108869675.issue40618@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- keywords: +patch pull_requests: +19387 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20083 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 20:53:40 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 14 May 2020 00:53:40 +0000 Subject: [issue40597] generated email message exceeds RFC-mandated limit of 998 characters In-Reply-To: <1589223619.93.0.38032538849.issue40597@roundup.psfhosted.org> Message-ID: <1589417620.49.0.68652341257.issue40597@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +19388 pull_request: https://github.com/python/cpython/pull/20084 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 20:53:34 2020 From: report at bugs.python.org (R. David Murray) Date: Thu, 14 May 2020 00:53:34 +0000 Subject: [issue40597] generated email message exceeds RFC-mandated limit of 998 characters In-Reply-To: <1589223619.93.0.38032538849.issue40597@roundup.psfhosted.org> Message-ID: <1589417614.92.0.330950656871.issue40597@roundup.psfhosted.org> R. David Murray added the comment: New changeset 6f2f475d5a2cd7675dce844f3af436ba919ef92b by Arkadiusz Hiler in branch 'master': bpo-40597: email: Use CTE if lines are longer than max_line_length consistently (gh-20038) https://github.com/python/cpython/commit/6f2f475d5a2cd7675dce844f3af436ba919ef92b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 20:56:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 00:56:17 +0000 Subject: [issue40521] Make tuple, dict, frame free lists, unicode interned strings, unicode latin1 singletons per-interpreter In-Reply-To: <1588693682.5.0.219755904926.issue40521@roundup.psfhosted.org> Message-ID: <1589417777.7.0.775470688944.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19389 pull_request: https://github.com/python/cpython/pull/20085 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 20:57:34 2020 From: report at bugs.python.org (R. David Murray) Date: Thu, 14 May 2020 00:57:34 +0000 Subject: [issue40597] generated email message exceeds RFC-mandated limit of 998 characters In-Reply-To: <1589223619.93.0.38032538849.issue40597@roundup.psfhosted.org> Message-ID: <1589417854.24.0.290048273058.issue40597@roundup.psfhosted.org> R. David Murray added the comment: Thanks, Arkadiusz. ---------- resolution: -> fixed stage: patch review -> backport needed versions: -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 21:12:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 01:12:44 +0000 Subject: [issue40609] _tracemalloc: remove pointer_t type In-Reply-To: <1589323635.37.0.444781514034.issue40609@roundup.psfhosted.org> Message-ID: <1589418764.74.0.419119351218.issue40609@roundup.psfhosted.org> STINNER Victor added the comment: I modified _Py_hashtable_t to remove key_size and data_size: keys are now always "void *" and values are now always "void *". See also bpo-40602: Move Modules/hashtable.h to Include/internal/pycore_hashtable.h. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 21:19:36 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 01:19:36 +0000 Subject: [issue40429] [C API] PyThreadState_GetFrame() and PyFrame_GetCode() should return a strong refrence In-Reply-To: <1588110917.55.0.0908942535567.issue40429@roundup.psfhosted.org> Message-ID: <1589419176.79.0.653132936658.issue40429@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 21:21:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 01:21:29 +0000 Subject: [issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type In-Reply-To: <1586276621.78.0.843757244355.issue40217@roundup.psfhosted.org> Message-ID: <1589419289.66.0.47047140452.issue40217@roundup.psfhosted.org> STINNER Victor added the comment: The issue has been fixed in the master branch, thanks Pablo! I close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 21:22:37 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 01:22:37 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1589419357.82.0.0340343524754.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 7443d42021d433da0497f8ba651daa47e7dc1991 by Hai Shi in branch 'master': bpo-40275: Import locale module lazily in gettext (GH-19905) https://github.com/python/cpython/commit/7443d42021d433da0497f8ba651daa47e7dc1991 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 23:57:30 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 14 May 2020 03:57:30 +0000 Subject: [issue40619] compile() passes rest of file as SyntaxError().text when file unreadable Message-ID: <1589428650.19.0.472919567451.issue40619@roundup.psfhosted.org> New submission from Guido van Rossum : Example: >>> compile("pass\n(1+)\npass", "", "exec") Traceback (most recent call last): File "", line 1, in File "", line 2 (1+) pass ^ SyntaxError: invalid syntax >>> Note that the input is pass (1+) pass The second "pass" (and in fact the entire file) leaks into the SyntaxError object's text attribute. This only happens when the file (here "") cannot be read. It's not specific to compile(), it seems fundamental in the C-level pegen API. ---------- keywords: 3.4regression messages: 368815 nosy: gvanrossum priority: normal severity: normal stage: needs patch status: open title: compile() passes rest of file as SyntaxError().text when file unreadable type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 13 23:57:45 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 14 May 2020 03:57:45 +0000 Subject: [issue40619] compile() passes rest of file as SyntaxError().text when file unreadable In-Reply-To: <1589428650.19.0.472919567451.issue40619@roundup.psfhosted.org> Message-ID: <1589428665.51.0.312743952962.issue40619@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: +lys.nikolaou, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 00:37:26 2020 From: report at bugs.python.org (hai shi) Date: Thu, 14 May 2020 04:37:26 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1589431046.44.0.0128690289835.issue40275@roundup.psfhosted.org> hai shi added the comment: Hi, folks. If there have no other imports should be improved, I suggest to close this bpo ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 01:49:36 2020 From: report at bugs.python.org (Chas Belov) Date: Thu, 14 May 2020 05:49:36 +0000 Subject: [issue3490] Example Code Error in Tutorial Documentation Section 4.4 In-Reply-To: <1217645659.61.0.258873000656.issue3490@psf.upfronthosting.co.za> Message-ID: <1589435376.16.0.0936722119639.issue3490@roundup.psfhosted.org> Change by Chas Belov : ---------- title: Example Code Error in Tutorial Documentation -> Example Code Error in Tutorial Documentation Section 4.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 01:51:20 2020 From: report at bugs.python.org (Chas Belov) Date: Thu, 14 May 2020 05:51:20 +0000 Subject: [issue11425] Cleanup sample code spacing and block arrangement in tutorial. In-Reply-To: <1299476693.61.0.829631562481.issue11425@psf.upfronthosting.co.za> Message-ID: <1589435480.22.0.937749031914.issue11425@roundup.psfhosted.org> Change by Chas Belov : ---------- title: Cleanup sample codes in tutorial. -> Cleanup sample code spacing and block arrangement in tutorial. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 01:52:44 2020 From: report at bugs.python.org (Chas Belov) Date: Thu, 14 May 2020 05:52:44 +0000 Subject: [issue1076955] Tutorial corrections (various issues spaced throughout the document) Message-ID: <1589435564.99.0.81409750487.issue1076955@roundup.psfhosted.org> Change by Chas Belov : ---------- title: Tutorial corrections -> Tutorial corrections (various issues spaced throughout the document) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 02:12:52 2020 From: report at bugs.python.org (Chas Belov) Date: Thu, 14 May 2020 06:12:52 +0000 Subject: [issue40620] Range tutorial shorthand could be made clearer Message-ID: <1589436772.42.0.96031331267.issue40620@roundup.psfhosted.org> New submission from Chas Belov : I found https://docs.python.org/3.7/tutorial/controlflow.html#the-range-function section 4.3 confusing. The range() Function shows the following example: >>> for i in range(5): ... print(i) ... 0 1 2 3 4 [some instructional text] range(5, 10) 5, 6, 7, 8, 9 range(0, 10, 3) 0, 3, 6, 9 range(-10, -100, -30) -10, -40, -70 This appears to be an instruction to type, for example: range(5, 10) at the prompt, and that the response will be: 5, 6, 7, 8, 9 leading to a perceived bug when I type at the prompt: >>> range(5, 10) and receive the response range(5, 10) I ultimately figured out that the example is a shorthand to substitute range(5, 10) for the original range(5) >>> for i in range(5, 10): ... print(i) ... 5 6 7 8 9 It would be less confusing if the example instead read: ---------------------------- Substituting "range(5, 10)" for "range(5)" results in (one number per line) 5, 6, 7, 8, 9 Substituting "range(0, 10, 3)" results in 0, 3, 6, 9 and substituting "range(-10, -100, -30)" results in -10, -40, -70 --------------------------- such that it is clear that the statements are not meant to be taken as literal stand-alone entries to be typed at the prompt but are instead substitutions. ---------- messages: 368817 nosy: docorbit at sonic.net priority: normal severity: normal status: open title: Range tutorial shorthand could be made clearer versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 03:40:23 2020 From: report at bugs.python.org (Shantanu) Date: Thu, 14 May 2020 07:40:23 +0000 Subject: [issue40621] Python crashes with new parser on invalid exception handlers Message-ID: <1589442023.75.0.251315852279.issue40621@roundup.psfhosted.org> New submission from Shantanu : ``` ~/dev/cpython master ? ./python.exe --version --version Python 3.9.0a6+ (heads/master:a15c9b3a05, May 14 2020, 00:31:47) [Clang 11.0.0 (clang-1100.0.33.17)] # should raise a syntax error, instead crashes ~/dev/cpython master ? cat test.py try: 1 / 0 except Exception as a.b: pass ~/dev/cpython master ? ./python.exe test.py [1] 63986 bus error ./python.exe test.py ~/dev/cpython master ? ./python.exe -Xoldparser test.py File "/Users/shantanu/dev/cpython/test.py", line 3 except Exception as a.b: ^ SyntaxError: invalid syntax # should raise a syntax error, instead passes ~/dev/cpython master ? cat test2.py try: 1 / 0 except Exception as (a): pass ~/dev/cpython master ? ./python.exe test2.py ~/dev/cpython master ? ./python.exe -Xoldparser test2.py File "/Users/shantanu/dev/cpython/test2.py", line 3 except Exception as (a): ^ SyntaxError: invalid syntax # should raise a syntax error, instead crashes ~/dev/cpython master ? cat test3.py try: 1 / 0 except Exception as a[0]: pass ~/dev/cpython master ? ./python.exe test3.py [1] 64206 bus error ./python.exe test3.py ~/dev/cpython master ? ./python.exe -Xoldparser test3.py File "/Users/shantanu/dev/cpython/test3.py", line 3 except Exception as a[0]: ^ SyntaxError: invalid syntax ``` The old grammar expects a NAME here, but the new grammar attempts to use a target (https://docs.python.org/3/reference/grammar.html). Seems like we should just go back to using NAME. ---------- messages: 368818 nosy: hauntsaninja priority: normal severity: normal status: open title: Python crashes with new parser on invalid exception handlers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 03:41:28 2020 From: report at bugs.python.org (Shantanu) Date: Thu, 14 May 2020 07:41:28 +0000 Subject: [issue40621] Python crashes with new parser on invalid exception handlers In-Reply-To: <1589442023.75.0.251315852279.issue40621@roundup.psfhosted.org> Message-ID: <1589442088.67.0.134133446603.issue40621@roundup.psfhosted.org> Change by Shantanu : ---------- keywords: +patch pull_requests: +19390 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20086 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 05:59:14 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 14 May 2020 09:59:14 +0000 Subject: [issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts In-Reply-To: <1588435279.1.0.0339863635356.issue40477@roundup.psfhosted.org> Message-ID: <1589450354.81.0.304175000695.issue40477@roundup.psfhosted.org> Ned Deily added the comment: An update on this: it turns out there are two different problems with the launcher app as a result of security changes introduced in macOS 10.15 Catalina. The first is that the launcher did not execute files launched with it (for example, by double-clicking on the source file or by dragging the file to the launcher icon). The launcher launches but no Terminal window opens. That problem has been fixed in the just released python.org macOS installer for 3.8.3 and will be fixed in the next releases of 3.7.x and 3.9.x (pre-release). The second problem is that the launcher app is not able to launch Terminal.app to run the script if Terminal.app was not already running. Unfortunately, I was not able to provide a fix for that problem in time for 3.8.3. However, there is a relatively easy workaround until that fix is available. Before using the launcher app, just ensure that Terminal.app is already launched; the launcher will then be able to run any number of scripts in new terminal windows as expected. One easy standard way to launch Terminal.app is to invoke Spotlight by clicking on the "magnifying glass" icon near the upper right end of the macOS menu bar and then typing the letters "terminal" followed by the Return key in the resulting search window. When a script is done running, just close the terminal window but don't quit Terminal.app if you want to keep using the launcher. ---------- priority: normal -> high stage: -> needs patch title: Launcher on Catalina -> Python Launcher app on macOS 10.15 Catalina fails to run scripts versions: +Python 3.7, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 06:12:25 2020 From: report at bugs.python.org (paul rubin) Date: Thu, 14 May 2020 10:12:25 +0000 Subject: [issue40028] Math module method to find prime factors for non-negative int n In-Reply-To: <1584733974.83.0.0417466712916.issue40028@roundup.psfhosted.org> Message-ID: <1589451145.52.0.243176650589.issue40028@roundup.psfhosted.org> paul rubin added the comment: I'm the one always asking for more stuff in the stdlib, but above some simplistic approaches this seems out of scope. Doing it usefully above say 2**32 requires fancy algorithms. Better to use some external package that implements that stuff. ---------- nosy: +phr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 06:15:56 2020 From: report at bugs.python.org (paul rubin) Date: Thu, 14 May 2020 10:15:56 +0000 Subject: [issue36027] Support negative exponents in pow() where a modulus is specified. In-Reply-To: <1550520659.43.0.126744170658.issue36027@roundup.psfhosted.org> Message-ID: <1589451356.56.0.193672939954.issue36027@roundup.psfhosted.org> paul rubin added the comment: https://bugs.python.org/issue457066 The old is new again ;-). ---------- nosy: +phr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 06:24:57 2020 From: report at bugs.python.org (Lin Gao) Date: Thu, 14 May 2020 10:24:57 +0000 Subject: [issue40622] Using VS2019 to automatically build Python3 and Runtest and it failed to Runtest Message-ID: <1589451897.46.0.783197129325.issue40622@roundup.psfhosted.org> New submission from Lin Gao : Here is repro steps: 1. git clone -b "3.6" -c core.autocrlf=true https://github.com/python/cpython.git F:\gitP\python\cpython 2. Open a VS 2019 16.4.5 x86 command prompt and browse to F:\gitP\python\cpython 3. checkout the revision to f3a5b7a. 4. Add #include to the _iomodule.c. 5. cd F:\gitP\python\cpython\PCBuild 6. devenv /upgrade pcbuild.sln 7. build -e -r --no-tkinter -v "/p:PlatformToolset=v142" "/p:WindowsTargetPlatformVersion=10.0.18362.0" 8.cd F:\gitP\python\cpython\PCBuild 9.rt -q -x test_math test_cmath test_distutils test_codecencodings_iso2022 test_random test_sax test_enum test_re test_subprocess test_socket Error: 4 tests failed: test_binhex test_importlib test_peg_generator test_tools Please see the attachment for details ---------- components: Tests files: test.log.2.out messages: 368822 nosy: Lin priority: normal severity: normal status: open title: Using VS2019 to automatically build Python3 and Runtest and it failed to Runtest type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file49152/test.log.2.out _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 06:35:58 2020 From: report at bugs.python.org (paul rubin) Date: Thu, 14 May 2020 10:35:58 +0000 Subject: [issue40623] JSON streaming Message-ID: <1589452558.91.0.037983714251.issue40623@roundup.psfhosted.org> New submission from paul rubin : This is a well-explored issue in other contexts: https://en.wikipedia.org/wiki/JSON_streaming There is also a patch for it in json.tool, for release in 3.9: https://bugs.python.org/issue31553 Basically it's often convenient to have a file containing a list of json docs, one per line. However, there is no convenient way to read them back in one by one, since json.load(filehandle) barfs when it sees the unexpected newline at the end of the first doc. It would be great if the json module itself had a function to handle this. I have an awful hack that I use myself, that is not suitable for a production library, but I'll attach it to show what functionality I'm suggesting. I hope this is simple enough to not need a PEP. Thanks! ---------- components: Library (Lib) files: jsonstream.py messages: 368823 nosy: phr priority: normal severity: normal status: open title: JSON streaming type: enhancement Added file: https://bugs.python.org/file49153/jsonstream.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 06:44:42 2020 From: report at bugs.python.org (paul rubin) Date: Thu, 14 May 2020 10:44:42 +0000 Subject: [issue40623] JSON streaming In-Reply-To: <1589452558.91.0.037983714251.issue40623@roundup.psfhosted.org> Message-ID: <1589453082.77.0.0611465834055.issue40623@roundup.psfhosted.org> Change by paul rubin : Added file: https://bugs.python.org/file49154/jsonstream.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 06:49:42 2020 From: report at bugs.python.org (paul rubin) Date: Thu, 14 May 2020 10:49:42 +0000 Subject: [issue40623] JSON streaming In-Reply-To: <1589452558.91.0.037983714251.issue40623@roundup.psfhosted.org> Message-ID: <1589453382.27.0.376526429646.issue40623@roundup.psfhosted.org> paul rubin added the comment: Note: the function in my attached file wants no separation at all between the json docs (rather than a newline between them), but that was ok for the application I wrote it for some time back. I forgot about that when first writing this rfe so thought I better clarify. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 07:08:14 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 14 May 2020 11:08:14 +0000 Subject: [issue40621] Python crashes with new parser on invalid exception handlers In-Reply-To: <1589442023.75.0.251315852279.issue40621@roundup.psfhosted.org> Message-ID: <1589454494.97.0.0630583082817.issue40621@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thanks for the issue and the PR @hauntsaninja. Unfortunately, I think this is already covered by #20083 and https://bugs.python.org/issue40618 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 07:09:31 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 May 2020 11:09:31 +0000 Subject: [issue40623] JSON streaming In-Reply-To: <1589452558.91.0.037983714251.issue40623@roundup.psfhosted.org> Message-ID: <1589454571.77.0.222619618468.issue40623@roundup.psfhosted.org> Serhiy Storchaka added the comment: If you want to read json objects encoded one per line (JSON Lines or NDJSON), you can do this with just two lines of code: for line in file: yield json.loads(line) This format is not formally standardized, but it is popular because its support in any programming language is trivial. If you want to use more complex format, I afraid it is not popular enough to be supported in the stdlib. You can try to search third-party library which supports your flavour of multi-object JSON format or write your own code if this format is specific for your application. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 07:17:58 2020 From: report at bugs.python.org (paul rubin) Date: Thu, 14 May 2020 11:17:58 +0000 Subject: [issue40623] JSON streaming In-Reply-To: <1589452558.91.0.037983714251.issue40623@roundup.psfhosted.org> Message-ID: <1589455078.68.0.516083802375.issue40623@roundup.psfhosted.org> paul rubin added the comment: It's coming back to me, I think I used the no-separator format because I made the multi-document input files by using json.dump after opening the file in append mode. That seems pretty natural. I figured the wikipedia article and the json.tool patch just released were evidence that there is interest in this. The approach of writing newlines between the docs and iterating through lines is probably workable though. I don't know why I didn't do that before. I might not have been sure that json docs never contain newlines. Really it would be nice if json.load could read in anything that json.dump could write out (including with the indent parameter), but that's potentially more complicated and might conflict with the json spec. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 07:21:22 2020 From: report at bugs.python.org (paul rubin) Date: Thu, 14 May 2020 11:21:22 +0000 Subject: [issue40623] JSON streaming In-Reply-To: <1589452558.91.0.037983714251.issue40623@roundup.psfhosted.org> Message-ID: <1589455282.8.0.343352159707.issue40623@roundup.psfhosted.org> paul rubin added the comment: Also I didn't know about ndjson (I just looked at it, ndjson.org) but its existence and formalization is even more evidence that this is useful. I'll check what the two different python modules linked from that site do that's different from your example of iterating through the file by lines. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 07:25:02 2020 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 14 May 2020 11:25:02 +0000 Subject: [issue40521] Make tuple, dict, frame free lists, unicode interned strings, unicode latin1 singletons per-interpreter In-Reply-To: <1588693682.5.0.219755904926.issue40521@roundup.psfhosted.org> Message-ID: <1589455502.25.0.0297728038366.issue40521@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 07:25:02 2020 From: report at bugs.python.org (Antony Lee) Date: Thu, 14 May 2020 11:25:02 +0000 Subject: [issue40624] add support for != (not-equals) in ElementTree XPath Message-ID: <1589455502.16.0.216786525166.issue40624@roundup.psfhosted.org> New submission from Antony Lee : It would be a small usability improvement if ElementTree's XPath support also supported the != (not-equals) operator. I am specifically mentioning only != and not >/ _______________________________________ From report at bugs.python.org Thu May 14 07:46:04 2020 From: report at bugs.python.org (Antony Lee) Date: Thu, 14 May 2020 11:46:04 +0000 Subject: [issue40625] Autogenerate signature for METH_NOARGS and perhaps METH_O extension functions Message-ID: <1589456764.49.0.198184837014.issue40625@roundup.psfhosted.org> New submission from Antony Lee : It would be nice if METH_NOARGS extension methods had an autogenerated signature (or rather, autogenerated __text_signature__ that gets picked up by inspect.signature). After all, the signature is trivially known at compile time. The same *could* possibly be done for METH_O methods, for which the effective signature is known too. The *name* of the sole parameter is not known, but given that the parameter is (I believe?) positional only, that name "shouldn't" really matter (in the sense, e.g., that whether `signature.bind()` succeeds or not doesn't depend on the parameter name). ---------- components: C API messages: 368830 nosy: Antony.Lee priority: normal severity: normal status: open title: Autogenerate signature for METH_NOARGS and perhaps METH_O extension functions versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 07:47:45 2020 From: report at bugs.python.org (Antony Lee) Date: Thu, 14 May 2020 11:47:45 +0000 Subject: [issue38045] enum.Flag instance creation is slow In-Reply-To: <1567772280.73.0.782923595007.issue38045@roundup.psfhosted.org> Message-ID: <1589456865.33.0.544566295703.issue38045@roundup.psfhosted.org> Antony Lee added the comment: Now fixed, I believe. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 07:51:51 2020 From: report at bugs.python.org (Serge Matveenko) Date: Thu, 14 May 2020 11:51:51 +0000 Subject: [issue38701] datetime.timedelta string representation is ambiguous In-Reply-To: <1572968919.3.0.316665305196.issue38701@roundup.psfhosted.org> Message-ID: <1589457111.2.0.43050600256.issue38701@roundup.psfhosted.org> Serge Matveenko added the comment: I would be happy to submit a PR if there would be an agreement on the format. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 08:00:16 2020 From: report at bugs.python.org (Serge Matveenko) Date: Thu, 14 May 2020 12:00:16 +0000 Subject: [issue33953] The DEFAULT_ENTROPY variable used to store the current default random bytes value should be documented for `secrets` module In-Reply-To: <1529913551.53.0.56676864532.issue33953@psf.upfronthosting.co.za> Message-ID: <1589457616.19.0.603956995678.issue33953@roundup.psfhosted.org> Change by Serge Matveenko : ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 08:00:54 2020 From: report at bugs.python.org (Serge Matveenko) Date: Thu, 14 May 2020 12:00:54 +0000 Subject: [issue33953] The DEFAULT_ENTROPY variable used to store the current default random bytes value should be documented for `secrets` module In-Reply-To: <1529913551.53.0.56676864532.issue33953@psf.upfronthosting.co.za> Message-ID: <1589457654.45.0.0918050729782.issue33953@roundup.psfhosted.org> Change by Serge Matveenko : ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 08:51:26 2020 From: report at bugs.python.org (Glenn Travis) Date: Thu, 14 May 2020 12:51:26 +0000 Subject: [issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts In-Reply-To: <1588435279.1.0.0339863635356.issue40477@roundup.psfhosted.org> Message-ID: <1589460686.59.0.555040044508.issue40477@roundup.psfhosted.org> Glenn Travis added the comment: I appreciate the update. As an aside, I keep the terminal in the dock. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 08:56:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 12:56:45 +0000 Subject: [issue39562] Asynchronous comprehensions don't work in asyncio REPL In-Reply-To: <1580923705.71.0.29233909242.issue39562@roundup.psfhosted.org> Message-ID: <1589461005.95.0.699896063285.issue39562@roundup.psfhosted.org> STINNER Victor added the comment: I tested manually the just released Python 3.8.3 with msg365311: I confirm that it's fixed. Thanks! ---------- priority: release blocker -> resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 08:46:41 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 12:46:41 +0000 Subject: [issue38804] Regular Expression Denial of Service in http.cookiejar In-Reply-To: <1573774680.03.0.864081161145.issue38804@roundup.psfhosted.org> Message-ID: <1589460401.71.0.856646924103.issue38804@roundup.psfhosted.org> STINNER Victor added the comment: The fix landed in all maintained versions, thanks. I close the issue. ---------- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 09:02:20 2020 From: report at bugs.python.org (Glenn Travis) Date: Thu, 14 May 2020 13:02:20 +0000 Subject: [issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts In-Reply-To: <1588435279.1.0.0339863635356.issue40477@roundup.psfhosted.org> Message-ID: <1589461340.0.0.979730098428.issue40477@roundup.psfhosted.org> Glenn Travis added the comment: Well heck. I just tried it, and got an error. The error does not occur when I run the script directly from the Terminal, nor when I run it via IDLE (double click) Last login: Thu May 14 07:57:11 on ttys000 But what do I know? % cd '/Volumes/BigHDD/Ortho4XP-master/' && '/usr/bin/pythonw' '/Volumes/BigHDD/Ortho4XP-master/Ortho4XP_v130.py' && echo Exit status: $? && exit 1 Traceback (most recent call last): File "/Volumes/BigHDD/Ortho4XP-master/Ortho4XP_v130.py", line 9, in import O4_Imagery_Utils as IMG File "./src/O4_Imagery_Utils.py", line 597 SyntaxError: Non-ASCII character '\xc2' in file ./src/O4_Imagery_Utils.py on line 597, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details But what do I know? % ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 09:05:50 2020 From: report at bugs.python.org (Tim Nyborg) Date: Thu, 14 May 2020 13:05:50 +0000 Subject: [issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition In-Reply-To: <1471355745.98.0.805545529346.issue27777@psf.upfronthosting.co.za> Message-ID: <1589461550.73.0.910939562074.issue27777@roundup.psfhosted.org> Tim Nyborg added the comment: Echoing Fran Boon, I'm wondering what needs to happen to get the fixes merged and this issue resolved. It affects web servers run on several frameworks, which is more of a problem now, since so many of us migrated to py3 in advance of py2 EOL. ---------- nosy: +Tim Nyborg2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 09:42:18 2020 From: report at bugs.python.org (Christopher Marchfelder) Date: Thu, 14 May 2020 13:42:18 +0000 Subject: [issue40592] `Shutil.which` incosistent with windows's `where` In-Reply-To: <1589187015.71.0.593402074503.issue40592@roundup.psfhosted.org> Message-ID: <1589463738.8.0.530952127421.issue40592@roundup.psfhosted.org> Christopher Marchfelder added the comment: @steve.dower I would really love to work on this and make my first contribution. Never did one, so I would some help doing this one :) ---------- nosy: +Christopher Marchfelder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 10:01:56 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 14 May 2020 14:01:56 +0000 Subject: [issue33953] The DEFAULT_ENTROPY variable used to store the current default random bytes value should be documented for `secrets` module In-Reply-To: <1529913551.53.0.56676864532.issue33953@psf.upfronthosting.co.za> Message-ID: <1589464916.43.0.792523609511.issue33953@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: docs at python -> steven.daprano nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 10:11:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 14:11:45 +0000 Subject: [issue40512] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1589465505.13.0.944524223053.issue40512@roundup.psfhosted.org> STINNER Victor added the comment: > Add a lock to pymalloc, or disable pymalloc when subinterpreters are used: (...) By the way, tracemalloc is not compatible with subinterpreters. test.support.run_in_subinterp() skips the test if tracemalloc is tracing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 10:16:05 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 14:16:05 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1589465765.71.0.519092401259.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: While the number of imports reduced a lot, "import test.support" still imports 98 modules. That's a lot! IMO we can reduce it a little bit more :-) Examples of imports which could be lazy: * faulthandler: move it into start_threads() and disable_faulthandler() * shutil: move it into rmtree() * bz2: move it into @requires_bz2 decorator. Is it possible? Same for zlib, gzip and lzma? There are also tons of functions, it may be time to create even more submodules: * support.threading_helper: * threading_setup()/threading_cleanup() * reap_threads() * wait_thread_exit() * join_thread() * catch_threading_exception context manager * start_threads() * support.process_helper: * wait_process() * reap_children() * SuppressCrashReport * PIPE_MAX_SIZE (is it the best place for that one?) * args_from_interpreter_flags() * optim_args_from_interpreter_flags() * PythonSymlink * support.file_helper: * rmtree() and the related private functions * unlink() * rmdir() * FS_NONASCII * TESTFN_UNICODE, TESTFN_NONASCII, TESTFN_UNENCODABLE, TESTFN_UNDECODABLE * SAVEDCWD (not sure about this one) * TESTFN_ENCODING <= this one can be removed, it's just sys.getfilesystemencoding() * temp_dir() * change_cwd() * temp_cwd() * temp_umask() * create_empty_file() * make_bad_fd() * EnvironmentVarGuard (not sure about this one) * can_symlink(), skip_unless_symlink() * can_xattr(), skip_unless_xattr() * fs_is_case_insensitive() * fd_count() * FakePath * support.import_helper: * import_module(), _ignore_deprecated_imports() * import_fresh_module(), _save_and_remove_module(), _save_and_block_module() * unload() * make_legacy_pyc() * forget() * CleanImport * DirsOnSysPath * modules_setup(), modules_cleanup() * support.warnings_helper: * check_syntax_warning() * ignore_warnings() * WarningsRecorder * check_warnings(), _filterwarnings() * check_no_warnings() * check_no_resource_warning() Move also move the following functions to socket_helper: * SOCK_MAX_SIZE * open_urlresource() * TransientResource * time_out * socket_peer_reset * ioerror_peer_reset Serhiy: What do you think of these proposed submodules? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 10:17:30 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 14:17:30 +0000 Subject: [issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files In-Reply-To: <1588583321.75.0.545037270294.issue40495@roundup.psfhosted.org> Message-ID: <1589465850.66.0.202519104644.issue40495@roundup.psfhosted.org> STINNER Victor added the comment: New changeset e77d428856fbd339faee44ff47214eda5fb51d57 by Lum?r 'Frenzy' Balhar in branch 'master': bpo-40495: compileall option to hardlink duplicate pyc files (GH-19901) https://github.com/python/cpython/commit/e77d428856fbd339faee44ff47214eda5fb51d57 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 10:18:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 14:18:29 +0000 Subject: [issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files In-Reply-To: <1588583321.75.0.545037270294.issue40495@roundup.psfhosted.org> Message-ID: <1589465909.42.0.145868854892.issue40495@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Lum?r and Miro! I close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 10:47:06 2020 From: report at bugs.python.org (MARK SCHWAB) Date: Thu, 14 May 2020 14:47:06 +0000 Subject: [issue40626] application/x-hdf5 mime type missing from mimetypes library Message-ID: <1589467626.22.0.421412195691.issue40626@roundup.psfhosted.org> New submission from MARK SCHWAB : The HDF data group relased HDF5 many years ago, it is a common data type for many science files. Their recommendation for file extension is '.h5', and mimetype 'application/x-hdf5'. See 'Recommendations' section for mime types from the HDF group here: https://www.hdfgroup.org/2018/06/citations-for-hdf-data-and-software/ Update mimetypes.py #20042 ---------- components: Extension Modules messages: 368843 nosy: schwabm priority: normal pull_requests: 19391 severity: normal status: open title: application/x-hdf5 mime type missing from mimetypes library type: enhancement 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 May 14 11:23:30 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 14 May 2020 15:23:30 +0000 Subject: [issue40624] add support for != (not-equals) in ElementTree XPath In-Reply-To: <1589455502.16.0.216786525166.issue40624@roundup.psfhosted.org> Message-ID: <1589469810.81.0.670964075629.issue40624@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 11:56:05 2020 From: report at bugs.python.org (Jakub Kulik) Date: Thu, 14 May 2020 15:56:05 +0000 Subject: [issue37573] asyncio: freeze when using MultiLoopChildWatcher on Solaris In-Reply-To: <1562936255.66.0.924337077063.issue37573@roundup.psfhosted.org> Message-ID: <1589471765.73.0.709000095657.issue37573@roundup.psfhosted.org> Jakub Kulik added the comment: You are right, that seems to be the same issue. Thanks for closing this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 11:56:44 2020 From: report at bugs.python.org (Christopher Marchfelder) Date: Thu, 14 May 2020 15:56:44 +0000 Subject: [issue40592] `Shutil.which` incosistent with windows's `where` In-Reply-To: <1589187015.71.0.593402074503.issue40592@roundup.psfhosted.org> Message-ID: <1589471804.43.0.845601790048.issue40592@roundup.psfhosted.org> Change by Christopher Marchfelder : ---------- keywords: +patch pull_requests: +19392 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20088 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 12:06:05 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 16:06:05 +0000 Subject: [issue40549] Convert posixmodule.c to multiphase initialization (PEP 489) In-Reply-To: <1588874748.21.0.997527577662.issue40549@roundup.psfhosted.org> Message-ID: <1589472365.87.0.83209150183.issue40549@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 97f33c35445e6d67df24dcbafef7b78333feb778 by Victor Stinner in branch 'master': bpo-40549: posixmodule.c uses defining_class (GH-20075) https://github.com/python/cpython/commit/97f33c35445e6d67df24dcbafef7b78333feb778 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 12:17:34 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 16:17:34 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1589473054.59.0.145859661635.issue32604@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19393 pull_request: https://github.com/python/cpython/pull/20089 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 12:19:34 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 16:19:34 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1589473174.41.0.379733786657.issue32604@roundup.psfhosted.org> STINNER Victor added the comment: The buildbots are broken for one whole week and nobody is available to investigate the reference leak regression. Following the CI policy, I wrote PR 20089 to revert the change which broke the CI: https://pythondev.readthedocs.io/ci.html#revert-on-fail If someone wants to push again the change, make sure that "./python -m test -R 3:3 test__xxsubinterpreters" does not leak. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 12:20:03 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 16:20:03 +0000 Subject: [issue40556] test__xxsubinterpreters leaked [1486, 1484, 1484, 1484] references In-Reply-To: <1588907065.92.0.443788591369.issue40556@roundup.psfhosted.org> Message-ID: <1589473203.16.0.0797597998112.issue40556@roundup.psfhosted.org> STINNER Victor added the comment: I wrote PR 20089 to revert the change which introduced the leak. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 12:37:08 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 14 May 2020 16:37:08 +0000 Subject: [issue25872] multithreading traceback KeyError when modifying file In-Reply-To: <1450200064.35.0.872448112145.issue25872@psf.upfronthosting.co.za> Message-ID: <1589474228.65.0.359332408384.issue25872@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +19394 pull_request: https://github.com/python/cpython/pull/20079 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 12:46:31 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 16:46:31 +0000 Subject: [issue40613] gcc 10 emits warning for unused function: _xxsubinterpretersmodule In-Reply-To: <1589351176.2.0.303752022619.issue40613@roundup.psfhosted.org> Message-ID: <1589474791.54.0.741440652834.issue40613@roundup.psfhosted.org> STINNER Victor added the comment: New changeset f2c3b6823bc4777d4a14eb0c3615b719521f763a by Victor Stinner in branch 'master': Revert "bpo-32604: [_xxsubinterpreters] Propagate exceptions. (GH-19768)" (GH-20089) https://github.com/python/cpython/commit/f2c3b6823bc4777d4a14eb0c3615b719521f763a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 12:46:31 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 16:46:31 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1589474791.64.0.842455847821.issue32604@roundup.psfhosted.org> STINNER Victor added the comment: New changeset f2c3b6823bc4777d4a14eb0c3615b719521f763a by Victor Stinner in branch 'master': Revert "bpo-32604: [_xxsubinterpreters] Propagate exceptions. (GH-19768)" (GH-20089) https://github.com/python/cpython/commit/f2c3b6823bc4777d4a14eb0c3615b719521f763a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 12:49:06 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 16:49:06 +0000 Subject: [issue40556] test__xxsubinterpreters leaked [1486, 1484, 1484, 1484] references In-Reply-To: <1588907065.92.0.443788591369.issue40556@roundup.psfhosted.org> Message-ID: <1589474946.9.0.540097352388.issue40556@roundup.psfhosted.org> STINNER Victor added the comment: The revert fixed the test: $ ./python -m test -R 3:3 test__xxsubinterpreters (...) Tests result: SUCCESS ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 12:49:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 16:49:17 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1589474957.54.0.509804399468.issue32604@roundup.psfhosted.org> STINNER Victor added the comment: The revert fixed the test: $ ./python -m test -R 3:3 test__xxsubinterpreters (...) Tests result: SUCCESS ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 12:50:10 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 14 May 2020 16:50:10 +0000 Subject: [issue40619] compile() passes rest of file as SyntaxError().text when file unreadable In-Reply-To: <1589428650.19.0.472919567451.issue40619@roundup.psfhosted.org> Message-ID: <1589475010.94.0.910781914136.issue40619@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +19395 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20090 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 13:03:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 17:03:45 +0000 Subject: [issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented In-Reply-To: <1585753703.83.0.0762180613721.issue40137@roundup.psfhosted.org> Message-ID: <1589475825.45.0.304369150178.issue40137@roundup.psfhosted.org> STINNER Victor added the comment: I consider that all things that could be done have already been done, so I close the issue. Thanks for Hai and Dong-hee who helped ;-) > * _functools: Py_CLEAR(kwd_mark); is commented in _functools_free() Sadly, PEP 573 implementation is not complete enough to use it in _functools: see PR 20055. > * _abc: abc_invalidation_counter Fixed in bpo-40566 by: commit 77c614624b6bf2145bef69830d0f499d8b55ec0c Author: Dong-hee Na Date: Sat May 9 17:31:40 2020 +0900 bpo-40566: Apply PEP 573 to abc module (GH-20005) > scanner_traverse(), scanner_clear(), encoder_traverse() and encoder_clear() tp_clear slot cannot get the defining type (PEP 573 may be extended later to allow that). Using PyType_GetModule(Py_TYPE(self)) to access types stored in the module state and then compare Py_TYPE(self) to these types... looks badly broken :-) If we get the wrong type, PyType_GetModule(Py_TYPE(self)) will return the wrong module and so we cannot get the json state from the wrong module... It's a chicken-and-egg issue :-) I think that it's not worth it to attempt to add back these assertions. It's very unlikely to get the wrong types in practice. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 13:34:40 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 17:34:40 +0000 Subject: [issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h In-Reply-To: <1589241684.81.0.926948421821.issue40602@roundup.psfhosted.org> Message-ID: <1589477680.82.0.0819278291365.issue40602@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19396 pull_request: https://github.com/python/cpython/pull/20091 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 13:39:46 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 14 May 2020 17:39:46 +0000 Subject: [issue40612] Make traceback module's formatting of SyntaxError more similar to system formatting In-Reply-To: <1589343535.08.0.511471445795.issue40612@roundup.psfhosted.org> Message-ID: <1589477986.68.0.39668801031.issue40612@roundup.psfhosted.org> Lysandros Nikolaou added the comment: Agreed on everything. One thing I don't really understand is if you propose to also strip trailing whitespace. Does "limit the offset to just past the end of the source text" include whitespace or not? For example, the linked PR does not change this behavior: ? cpython git:(pr/20072) ./python Python 3.9.0a6+ (heads/pr/20072:6df7662ca5, May 14 2020, 20:37:50) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> compile('1 + ', '', 'exec') Traceback (most recent call last): File "", line 1, in File "", line 1 1 + ^ SyntaxError: invalid syntax Should we clip just past the end of `1 +` here? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 13:41:31 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 14 May 2020 17:41:31 +0000 Subject: [issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts In-Reply-To: <1588435279.1.0.0339863635356.issue40477@roundup.psfhosted.org> Message-ID: <1589478091.14.0.668648003808.issue40477@roundup.psfhosted.org> Ned Deily added the comment: Glenn, you will need to change the Interpreter setting in the Launcher Preferences panel. In the box that says "/usr/bin/pythonw", type "/usr/local/bin/python3"; that setting will then be remembered on subsequent launches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 13:51:54 2020 From: report at bugs.python.org (Glenn Travis) Date: Thu, 14 May 2020 17:51:54 +0000 Subject: [issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts In-Reply-To: <1588435279.1.0.0339863635356.issue40477@roundup.psfhosted.org> Message-ID: <1589478714.32.0.311591664147.issue40477@roundup.psfhosted.org> Glenn Travis added the comment: Thank you Ned. So close now. After your final fix, if I understood you correctly, we will no longer have to open Terminal? And, excuse my vast knowledge gap, but will it ever be possible to not have the terminal run in the future? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 13:54:47 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 14 May 2020 17:54:47 +0000 Subject: [issue40612] Make traceback module's formatting of SyntaxError more similar to system formatting In-Reply-To: <1589343535.08.0.511471445795.issue40612@roundup.psfhosted.org> Message-ID: <1589478887.08.0.445507182109.issue40612@roundup.psfhosted.org> Guido van Rossum added the comment: My current PR does not strip trailing whitespace. It only strips a single trailing newline (since this is usually but not always present, and we don't want to its presence to cause an extra blank line, nor do we want its absence to cause the text line and the caret line to be run together). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 13:55:36 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 14 May 2020 17:55:36 +0000 Subject: [issue40612] Make traceback module's formatting of SyntaxError more similar to system formatting In-Reply-To: <1589343535.08.0.511471445795.issue40612@roundup.psfhosted.org> Message-ID: <1589478936.26.0.958001002132.issue40612@roundup.psfhosted.org> Guido van Rossum added the comment: (And, to be clear, I don't *want* to strip trailing spaces.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 13:55:49 2020 From: report at bugs.python.org (Glenn Travis) Date: Thu, 14 May 2020 17:55:49 +0000 Subject: [issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts In-Reply-To: <1588435279.1.0.0339863635356.issue40477@roundup.psfhosted.org> Message-ID: <1589478949.82.0.677241977596.issue40477@roundup.psfhosted.org> Glenn Travis added the comment: It is working now. However, I end up with two terminal windows open. One is the one that I opened and the second appears to have been opened by the Launcher?? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 13:56:40 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 14 May 2020 17:56:40 +0000 Subject: [issue40612] Make traceback module's formatting of SyntaxError more similar to system formatting In-Reply-To: <1589343535.08.0.511471445795.issue40612@roundup.psfhosted.org> Message-ID: <1589479000.02.0.659039969795.issue40612@roundup.psfhosted.org> Lysandros Nikolaou added the comment: Understood. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 14:27:40 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 14 May 2020 18:27:40 +0000 Subject: [issue40627] Bus error on 'except E as a.b:' Message-ID: <1589480860.81.0.165403364835.issue40627@roundup.psfhosted.org> New submission from Guido van Rossum : This seems due to some new check in pegen: >>> try: ... pass ... except E as a.b: ... pass ... Bus error: 10 ---------- messages: 368860 nosy: gvanrossum, lys.nikolaou, pablogsal priority: normal severity: normal stage: needs patch status: open title: Bus error on 'except E as a.b:' type: crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 14:29:34 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 14 May 2020 18:29:34 +0000 Subject: [issue40627] Bus error on 'except E as a.b:' In-Reply-To: <1589480860.81.0.165403364835.issue40627@roundup.psfhosted.org> Message-ID: <1589480974.15.0.217894467645.issue40627@roundup.psfhosted.org> Guido van Rossum added the comment: Oh, looks like https://github.com/python/cpython/pull/20083 fixes it. ---------- keywords: +patch message_count: 1.0 -> 2.0 pull_requests: +19397 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20083 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 14:31:15 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 14 May 2020 18:31:15 +0000 Subject: [issue40627] Bus error on 'except E as a.b:' In-Reply-To: <1589480860.81.0.165403364835.issue40627@roundup.psfhosted.org> Message-ID: <1589481075.82.0.780503011517.issue40627@roundup.psfhosted.org> Guido van Rossum added the comment: Sorry! ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> PEG Parser: Invalid targets for augassign and except succeed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 14:55:17 2020 From: report at bugs.python.org (Ryan C. Gordon) Date: Thu, 14 May 2020 18:55:17 +0000 Subject: [issue40628] sockmodule.c: sock_connect vs negative errno values... Message-ID: <1589482517.06.0.439871312188.issue40628@roundup.psfhosted.org> New submission from Ryan C. Gordon : (Forgive any obvious mistakes in this report, I'm almost illiterate with Python, doubly so with Python internals.) In trying to get buildbot-worker running on Haiku ( https://haiku-os.org/ ), it runs into a situation where it tries to connect a non-blocking TCP socket, which correctly reports EINPROGRESS, and cpython/Modules/sockmodule.c's internal_connect() returns this error code to sock_connect() and sock_connect_ex(). Both of the sock_connect* functions will return NULL if the error code is negative, but on Haiku, all the errno values are negative (EINPROGRESS, for example, is -2147454940). I _think_ what sock_connect is intending to do here... res = internal_connect(s, SAS2SA(&addrbuf), addrlen, 1); if (res < 0) return NULL; ...is say "if we had a devastating and unexpected system error, give up immediately." Buildbot-worker seems to confirm this by throwing this exception in response: builtins.SystemError: returned NULL without setting an error internal_connect returns -1 in those devastating-and-unexpected cases--namely when an exception is to be raised--and does not ever use that to otherwise signify a legit socket error. Linux and other systems don't otherwise fall into this "res < 0" condition because errno values are positive on those systems. So I believe the correct fix here, in sock_connect() and sock_connect_ex(), is to check "if (res == -1)" instead of "res < 0" and let all other negative error codes carry on. If this seems like the correct approach, I can assemble a pull request, but I don't know the full ramifications of this small change, so I thought I'd report it here first. --ryan. ---------- components: Extension Modules messages: 368863 nosy: icculus priority: normal severity: normal status: open title: sockmodule.c: sock_connect vs negative errno values... type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 15:19:52 2020 From: report at bugs.python.org (A.M. Kuchling) Date: Thu, 14 May 2020 19:19:52 +0000 Subject: [issue25872] multithreading traceback KeyError when modifying file In-Reply-To: <1450200064.35.0.872448112145.issue25872@psf.upfronthosting.co.za> Message-ID: <1589483992.99.0.659569170758.issue25872@roundup.psfhosted.org> Change by A.M. Kuchling : ---------- nosy: +akuchling nosy_count: 5.0 -> 6.0 pull_requests: +19398 pull_request: https://github.com/python/cpython/pull/20092 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 15:55:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 19:55:54 +0000 Subject: [issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h In-Reply-To: <1589241684.81.0.926948421821.issue40602@roundup.psfhosted.org> Message-ID: <1589486154.65.0.323490303033.issue40602@roundup.psfhosted.org> STINNER Victor added the comment: New changeset a482dc500b6ec4889f6a126ba08cbad6c11e37bc by Victor Stinner in branch 'master': bpo-40602: Write unit tests for _Py_hashtable_t (GH-20091) https://github.com/python/cpython/commit/a482dc500b6ec4889f6a126ba08cbad6c11e37bc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 16:11:54 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 14 May 2020 20:11:54 +0000 Subject: [issue40619] compile() passes rest of file as SyntaxError().text when file unreadable In-Reply-To: <1589428650.19.0.472919567451.issue40619@roundup.psfhosted.org> Message-ID: <1589487114.76.0.208521531078.issue40619@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset bcc30360951a303aa72b0502b77aad2c5f09f30d by Pablo Galindo in branch 'master': bpo-40619: Correctly handle error lines in programs without file mode (GH-20090) https://github.com/python/cpython/commit/bcc30360951a303aa72b0502b77aad2c5f09f30d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 16:12:11 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 14 May 2020 20:12:11 +0000 Subject: [issue40619] compile() passes rest of file as SyntaxError().text when file unreadable In-Reply-To: <1589428650.19.0.472919567451.issue40619@roundup.psfhosted.org> Message-ID: <1589487131.65.0.791792443451.issue40619@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 Thu May 14 16:13:22 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 14 May 2020 20:13:22 +0000 Subject: [issue40621] Python crashes with new parser on invalid exception handlers In-Reply-To: <1589442023.75.0.251315852279.issue40621@roundup.psfhosted.org> Message-ID: <1589487202.96.0.483197007846.issue40621@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> PEG Parser: Invalid targets for augassign and except succeed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 16:13:54 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 14 May 2020 20:13:54 +0000 Subject: [issue40618] PEG Parser: Invalid targets for augassign and except succeed In-Reply-To: <1589415304.05.0.507277584586.issue40618@roundup.psfhosted.org> Message-ID: <1589487234.11.0.474650375897.issue40618@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset ce21cfca7bb2d18921bc4ac27cb064726996c519 by Lysandros Nikolaou in branch 'master': bpo-40618: Disallow invalid targets in augassign and except clauses (GH-20083) https://github.com/python/cpython/commit/ce21cfca7bb2d18921bc4ac27cb064726996c519 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 16:44:38 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 20:44:38 +0000 Subject: [issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h In-Reply-To: <1589241684.81.0.926948421821.issue40602@roundup.psfhosted.org> Message-ID: <1589489078.98.0.0106939880137.issue40602@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d2dc827d16479d99927a6923a0347199d7c694fb by Victor Stinner in branch 'master': bpo-40602: _Py_hashtable_set() reports rehash failure (GH-20077) https://github.com/python/cpython/commit/d2dc827d16479d99927a6923a0347199d7c694fb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 16:52:38 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 20:52:38 +0000 Subject: [issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h In-Reply-To: <1589241684.81.0.926948421821.issue40602@roundup.psfhosted.org> Message-ID: <1589489558.51.0.43760389018.issue40602@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 16:54:40 2020 From: report at bugs.python.org (Tor Colvin) Date: Thu, 14 May 2020 20:54:40 +0000 Subject: [issue22107] tempfile module misinterprets access denied error on Windows In-Reply-To: <1406724041.52.0.0365391579019.issue22107@psf.upfronthosting.co.za> Message-ID: <1589489680.86.0.938888430463.issue22107@roundup.psfhosted.org> Change by Tor Colvin : ---------- nosy: +Tor.Colvin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 17:18:57 2020 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 14 May 2020 21:18:57 +0000 Subject: [issue1776160] Buffer overflow when listing deeply nested directory Message-ID: <1589491137.68.0.298266358025.issue1776160@roundup.psfhosted.org> Zackery Spytz added the comment: Python 2 is EOL. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 17:21:04 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 14 May 2020 21:21:04 +0000 Subject: [issue1776160] Buffer overflow when listing deeply nested directory Message-ID: <1589491264.59.0.575650141695.issue1776160@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- resolution: -> wont fix stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 17:29:20 2020 From: report at bugs.python.org (Chris Billington) Date: Thu, 14 May 2020 21:29:20 +0000 Subject: [issue40377] APPDATA In-Reply-To: <1587734754.85.0.727792315124.issue40377@roundup.psfhosted.org> Message-ID: <1589491760.32.0.567594698632.issue40377@roundup.psfhosted.org> Change by Chris Billington : ---------- title: APPDATA location in Microsoft Store version -> APPDATA _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 17:30:08 2020 From: report at bugs.python.org (Chris Billington) Date: Thu, 14 May 2020 21:30:08 +0000 Subject: [issue40377] APPDATA location in Microsoft Store version In-Reply-To: <1587734754.85.0.727792315124.issue40377@roundup.psfhosted.org> Message-ID: <1589491808.3.0.0633066836105.issue40377@roundup.psfhosted.org> Change by Chris Billington : ---------- title: APPDATA -> APPDATA location in Microsoft Store version _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 17:48:08 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 21:48:08 +0000 Subject: [issue40237] Test code coverage (C) job of Travis CI fails on test_distutils which creates _configtest.gcno file In-Reply-To: <1586436730.26.0.786791148526.issue40237@roundup.psfhosted.org> Message-ID: <1589492888.21.0.188806629026.issue40237@roundup.psfhosted.org> STINNER Victor added the comment: It seems like results at published at: https://codecov.io/gh/python/cpython/ It seems like there is coverage on both C and Python code. I never used this service. ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 18:11:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 22:11:47 +0000 Subject: [issue40548] Always run GitHub action jobs, even on documentation-only jobs In-Reply-To: <1588873177.1.0.956855864504.issue40548@roundup.psfhosted.org> Message-ID: <1589494307.74.0.209119496402.issue40548@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 75d7257b201a56f950c20cd9f5753a83fff4742b by Filipe La?ns in branch 'master': bpo-40548: GitHub Action workflow: skip jobs on doc only PRs (GH-19983) https://github.com/python/cpython/commit/75d7257b201a56f950c20cd9f5753a83fff4742b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 18:27:53 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 22:27:53 +0000 Subject: [issue40462] [easy] undefined name in Lib/test/mock_socket.py In-Reply-To: <1588290630.2.0.182306583677.issue40462@roundup.psfhosted.org> Message-ID: <1589495273.96.0.657362640494.issue40462@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -19288 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 18:30:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 22:30:48 +0000 Subject: [issue40460] [easy] undefined name in Lib/idlelib/zzdummy.py In-Reply-To: <1588290497.54.0.985175585062.issue40460@roundup.psfhosted.org> Message-ID: <1589495448.76.0.225025325236.issue40460@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +19399 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20093 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 18:36:16 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 22:36:16 +0000 Subject: [issue40462] [easy] undefined name in Lib/test/mock_socket.py In-Reply-To: <1588290630.2.0.182306583677.issue40462@roundup.psfhosted.org> Message-ID: <1589495776.26.0.61837195549.issue40462@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19400 pull_request: https://github.com/python/cpython/pull/20094 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 18:51:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 22:51:58 +0000 Subject: [issue40460] [easy] undefined name in Lib/idlelib/zzdummy.py In-Reply-To: <1588290497.54.0.985175585062.issue40460@roundup.psfhosted.org> Message-ID: <1589496718.26.0.413127556414.issue40460@roundup.psfhosted.org> STINNER Victor added the comment: New changeset edf2643bbb9859403239fe1cb3c212b1a2a8e65c by Victor Stinner in branch 'master': bpo-40460: Fix typo in idlelib/zzdummy.py (GH-20093) https://github.com/python/cpython/commit/edf2643bbb9859403239fe1cb3c212b1a2a8e65c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 18:53:31 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 22:53:31 +0000 Subject: [issue40460] [easy] undefined name in Lib/idlelib/zzdummy.py In-Reply-To: <1588290497.54.0.985175585062.issue40460@roundup.psfhosted.org> Message-ID: <1589496811.35.0.771036058521.issue40460@roundup.psfhosted.org> STINNER Victor added the comment: > Yes, simple typo. Ok, thanks for the confirmation :-) It's now fixed. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 18:54:13 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 14 May 2020 22:54:13 +0000 Subject: [issue40618] PEG Parser: Invalid targets for augassign and except succeed In-Reply-To: <1589415304.05.0.507277584586.issue40618@roundup.psfhosted.org> Message-ID: <1589496853.46.0.142864298025.issue40618@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 19:00:43 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 23:00:43 +0000 Subject: [issue40142] Modify _PyObject_GC_TRACK() to ensure that newly tracked object is valid In-Reply-To: <1585778141.93.0.504215883297.issue40142@roundup.psfhosted.org> Message-ID: <1589497243.07.0.189795255876.issue40142@roundup.psfhosted.org> STINNER Victor added the comment: While it might be doable, I don't have the bandwidth to investigate this issue and so I prefer to close it as out of date. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 19:02:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 23:02:17 +0000 Subject: [issue40462] [easy] undefined name in Lib/test/mock_socket.py In-Reply-To: <1588290630.2.0.182306583677.issue40462@roundup.psfhosted.org> Message-ID: <1589497337.66.0.372046021832.issue40462@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 4b972faf605912092013a1fdbf486c498d002926 by Victor Stinner in branch 'master': bpo-40462: Fix typo in test_json (GH-20094) https://github.com/python/cpython/commit/4b972faf605912092013a1fdbf486c498d002926 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 19:02:41 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 23:02:41 +0000 Subject: [issue40462] [easy] undefined name in Lib/test/mock_socket.py In-Reply-To: <1588290630.2.0.182306583677.issue40462@roundup.psfhosted.org> Message-ID: <1589497361.27.0.497258691564.issue40462@roundup.psfhosted.org> STINNER Victor added the comment: Thanks for the fix Furkan ?nder! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 19:14:40 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 14 May 2020 23:14:40 +0000 Subject: [issue25920] PyOS_AfterFork should reset socketmodule's lock In-Reply-To: <1450739972.22.0.163393011494.issue25920@psf.upfronthosting.co.za> Message-ID: <1589498080.2.0.742968763511.issue25920@roundup.psfhosted.org> Terry J. Reedy added the comment: Does the example code (which should be posted here) still hang? If so, automated tests that hang indefinitely on failure are a nuisance. A revised example that failed after, say, a second would be better. ---------- nosy: +terry.reedy versions: +Python 3.9 -Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 19:22:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 23:22:12 +0000 Subject: [issue40055] test___all__ and test_distutils alters the enviroinment: pkg_resources.PEP440Warning In-Reply-To: <1585068690.81.0.102478946521.issue40055@roundup.psfhosted.org> Message-ID: <1589498532.56.0.866038953524.issue40055@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19401 pull_request: https://github.com/python/cpython/pull/20095 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 19:25:06 2020 From: report at bugs.python.org (veganaiZe) Date: Thu, 14 May 2020 23:25:06 +0000 Subject: [issue40629] Error MSB4086 (numeric comparison) Message-ID: <1589498706.71.0.441152981554.issue40629@roundup.psfhosted.org> New submission from veganaiZe : I'm getting an "error MSB4086: A numeric comparison was attempted ..." while attempting to build Python 3.8.3 (branch `3.8` from github) on Windows 8.1 (64-bit) with VC++ Build Tools 14.0 (2015 R3), at the command line. I'm guessing that I might have an incorrect (ie. too old) version of the .NET tools? I've attach the `PCBuild\clean.bat -vv` output. I can provide many more details but I didn't want to overwhelm. ---------- components: Windows files: clean_out.txt messages: 368877 nosy: paul.moore, steve.dower, tim.golden, veganaiZe, zach.ware priority: normal severity: normal status: open title: Error MSB4086 (numeric comparison) type: compile error versions: Python 3.8 Added file: https://bugs.python.org/file49155/clean_out.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 19:29:00 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 14 May 2020 23:29:00 +0000 Subject: [issue22652] Add suggestion about keyword arguments to this error message: "builtins.TypeError: my_func() takes 1 positional argument but 2 were given" In-Reply-To: <1413455617.21.0.000325400143663.issue22652@psf.upfronthosting.co.za> Message-ID: <1589498940.11.0.851569335403.issue22652@roundup.psfhosted.org> Terry J. Reedy added the comment: Serhiy, I am nosying you because you have worked on argument issues in the last year. Minimal example: def f(a, *, b): pass. In 3.9.0a6, >>> f(1,2) # ... Same as 5 years ago. TypeError: f() takes 1 positional argument but 2 were given My first inclination was that this is sufficient information. But ... >>> f(1,2,b=3) # ... TypeError: f() takes 1 positional argument but 2 positional arguments (and 1 keyword-only argument) were given The simple message is equally sufficiant here, but more is given, and it seems strange to not then give the equivalent for for 'takes'. So the patch to add more seems plausible (but I am not one to carefully review C code). Jesse, if you still want your patch, possibly updated, considered, please make a PR. We now also have positional-only arguments, and I am not sure how that affects my view on this issue. ---------- nosy: +serhiy.storchaka, terry.reedy versions: +Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 19:29:08 2020 From: report at bugs.python.org (Furkan Onder) Date: Thu, 14 May 2020 23:29:08 +0000 Subject: [issue40462] [easy] undefined name in Lib/test/mock_socket.py In-Reply-To: <1588290630.2.0.182306583677.issue40462@roundup.psfhosted.org> Message-ID: <1589498948.12.0.624987327897.issue40462@roundup.psfhosted.org> Furkan Onder added the comment: You are welcome :=) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 19:30:26 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 14 May 2020 23:30:26 +0000 Subject: [issue22652] Add suggestion about keyword arguments to this error message: "builtins.TypeError: my_func() takes 1 positional argument but 2 were given" In-Reply-To: <1413455617.21.0.000325400143663.issue22652@psf.upfronthosting.co.za> Message-ID: <1589499026.03.0.919554954991.issue22652@roundup.psfhosted.org> Terry J. Reedy added the comment: Also, python-ideas list is a good place to get more opinions (too many sometimes) on an enhancement proposal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 19:42:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 23:42:29 +0000 Subject: [issue25920] PyOS_AfterFork should reset socketmodule's lock In-Reply-To: <1450739972.22.0.163393011494.issue25920@psf.upfronthosting.co.za> Message-ID: <1589499749.93.0.372285101362.issue25920@roundup.psfhosted.org> STINNER Victor added the comment: > Maybe instead of releasing the lock in the forked child process, we should try to acquire the lock in the os.fork() implementation, and then release it? In bpo-40089, I added _PyThread_at_fork_reinit() for this purpose: reinitialize a lock after a fork to unlocked state. Internally, it leaks memory on purpose and then create a new lock, since there is no portable way to reset a lock after fork. The problem is how to register netdb_lock of Modules/socketmodule.c into a list of locks which should be reinitialized at fork, or maybe how to register a C callback called at fork. There is a *Python* API to register a callback after a fork: os.register_at_fork(). See also the meta-issue bpo-6721: "Locks in the standard library should be sanitized on fork". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 19:43:26 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 23:43:26 +0000 Subject: [issue6721] Locks in the standard library should be sanitized on fork In-Reply-To: <1250550378.97.0.072881968798.issue6721@psf.upfronthosting.co.za> Message-ID: <1589499806.44.0.897516723827.issue6721@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-25920: PyOS_AfterFork should reset socketmodule's lock. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 19:48:02 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 May 2020 23:48:02 +0000 Subject: [issue25920] PyOS_AfterFork should reset socketmodule's lock In-Reply-To: <1450739972.22.0.163393011494.issue25920@psf.upfronthosting.co.za> Message-ID: <1589500082.85.0.0607168434433.issue25920@roundup.psfhosted.org> STINNER Victor added the comment: > (I wrote some more details here: https://emptysqua.re/blog/getaddrinfo-deadlock/ ) On macOS, Python is only affected if "MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5". Is it still the case in 2020? Copy/paste of socketmodule.c: /* On systems on which getaddrinfo() is believed to not be thread-safe, (this includes the getaddrinfo emulation) protect access with a lock. getaddrinfo is thread-safe on Mac OS X 10.5 and later. Originally it was a mix of code including an unsafe implementation from an old BSD's libresolv. In 10.5 Apple reimplemented it as a safe IPC call to the mDNSResponder process. 10.5 is the first be UNIX '03 certified, which includes the requirement that getaddrinfo be thread-safe. See issue #25924. It's thread-safe in OpenBSD starting with 5.4, released Nov 2013: http://www.openbsd.org/plus54.html It's thread-safe in NetBSD starting with 4.0, released Dec 2007: http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/net/getaddrinfo.c.diff?r1=1.82&r2=1.83 */ #if ((defined(__APPLE__) && \ MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5) || \ (defined(__FreeBSD__) && __FreeBSD_version+0 < 503000) || \ (defined(__OpenBSD__) && OpenBSD+0 < 201311) || \ (defined(__NetBSD__) && __NetBSD_Version__+0 < 400000000) || \ !defined(HAVE_GETADDRINFO)) #define USE_GETADDRINFO_LOCK #endif ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:21:27 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Fri, 15 May 2020 00:21:27 +0000 Subject: [issue40548] Always run GitHub action jobs, even on documentation-only jobs In-Reply-To: <1588873177.1.0.956855864504.issue40548@roundup.psfhosted.org> Message-ID: <1589502087.14.0.287946963394.issue40548@roundup.psfhosted.org> Change by Filipe La?ns : ---------- pull_requests: +19402 pull_request: https://github.com/python/cpython/pull/20097 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:30:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:30:24 +0000 Subject: [issue40028] Math module method to find prime factors for non-negative int n In-Reply-To: <1584733974.83.0.0417466712916.issue40028@roundup.psfhosted.org> Message-ID: <1589502624.13.0.107911374816.issue40028@roundup.psfhosted.org> STINNER Victor added the comment: I suggest to implement this idea on PyPI first and only later propose it for inclusion in the stdlib (as a new module, or into an existing module). Bikeshedding on names, debate on the appropriate trade-off between correctness and speed, how many functions?, which functions?, etc. can be discussed outside Python bug tracker first. So far, the proposition is quite vague: "Math module method to find prime factors for non-negative int n". Comments on this issue gives an idea of the questions which should be answered first. See also bpo-37132 which proposes another bunch of functions. Because such module is easy to write and prototype, bikeshedding on details are more likely :-) An actual implementation may help to drive the discussion, and a dedicated project may help to organize discussions (ex: dedicated bug tracker to discuss each function independently). ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:35:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:35:29 +0000 Subject: [issue40512] [subinterpreters] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1589502928.99.0.956050493502.issue40512@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Interpreter Core title: Meta issue: per-interpreter GIL -> [subinterpreters] Meta issue: per-interpreter GIL _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:35:40 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:35:40 +0000 Subject: [issue40513] [subinterpreters] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1589502940.35.0.986104500525.issue40513@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Interpreter Core title: Move _PyRuntimeState.ceval to PyInterpreterState -> [subinterpreters] Move _PyRuntimeState.ceval to PyInterpreterState _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:36:01 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:36:01 +0000 Subject: [issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter In-Reply-To: <1588693682.5.0.219755904926.issue40521@roundup.psfhosted.org> Message-ID: <1589502961.42.0.836135025226.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Interpreter Core title: Make tuple, dict, frame free lists, unicode interned strings, unicode latin1 singletons per-interpreter -> [subinterpreters] Make free lists and unicode caches per-interpreter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:35:50 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:35:50 +0000 Subject: [issue40514] [subinterpreters] Add --experimental-isolated-subinterpreters build option In-Reply-To: <1588684431.91.0.693668036583.issue40514@roundup.psfhosted.org> Message-ID: <1589502950.49.0.768867869228.issue40514@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters title: Add --experimental-isolated-subinterpreters build option -> [subinterpreters] Add --experimental-isolated-subinterpreters build option _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:36:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:36:11 +0000 Subject: [issue40522] [subinterpreters] Get the current Python interpreter state from Thread Local Storage (autoTSSkey) In-Reply-To: <1588698734.65.0.223552100195.issue40522@roundup.psfhosted.org> Message-ID: <1589502971.65.0.0152597049587.issue40522@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Interpreter Core title: Subinterpreters: get the current Python interpreter state from Thread Local Storage (autoTSSkey) -> [subinterpreters] Get the current Python interpreter state from Thread Local Storage (autoTSSkey) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:36:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:36:24 +0000 Subject: [issue40533] [subinterpreters] Don't share Python objects between interpreters In-Reply-To: <1588777895.61.0.395509624257.issue40533@roundup.psfhosted.org> Message-ID: <1589502984.4.0.33179630277.issue40533@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Interpreter Core title: Subinterpreters: don't share Python objects between interpreters -> [subinterpreters] Don't share Python objects between interpreters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:37:07 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:37:07 +0000 Subject: [issue36876] [subinterpreters] Global C variables are a problem In-Reply-To: <1557514902.13.0.853517754348.issue36876@roundup.psfhosted.org> Message-ID: <1589503027.7.0.814130904129.issue36876@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Interpreter Core title: Global C variables are a problem. -> [subinterpreters] Global C variables are a problem _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:37:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:37:35 +0000 Subject: [issue36737] Warnings operate out of global runtime state. In-Reply-To: <1556317738.23.0.687262373674.issue36737@roundup.psfhosted.org> Message-ID: <1589503055.66.0.722993841266.issue36737@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:37:30 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:37:30 +0000 Subject: [issue36854] GC operates out of global runtime state. In-Reply-To: <1557334825.47.0.818401533303.issue36854@roundup.psfhosted.org> Message-ID: <1589503050.7.0.883651741416.issue36854@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:37:42 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:37:42 +0000 Subject: [issue38858] new_interpreter() should reuse more Py_InitializeFromConfig() code In-Reply-To: <1574205069.59.0.0921100013632.issue38858@roundup.psfhosted.org> Message-ID: <1589503062.27.0.180801811779.issue38858@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:37:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:37:52 +0000 Subject: [issue39984] Move pending calls from _PyRuntime to PyInterpreterState In-Reply-To: <1584406401.63.0.604728519645.issue39984@roundup.psfhosted.org> Message-ID: <1589503072.24.0.652789462862.issue39984@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:38:26 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:38:26 +0000 Subject: [issue39465] [subinterpreters] Design a subinterpreter friendly alternative to _Py_IDENTIFIER In-Reply-To: <1580135310.72.0.978238650594.issue39465@roundup.psfhosted.org> Message-ID: <1589503106.15.0.0564323819316.issue39465@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters title: Design a subinterpreter friendly alternative to _Py_IDENTIFIER -> [subinterpreters] Design a subinterpreter friendly alternative to _Py_IDENTIFIER _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:39:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:39:12 +0000 Subject: [issue32604] [subinterpreters] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1589503152.72.0.0895407285976.issue32604@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters title: Expose the subinterpreters C-API in Python for testing use. -> [subinterpreters] Expose the subinterpreters C-API in Python for testing use. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:39:23 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:39:23 +0000 Subject: [issue40390] [subinterpreters] Implement _xxsubinterpreters.channel_send_wait() In-Reply-To: <1587842364.13.0.0340365069537.issue40390@roundup.psfhosted.org> Message-ID: <1589503163.42.0.357374493447.issue40390@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Library (Lib) title: Implement _xxsubinterpreters.channel_send_wait(). -> [subinterpreters] Implement _xxsubinterpreters.channel_send_wait() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:39:34 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:39:34 +0000 Subject: [issue40453] [subinterpreters] Add PyConfig._isolated_interpreter: isolated subinterpreters In-Reply-To: <1588276857.13.0.360538290387.issue40453@roundup.psfhosted.org> Message-ID: <1589503174.4.0.957484566916.issue40453@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Interpreter Core title: Add PyConfig._isolated_interpreter: isolated subinterpreters -> [subinterpreters] Add PyConfig._isolated_interpreter: isolated subinterpreters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:39:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:39:46 +0000 Subject: [issue40234] [subinterpreters] Disallow daemon threads in subinterpreters optionally In-Reply-To: <1586387812.86.0.0296012569674.issue40234@roundup.psfhosted.org> Message-ID: <1589503186.2.0.255004829218.issue40234@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Interpreter Core title: Disallow daemon threads in subinterpreters optionally. -> [subinterpreters] Disallow daemon threads in subinterpreters optionally _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:39:53 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:39:53 +0000 Subject: [issue40231] [subinterpreters] Fix pending calls in subinterpreters In-Reply-To: <1586381605.22.0.272292107555.issue40231@roundup.psfhosted.org> Message-ID: <1589503193.9.0.292699198714.issue40231@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Interpreter Core title: Fix pending calls in subinterpreters -> [subinterpreters] Fix pending calls in subinterpreters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:40:09 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:40:09 +0000 Subject: [issue37224] [subinterpreters] test__xxsubinterpreters fails randomly In-Reply-To: <1560214681.61.0.906498246375.issue37224@roundup.psfhosted.org> Message-ID: <1589503209.78.0.587753551748.issue37224@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters title: test__xxsubinterpreters fails randomly -> [subinterpreters] test__xxsubinterpreters fails randomly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:40:02 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:40:02 +0000 Subject: [issue36225] [subinterpreters] Lingering subinterpreters should be implicitly cleared on shutdown In-Reply-To: <1551964663.69.0.686712846789.issue36225@roundup.psfhosted.org> Message-ID: <1589503202.36.0.573562804386.issue36225@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters title: Lingering subinterpreters should be implicitly cleared on shutdown -> [subinterpreters] Lingering subinterpreters should be implicitly cleared on shutdown _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:40:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:40:17 +0000 Subject: [issue37776] [subinterpreters] Test Py_Finalize() from a subinterpreter In-Reply-To: <1565113410.42.0.547052767114.issue37776@roundup.psfhosted.org> Message-ID: <1589503217.65.0.243373133981.issue37776@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters title: Test Py_Finalize() from a subinterpreter -> [subinterpreters] Test Py_Finalize() from a subinterpreter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:40:23 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:40:23 +0000 Subject: [issue37292] [subinterpreters] _xxsubinterpreters: Can't unpickle objects defined in __main__ In-Reply-To: <1560603991.54.0.788079404137.issue37292@roundup.psfhosted.org> Message-ID: <1589503223.3.0.655864932523.issue37292@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters title: _xxsubinterpreters: Can't unpickle objects defined in __main__ -> [subinterpreters] _xxsubinterpreters: Can't unpickle objects defined in __main__ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:40:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:40:35 +0000 Subject: [issue15751] [subinterpreters] Support subinterpreters in the GIL state API In-Reply-To: <1345526301.75.0.455071650321.issue15751@psf.upfronthosting.co.za> Message-ID: <1589503235.08.0.838379252354.issue15751@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters title: Support subinterpreters in the GIL state API -> [subinterpreters] Support subinterpreters in the GIL state API _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:41:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:41:35 +0000 Subject: [issue15751] [subinterpreters] Support subinterpreters in the GIL state API In-Reply-To: <1345526301.75.0.455071650321.issue15751@psf.upfronthosting.co.za> Message-ID: <1589503295.96.0.598545758819.issue15751@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-40512: [subinterpreters] Meta issue: per-interpreter GIL. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:41:59 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:41:59 +0000 Subject: [issue24553] [subinterpreters] Improve test coverage for subinterpreters In-Reply-To: <1435883403.8.0.344718256458.issue24553@psf.upfronthosting.co.za> Message-ID: <1589503319.32.0.0358127321352.issue24553@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters title: improve test coverage for subinterpreters -> [subinterpreters] Improve test coverage for subinterpreters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:42:10 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:42:10 +0000 Subject: [issue30439] [subinterpreters] Expose the subinterpreters C-API in the stdlib In-Reply-To: <1495517065.49.0.193361600538.issue30439@psf.upfronthosting.co.za> Message-ID: <1589503330.65.0.0259651174552.issue30439@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Library (Lib) title: Expose the subinterpreters C-API in the stdlib. -> [subinterpreters] Expose the subinterpreters C-API in the stdlib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:42:26 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:42:26 +0000 Subject: [issue33607] [subinterpreters] Explicitly track object ownership (and allocator). In-Reply-To: <1527016778.74.0.682650639539.issue33607@psf.upfronthosting.co.za> Message-ID: <1589503346.16.0.655619893649.issue33607@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:42:39 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:42:39 +0000 Subject: [issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.) In-Reply-To: <1580484815.27.0.407070570821.issue39511@roundup.psfhosted.org> Message-ID: <1589503359.47.0.356075237834.issue39511@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:43:16 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:43:16 +0000 Subject: [issue40572] [subinterpreters] Support basic asynchronous cross-interpreter operations. In-Reply-To: <1588976931.16.0.539865430025.issue40572@roundup.psfhosted.org> Message-ID: <1589503396.25.0.0139683095587.issue40572@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters title: Support basic asynchronous cross-interpreter operations. -> [subinterpreters] Support basic asynchronous cross-interpreter operations. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:43:26 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:43:26 +0000 Subject: [issue40288] [subinterpreters] atexit module should not be loaded more than once per interpreter In-Reply-To: <1586917009.7.0.806642420762.issue40288@roundup.psfhosted.org> Message-ID: <1589503406.61.0.316177307452.issue40288@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Library (Lib) title: atexit module should not be loaded more than once per interpreter -> [subinterpreters] atexit module should not be loaded more than once per interpreter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:43:43 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:43:43 +0000 Subject: [issue39881] [subinterpreters] Multiple Interpreters in the Stdlib (PEP 554) - High-level Implementation In-Reply-To: <1583531445.05.0.495452199299.issue39881@roundup.psfhosted.org> Message-ID: <1589503423.4.0.72197001525.issue39881@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Interpreter Core title: Multiple Interpreters in the Stdlib (PEP 554) - High-level Implementation -> [subinterpreters] Multiple Interpreters in the Stdlib (PEP 554) - High-level Implementation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:43:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:43:58 +0000 Subject: [issue40412] [subinterpreters] inittab_copy not set to NULL after free, can lead to crashes when running multiple interpreters in a single process In-Reply-To: <1588035109.97.0.994346077967.issue40412@roundup.psfhosted.org> Message-ID: <1589503438.98.0.2060078912.issue40412@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters title: inittab_copy not set to NULL after free, can lead to crashes when running multiple interpreters in a single process -> [subinterpreters] inittab_copy not set to NULL after free, can lead to crashes when running multiple interpreters in a single process _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:44:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:44:33 +0000 Subject: [issue38865] [subinterpreters] Can Py_Finalize() be called if the current interpreter is not the main interpreter? In-Reply-To: <1574264524.01.0.330569638863.issue38865@roundup.psfhosted.org> Message-ID: <1589503473.03.0.524666052027.issue38865@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Interpreter Core title: Can Py_Finalize() be called if the current interpreter is not the main interpreter? -> [subinterpreters] Can Py_Finalize() be called if the current interpreter is not the main interpreter? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:44:59 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:44:59 +0000 Subject: [issue36479] [subinterpreters] Exit threads when interpreter is finalizing rather than runtime. In-Reply-To: <1553896742.19.0.478613119545.issue36479@roundup.psfhosted.org> Message-ID: <1589503499.54.0.932840455244.issue36479@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters title: Exit threads when interpreter is finalizing rather than runtime. -> [subinterpreters] Exit threads when interpreter is finalizing rather than runtime. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:45:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:45:46 +0000 Subject: [issue39958] Deadlock in _PyInterpreterState_DeleteExceptMain with HEAD_LOCK(runtime) In-Reply-To: <1584127663.81.0.927144728358.issue39958@roundup.psfhosted.org> Message-ID: <1589503546.83.0.52633461872.issue39958@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:46:02 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:46:02 +0000 Subject: [issue10915] [subinterpreters] Make the PyGILState API compatible with multiple interpreters In-Reply-To: <1295103161.75.0.771875465176.issue10915@psf.upfronthosting.co.za> Message-ID: <1589503562.67.0.478393183572.issue10915@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Interpreter Core title: Make the PyGILState API compatible with multiple interpreters -> [subinterpreters] Make the PyGILState API compatible with multiple interpreters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:46:20 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:46:20 +0000 Subject: [issue36877] [subinterpreters][meta] Move fields from _PyRuntimeState to PyInterpreterState. In-Reply-To: <1557515517.79.0.229526383765.issue36877@roundup.psfhosted.org> Message-ID: <1589503580.36.0.802686900713.issue36877@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Interpreter Core title: [meta] Move fields from _PyRuntimeState to PyInterpreterState. -> [subinterpreters][meta] Move fields from _PyRuntimeState to PyInterpreterState. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:49:42 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:49:42 +0000 Subject: [issue1332869] Fatal Python error: Interpreter not initialized Message-ID: <1589503782.15.0.335029278059.issue1332869@roundup.psfhosted.org> STINNER Victor added the comment: No activity since 2006, I close the issue as out of date. ---------- nosy: +vstinner resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:52:12 2020 From: report at bugs.python.org (paul rubin) Date: Fri, 15 May 2020 00:52:12 +0000 Subject: [issue40028] Math module method to find prime factors for non-negative int n In-Reply-To: <1584733974.83.0.0417466712916.issue40028@roundup.psfhosted.org> Message-ID: <1589503932.16.0.372535930834.issue40028@roundup.psfhosted.org> paul rubin added the comment: I don't think the interface needs much bikeshedding, as long as the implementer chooses something reasonable. E.g. factor(30) gives the list [2,3,5]. Implementation is harder if you want to handle numbers of non-trivial size. Neal Koblitz's book "A Course in Number Theory and Cryptogoraphy" has good coverage of factoring algorithms. To factor numbers up to 2**64, Pollard's rho method is simple to code and has always worked for me, but I don't know if there are specific numbers in that range that could give it trouble. For bigger numbers you need fancier algorithms and eventually fancy hardware and long computing runs. Part of a design discussion would include trying to decide the scope of such a module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:52:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:52:49 +0000 Subject: [issue38160] [subinterpreters] Add a "PyInterpreterState *" field to PyTypeObject. In-Reply-To: <1568381609.99.0.399978002813.issue38160@roundup.psfhosted.org> Message-ID: <1589503969.52.0.739653601213.issue38160@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Interpreter Core title: Add a "PyInterpreterState *" field to PyTypeObject. -> [subinterpreters] Add a "PyInterpreterState *" field to PyTypeObject. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:53:42 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:53:42 +0000 Subject: [issue37888] [subinterpreters] Confusing docs about state after calling Py_NewInterpreter() In-Reply-To: <1566241522.51.0.41054137805.issue37888@roundup.psfhosted.org> Message-ID: <1589504022.59.0.958169880044.issue37888@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters title: Sub-interpreters : Confusing docs about state after calling Py_NewInterpreter() -> [subinterpreters] Confusing docs about state after calling Py_NewInterpreter() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:59:53 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Fri, 15 May 2020 00:59:53 +0000 Subject: [issue38872] Document exec symbol for codeop.compile_command In-Reply-To: <1574298846.26.0.835938077059.issue38872@roundup.psfhosted.org> Message-ID: <1589504393.51.0.204626549051.issue38872@roundup.psfhosted.org> Joannah Nanjekye added the comment: New changeset 7ba1f75f3f02b4b50ac6d7e17d15e467afa36aac by Joannah Nanjekye in branch 'master': bpo-38872: Document exec symbol for codeop.compile_command (GH-20047) https://github.com/python/cpython/commit/7ba1f75f3f02b4b50ac6d7e17d15e467afa36aac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 20:47:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 00:47:33 +0000 Subject: [issue16826] Don't check for PYTHONCASEOK if interpreter started with -E In-Reply-To: <1356964491.55.0.198222992625.issue16826@psf.upfronthosting.co.za> Message-ID: <1589503653.9.0.440596879789.issue16826@roundup.psfhosted.org> STINNER Victor added the comment: Issue fixed in bpo-38691: commit fc72ab6913f2b5337ae7fda711f2de846d38f479 Author: idomic Date: Mon Mar 9 07:57:53 2020 -0400 bpo-38691: importlib ignores PYTHONCASEOK if -E is used (GH-18627) The importlib module now ignores the PYTHONCASEOK environment variable when the -E or -I command line options are being used. ---------- nosy: +vstinner resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> importlib: PYTHONCASEOK should be ignored when using python3 -E _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:00:11 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 15 May 2020 01:00:11 +0000 Subject: [issue38872] Document exec symbol for codeop.compile_command In-Reply-To: <1574298846.26.0.835938077059.issue38872@roundup.psfhosted.org> Message-ID: <1589504411.26.0.543323121587.issue38872@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +19403 pull_request: https://github.com/python/cpython/pull/20098 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:00:21 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 15 May 2020 01:00:21 +0000 Subject: [issue38872] Document exec symbol for codeop.compile_command In-Reply-To: <1574298846.26.0.835938077059.issue38872@roundup.psfhosted.org> Message-ID: <1589504421.76.0.811601411886.issue38872@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19404 pull_request: https://github.com/python/cpython/pull/20099 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:01:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:01:35 +0000 Subject: [issue35969] Interpreter crashes with "can't initialize init_sys_streams" when abc fails to import In-Reply-To: <1549908934.51.0.669039845286.issue35969@roundup.psfhosted.org> Message-ID: <1589504495.56.0.672144426361.issue35969@roundup.psfhosted.org> STINNER Victor added the comment: > I agree with @p-ganssle, If exist some problem on initialize Python interpreter it would be great if it return a non-zero status and avoid an abort() Since Python 3.8 (PEP 587), Python no longer call abort() on initialization error. $ echo bug > abc.py $ PYTHONPATH=$PWD python3.8 -c pass Fatal Python error: init_sys_streams: can't initialize sys standard streams Python runtime state: core initialized Traceback (most recent call last): File "/usr/lib64/python3.8/io.py", line 52, in File "/home/vstinner/abc.py", line 1, in NameError: name 'bug' is not defined I don't think that it's worth it to change Python 3.7. The initial issue was that abort() was called in this case. It's no longer the case, so I close the issue. If someone cares abou the more general issue with the current directory being added to sys.path, please open a separated issue (or look for existing issues). ---------- components: +Interpreter Core resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.9 -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:02:08 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:02:08 +0000 Subject: [issue28411] [subinterpreters] Eliminate PyInterpreterState.modules. In-Reply-To: <1476138783.81.0.661524291989.issue28411@psf.upfronthosting.co.za> Message-ID: <1589504528.29.0.9152080349.issue28411@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Interpreter Core title: Eliminate PyInterpreterState.modules. -> [subinterpreters] Eliminate PyInterpreterState.modules. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:03:53 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:03:53 +0000 Subject: [issue34821] Crash after run Python interpreter from removed directory In-Reply-To: <1538061948.41.0.545547206417.issue34821@psf.upfronthosting.co.za> Message-ID: <1589504633.45.0.976311647172.issue34821@roundup.psfhosted.org> STINNER Victor added the comment: I understood that the bug was fixed in Python 3.5. Python 3.4 and older are no longer supported, I close the issue. ---------- nosy: +vstinner resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:04:57 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 15 May 2020 01:04:57 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1589504697.28.0.069850018005.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 16ab07063cb564c1937714bd39d6915172f005b5 by Pablo Galindo in branch 'master': bpo-40334: Correctly identify invalid target in assignment errors (GH-20076) https://github.com/python/cpython/commit/16ab07063cb564c1937714bd39d6915172f005b5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:06:13 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:06:13 +0000 Subject: [issue34346] dir() hangs interpreter In-Reply-To: <1533563869.83.0.56676864532.issue34346@psf.upfronthosting.co.za> Message-ID: <1589504773.48.0.214370699983.issue34346@roundup.psfhosted.org> STINNER Victor added the comment: > Only present with 2.7 new-style classes. Old-style 2.7 did not exhibit this behavior nor did 3.x. Python 2 is no longer supported, I close the issue as out of date. ---------- nosy: +vstinner resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:06:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:06:54 +0000 Subject: [issue31375] [subinterpreters] Add the interpreters module to stdlib (PEP 554). In-Reply-To: <1504739781.57.0.317072696528.issue31375@psf.upfronthosting.co.za> Message-ID: <1589504814.03.0.810172165967.issue31375@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters title: Add the interpreters module to stdlib (PEP 554). -> [subinterpreters] Add the interpreters module to stdlib (PEP 554). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:09:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:09:24 +0000 Subject: [issue26461] PyInterpreterState_Head(), PyThreadState_Next() etc can't be sanely used In-Reply-To: <1456787950.96.0.423186176416.issue26461@psf.upfronthosting.co.za> Message-ID: <1589504964.65.0.497024464633.issue26461@roundup.psfhosted.org> STINNER Victor added the comment: Duplicate of bpo-1021318. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> PyThreadState_Next not thread safe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:09:40 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:09:40 +0000 Subject: [issue1021318] PyThreadState_Next not thread safe Message-ID: <1589504980.64.0.597021901105.issue1021318@roundup.psfhosted.org> STINNER Victor added the comment: I marked bpo-26461 as a duplicate of this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:10:05 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:10:05 +0000 Subject: [issue4202] [subinterpreters] Multiple interpreters and readline module hook functions. In-Reply-To: <1224903164.25.0.50876142409.issue4202@psf.upfronthosting.co.za> Message-ID: <1589505005.34.0.787798507405.issue4202@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Interpreter Core title: Multiple interpreters and readline module hook functions. -> [subinterpreters] Multiple interpreters and readline module hook functions. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:11:17 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Fri, 15 May 2020 01:11:17 +0000 Subject: [issue38872] Document exec symbol for codeop.compile_command In-Reply-To: <1574298846.26.0.835938077059.issue38872@roundup.psfhosted.org> Message-ID: <1589505077.64.0.415209893623.issue38872@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:12:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:12:17 +0000 Subject: [issue24228] Interpreter triggers segmentation fault at the starting In-Reply-To: <1431964179.84.0.528825481324.issue24228@psf.upfronthosting.co.za> Message-ID: <1589505137.6.0.187857165109.issue24228@roundup.psfhosted.org> STINNER Victor added the comment: No activity since 2015, it was a bug in Python 3.4. Please retry with Python 3.8.3. I close the issue. ---------- nosy: +vstinner resolution: third party -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:13:31 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:13:31 +0000 Subject: [issue24554] [subinterpreters] GC should happen when a subinterpreter is destroyed In-Reply-To: <1435884077.54.0.517018915499.issue24554@psf.upfronthosting.co.za> Message-ID: <1589505211.26.0.10669658579.issue24554@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Interpreter Core title: GC should happen when a subinterpreter is destroyed -> [subinterpreters] GC should happen when a subinterpreter is destroyed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:13:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:13:47 +0000 Subject: [issue6531] [subinterpreters] atexit_callfuncs() crashing within Py_Finalize() when using multiple interpreters. In-Reply-To: <1248175169.79.0.15962102552.issue6531@psf.upfronthosting.co.za> Message-ID: <1589505227.32.0.784859209169.issue6531@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters -Interpreter Core title: atexit_callfuncs() crashing within Py_Finalize() when using multiple interpreters. -> [subinterpreters] atexit_callfuncs() crashing within Py_Finalize() when using multiple interpreters. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:18:14 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:18:14 +0000 Subject: [issue30439] [subinterpreters] Expose the subinterpreters C-API in the stdlib In-Reply-To: <1495517065.49.0.193361600538.issue30439@psf.upfronthosting.co.za> Message-ID: <1589505494.09.0.58046671619.issue30439@roundup.psfhosted.org> STINNER Victor added the comment: I mark this issue as a duplicate of bpo-32604. ---------- nosy: +vstinner resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> [subinterpreters] Expose the subinterpreters C-API in Python for testing use. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:18:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:18:54 +0000 Subject: [issue31375] [subinterpreters] Add the interpreters module to stdlib (PEP 554). In-Reply-To: <1504739781.57.0.317072696528.issue31375@psf.upfronthosting.co.za> Message-ID: <1589505534.48.0.299492541158.issue31375@roundup.psfhosted.org> STINNER Victor added the comment: I mark this issue as a duplicate of bpo-32604. ---------- nosy: +vstinner resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> [subinterpreters] Expose the subinterpreters C-API in Python for testing use. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:19:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:19:11 +0000 Subject: [issue32604] [subinterpreters] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1589505551.3.0.635538408718.issue32604@roundup.psfhosted.org> STINNER Victor added the comment: I marked bpo-30439 and bpo-31375 as duplicates of this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:19:45 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Fri, 15 May 2020 01:19:45 +0000 Subject: [issue38872] Document exec symbol for codeop.compile_command In-Reply-To: <1574298846.26.0.835938077059.issue38872@roundup.psfhosted.org> Message-ID: <1589505585.25.0.976890680459.issue38872@roundup.psfhosted.org> Joannah Nanjekye added the comment: New changeset c1203b75ffe429b28cb2e2480deb0d0b8d3a941c by Miss Islington (bot) in branch '3.7': bpo-38872: Document exec symbol for codeop.compile_command (GH-20047) (#20099) https://github.com/python/cpython/commit/c1203b75ffe429b28cb2e2480deb0d0b8d3a941c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:20:13 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:20:13 +0000 Subject: [issue39881] [subinterpreters] Multiple Interpreters in the Stdlib (PEP 554) - High-level Implementation In-Reply-To: <1583531445.05.0.495452199299.issue39881@roundup.psfhosted.org> Message-ID: <1589505613.89.0.860559017722.issue39881@roundup.psfhosted.org> STINNER Victor added the comment: I mark this issue as a duplicate of bpo-32604. Please change the bpo number of your PRs: use bpo-32604. ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> [subinterpreters] Expose the subinterpreters C-API in Python for testing use. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:21:11 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Fri, 15 May 2020 01:21:11 +0000 Subject: [issue32604] [subinterpreters] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1589505671.27.0.822543635878.issue32604@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +nanjekyejoannah nosy_count: 12.0 -> 13.0 pull_requests: +19405 pull_request: https://github.com/python/cpython/pull/18817 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:21:19 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Fri, 15 May 2020 01:21:19 +0000 Subject: [issue32604] [subinterpreters] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1589505679.48.0.700571684699.issue32604@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- pull_requests: +19406 pull_request: https://github.com/python/cpython/pull/19985 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:22:41 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:22:41 +0000 Subject: [issue32604] [subinterpreters] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1589505761.52.0.556756967663.issue32604@roundup.psfhosted.org> STINNER Victor added the comment: I marked bpo-39881 as a duplicate of this issue. It has two open PRs: * PR 18817 * PR 19985 I changed their title to use bpo-32604. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:23:26 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:23:26 +0000 Subject: [issue32604] [subinterpreters] PEP 554 implementation: add interpreters module In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1589505806.3.0.470697822784.issue32604@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: [subinterpreters] Expose the subinterpreters C-API in Python for testing use. -> [subinterpreters] PEP 554 implementation: add interpreters module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:26:55 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:26:55 +0000 Subject: [issue10915] [subinterpreters] Make the PyGILState API compatible with multiple interpreters In-Reply-To: <1295103161.75.0.771875465176.issue10915@psf.upfronthosting.co.za> Message-ID: <1589506015.69.0.743158536661.issue10915@roundup.psfhosted.org> STINNER Victor added the comment: I marked this issue as a duplicate of bpo-15751. ---------- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> [subinterpreters] Support subinterpreters in the GIL state API _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:27:15 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:27:15 +0000 Subject: [issue15751] [subinterpreters] Make the PyGILState API compatible with subinterpreters In-Reply-To: <1345526301.75.0.455071650321.issue15751@psf.upfronthosting.co.za> Message-ID: <1589506035.11.0.339128662582.issue15751@roundup.psfhosted.org> STINNER Victor added the comment: I marked bpo-10915 as a duplicate of this issue. See also bpo-1021318: "PyThreadState_Next not thread safe". ---------- components: +C API title: [subinterpreters] Support subinterpreters in the GIL state API -> [subinterpreters] Make the PyGILState API compatible with subinterpreters versions: -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:28:36 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:28:36 +0000 Subject: [issue4202] [subinterpreters] Multiple interpreters and readline module hook functions. In-Reply-To: <1224903164.25.0.50876142409.issue4202@psf.upfronthosting.co.za> Message-ID: <1589506116.75.0.496734131221.issue4202@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-15751: [subinterpreters] Make the PyGILState API compatible with subinterpreters. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:28:51 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:28:51 +0000 Subject: [issue15751] [subinterpreters] Make the PyGILState API compatible with subinterpreters In-Reply-To: <1345526301.75.0.455071650321.issue15751@psf.upfronthosting.co.za> Message-ID: <1589506131.63.0.0871298717409.issue15751@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-4202: [subinterpreters] Multiple interpreters and readline module hook functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:31:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:31:54 +0000 Subject: [issue36877] [subinterpreters][meta] Move fields from _PyRuntimeState to PyInterpreterState. In-Reply-To: <1557515517.79.0.229526383765.issue36877@roundup.psfhosted.org> Message-ID: <1589506314.97.0.376891637352.issue36877@roundup.psfhosted.org> STINNER Victor added the comment: I mark this issue as a duplicate of bpo-40512. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> [subinterpreters] Meta issue: per-interpreter GIL _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:32:00 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:32:00 +0000 Subject: [issue40512] [subinterpreters] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1589506320.97.0.315965485311.issue40512@roundup.psfhosted.org> STINNER Victor added the comment: I marked bpo-36877 "[subinterpreters][meta] Move fields from _PyRuntimeState to PyInterpreterState" as a duplicate of this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:34:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:34:28 +0000 Subject: [issue40513] [subinterpreters] Move _PyRuntimeState.ceval to PyInterpreterState In-Reply-To: <1588683392.98.0.918387482163.issue40513@roundup.psfhosted.org> Message-ID: <1589506468.8.0.641220267682.issue40513@roundup.psfhosted.org> STINNER Victor added the comment: Well, the remaining field which should be moved is the GIL lock itself. It will likely be the last thing to do in bpo-40512. I consider that the work is done in this issue and so I close it. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:37:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:37:33 +0000 Subject: [issue36876] [subinterpreters] Global C variables are a problem In-Reply-To: <1557514902.13.0.853517754348.issue36876@roundup.psfhosted.org> Message-ID: <1589506653.54.0.78239455033.issue36876@roundup.psfhosted.org> STINNER Victor added the comment: More and more C extensions are converted to multiphase initialization API (PEP 489) and their global variables are moved into a new module state. bpo-39465 will make _Py_IDENTIFIER compatible with subinterpreters. See also bpo-40521 for caches like free lists and Unicode interned strings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:38:24 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Fri, 15 May 2020 01:38:24 +0000 Subject: [issue38872] Document exec symbol for codeop.compile_command In-Reply-To: <1574298846.26.0.835938077059.issue38872@roundup.psfhosted.org> Message-ID: <1589506704.88.0.390852055591.issue38872@roundup.psfhosted.org> Joannah Nanjekye added the comment: New changeset eb5ce324f724a59c51d7a76d1dd49b550cdf386b by Miss Islington (bot) in branch '3.8': bpo-38872: Document exec symbol for codeop.compile_command (GH-20047) (GH-20098) https://github.com/python/cpython/commit/eb5ce324f724a59c51d7a76d1dd49b550cdf386b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:39:13 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:39:13 +0000 Subject: [issue40234] [subinterpreters] Disallow daemon threads in subinterpreters optionally In-Reply-To: <1586387812.86.0.0296012569674.issue40234@roundup.psfhosted.org> Message-ID: <1589506753.48.0.5711604972.issue40234@roundup.psfhosted.org> STINNER Victor added the comment: Issue title: "[subinterpreters] Disallow daemon threads in subinterpreters optionally" This issue is basically addressed by bpo-40453: daemon threads continue to be allowed by default when using Py_NewInterpreter(), but it's possible to opt-in for "isolated" subinterpreters where threads are denied. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:41:00 2020 From: report at bugs.python.org (David Bolen) Date: Fri, 15 May 2020 01:41:00 +0000 Subject: [issue36876] [subinterpreters] Global C variables are a problem In-Reply-To: <1557514902.13.0.853517754348.issue36876@roundup.psfhosted.org> Message-ID: <1589506860.14.0.36391436041.issue36876@roundup.psfhosted.org> Change by David Bolen : ---------- nosy: -db3l _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:51:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:51:49 +0000 Subject: [issue33607] [subinterpreters] Explicitly track object ownership (and allocator). In-Reply-To: <1527016778.74.0.682650639539.issue33607@psf.upfronthosting.co.za> Message-ID: <1589507509.03.0.628601391814.issue33607@roundup.psfhosted.org> STINNER Victor added the comment: I see two options: * Add a field to PyObject, but only in a special debug mode. Maybe not even in Py_DEBUG (since I managed to make Py_DEBUG ABI-compatible with the release mode!) * Add an hash table mapping an object to its interpreter. The hash table would only be used in debug mode. It may even be turned on at runtime depending on a command line option or something else. See also bpo-40514: [subinterpreters] Add --experimental-isolated-subinterpreters build option. Antoine: "Can I ask why you're considering this? I thought you didn't want to transfer ownership between interpreters." I guess that the purpose is to ensure that: detect when an object is shared between two interpreters. Currently, tons of objects are still shared between interpreters. Starting with static types: see bpo-40601 "[C API] Hide static types from the limited C API". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:51:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:51:54 +0000 Subject: [issue40601] [C API] Hide static types from the limited C API In-Reply-To: <1589235805.82.0.0888479979707.issue40601@roundup.psfhosted.org> Message-ID: <1589507514.85.0.791436753363.issue40601@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 21:55:20 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 01:55:20 +0000 Subject: [issue40512] [subinterpreters] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1589507720.93.0.111717574979.issue40512@roundup.psfhosted.org> STINNER Victor added the comment: I created a new "Subinterpreters" component in the bug tracker. It may help to better track all issues related to subinterpreters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 22:08:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 02:08:29 +0000 Subject: [issue40548] Always run GitHub action jobs, even on documentation-only jobs In-Reply-To: <1588873177.1.0.956855864504.issue40548@roundup.psfhosted.org> Message-ID: <1589508509.57.0.186247839562.issue40548@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 6a78589b6b22878491a4b042bb8b3161e1d120f6 by Filipe La?ns in branch 'master': bpo-40548: github actions: pass the changes check on no source changes (GH-20097) https://github.com/python/cpython/commit/6a78589b6b22878491a4b042bb8b3161e1d120f6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 22:12:36 2020 From: report at bugs.python.org (Huon Wilson) Date: Fri, 15 May 2020 02:12:36 +0000 Subject: [issue40630] tracemalloc: allow resetting peak memory metric without touching other traces Message-ID: <1589508756.01.0.239997467276.issue40630@roundup.psfhosted.org> New submission from Huon Wilson : Per https://mail.python.org/archives/list/python-ideas at python.org/thread/QDWI37A4TJXOYUKULGPY2GKD7IG2JNDC/ , it would be helpful to have a function that resets the peak memory usage of the tracemalloc module, without changing all the traces. This allows for recording the peak memory usage of a specific region of code, rather than only the peak since the last tracemalloc.start() or tracemalloc.clear_traces() call. ---------- components: Library (Lib) messages: 368916 nosy: huonw, vstinner priority: normal severity: normal status: open title: tracemalloc: allow resetting peak memory metric without touching other traces type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 22:22:55 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 15 May 2020 02:22:55 +0000 Subject: [issue40612] Make traceback module's formatting of SyntaxError more similar to system formatting In-Reply-To: <1589343535.08.0.511471445795.issue40612@roundup.psfhosted.org> Message-ID: <1589509375.37.0.674268872401.issue40612@roundup.psfhosted.org> miss-islington added the comment: New changeset 15bc9ab301d73f20bff47a12ef05326feb40f797 by Guido van Rossum in branch 'master': bpo-40612: Fix SyntaxError edge cases in traceback formatting (GH-20072) https://github.com/python/cpython/commit/15bc9ab301d73f20bff47a12ef05326feb40f797 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 22:47:58 2020 From: report at bugs.python.org (Anthony Sottile) Date: Fri, 15 May 2020 02:47:58 +0000 Subject: [issue40492] -m cProfile -o f.pstats with a script that does chdir() writes to the changed directory and not `.` In-Reply-To: <1588563387.24.0.675526674384.issue40492@roundup.psfhosted.org> Message-ID: <1589510878.07.0.971990597229.issue40492@roundup.psfhosted.org> Anthony Sottile added the comment: @serhiy: this was pretty straightfowrard to fix as you suspected -- would you be able to review it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 22:54:51 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 02:54:51 +0000 Subject: [issue40246] Different error messages for same error - invalid string prefixes In-Reply-To: <1586541958.33.0.891000303304.issue40246@roundup.psfhosted.org> Message-ID: <1589511291.21.0.955188472357.issue40246@roundup.psfhosted.org> STINNER Victor added the comment: The error can be seen on the new cool AMD64 Arch Linux VintageParser 3.x, vintage is the new cool: https://buildbot.python.org/all/#builders/648/builds/185 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 22:54:19 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 02:54:19 +0000 Subject: [issue40246] Different error messages for same error - invalid string prefixes In-Reply-To: <1586541958.33.0.891000303304.issue40246@roundup.psfhosted.org> Message-ID: <1589511259.58.0.717499662187.issue40246@roundup.psfhosted.org> STINNER Victor added the comment: The following change broke test_fstring when using the old parser. I reopen the issue. commit 846d8b28ab9bb6197ee81372820311c0abe509c0 (refs/bisect/bad) Author: Lysandros Nikolaou Date: Mon May 4 14:32:18 2020 +0300 bpo-40246: Revert reporting of invalid string prefixes (GH-19888) Due to backwards compatibility concerns regarding keywords immediately followed by a string without whitespace between them (like in `bg="#d00" if clear else"#fca"`) will fail to parse, commit 41d5b94af44e34ac05d4cd57460ed104ccf96628 has to be reverted. $ ./python -X oldparser -m test -v test_fstring (...) ====================================================================== FAIL: test_invalid_string_prefixes (test.test_fstring.TestCase) (str='BF""') ---------------------------------------------------------------------- File "", line 1 BF"" ^ SyntaxError: invalid syntax During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/vstinner/python/master/Lib/test/test_fstring.py", line 29, in assertAllRaise eval(str) AssertionError: "unexpected EOF while parsing" does not match "invalid syntax (, line 1)" (...) ---------- resolution: wont fix -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 23:01:01 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 03:01:01 +0000 Subject: [issue40192] time.thread_time isn't outputting in nanoseconds in AIX In-Reply-To: <1586049332.22.0.327858503775.issue40192@roundup.psfhosted.org> Message-ID: <1589511661.31.0.537389907227.issue40192@roundup.psfhosted.org> STINNER Victor added the comment: Which implementation is currently used on AIX? What's the output of the following command? $ ./python Python 3.9.0a6+ (heads/master:4a12d12186, May 15 2020, 04:55:17) >>> import time; time.get_clock_info('thread_time') namespace(adjustable=False, implementation='clock_gettime(CLOCK_THREAD_CPUTIME_ID)', monotonic=True, resolution=1e-09) ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 23:07:15 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 03:07:15 +0000 Subject: [issue40548] Always run GitHub action jobs, even on documentation-only jobs In-Reply-To: <1588873177.1.0.956855864504.issue40548@roundup.psfhosted.org> Message-ID: <1589512035.64.0.478192065761.issue40548@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19407 pull_request: https://github.com/python/cpython/pull/20100 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 23:27:55 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 03:27:55 +0000 Subject: [issue40548] Always run GitHub action jobs, even on documentation-only jobs In-Reply-To: <1588873177.1.0.956855864504.issue40548@roundup.psfhosted.org> Message-ID: <1589513275.7.0.547235324787.issue40548@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 07bd5cf3d9551ae84100e6400836163fcd507f07 by Victor Stinner in branch '3.8': [3.8] bpo-40548: GitHub Action workflow: skip jobs on doc only PRs (GH-20100) https://github.com/python/cpython/commit/07bd5cf3d9551ae84100e6400836163fcd507f07 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 23:28:51 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 15 May 2020 03:28:51 +0000 Subject: [issue40548] Always run GitHub action jobs, even on documentation-only jobs In-Reply-To: <1588873177.1.0.956855864504.issue40548@roundup.psfhosted.org> Message-ID: <1589513331.37.0.0678072847837.issue40548@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +19408 pull_request: https://github.com/python/cpython/pull/20101 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 23:42:10 2020 From: report at bugs.python.org (Huon Wilson) Date: Fri, 15 May 2020 03:42:10 +0000 Subject: [issue40630] tracemalloc: allow resetting peak memory metric without touching other traces In-Reply-To: <1589508756.01.0.239997467276.issue40630@roundup.psfhosted.org> Message-ID: <1589514130.91.0.380785215512.issue40630@roundup.psfhosted.org> Change by Huon Wilson : ---------- keywords: +patch pull_requests: +19409 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20102 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 14 23:46:31 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 15 May 2020 03:46:31 +0000 Subject: [issue40548] Always run GitHub action jobs, even on documentation-only jobs In-Reply-To: <1588873177.1.0.956855864504.issue40548@roundup.psfhosted.org> Message-ID: <1589514391.71.0.980904688715.issue40548@roundup.psfhosted.org> miss-islington added the comment: New changeset 6ad51a1fd6715d8266a43a4a89d496cf0615aace by Miss Islington (bot) in branch '3.7': [3.8] bpo-40548: GitHub Action workflow: skip jobs on doc only PRs (GH-20100) https://github.com/python/cpython/commit/6ad51a1fd6715d8266a43a4a89d496cf0615aace ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 00:36:59 2020 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 15 May 2020 04:36:59 +0000 Subject: [issue40246] Different error messages for same error - invalid string prefixes In-Reply-To: <1586541958.33.0.891000303304.issue40246@roundup.psfhosted.org> Message-ID: <1589517419.73.0.0965793178147.issue40246@roundup.psfhosted.org> Guido van Rossum added the comment: We should run the tests with the old parser in at least one build. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 01:01:25 2020 From: report at bugs.python.org (hai shi) Date: Fri, 15 May 2020 05:01:25 +0000 Subject: [issue40237] Test code coverage (C) job of Travis CI fails on test_distutils which creates _configtest.gcno file In-Reply-To: <1586436730.26.0.786791148526.issue40237@roundup.psfhosted.org> Message-ID: <1589518885.85.0.962216120727.issue40237@roundup.psfhosted.org> hai shi added the comment: > It seems like there is coverage on both C and Python code. Great, MAYBE we can use this coverage result to improve our testcases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 01:19:44 2020 From: report at bugs.python.org (paul rubin) Date: Fri, 15 May 2020 05:19:44 +0000 Subject: [issue40411] frozen collection.Counter In-Reply-To: <1588031999.2.0.641079021792.issue40411@roundup.psfhosted.org> Message-ID: <1589519984.47.0.0422882791493.issue40411@roundup.psfhosted.org> paul rubin added the comment: Note: PEP 603 may essentially take care of this, if it is accepted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 02:14:52 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 15 May 2020 06:14:52 +0000 Subject: [issue40028] Math module method to find prime factors for non-negative int n In-Reply-To: <1584733974.83.0.0417466712916.issue40028@roundup.psfhosted.org> Message-ID: <1589523292.73.0.410806946298.issue40028@roundup.psfhosted.org> Christian Heimes added the comment: > I don't think the interface needs much bikeshedding, as long as the implementer chooses something reasonable. Bikeshedding works more like "build it and they will come". It's going to happen especially when the interface looks easy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 03:27:54 2020 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 15 May 2020 07:27:54 +0000 Subject: [issue40028] Math module method to find prime factors for non-negative int n In-Reply-To: <1584733974.83.0.0417466712916.issue40028@roundup.psfhosted.org> Message-ID: <1589527674.27.0.969580379988.issue40028@roundup.psfhosted.org> Mark Dickinson added the comment: @R?mi Lapeyre (since you requested re-opening of the issue :-) Are you interested in putting together a PEP for this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 03:43:12 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 15 May 2020 07:43:12 +0000 Subject: [issue40492] -m cProfile -o f.pstats with a script that does chdir() writes to the changed directory and not `.` In-Reply-To: <1588563387.24.0.675526674384.issue40492@roundup.psfhosted.org> Message-ID: <1589528592.24.0.201254102717.issue40492@roundup.psfhosted.org> Serhiy Storchaka added the comment: I am not sure what is better: to fix it at high level, in main() for cProfile and cProfile, or at low level, in methods runctx() and run() of profile._Utils. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 04:26:14 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 15 May 2020 08:26:14 +0000 Subject: [issue40608] PY3.8 GC segfault (Py_TRASHCAN_SAFE_BEGIN/END are not backwards compatible) In-Reply-To: <1589306849.27.0.146369076662.issue40608@roundup.psfhosted.org> Message-ID: <1589531174.98.0.482705951809.issue40608@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +patch pull_requests: +19411 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20103 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 05:50:03 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 15 May 2020 09:50:03 +0000 Subject: [issue36264] os.path.expanduser should not use HOME on windows In-Reply-To: <1552320597.36.0.934790753816.issue36264@roundup.psfhosted.org> Message-ID: <1589536203.29.0.471153619502.issue36264@roundup.psfhosted.org> Jason R. Coombs added the comment: Today I ran into an issue due to this change. I have a test that sets `os.environ['HOME']` in order to ensure that `os.path.expanduser(~)` returns that value (https://github.com/pypa/setuptools/blob/f6f25adfc81df76e186bf6c3738a1baa0f92be05/setuptools/tests/test_packageindex.py#L288). > I can't find any documentation of `HOME` being relevant on windows (only on posix). First, I'll nitpick that Windows is posix-compliant. What you probably mean here is "Unix". But the important thing here is that one of the beautiful things about Python is how it _bridges_ the gap between Unix and Windows, in many ways providing a uniform interface across various platforms. By supporting `HOME`, Python provides a single mechanism that a caller can rely on to indicate a home directory. With this change, a user is now required to provide separate guidance for invocation on Windows. In addition to the Setuptools test above that failed, I know I've relied on this behavior before in uses where I've written documentation advising users to set "HOME" to override a location derived from ~ (perhaps for .pypirc, but probably for others as well). Now guidance like that changes from: Set HOME to the target directory. to: If on Windows and Python 3.8 or later, set USERPROFILE to the target directory. Otherwise, set HOME to the target directory. It also means that code like the tests in Setuptools need to implement this branching logic as well. Can we restore _some_ mechanism by which a caller can supply the home directory in a unified way? ---------- nosy: +jaraco _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 05:52:38 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 15 May 2020 09:52:38 +0000 Subject: [issue36264] os.path.expanduser should not use HOME on windows In-Reply-To: <1552320597.36.0.934790753816.issue36264@roundup.psfhosted.org> Message-ID: <1589536358.39.0.77738719025.issue36264@roundup.psfhosted.org> Jason R. Coombs added the comment: I should also point out that this was a documented feature of Python that was removed without any deprecation period. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 06:03:05 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 15 May 2020 10:03:05 +0000 Subject: [issue36264] os.path.expanduser should not use HOME on windows In-Reply-To: <1552320597.36.0.934790753816.issue36264@roundup.psfhosted.org> Message-ID: <1589536985.13.0.52047002386.issue36264@roundup.psfhosted.org> Jason R. Coombs added the comment: I addressed the [setuptools test suite issue](https://github.com/pypa/setuptools/issues/2112) with [this commit](https://github.com/pypa/setuptools/commit/f866311d60f54499c3637309e3429780d8c8f218). What was a one-line elegant solution is now multiple lines requiring extra imports. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 06:09:58 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 15 May 2020 10:09:58 +0000 Subject: [issue40608] PY3.8 GC segfault (Py_TRASHCAN_SAFE_BEGIN/END are not backwards compatible) In-Reply-To: <1589306849.27.0.146369076662.issue40608@roundup.psfhosted.org> Message-ID: <1589537398.66.0.317590853094.issue40608@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +19412 pull_request: https://github.com/python/cpython/pull/20104 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 06:21:37 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Fri, 15 May 2020 10:21:37 +0000 Subject: [issue38938] Possible performance improvement for heaqq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1589538097.31.0.0840458673773.issue38938@roundup.psfhosted.org> Dennis Sweeney added the comment: As Serhiy suggested, keeping the algorithm but moving the Python implementation to be a generator again (as I recently changed in PR 18427) gives another performance boost (although this unrolling is many lines of code). Timing the C implementation: .\python.bat -m pyperf timeit -s "from random import random; from collections import deque; from heapq import merge; iters = [sorted(random() for j in range(10_000)) for i in range(20)]" "deque(merge(*iters), maxlen=0)" On Master: Mean +- std dev: 66.9 ms +- 0.6 ms With PR: Mean +- std dev: 17.3 ms +- 0.9 ms Timing the Python Implementation in CPython: .\python.bat -m pyperf timeit -s "from random import random; from collections import deque; from test import support; merge = support.import_fresh_module('heapq', blocked=['_heapq']).merge; iters = [sorted(random() for j in range(10_000)) for i in range(20)]" "deque(merge(*iters), maxlen=0)" On Master: Mean +- std dev: 385 ms +- 3 ms With PR: Mean +- std dev: 250 ms +- 2 ms Timing PyPy: pypy -m pyperf timeit -s "... from heapq import merge; ..." ... versus pypy -m pyperf timeit -s "... from heapq2 import merge; ..." ... Testing on PyPy 7.1.1: Mean +- std dev: 142 ms +- 2 ms This implementation: Mean +- std dev: 38.0 ms +- 1.2 ms ============================================================================= Another positive for this proposal I just discovered is that object.__eq__ no longer needs to be called at each comparison: from heapq import merge from collections import deque class Int(int): lt = eq = 0 def __lt__(self, other): __class__.lt += 1 return int.__lt__(self, other) def __eq__(self, other): __class__.eq += 1 return int.__eq__(self, other) def comparisons(iterables): Int.lt = Int.eq = 0 deque(merge(*iterables), maxlen=0) return Int.lt, Int.eq no_overlap = comparisons( # (0..999), (1_000..1_999), (2_000..2_999), ... map(Int, range(x, x+1_000)) for x in range(0, 16_000, 1_000) ) interleaved = comparisons( # (0,16,32,...), (1,17,33,...), (2,18,34,...), ... map(Int, range(x, 16_000, 16)) for x in range(16) ) print("No overlap: {:,} lt; {:,} eq".format(*no_overlap)) print("Interleaved: {:,} lt; {:,} eq".format(*interleaved)) Before: No overlap: 65,004 lt; 65,004 eq Interleaved: 64,004 lt; 64,004 eq After: No overlap: 32,000 lt; 0 eq Interleaved: 63,968 lt; 0 eq This comes from the way that tuples are compared by scanning item-wise for equality before comparing the first discrepancy. Using the positional information in the tree with the logic yield (right if right < left else left) requires only one rich comparison, while breaking ties with the stored index and the logic yield (b if (b, b_index) < (a, a_index) else a) requires two arbitrary rich comparisons (a != b, then a < b). This can be somewhat fixed with the logic if a_index < b_index: yield (b if b < a else a) else: yield (a if a < b else b) ...but this is another branch in the innermost loop. ============================================================================== I also played with a "Tree of Losers" method[1] here[2], and on the same benchmarks I got: CPython (C): Mean +- std dev: 22.7 ms +- 0.2 ms (slower than in PR 18427) CPython (Pure Python): Mean +- std dev: 197 ms +- 9 ms (faster -- likely because of fewer int operations) PyPy: Mean +- std dev: 38.8 ms +- 0.8 ms (about the same) Maybe some more optimizations could be made to that code. The two approaches should be "isomorphic" in some sense: both should do the same number of comparisons on the same data. But I'll emphasize the differences: Tree of Losers: - Data structure: Loser Tree (does not satisfy heap invariant) - Nodes: (item, index) pairs - Tree has n nodes - To get the next item: do exchanges from leaf to root, swapping as you find better items - Comparisons: branching logic based on index comparison PR 18427 "Tree of winners": - Data structure: binary heap (always satisfies heap invariant) - Nodes: just the items - Tree has 2n-1 nodes (more eagerly evaluated) - To get the next item: replace parent with better child, root to leaf - Comparisons: right < left (simple) Personally, I find the Tree of Winners approach more intuitive, but the Tree of Losers approach seems to be the one that comes up more in the literature. [1] https://en.wikipedia.org/wiki/K-way_merge_algorithm [2] https://github.com/sweeneyde/cpython/tree/replacement-selection ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 06:27:13 2020 From: report at bugs.python.org (Christoph Reiter) Date: Fri, 15 May 2020 10:27:13 +0000 Subject: [issue36264] os.path.expanduser should not use HOME on windows In-Reply-To: <1552320597.36.0.934790753816.issue36264@roundup.psfhosted.org> Message-ID: <1589538433.83.0.341976586905.issue36264@roundup.psfhosted.org> Christoph Reiter added the comment: Config on Windows should go into APPDATA not USERPROFILE/HOME, on macOS it should go to "$HOME/Library/Application Support" and on Linux $XDG_CONFIG_HOME or $HOME/.config. So using using HOME on all platforms for config is not what those platforms recommend, though I understand why it's still done this way by many tools. What about supporting a MYFANCYTOOL_CONFIG_DIR env var that the user can override? That's what I do for example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 08:04:27 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 15 May 2020 12:04:27 +0000 Subject: [issue40631] PEG Parser: Cannot used starred expression in parenthesised expr Message-ID: <1589544267.84.0.231872596395.issue40631@roundup.psfhosted.org> New submission from Lysandros Nikolaou : The new PEG parser fails when a parenthesised expression with a single child (a group) contains a starred expression. Example: ?? ./python.exe Python 3.9.0a6+ (heads/master-dirty:4a12d12186, May 15 2020, 14:53:45) [Clang 11.0.0 (clang-1100.0.33.8)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import ast >>> ast.parse('(*a)') Traceback (most recent call last): File "", line 1, in File "/Users/lysnikolaou/Repositories/cpython/Lib/ast.py", line 50, in parse return compile(source, filename, mode, flags, File "", line 1 (*a) ^ SyntaxError: invalid syntax This was valid syntax up until now: ?? ./python.exe -X oldparser Python 3.9.0a6+ (heads/master-dirty:4a12d12186, May 15 2020, 14:53:45) [Clang 11.0.0 (clang-1100.0.33.8)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import ast >>> ast.dump(ast.parse('(*a)')) "Module(body=[Expr(value=Starred(value=Name(id='a', ctx=Load()), ctx=Load()))], type_ignores=[])" ---------- assignee: lys.nikolaou components: Interpreter Core messages: 368936 nosy: gvanrossum, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: PEG Parser: Cannot used starred expression in parenthesised expr versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 08:12:02 2020 From: report at bugs.python.org (Mark Shannon) Date: Fri, 15 May 2020 12:12:02 +0000 Subject: [issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.) In-Reply-To: <1580484815.27.0.407070570821.issue39511@roundup.psfhosted.org> Message-ID: <1589544722.64.0.536385889365.issue39511@roundup.psfhosted.org> Mark Shannon added the comment: Those numbers are for code without immortal objects. They don't apply in this case, as the branch misprediction rate would rise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 08:13:59 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 15 May 2020 12:13:59 +0000 Subject: [issue40631] PEG Parser: Cannot used starred expression in parenthesised expr In-Reply-To: <1589544267.84.0.231872596395.issue40631@roundup.psfhosted.org> Message-ID: <1589544839.73.0.292807849981.issue40631@roundup.psfhosted.org> Lysandros Nikolaou added the comment: Whoops, false alarm. It's just that we moved the check for invalid starred expressions to the parser, while it previously was in the compiler. ?? ./python.exe -X oldparser Python 3.9.0a6+ (heads/master-dirty:003708bcf8, May 15 2020, 15:08:21) [Clang 11.0.0 (clang-1100.0.33.8)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> (*a) File "", line 1 SyntaxError: can't use starred expression here Sorry for the noise! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 08:14:34 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 15 May 2020 12:14:34 +0000 Subject: [issue40631] PEG Parser: Cannot used starred expression in parenthesised expr In-Reply-To: <1589544267.84.0.231872596395.issue40631@roundup.psfhosted.org> Message-ID: <1589544874.43.0.28404800178.issue40631@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 08:30:38 2020 From: report at bugs.python.org (Glenn Travis) Date: Fri, 15 May 2020 12:30:38 +0000 Subject: [issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts In-Reply-To: <1588435279.1.0.0339863635356.issue40477@roundup.psfhosted.org> Message-ID: <1589545838.27.0.369907948998.issue40477@roundup.psfhosted.org> Glenn Travis added the comment: Is there no way to edit a previous comment? Anyway, I can get it to work as described, but the Launcher Preferences window also opens when I run a script. Did I miss a setting? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 09:03:38 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 15 May 2020 13:03:38 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1589547818.55.0.898149083769.issue40334@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +19413 pull_request: https://github.com/python/cpython/pull/20106 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 09:06:23 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 15 May 2020 13:06:23 +0000 Subject: [issue22652] Add suggestion about keyword arguments to this error message: "builtins.TypeError: my_func() takes 1 positional argument but 2 were given" In-Reply-To: <1413455617.21.0.000325400143663.issue22652@psf.upfronthosting.co.za> Message-ID: <1589547983.25.0.556902264863.issue22652@roundup.psfhosted.org> Serhiy Storchaka added the comment: First, the code for checking arguments was significantly changed in recent versions. So if we are going to make these changes the patch should be not just rebased, but rewritten from zero. Second, the error messages for wrong number of positional arguments are more diverse. >>> def func(a, b=1): pass ... >>> func() Traceback (most recent call last): File "", line 1, in TypeError: func() missing 1 required positional argument: 'a' >>> func(1, 2, 3) Traceback (most recent call last): File "", line 1, in TypeError: func() takes from 1 to 2 positional arguments but 3 were given It differs when you pass less positional arguments than expected, and when there are optional positional parameters. Third, when you pass incorrect number of keyword arguments, you get error either about missed keyword arguments (they names, not count), or about an unexpected keyword argument (with its name). Forth, if you change error messages for Python implemented functions, don't forget about functions implemented in C. Those which use PyArg_ParseTupleAndKeywords (and variants), those which use Argument Clinic, and special cases like print(), sorted(), max(). Personally I think that the current error message is correct and complete. But if you want to improve it, remember that additional information should be correct, useful and consistent across different types of functions. Also, too verbose error message can have negative effect on comprehension. It should provide information necessary to identify the source of the error and do not distract from it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 09:41:24 2020 From: report at bugs.python.org (=?utf-8?b?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?=) Date: Fri, 15 May 2020 13:41:24 +0000 Subject: [issue40632] AttributeError: type object 'Callable' has no attribute '_abc_registry' Message-ID: <1589550084.49.0.00476080862108.issue40632@roundup.psfhosted.org> New submission from ????? ???????? : I have the newest cpython 3.8 (07bd5cf3d9551ae), installed with `./configure --enable-loadable-sqlite-extensions --disable-ipv6 --with-system-expat --with-system-libmpdec --enable-shared && make && make install`. Calling `pip-20.1 install -U meson` prints: Collecting meson Using cached meson-0.54.2.tar.gz (1.7 MB) Installing build dependencies: started Installing build dependencies: finished with status 'error' ERROR: Command errored out with exit status 1: command: /usr/local/bin/python3 /usr/local/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-to_qzg_r/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel cwd: None Complete output (44 lines): Traceback (most recent call last): File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/usr/local/lib/python3.8/site-packages/pip/__main__.py", line 26, in sys.exit(_main()) File "/usr/local/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 73, in main command = create_command(cmd_name, isolated=("--isolated" in cmd_args)) File "/usr/local/lib/python3.8/site-packages/pip/_internal/commands/__init__.py", line 104, in create_command module = importlib.import_module(module_path) File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "/usr/local/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 24, in from pip._internal.cli.req_command import RequirementCommand, with_cleanup File "/usr/local/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 16, in from pip._internal.index.package_finder import PackageFinder File "/usr/local/lib/python3.8/site-packages/pip/_internal/index/package_finder.py", line 21, in from pip._internal.index.collector import parse_links File "/usr/local/lib/python3.8/site-packages/pip/_internal/index/collector.py", line 14, in from pip._vendor import html5lib, requests File "/usr/local/lib/python3.8/site-packages/pip/_vendor/requests/__init__.py", line 114, in from . import utils File "/usr/local/lib/python3.8/site-packages/pip/_vendor/requests/utils.py", line 25, in from . import certs File "/usr/local/lib/python3.8/site-packages/pip/_vendor/requests/certs.py", line 15, in from pip._vendor.certifi import where File "/usr/local/lib/python3.8/site-packages/pip/_vendor/certifi/__init__.py", line 1, in from .core import contents, where File "/usr/local/lib/python3.8/site-packages/pip/_vendor/certifi/core.py", line 12, in from importlib.resources import read_text File "/usr/local/lib/python3.8/importlib/resources.py", line 11, in from typing import Iterable, Iterator, Optional, Set, Union # noqa: F401 File "/usr/local/lib/python3.8/site-packages/typing.py", line 1357, in class Callable(extra=collections_abc.Callable, metaclass=CallableMeta): File "/usr/local/lib/python3.8/site-packages/typing.py", line 1005, in __new__ self._abc_registry = extra._abc_registry AttributeError: type object 'Callable' has no attribute '_abc_registry' ---------------------------------------- ERROR: Command errored out with exit status 1: /usr/local/bin/python3 /usr/local/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-to_qzg_r/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel Check the logs for full command output. ---------- components: Installation messages: 368941 nosy: dilyan.palauzov priority: normal severity: normal status: open title: AttributeError: type object 'Callable' has no attribute '_abc_registry' type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 09:42:04 2020 From: report at bugs.python.org (Haoyu SUN) Date: Fri, 15 May 2020 13:42:04 +0000 Subject: [issue40633] json.dumps() should encode float number NaN to null Message-ID: <1589550124.35.0.830023884715.issue40633@roundup.psfhosted.org> New submission from Haoyu SUN : Float numbers in Python can have 3 special number: nan, inf, -inf, which are encoded by json module as "NaN", "Infinity", "-Infinity". These representations are not compatible with JSON specifications RFC7159: https://tools.ietf.org/html/rfc7159.html#page-6 These values are not correctly parsed by most JavaScript JSON encoders. It is better to encode "NaN" to "null" which is a valid JSON keyword representing "Not a Number". Here is an example how json.dumps() encodes NaN to NaN in JSON: Python 3.6.9 (default, Apr 18 2020, 01:56:04) [GCC 8.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> dct = {'a': None, 'b' : float('nan')} >>> dct {'a': None, 'b': nan} >>> import json >>> json.dumps(dct) '{"a": null, "b": NaN}' ---------- components: Library (Lib) messages: 368942 nosy: Haoyu SUN priority: normal severity: normal status: open title: json.dumps() should encode float number NaN to null type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 09:55:08 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 15 May 2020 13:55:08 +0000 Subject: [issue40632] AttributeError: type object 'Callable' has no attribute '_abc_registry' In-Reply-To: <1589550084.49.0.00476080862108.issue40632@roundup.psfhosted.org> Message-ID: <1589550908.14.0.65494499285.issue40632@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: You seem to use typing backport that has this issue : https://github.com/python/typing/issues/573 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 09:57:20 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 15 May 2020 13:57:20 +0000 Subject: [issue40633] json.dumps() should encode float number NaN to null In-Reply-To: <1589550124.35.0.830023884715.issue40633@roundup.psfhosted.org> Message-ID: <1589551040.58.0.318498920645.issue40633@roundup.psfhosted.org> Eric V. Smith added the comment: Since this is documented behavior (https://docs.python.org/3.8/library/json.html#infinite-and-nan-number-values), we can't change it by default without breaking code. What JavaScript JSON encoders and decoders specifically have a problem with this behavior? The documentation says "This behavior is not JSON specification compliant, but is consistent with most JavaScript based encoders and decoders.", so if there are encoders and decoders that it doesn't work with, that would be good to know. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 10:02:26 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Fri, 15 May 2020 14:02:26 +0000 Subject: [issue40192] time.thread_time isn't outputting in nanoseconds in AIX In-Reply-To: <1586049332.22.0.327858503775.issue40192@roundup.psfhosted.org> Message-ID: <1589551346.5.0.193221959496.issue40192@roundup.psfhosted.org> Batuhan Taskaya added the comment: current: >>> import time >>> import time >>> time.get_clock_info('thread_time') namespace(adjustable=False, implementation='clock_gettime(CLOCK_THREAD_CPUTIME_ID)', monotonic=True, resolution=0.01) >>> time.thread_time() 0.07 PR 19381: >>> import time >>> time.get_clock_info('thread_time') namespace(adjustable=False, implementation='thread_cputime()', monotonic=True, resolution=1e-09) >>> time.thread_time() 0.002379953 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 10:20:18 2020 From: report at bugs.python.org (Hugh Redelmeier) Date: Fri, 15 May 2020 14:20:18 +0000 Subject: [issue25920] PyOS_AfterFork should reset socketmodule's lock In-Reply-To: <1450739972.22.0.163393011494.issue25920@psf.upfronthosting.co.za> Message-ID: <1589552418.77.0.108876775581.issue25920@roundup.psfhosted.org> Change by Hugh Redelmeier : ---------- nosy: +hugh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 10:20:56 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 14:20:56 +0000 Subject: [issue40192] time.thread_time isn't outputting in nanoseconds in AIX In-Reply-To: <1586049332.22.0.327858503775.issue40192@roundup.psfhosted.org> Message-ID: <1589552456.75.0.648620807141.issue40192@roundup.psfhosted.org> STINNER Victor added the comment: I found this documentation on AIX thread_cputime(): https://www.ibm.com/support/knowledgecenter/ssw_aix_71/t_bostechref/thread_cputime.html """ Syntax #include int thread_cputime (tid, ctime) tid_t tid; thread_cputime_t * ctime ; typedef struct { uint64_t utime; /* User time in nanosenconds */ uint64_t stime; /* System time in nanoseconds */ } thread_cputime_t; Description The thread_cputime subroutine allows a thread to query the CPU usage of the specified thread (tid) in the same process or in another process. If a value of -1 is passed in the tid parameter field, then the CPU usage of the calling thread is retrieved. CPU usage is not the same as the total life of the thread in real time, rather it is the actual amount of CPU time consumed by the thread since it was created. The CPU usage retrieved by this subroutine contains the CPU time consumed by the requested thread tid in user space (utime) and system space (stime). The thread to be queried is identified using the kernel thread ID which has global scope. This can be obtained by the application using the thread_self system call. Only 1:1 thread mode is supported. The result for M:N thread mode is undefined. The CPU usage of a thread that is not the calling thread will be current as of the last time the thread was dispatched. This value will be off by a small amount if the target thread is currently running. """ Ok good, it returns the user time *and* the system time, and it's the thread CPU time. So it sounds reasonable to use it to implement time.thread_time(). By the way, the v8 project calls thread_cputime() on AIX when clock_gettime(CLOCK_THREAD_CPUTIME_ID) is requested, also to get better resolution: https://github.com/v8/v8/blob/a5038c42283a09f65c44229907123e15a779feb7/src/base/platform/time.cc#L68 // On AIX clock_gettime for CLOCK_THREAD_CPUTIME_ID outputs time with // resolution of 10ms. thread_cputime API provides the time in ns #if defined(V8_OS_AIX) thread_cputime_t tc; if (clk_id == CLOCK_THREAD_CPUTIME_ID) { #if defined(__PASE__) // CLOCK_THREAD_CPUTIME_ID clock not supported on IBMi return 0; #endif if (thread_cputime(-1, &tc) != 0) { UNREACHABLE(); } } #endif Another question is why AIX doesn't use thread_cputime() internally to implement clock_gettime(CLOCK_THREAD_CPUTIME_ID) :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 10:23:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 14:23:24 +0000 Subject: [issue40192] time.thread_time isn't outputting in nanoseconds in AIX In-Reply-To: <1586049332.22.0.327858503775.issue40192@roundup.psfhosted.org> Message-ID: <1589552604.52.0.872248474364.issue40192@roundup.psfhosted.org> STINNER Victor added the comment: time.thread_time() is documented as: "Return the value (in fractional seconds) of the sum of the system and user CPU time of the current thread. It does not include time elapsed during sleep." https://docs.python.org/dev/library/time.html#time.thread_time So we must use utime+stime, just not stime (current PR 19381 implementation). test_time.test_thread_time() validates that time.thread_time() doesn't include time spend during a sleep. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 10:28:44 2020 From: report at bugs.python.org (Haoyu SUN) Date: Fri, 15 May 2020 14:28:44 +0000 Subject: [issue40633] json.dumps() should encode float number NaN to null In-Reply-To: <1589550124.35.0.830023884715.issue40633@roundup.psfhosted.org> Message-ID: <1589552924.28.0.456445821354.issue40633@roundup.psfhosted.org> Haoyu SUN added the comment: Thank you for the timely reply, Eric. How about we add an optional argument (like the argument "ignore_nan" defaults to False as the package simplejson does) to functions like json.dumps(). So that user can choose whether he needs NaN encoded as NaN or null, meanwhile the default behavior stays the same. In chromium based browsers, the function JSON.parse cannot parse it correctly. Here is an example below: > JSON.parse('{"a": null, "b": NaN}') uncaught SyntaxError: Unexpected token N in JSON at position 17 at JSON.parse () at :1:6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 10:30:41 2020 From: report at bugs.python.org (=?utf-8?b?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?=) Date: Fri, 15 May 2020 14:30:41 +0000 Subject: [issue40632] AttributeError: type object 'Callable' has no attribute '_abc_registry' In-Reply-To: <1589550084.49.0.00476080862108.issue40632@roundup.psfhosted.org> Message-ID: <1589553041.73.0.682019654001.issue40632@roundup.psfhosted.org> ????? ???????? added the comment: I used python 3.6, I exported all dependencies with `pip list`, then upgraded to python 3.8 and imported the exported dependencies. Uninstalling the ?typing? module has helped. Do you mean, that python 3.8 includes the ?typing? modules, so that it may not be re-installed over pip? Why pip does not prevent the user from installing the ?typing? modules on python 3.8? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 10:55:04 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 15 May 2020 14:55:04 +0000 Subject: [issue40633] json.dumps() should encode float number NaN to null In-Reply-To: <1589550124.35.0.830023884715.issue40633@roundup.psfhosted.org> Message-ID: <1589554504.25.0.817430234478.issue40633@roundup.psfhosted.org> Eric V. Smith added the comment: I think that's reasonable, although I could see someone objecting ("just use simplejson instead"). I suggest discussing this on the python-ideas mailing list and see what people think over there. It might help to create a PR first, if it's not a lot of work. ---------- type: behavior -> enhancement versions: +Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 11:07:20 2020 From: report at bugs.python.org (A. Jesse Jiryu Davis) Date: Fri, 15 May 2020 15:07:20 +0000 Subject: [issue22652] Add suggestion about keyword arguments to this error message: "builtins.TypeError: my_func() takes 1 positional argument but 2 were given" In-Reply-To: <1413455617.21.0.000325400143663.issue22652@psf.upfronthosting.co.za> Message-ID: <1589555240.61.0.255836301124.issue22652@roundup.psfhosted.org> A. Jesse Jiryu Davis added the comment: If the patch requires a rewrite and its value is uncertain then I'll excuse myself from this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 11:12:05 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 15:12:05 +0000 Subject: [issue39837] Make Azure Pipelines optional on GitHub PRs In-Reply-To: <1583255119.77.0.277327127951.issue39837@roundup.psfhosted.org> Message-ID: <1589555525.15.0.334909417973.issue39837@roundup.psfhosted.org> STINNER Victor added the comment: > Oh, and Victor, you should probably email python-dev to let everyone know you requested this change and it's been made. Otherwise people may be surprised that it changed without any discussion or notification. I wanted to wait until the situation was being clarified. I fixed the "documentation only" issue in GitHub Action workflow. I sent an email to python-committers rather than python-dev, core devs are the first concerned by workflow changes: https://mail.python.org/archives/list/python-committers at python.org/thread/B6WVI254L7GEOCKUOHZ6XBZD4GCLAIBV/ Slowly, it seems like the situation is being resolved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 11:30:02 2020 From: report at bugs.python.org (Yaroslav Halchenko) Date: Fri, 15 May 2020 15:30:02 +0000 Subject: [issue40634] Ignored "BlockingIOError: [Errno 11] Resource temporarily unavailable" are still haunting us Message-ID: <1589556602.37.0.773453748753.issue40634@roundup.psfhosted.org> New submission from Yaroslav Halchenko : This is a reincarnation of previous issues such as - older https://bugs.python.org/issue21595 which partially (with ack on that) addressed the issue awhile back - more recent https://bugs.python.org/issue38104 which was closed as "wont fix" since "the provided example finishes without any warning" on 3.8 (verified -- true for me with 3.8.3rc1); and with the explanation that "You spawn too many subprocesses that finish virtually at the same time. It leads to wakeup_fd overrun." - additional similar reports could be found online, e.g. https://stackoverflow.com/a/52391791/1265472 . In our project we are slowly introducing use of asyncio and have a mix of execution with asyncio and regular subprocess.Popen. We do run lots of short lived processes serially, and I think it should be Ok, i.e. it should not cause underlying libraries to spit out some output to ignore unless we indeed just using them incorrectly somehow. If we recreate the SelectorEventLoop for every separate execution via asyncio -- no ignored exception messages are displayed. But if we start to reuse the same loop -- they eventually emerge. If I enable asyncio debug and log it along with our own debug messages, the strange thing that they come around the points where we run using regular subprocess.Popen, not asyncio. See https://github.com/datalad/datalad/pull/4527#issuecomment-629289819 for more information. Unfortunately I do not have (yet) any short script to reproduce it, but I would appreciate possible hints on how to figure out what is actually causing them in our particular case. May be additional logging within asyncio could assist? ---------- components: asyncio messages: 368953 nosy: Yaroslav.Halchenko, asvetlov, yselivanov priority: normal severity: normal status: open title: Ignored "BlockingIOError: [Errno 11] Resource temporarily unavailable" are still haunting us versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 11:44:26 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 15 May 2020 15:44:26 +0000 Subject: [issue40479] Port _hashlib to OpenSSL 3.0.0 In-Reply-To: <1588497803.18.0.937746880221.issue40479@roundup.psfhosted.org> Message-ID: <1589557466.32.0.1004083689.issue40479@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +19414 pull_request: https://github.com/python/cpython/pull/20107 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 11:50:54 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 15 May 2020 15:50:54 +0000 Subject: [issue40479] Port _hashlib to OpenSSL 3.0.0 In-Reply-To: <1588497803.18.0.937746880221.issue40479@roundup.psfhosted.org> Message-ID: <1589557854.77.0.0628356467675.issue40479@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +19415 pull_request: https://github.com/python/cpython/pull/20108 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 12:06:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 May 2020 16:06:27 +0000 Subject: [issue40055] test___all__ and test_distutils alters the enviroinment: pkg_resources.PEP440Warning In-Reply-To: <1585068690.81.0.102478946521.issue40055@roundup.psfhosted.org> Message-ID: <1589558787.28.0.359246932116.issue40055@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 6e57237faf0da8904e0130a11350cae3c5062b82 by Victor Stinner in branch 'master': bpo-40055: test_distutils leaves warnings filters unchanged (GH-20095) https://github.com/python/cpython/commit/6e57237faf0da8904e0130a11350cae3c5062b82 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 12:06:40 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 15 May 2020 16:06:40 +0000 Subject: [issue40055] test___all__ and test_distutils alters the enviroinment: pkg_resources.PEP440Warning In-Reply-To: <1585068690.81.0.102478946521.issue40055@roundup.psfhosted.org> Message-ID: <1589558800.47.0.319263617736.issue40055@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +19416 pull_request: https://github.com/python/cpython/pull/20109 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 12:06:51 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 15 May 2020 16:06:51 +0000 Subject: [issue40055] test___all__ and test_distutils alters the enviroinment: pkg_resources.PEP440Warning In-Reply-To: <1585068690.81.0.102478946521.issue40055@roundup.psfhosted.org> Message-ID: <1589558811.11.0.761342878032.issue40055@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19417 pull_request: https://github.com/python/cpython/pull/20110 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 12:23:01 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 15 May 2020 16:23:01 +0000 Subject: [issue40055] test___all__ and test_distutils alters the enviroinment: pkg_resources.PEP440Warning In-Reply-To: <1585068690.81.0.102478946521.issue40055@roundup.psfhosted.org> Message-ID: <1589559781.88.0.343811371021.issue40055@roundup.psfhosted.org> miss-islington added the comment: New changeset 7ef275160953f00b4303149df6d919c0afe763cb by Miss Islington (bot) in branch '3.7': bpo-40055: test_distutils leaves warnings filters unchanged (GH-20095) https://github.com/python/cpython/commit/7ef275160953f00b4303149df6d919c0afe763cb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 12:25:08 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 15 May 2020 16:25:08 +0000 Subject: [issue40055] test___all__ and test_distutils alters the enviroinment: pkg_resources.PEP440Warning In-Reply-To: <1585068690.81.0.102478946521.issue40055@roundup.psfhosted.org> Message-ID: <1589559908.3.0.301319831924.issue40055@roundup.psfhosted.org> miss-islington added the comment: New changeset 4e6545b002dd4d068b2538ffca60830d0e7fd369 by Miss Islington (bot) in branch '3.8': bpo-40055: test_distutils leaves warnings filters unchanged (GH-20095) https://github.com/python/cpython/commit/4e6545b002dd4d068b2538ffca60830d0e7fd369 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 12:28:13 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 15 May 2020 16:28:13 +0000 Subject: [issue40479] Port _hashlib to OpenSSL 3.0.0 In-Reply-To: <1588497803.18.0.937746880221.issue40479@roundup.psfhosted.org> Message-ID: <1589560092.99.0.0396922123261.issue40479@roundup.psfhosted.org> miss-islington added the comment: New changeset 16d4e6f6f559b4fd21c9d29fea303489f658674f by Christian Heimes in branch 'master': bpo-40479: Fix hashlib issue with OpenSSL 3.0.0 (GH-20107) https://github.com/python/cpython/commit/16d4e6f6f559b4fd21c9d29fea303489f658674f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 12:48:33 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 15 May 2020 16:48:33 +0000 Subject: [issue40479] Port _hashlib to OpenSSL 3.0.0 In-Reply-To: <1588497803.18.0.937746880221.issue40479@roundup.psfhosted.org> Message-ID: <1589561313.19.0.114975380969.issue40479@roundup.psfhosted.org> miss-islington added the comment: New changeset 62d618c06bd395308b7163dbcb26c7e6d0922033 by Christian Heimes in branch 'master': bpo-40479: Test with latest OpenSSL versions (GH-20108) https://github.com/python/cpython/commit/62d618c06bd395308b7163dbcb26c7e6d0922033 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 12:48:41 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 15 May 2020 16:48:41 +0000 Subject: [issue40479] Port _hashlib to OpenSSL 3.0.0 In-Reply-To: <1588497803.18.0.937746880221.issue40479@roundup.psfhosted.org> Message-ID: <1589561321.58.0.0322880953609.issue40479@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19418 pull_request: https://github.com/python/cpython/pull/20111 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 12:48:51 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 15 May 2020 16:48:51 +0000 Subject: [issue40479] Port _hashlib to OpenSSL 3.0.0 In-Reply-To: <1588497803.18.0.937746880221.issue40479@roundup.psfhosted.org> Message-ID: <1589561331.89.0.685154802338.issue40479@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19419 pull_request: https://github.com/python/cpython/pull/20112 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 12:54:35 2020 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 15 May 2020 16:54:35 +0000 Subject: [issue40633] json.dumps() should encode float number NaN to null In-Reply-To: <1589550124.35.0.830023884715.issue40633@roundup.psfhosted.org> Message-ID: <1589561675.58.0.629288507557.issue40633@roundup.psfhosted.org> Mark Dickinson added the comment: I don't think "null" in JSON is supposed to represent "Not a Number"; it's closer in meaning to Python's `None`. I definitely wouldn't want to see nans translated to "null" by default. This also only seems to address a part of the issue: what's the proposed action for "Infinity" and "-Infinity"? We've written internal code to deal with float special values in JSON a few times (usually to work with databases that stick to the strict JSON definition), and that code has to find a way to deal with all three of the special values. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 13:02:26 2020 From: report at bugs.python.org (Chris Herdt) Date: Fri, 15 May 2020 17:02:26 +0000 Subject: [issue40635] Documentation for socket.getfqdn incorrect? Message-ID: <1589562146.75.0.739099613667.issue40635@roundup.psfhosted.org> New submission from Chris Herdt : The documentation for socket.getfqdn() includes this info: "In case no fully qualified domain name is available, the hostname as returned by gethostname() is returned." However, that does not appear to be correct. To reproduce a case that exhibits contrary behavior: >>> import socket >>> socket.getfqdn("test") 'test' >>> socket.gethostname() 'centos7minimal.osric.net' ---------- assignee: docs at python components: Documentation messages: 368960 nosy: cherdt, docs at python priority: normal severity: normal status: open title: Documentation for socket.getfqdn incorrect? versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 13:06:01 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 15 May 2020 17:06:01 +0000 Subject: [issue40479] Port _hashlib to OpenSSL 3.0.0 In-Reply-To: <1588497803.18.0.937746880221.issue40479@roundup.psfhosted.org> Message-ID: <1589562361.11.0.333914501972.issue40479@roundup.psfhosted.org> miss-islington added the comment: New changeset 5e6b491403d7211588dcd399167f5bc21781c69c by Miss Islington (bot) in branch '3.7': bpo-40479: Test with latest OpenSSL versions (GH-20108) https://github.com/python/cpython/commit/5e6b491403d7211588dcd399167f5bc21781c69c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 13:10:20 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 15 May 2020 17:10:20 +0000 Subject: [issue40479] Port _hashlib to OpenSSL 3.0.0 In-Reply-To: <1588497803.18.0.937746880221.issue40479@roundup.psfhosted.org> Message-ID: <1589562620.59.0.271570085467.issue40479@roundup.psfhosted.org> miss-islington added the comment: New changeset 5a06cf01ecb6a048fb47c086adc1336f54fe8789 by Miss Islington (bot) in branch '3.8': bpo-40479: Test with latest OpenSSL versions (GH-20108) https://github.com/python/cpython/commit/5a06cf01ecb6a048fb47c086adc1336f54fe8789 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 13:10:52 2020 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 15 May 2020 17:10:52 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1589562652.68.0.757631056635.issue24416@roundup.psfhosted.org> Change by Paul Ganssle : ---------- pull_requests: +19420 pull_request: https://github.com/python/cpython/pull/20113 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 13:21:37 2020 From: report at bugs.python.org (Eryk Sun) Date: Fri, 15 May 2020 17:21:37 +0000 Subject: [issue36264] os.path.expanduser should not use HOME on windows In-Reply-To: <1552320597.36.0.934790753816.issue36264@roundup.psfhosted.org> Message-ID: <1589563297.87.0.883380920666.issue36264@roundup.psfhosted.org> Eryk Sun added the comment: > set "HOME" to override a location derived from ~ Using HOME in Windows is not reliable because it is not a system environment variable. That makes it fair game for administrators, users, and applications to use however they like. Platform differences can be papered over with functions. For example, add set_user_home(dir) and get_user_home(name=''). set_user_home sets a private global variable named _user_home, which defaults to None. get_user_home returns _user_home if it's not None and name is an empty string. Otherwise it gets the home directory per platform rules. > If on Windows and Python 3.8 or later, set USERPROFILE to the > target directory. This is unfortunate. Modifying USERPROFILE is highly unusual. USERPROFILE is the location of the user's "NTUSER.DAT" registry hive and local application data ("AppData\Local"), including "UsrClass.dat" (the "Software\Classes" registry hive). It's also the default location for a user's known shell folders and home directory. Modifying USERPROFILE shouldn't cause problems with any of this, but I'm not completely at ease with it. If a user profile defines a custom home directory (e.g. net user /homedir:), it will be reflected in "%HOMEDRIVE%%HOMEPATH%", and not in USERPROFILE. In a more perfect world, in which no one ever depended on the default location of shell folders, I'd recommend flipping the order around in ntpath.expanduser to prefer "%HOMEDRIVE%%HOMEPATH%". That said, a major snag with HOMEDRIVE and HOMEPATH is that they're sometimes wrong or missing. CreateEnvironmentBlock() will enumerate but won't populate the user's "Volatile Environment" registry key, which is where HOMEDRIVE and HOMEPATH are normally set. This key gets populated during startup of a desktop session, and, since it's volatile, it gets deleted when the profile is unloaded (i.e. the user logs off). Consequently the Secondary Logon service (i.e. CreateProcessWithLogonW), which runas.exe uses, will only set the correct HOMEDRIVE and HOMEPATH values if the user is already logged on as a desktop session user. Otherwise it uses a default value of "%SystemRoot%\System32" as the home directory, which is spectacularly wrong. Similarly, a scheduled task that uses an S4U batch logon won't even have HOMEDRIVE and HOMEPATH defined if the task user isn't already logged on as a desktop session user. USERPROFILE will still be correct in these cases. > Windows is posix-compliant. What you probably mean here is "Unix". The Windows subsystem has never been POSIX compliant. At most, Microsoft's C runtime library provides rudimentary POSIX API support (e.g. open, read). On the other hand, NT's original POSIX subsystem (psxss.exe) was POSIX.1 (1990) compliant. In 1999, Microsoft purchased the more capable OpenNT Unix system from Softway Systems and rebranded it as Interix. In Server 2003 R2, Interix was integrated in NT as the Subsystem for UNIX-based Applications (SUA). It was removed in Server 2012 R2. Microsoft abandoned the old conception of an NT subsystem in favor of virtualization concepts such as pico processes and pico providers (WSL 1) or hosting a kernel in a light-weight VM (WSL 2). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 14:34:01 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 15 May 2020 18:34:01 +0000 Subject: [issue36543] Remove old-deprecated ElementTree features (part 2) In-Reply-To: <1554566782.39.0.176680363975.issue36543@roundup.psfhosted.org> Message-ID: <1589567641.16.0.180961289648.issue36543@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +19421 pull_request: https://github.com/python/cpython/pull/20117 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 14:55:32 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 15 May 2020 18:55:32 +0000 Subject: [issue40515] test_ssl.py hangs with SSL 1.1 built with no threads In-Reply-To: <1588684824.78.0.561425398379.issue40515@roundup.psfhosted.org> Message-ID: <1589568932.26.0.253855953234.issue40515@roundup.psfhosted.org> miss-islington added the comment: New changeset c087a268a4d4ead8ef2ca21e325423818729da89 by Christian Heimes in branch 'master': bpo-40515: Require OPENSSL_THREADS (GH-19953) https://github.com/python/cpython/commit/c087a268a4d4ead8ef2ca21e325423818729da89 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 15:25:39 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 15 May 2020 19:25:39 +0000 Subject: [issue40636] Provide a strict form of zip (PEP-618) requiring same length inputs Message-ID: <1589570739.4.0.582573486837.issue40636@roundup.psfhosted.org> New submission from Gregory P. Smith : PEP 618 https://www.python.org/dev/peps/pep-0618 discussions are still on going. This issue is being filed to track an implementation, assuming the PEP is accepted and one is decided upon. I'm filing it now, as I can at least use the issue for documentation enhancements of the existing zip() behavior. ---------- messages: 368965 nosy: brandtbucher, gregory.p.smith, pitrou priority: normal severity: normal stage: needs patch status: open title: Provide a strict form of zip (PEP-618) requiring same length inputs type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 15:27:04 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 15 May 2020 19:27:04 +0000 Subject: [issue40636] Provide a strict form of zip (PEP-618) requiring same length inputs In-Reply-To: <1589570739.4.0.582573486837.issue40636@roundup.psfhosted.org> Message-ID: <1589570824.5.0.250845993585.issue40636@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- keywords: +patch pull_requests: +19422 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20118 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 15:43:47 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 15 May 2020 19:43:47 +0000 Subject: [issue40515] test_ssl.py hangs with SSL 1.1 built with no threads In-Reply-To: <1588684824.78.0.561425398379.issue40515@roundup.psfhosted.org> Message-ID: <1589571827.76.0.387880053276.issue40515@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +19423 pull_request: https://github.com/python/cpython/pull/20119 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 15:54:37 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 15 May 2020 19:54:37 +0000 Subject: [issue40637] Allow users to disable builtin hash modules on compile time Message-ID: <1589572477.51.0.0723794421446.issue40637@roundup.psfhosted.org> New submission from Christian Heimes : Python has a couple of builtin hash module: md5, sha1, sha256/224, sha512/383, sha3/shake family, and blake2b/s. Most of them are used as fallbacks in case OpenSSL bindings are not available. In some scenarios it is useful or required to disable the custom implementations and only offer libcrypto based implementations. Let's add a build option to disable modules. ---------- assignee: christian.heimes components: Build messages: 368966 nosy: christian.heimes priority: normal severity: normal stage: patch review status: open title: Allow users to disable builtin hash modules on compile time type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 15:47:45 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 15 May 2020 19:47:45 +0000 Subject: [issue40515] test_ssl.py hangs with SSL 1.1 built with no threads In-Reply-To: <1588684824.78.0.561425398379.issue40515@roundup.psfhosted.org> Message-ID: <1589572065.59.0.612900330922.issue40515@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +19424 pull_request: https://github.com/python/cpython/pull/20120 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 16:05:29 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 15 May 2020 20:05:29 +0000 Subject: [issue40637] Allow users to disable builtin hash modules on compile time In-Reply-To: <1589572477.51.0.0723794421446.issue40637@roundup.psfhosted.org> Message-ID: <1589573129.19.0.905935525736.issue40637@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +19425 pull_request: https://github.com/python/cpython/pull/20121 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 16:12:11 2020 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 15 May 2020 20:12:11 +0000 Subject: [issue40607] asyncio.wait_for should reraise future exception even if timeout expires In-Reply-To: <1589283187.27.0.827786043193.issue40607@roundup.psfhosted.org> Message-ID: <1589573531.89.0.214362124705.issue40607@roundup.psfhosted.org> Yury Selivanov added the comment: New changeset 382a5635bd10c237c3e23e346b21cde27e48d7fa by romasku in branch 'master': bpo-40607: Reraise exception during task cancelation in asyncio.wait_for() (GH-20054) https://github.com/python/cpython/commit/382a5635bd10c237c3e23e346b21cde27e48d7fa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 16:32:31 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 15 May 2020 20:32:31 +0000 Subject: [issue40163] multissl doesn't support tarballs in /source/old/ In-Reply-To: <1585874938.56.0.268058447907.issue40163@roundup.psfhosted.org> Message-ID: <1589574751.72.0.48277796699.issue40163@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 938717fd04c53c717895a756d5910e8c8813706c by Christian Heimes in branch 'master': bpo-40163: Fix multissltest download of old OpenSSL (GH-19329) https://github.com/python/cpython/commit/938717fd04c53c717895a756d5910e8c8813706c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 16:33:46 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 15 May 2020 20:33:46 +0000 Subject: [issue40163] multissl doesn't support tarballs in /source/old/ In-Reply-To: <1585874938.56.0.268058447907.issue40163@roundup.psfhosted.org> Message-ID: <1589574826.77.0.690293613513.issue40163@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +19426 pull_request: https://github.com/python/cpython/pull/20122 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 16:33:55 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 15 May 2020 20:33:55 +0000 Subject: [issue40163] multissl doesn't support tarballs in /source/old/ In-Reply-To: <1585874938.56.0.268058447907.issue40163@roundup.psfhosted.org> Message-ID: <1589574835.84.0.520905454429.issue40163@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19427 pull_request: https://github.com/python/cpython/pull/20123 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 16:34:22 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 15 May 2020 20:34:22 +0000 Subject: [issue40163] multissl doesn't support tarballs in /source/old/ In-Reply-To: <1585874938.56.0.268058447907.issue40163@roundup.psfhosted.org> Message-ID: <1589574862.04.0.479332438834.issue40163@roundup.psfhosted.org> Change by Christian Heimes : ---------- stage: patch review -> backport needed versions: -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 16:36:57 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 15 May 2020 20:36:57 +0000 Subject: [issue40515] test_ssl.py hangs with SSL 1.1 built with no threads In-Reply-To: <1588684824.78.0.561425398379.issue40515@roundup.psfhosted.org> Message-ID: <1589575017.42.0.728004489316.issue40515@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 387c7441f589cc45ea86f1fa257af616c39d9a4b by Christian Heimes in branch '3.8': [3.8] bpo-40515: Require OPENSSL_THREADS (GH-19953) (GH-20119) https://github.com/python/cpython/commit/387c7441f589cc45ea86f1fa257af616c39d9a4b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 16:37:36 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 15 May 2020 20:37:36 +0000 Subject: [issue40515] test_ssl.py hangs with SSL 1.1 built with no threads In-Reply-To: <1588684824.78.0.561425398379.issue40515@roundup.psfhosted.org> Message-ID: <1589575056.55.0.894534831783.issue40515@roundup.psfhosted.org> Christian Heimes added the comment: New changeset efc9065904c4df8962e04303c2c03642f45019b5 by Christian Heimes in branch '3.7': [3.7] bpo-40515: Require OPENSSL_THREADS (GH-19953) (GH-20120) https://github.com/python/cpython/commit/efc9065904c4df8962e04303c2c03642f45019b5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 16:38:47 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 15 May 2020 20:38:47 +0000 Subject: [issue40515] test_ssl.py hangs with SSL 1.1 built with no threads In-Reply-To: <1588684824.78.0.561425398379.issue40515@roundup.psfhosted.org> Message-ID: <1589575127.26.0.419337147244.issue40515@roundup.psfhosted.org> Christian Heimes added the comment: Users will now get an error message when they are trying to compile against an OpenSSL build without thread support. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 16:48:00 2020 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 15 May 2020 20:48:00 +0000 Subject: [issue40595] AttributeError from type annotation In-Reply-To: <1589217598.74.0.170713443577.issue40595@roundup.psfhosted.org> Message-ID: <1589575680.3.0.0571249413756.issue40595@roundup.psfhosted.org> Ivan Levkivskyi added the comment: Yes, this is as expected. A recommended workaround is to define a type alias like `Match = re.Match` before the class body. You can also suppress the exception with `from __future__ import annotations` (so that the annotations are not evaluated), but static type checkers like mypy will still force you to use the alias. ---------- nosy: +levkivskyi resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 16:55:01 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 15 May 2020 20:55:01 +0000 Subject: [issue40163] multissl doesn't support tarballs in /source/old/ In-Reply-To: <1585874938.56.0.268058447907.issue40163@roundup.psfhosted.org> Message-ID: <1589576101.29.0.260156254276.issue40163@roundup.psfhosted.org> miss-islington added the comment: New changeset 7a89f9b4e2c05a6abdf59e8a96a1fc80a47a1144 by Miss Islington (bot) in branch '3.7': bpo-40163: Fix multissltest download of old OpenSSL (GH-19329) https://github.com/python/cpython/commit/7a89f9b4e2c05a6abdf59e8a96a1fc80a47a1144 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 16:55:48 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 15 May 2020 20:55:48 +0000 Subject: [issue40163] multissl doesn't support tarballs in /source/old/ In-Reply-To: <1585874938.56.0.268058447907.issue40163@roundup.psfhosted.org> Message-ID: <1589576148.87.0.180705895502.issue40163@roundup.psfhosted.org> miss-islington added the comment: New changeset fcea08059f46d2d9582bb7ce5b2e905b20b86e8e by Miss Islington (bot) in branch '3.8': bpo-40163: Fix multissltest download of old OpenSSL (GH-19329) https://github.com/python/cpython/commit/fcea08059f46d2d9582bb7ce5b2e905b20b86e8e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 16:57:49 2020 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 15 May 2020 20:57:49 +0000 Subject: [issue40632] AttributeError: type object 'Callable' has no attribute '_abc_registry' In-Reply-To: <1589550084.49.0.00476080862108.issue40632@roundup.psfhosted.org> Message-ID: <1589576269.52.0.523487292468.issue40632@roundup.psfhosted.org> Ivan Levkivskyi added the comment: I think a better question is why the `typing` in site packages is ever imported? I thought that an stdlib module always takes precedence over an installed one with the same name. ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 17:04:13 2020 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 15 May 2020 21:04:13 +0000 Subject: [issue40606] Copy property return annotations to __annotations__ In-Reply-To: <1589274707.18.0.747615311988.issue40606@roundup.psfhosted.org> Message-ID: <1589576653.26.0.0533686866005.issue40606@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 17:05:41 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 15 May 2020 21:05:41 +0000 Subject: [issue40163] multissl doesn't support tarballs in /source/old/ In-Reply-To: <1585874938.56.0.268058447907.issue40163@roundup.psfhosted.org> Message-ID: <1589576741.75.0.92267816226.issue40163@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 17:10:32 2020 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 15 May 2020 21:10:32 +0000 Subject: [issue40583] Runtime type annotation mutation leads to inconsistent behavior In-Reply-To: <1589096457.86.0.369001499523.issue40583@roundup.psfhosted.org> Message-ID: <1589577032.59.0.354144653163.issue40583@roundup.psfhosted.org> Ivan Levkivskyi added the comment: This is actually a specified behavior (motivated by memory savings for class objects, that are already pretty large). If you scroll down the link you posted it says: > Note that if annotations are not found statically, then the ``__annotations__`` dictionary is not created at all. So what do you propose? Changing this behavior is not easy, because it would be a backwards incompatible change. ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 17:11:33 2020 From: report at bugs.python.org (Shantanu) Date: Fri, 15 May 2020 21:11:33 +0000 Subject: [issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files In-Reply-To: <1588583321.75.0.545037270294.issue40495@roundup.psfhosted.org> Message-ID: <1589577093.69.0.0428004261598.issue40495@roundup.psfhosted.org> Change by Shantanu : ---------- nosy: +hauntsaninja nosy_count: 6.0 -> 7.0 pull_requests: +19428 pull_request: https://github.com/python/cpython/pull/19806 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 17:26:07 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 15 May 2020 21:26:07 +0000 Subject: [issue40636] Provide a strict form of zip (PEP-618) requiring same length inputs In-Reply-To: <1589570739.4.0.582573486837.issue40636@roundup.psfhosted.org> Message-ID: <1589577967.51.0.787434530595.issue40636@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 6a5d3ff67644af42b1a781be2eacb2e82913441c by Gregory P. Smith in branch 'master': bpo-40636: Clarify the zip built-in docstring. (GH-20118) https://github.com/python/cpython/commit/6a5d3ff67644af42b1a781be2eacb2e82913441c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 17:26:14 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 15 May 2020 21:26:14 +0000 Subject: [issue40636] Provide a strict form of zip (PEP-618) requiring same length inputs In-Reply-To: <1589570739.4.0.582573486837.issue40636@roundup.psfhosted.org> Message-ID: <1589577974.23.0.901980085247.issue40636@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +19429 pull_request: https://github.com/python/cpython/pull/20124 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 17:28:26 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 15 May 2020 21:28:26 +0000 Subject: [issue40445] compileall.compile_dir docs aren't updated for bpo-38112 In-Reply-To: <1588203472.21.0.62841448361.issue40445@roundup.psfhosted.org> Message-ID: <1589578106.79.0.344615431951.issue40445@roundup.psfhosted.org> miss-islington added the comment: New changeset a2b3cdd661a4b6c6c74adbfcb6ac1865bfd2a011 by Shantanu in branch 'master': bpo-40445: Update compileall.compile_dir docs (GH-19806) https://github.com/python/cpython/commit/a2b3cdd661a4b6c6c74adbfcb6ac1865bfd2a011 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 17:35:17 2020 From: report at bugs.python.org (Saumitro Dasgupta) Date: Fri, 15 May 2020 21:35:17 +0000 Subject: [issue40583] Runtime type annotation mutation leads to inconsistent behavior In-Reply-To: <1589096457.86.0.369001499523.issue40583@roundup.psfhosted.org> Message-ID: <1589578517.74.0.185834228256.issue40583@roundup.psfhosted.org> Saumitro Dasgupta added the comment: In my opinion, the main problem here is the element of surprise. Given a statement like this: foo.__annotations__['injected'] = bool the expressed intent is "extend this object's annotations". It's surprising that it can sometimes result in accidental mutation of the base's annotations. This surprise may manifest downstream in other parts of the standard library (like dataclasses in the example above), which can be a bit cryptic. As a performance optimization, it makes sense. However, the element of surprise probably can be improved upon. For instance: - Explicitly disallow accidental mutation by presenting the parent's dict via a MappingProxy - Use a "copy-on-write" mechanism ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 17:43:33 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 15 May 2020 21:43:33 +0000 Subject: [issue40636] Provide a strict form of zip (PEP-618) requiring same length inputs In-Reply-To: <1589570739.4.0.582573486837.issue40636@roundup.psfhosted.org> Message-ID: <1589579013.84.0.0458026675908.issue40636@roundup.psfhosted.org> miss-islington added the comment: New changeset c3d025a86a60348f19551bd9921304c5db322531 by Miss Islington (bot) in branch '3.8': bpo-40636: Clarify the zip built-in docstring. (GH-20118) https://github.com/python/cpython/commit/c3d025a86a60348f19551bd9921304c5db322531 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 17:54:58 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 15 May 2020 21:54:58 +0000 Subject: [issue40637] Allow users to disable builtin hash modules on compile time In-Reply-To: <1589572477.51.0.0723794421446.issue40637@roundup.psfhosted.org> Message-ID: <1589579698.19.0.820349471627.issue40637@roundup.psfhosted.org> miss-islington added the comment: New changeset 9b60e55db2897acc30d6b9ef1dbc49674eed40c7 by Christian Heimes in branch 'master': bpo-40637: Add option to disable builtin hashes (GH-20121) https://github.com/python/cpython/commit/9b60e55db2897acc30d6b9ef1dbc49674eed40c7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 18:15:21 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 15 May 2020 22:15:21 +0000 Subject: [issue40637] Allow users to disable builtin hash modules on compile time In-Reply-To: <1589572477.51.0.0723794421446.issue40637@roundup.psfhosted.org> Message-ID: <1589580921.6.0.183575411805.issue40637@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 18:17:06 2020 From: report at bugs.python.org (Maxwell Bernstein) Date: Fri, 15 May 2020 22:17:06 +0000 Subject: [issue40638] input() with malformed input stream triggers assertion failure Message-ID: <1589581026.88.0.827798305344.issue40638@roundup.psfhosted.org> New submission from Maxwell Bernstein : builtin_input_impl does multiple attribute lookups in a row assuming they will succeed, but part of attribute lookup assumes that there is no pending exception. I propose doing the lookups one by one and checking for an error after each. There is an upcoming patch. ---------- components: Interpreter Core, Library (Lib) messages: 368982 nosy: tekknolagi priority: normal severity: normal status: open title: input() with malformed input stream triggers assertion failure versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 18:18:33 2020 From: report at bugs.python.org (Maxwell Bernstein) Date: Fri, 15 May 2020 22:18:33 +0000 Subject: [issue40638] input() with malformed input stream triggers assertion failure In-Reply-To: <1589581026.88.0.827798305344.issue40638@roundup.psfhosted.org> Message-ID: <1589581113.46.0.213996106016.issue40638@roundup.psfhosted.org> Change by Maxwell Bernstein : ---------- keywords: +patch pull_requests: +19430 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 18:59:38 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 15 May 2020 22:59:38 +0000 Subject: [issue40583] Runtime type annotation mutation leads to inconsistent behavior In-Reply-To: <1589096457.86.0.369001499523.issue40583@roundup.psfhosted.org> Message-ID: <1589583578.39.0.0360085487745.issue40583@roundup.psfhosted.org> Eric V. Smith added the comment: But this is no different from every other mutable class variable in Python: class Base: data = {} class Alpha(Base): pass class Beta(Base): data = {} Alpha.data['injected'] = bool assert Alpha.data is Base.data Beta.data['injected'] = bool I'm not sure what could change here. The choices seem to be break a lot of existing code and have new behavior for all class variables, or do something special for __annotations__. In general, to get what you want, you'd need to do something like this (going back to your original example): def add_annotation(cls, v, t): if not "__annotations__" in cls.__dict__: # Doesn't exist, add it. cls.__annotations__ = {} cls.__annotations__[v] = t add_annotation(Base, 'a', int) add_annotation(Alpha,'a', float) add_annotation(Beta, 'a', str) Which produces: {'base': , 'a': } {'a': } {'foobar': , 'a': } Again, this is just how class variables work in Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 19:12:29 2020 From: report at bugs.python.org (Saumitro Dasgupta) Date: Fri, 15 May 2020 23:12:29 +0000 Subject: [issue40583] Runtime type annotation mutation leads to inconsistent behavior In-Reply-To: <1589096457.86.0.369001499523.issue40583@roundup.psfhosted.org> Message-ID: <1589584349.32.0.00726972734334.issue40583@roundup.psfhosted.org> Saumitro Dasgupta added the comment: I'd argue that the situation is a bit different from class variables here, since __annotations__ is indirectly brought into existence by the presence of statically-established type annotations. You can be perfectly aware of how class variables work yet find this surprising, since you'd have to be aware of the additional bit of detail pointed out by Ivan above. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 19:26:10 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 15 May 2020 23:26:10 +0000 Subject: [issue40583] Runtime type annotation mutation leads to inconsistent behavior In-Reply-To: <1589096457.86.0.369001499523.issue40583@roundup.psfhosted.org> Message-ID: <1589585170.37.0.908291919612.issue40583@roundup.psfhosted.org> Eric V. Smith added the comment: Perhaps it should be better documented. I don't see the behavior changing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 19:46:26 2020 From: report at bugs.python.org (Saumitro Dasgupta) Date: Fri, 15 May 2020 23:46:26 +0000 Subject: [issue40583] Runtime type annotation mutation leads to inconsistent behavior In-Reply-To: <1589096457.86.0.369001499523.issue40583@roundup.psfhosted.org> Message-ID: <1589586386.62.0.0190226614645.issue40583@roundup.psfhosted.org> Saumitro Dasgupta added the comment: Fair enough. If that's the consensus, I'll close the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 19:55:57 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 15 May 2020 23:55:57 +0000 Subject: [issue31033] Add argument to .cancel() of Task and Future In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1589586957.38.0.622934029522.issue31033@roundup.psfhosted.org> Chris Jerdonek added the comment: New changeset 1ce5841eca6d96b1b1e8c213d04f2e92b1619bb5 by Chris Jerdonek in branch 'master': bpo-31033: Add a msg argument to Future.cancel() and Task.cancel() (GH-19979) https://github.com/python/cpython/commit/1ce5841eca6d96b1b1e8c213d04f2e92b1619bb5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 20:00:15 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 16 May 2020 00:00:15 +0000 Subject: [issue31033] Add argument to .cancel() of Task and Future In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1589587215.7.0.759022356857.issue31033@roundup.psfhosted.org> Chris Jerdonek added the comment: The msg argument has now been added (second PR). I'm going to keep this issue open until the traceback issue has also been addressed (the other PR), as that was one part of the discussions here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 20:07:00 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 16 May 2020 00:07:00 +0000 Subject: [issue38938] Possible performance improvement for heaqq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1589587620.22.0.435512733113.issue38938@roundup.psfhosted.org> Raymond Hettinger added the comment: The nested generators approach looks promising. I hope you keep working on that :-) I'm not too keen on PR 18427 because it is a massive explosion in code volume and complexity. With some continued effort, I expect we'll get to something much simpler and more maintainable. The existing code already performs well for typical applications, so there is no need to "go gonzo" and throw a massive wall of code at the problem. The ensuing maintenance costs would be too high. To save time and effort, please hold-off on a C implementation until we've agreed to a pure python version of the algorithm. For timings, try using strings, tuples, or dataclass instances. Timing integer inputs isn't representative of how merge() is used and it tends to exaggerate improvements. For interesting merges, the dominant cost is the comparison step. By switching to a binary tree arrangement, the payoff we're aiming for is to avoid the double comparison in the tuple inequality logic ? "('a',1)<('b',2)" tests both 'a'=='b' and 'a'<='b'. I suggest aiming for the simplest possible code that avoids the double test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 20:18:57 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Sat, 16 May 2020 00:18:57 +0000 Subject: [issue40635] Documentation for socket.getfqdn incorrect? In-Reply-To: <1589562146.75.0.739099613667.issue40635@roundup.psfhosted.org> Message-ID: <1589588337.09.0.341739997531.issue40635@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 20:45:13 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 May 2020 00:45:13 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1589589913.55.0.0812805459164.issue40257@roundup.psfhosted.org> Terry J. Reedy added the comment: Whether or not an object has a docstring is implementation defined, and I do not consider it to be part of its API. I just backported some new docstrings (with Brett Cannon's concurrence), and I would consider it OK for Serhiy to do the same with his addition. But the return value of getdoc is half of its API. Its 3.8 doc says "If the documentation string for an object is not provided and the object is a class, a method, a property or a descriptor, retrieve the documentation string from the inheritance hierarchy. Changed in version 3.5: Documentation strings are now inherited if not overridden." While inherited class docstrings are sometimes inapplicable, they may not be. In any case, not doing so is an API change. If done, and this is obviously controversial, the change needs a deprecation period. I would say at least 2 releases. And this should be a separate issue. But I suggest leaving getdoc alone. I think it appropriate that it be a bit liberal in returning text that just might be useful. Changing what pydoc does with the information it gets, including from getdoc, is a different issue -- this issue. Pydoc could not call getdoc for classes, or it could determine whether the returned string is inherited and change it slightly as has been suggested. Other object information functions can make their own choices. For instance, IDLE calltips are primarily about signature and currently only use an object's own docstring. But maybe pydoc should be used for instance methods to get the one or two summary lines IDLE displays. A related note: Useful specific docstrings would be easier if an object could directly extend a base objects docstring with f"{base_object.__doc__}\nExtra implementation info\n" following the header instead of having to later write derived_object.__doc__ = f"....". In instructional contexts, this would be useful, in addition for classes, for functions that implement a docstring specificaton. def _factor(number): "Return prime factors of non-negative ints as list of (prime, count) pairs." Students could then submit an implementation with def factor(number): f"{_factor.__doc__}\nImplementation details." ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 20:53:46 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 May 2020 00:53:46 +0000 Subject: [issue40586] Pydoc should support https for hyperlinks. In-Reply-To: <1589158231.48.0.0342376329959.issue40586@roundup.psfhosted.org> Message-ID: <1589590426.39.0.243287855628.issue40586@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 20:55:49 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 May 2020 00:55:49 +0000 Subject: [issue40586] Pydoc should support https for hyperlinks. In-Reply-To: <1589158231.48.0.0342376329959.issue40586@roundup.psfhosted.org> Message-ID: <1589590549.62.0.791478651164.issue40586@roundup.psfhosted.org> Terry J. Reedy added the comment: Agreed. pydoc is a library module. 3.5 and 3.6 only get security patches. ---------- components: +Library (Lib) -Demos and Tools nosy: +serhiy.storchaka, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 20:58:58 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 May 2020 00:58:58 +0000 Subject: [issue40587] [regression] inspect.getdoc not returning docstring. In-Reply-To: <1589169380.19.0.988807060363.issue40587@roundup.psfhosted.org> Message-ID: <1589590738.81.0.680243389034.issue40587@roundup.psfhosted.org> Terry J. Reedy added the comment: This change was part of #40257 and is being discussed there (where I suggested reverting it). ---------- nosy: +terry.reedy resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 21:06:27 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 16 May 2020 01:06:27 +0000 Subject: [issue31033] Add argument to .cancel() of Task and Future In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1589591187.33.0.68762231891.issue31033@roundup.psfhosted.org> Chris Jerdonek added the comment: I just want to flag one issue after rebasing my traceback PR onto what was merged. If task.cancel() is called like this-- task.cancel("POSSIBLY LONG CANCEL MESSAGE") There is the question of whether the passed message should be repeated each time the CancelledError is raised, or only show it in the innermost, originating exception. My preference is to do the latter because it is simpler, less verbose, and seems more correct from a Python perspective. But I wanted to flag this because the message won't be visible in the leading, outermost exception. There is a third alternative which is to mutate the exception each time (delete the message from the earlier exception and add it to the new exception). But that seems more fraught and what I'd consider surprising behavior. Lastly, to illustrate, here is the more verbose option (the one I think it **shouldn't** look like): Traceback (most recent call last): File "/.../cpython/test-cancel.py", line 4, in nested await asyncio.sleep(1) File "/.../cpython/Lib/asyncio/tasks.py", line 670, in sleep return await future asyncio.exceptions.CancelledError: POSSIBLY LONG CANCEL MESSAGE During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/.../cpython/test-cancel.py", line 11, in run await task asyncio.exceptions.CancelledError: POSSIBLY LONG CANCEL MESSAGE During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/.../cpython/test-cancel.py", line 15, in loop.run_until_complete(run()) File "/.../cpython/Lib/asyncio/base_events.py", line 642, in run_until_complete return future.result() asyncio.exceptions.CancelledError: POSSIBLY LONG CANCEL MESSAGE ---------- versions: +Python 3.9 -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 21:10:16 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 May 2020 01:10:16 +0000 Subject: [issue40600] Add option to disallow > 1 instance of an extension module In-Reply-To: <1589235149.46.0.0630975096351.issue40600@roundup.psfhosted.org> Message-ID: <1589591416.58.0.0502394037239.issue40600@roundup.psfhosted.org> Terry J. Reedy added the comment: Title clarified. Leaving subinterpreters aside, only one instance, AFAIK, is true for stdlib and python modules unless imported with different names, as can happen with main module (which is a nuisance if not a bug). So only once per interpreter seems like a bugfix. Only once per process, if once per interpreter otherwise becomes normal, seems like an enhancement, even if a necessary option. ---------- nosy: +terry.reedy stage: -> test needed title: Add an option to disallow creating more than one instance of a module -> Add option to disallow > 1 instance of an extension module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 21:28:01 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 16 May 2020 01:28:01 +0000 Subject: [issue39075] types.SimpleNamespace should preserve attribute ordering (?) In-Reply-To: <1576599681.13.0.0769751822925.issue39075@roundup.psfhosted.org> Message-ID: <1589592481.25.0.180827660222.issue39075@roundup.psfhosted.org> miss-islington added the comment: New changeset 6b6092f533f0e4787b8564c4fad6ec6d1018af0d by Zackery Spytz in branch 'master': bpo-39075: types.SimpleNamespace no longer sorts attributes in its repr (GH-19430) https://github.com/python/cpython/commit/6b6092f533f0e4787b8564c4fad6ec6d1018af0d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 21:30:01 2020 From: report at bugs.python.org (Eric Snow) Date: Sat, 16 May 2020 01:30:01 +0000 Subject: [issue39075] types.SimpleNamespace should preserve attribute ordering (?) In-Reply-To: <1576599681.13.0.0769751822925.issue39075@roundup.psfhosted.org> Message-ID: <1589592601.4.0.57028321949.issue39075@roundup.psfhosted.org> Change by Eric Snow : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 21:30:10 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 May 2020 01:30:10 +0000 Subject: =?utf-8?q?=5Bissue40605=5D_=C2=ABpython=C2=BB=3A_Aucun_fichier_ou_dossier?= =?utf-8?q?_de_ce_type?= In-Reply-To: <1589271541.65.0.191752664403.issue40605@roundup.psfhosted.org> Message-ID: <1589592610.29.0.442092868159.issue40605@roundup.psfhosted.org> Terry J. Reedy added the comment: Titles should be in English (translated if quoting output). I am closing because there is no indication that there is a bug in Python, as opposed to a misunderstanding of how to use it. Extended help discussion is better conducted on python-list. For one thing, discussion there is seen by many more people. Isa: traditionally, on *nix, 'python' ran Python2 and 'python3' has been used to run Python3. Sometimes 'python2' has also been used. Different Linux distributions distributions disagree about whether and when to make 'python' run Python3. I believe that you can make this happen for your login, but it might disable other programs, especially things provided by Ubuntu. So it is probably best if you write a shell script that makes the change temporarily. Since this is going to be a common problem, please ask a question on python-list. Suggestion: --- (Subject) Make 'python' run Python 3.8 on Ubuntu I want to run a program on Ubuntu 20.04 that expects 'python' to run Python 3 instead of Python 2. How can I do this without disabling other programs that expect the opposite? ---------- nosy: +terry.reedy resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 21:30:25 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 May 2020 01:30:25 +0000 Subject: =?utf-8?q?=5Bissue40605=5D_=C2=ABpython=C2=BB=3A_Aucun_fichier_ou_dossier?= =?utf-8?q?_de_ce_type?= In-Reply-To: <1589271541.65.0.191752664403.issue40605@roundup.psfhosted.org> Message-ID: <1589592625.21.0.513563568635.issue40605@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 21:33:08 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 16 May 2020 01:33:08 +0000 Subject: [issue40457] Python fails to compile/load _ssl module if OpenSSL is compiled with no-tls1-method In-Reply-To: <1588286494.27.0.412005858691.issue40457@roundup.psfhosted.org> Message-ID: <1589592788.71.0.454462091034.issue40457@roundup.psfhosted.org> miss-islington added the comment: New changeset 6e8cda91d92da72800d891b2fc2073ecbc134d98 by Christian Heimes in branch 'master': bpo-40457: Support OpenSSL without TLS 1.0/1.1 (GH-19862) https://github.com/python/cpython/commit/6e8cda91d92da72800d891b2fc2073ecbc134d98 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 21:33:26 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 16 May 2020 01:33:26 +0000 Subject: [issue40457] Python fails to compile/load _ssl module if OpenSSL is compiled with no-tls1-method In-Reply-To: <1588286494.27.0.412005858691.issue40457@roundup.psfhosted.org> Message-ID: <1589592806.06.0.904482490465.issue40457@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19431 pull_request: https://github.com/python/cpython/pull/20126 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 21:44:10 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 May 2020 01:44:10 +0000 Subject: [issue40620] Range tutorial shorthand could be made clearer In-Reply-To: <1589436772.42.0.96031331267.issue40620@roundup.psfhosted.org> Message-ID: <1589593450.22.0.926914323953.issue40620@roundup.psfhosted.org> Terry J. Reedy added the comment: This block is the same in 3.9 and 3.8. My first though is this block is a holdover from 2.7, where range returned list. But looking at what is written previously, I think your interpretation is correct -- and agree that something other that code and corresponding output in a code block is confusing. So this might better be a list than a code block. Cheryl, do you have an idea of what might be better? ---------- assignee: -> docs at python components: +Documentation nosy: +cheryl.sabella, docs at python, terry.reedy stage: -> needs patch type: -> behavior versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 22:07:10 2020 From: report at bugs.python.org (Saumitro Dasgupta) Date: Sat, 16 May 2020 02:07:10 +0000 Subject: [issue40583] Runtime type annotation mutation leads to inconsistent behavior In-Reply-To: <1589096457.86.0.369001499523.issue40583@roundup.psfhosted.org> Message-ID: <1589594830.31.0.803057109519.issue40583@roundup.psfhosted.org> Change by Saumitro Dasgupta : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 22:11:46 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 May 2020 02:11:46 +0000 Subject: [issue40622] Tests fail with python3.6 built with VS2019 In-Reply-To: <1589451897.46.0.783197129325.issue40622@roundup.psfhosted.org> Message-ID: <1589595106.12.0.304793387434.issue40622@roundup.psfhosted.org> Terry J. Reedy added the comment: Runtest itself ran to completion but the 4 tests listed failed. I suspect that this should be closed as "won't fix" because A. 3.6 only gets security fixes since Dec 2018. B. Locally built Windows binaries often fail a few tests, either occasionally or dependably even if the Windows buildbots are green. Just now, test_import (still, or again), test__locale, and test_locale failed for me with 3.9.0a6+. This is unfortunate, but it is sometimes not clear whether the bug is in the modules or the tests. ---------- components: +Windows nosy: +ned.deily, paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware title: Using VS2019 to automatically build Python3 and Runtest and it failed to Runtest -> Tests fail with python3.6 built with VS2019 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 22:26:21 2020 From: report at bugs.python.org (Shantanu) Date: Sat, 16 May 2020 02:26:21 +0000 Subject: [issue40586] Pydoc should support https for hyperlinks. In-Reply-To: <1589158231.48.0.0342376329959.issue40586@roundup.psfhosted.org> Message-ID: <1589595981.34.0.518745357473.issue40586@roundup.psfhosted.org> Shantanu added the comment: This looks like a duplicate of https://bugs.python.org/issue38786, which was fixed in https://github.com/python/cpython/pull/17143 That PR wasn't backported, but maybe it should be. ---------- nosy: +hauntsaninja _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 22:27:53 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 May 2020 02:27:53 +0000 Subject: [issue40590] test_subprocess stuck on Windows, x64 In-Reply-To: <1589175898.73.0.75396943112.issue40590@roundup.psfhosted.org> Message-ID: <1589596073.77.0.725228163482.issue40590@roundup.psfhosted.org> Terry J. Reedy added the comment: python -m test.testsubprocessing on my Win 10-64 with repository 3.9.0a6+, without your patch, produces minkernel\crts\ucrt\src\appcrt\lowio\write.cpp(49) : Assertion failed: (_osfile(fh) & FOPEN) minkernel\crts\ucrt\src\appcrt\lowio\close.cpp(49) : Assertion failed: (_osfile(fh) & FOPEN) .minkernel\crts\ucrt\src\appcrt\lowio\close.cpp(49) : Assertion failed: (_osfile(fh) & FOPEN) followed by Ran 313 tests in 43.808s OK (skipped=180) Since, I presume, you are not working on Windows, I made a PR branch, recompiled, and reran test_subprocess. Same result. So I triggered a rerun in case the error was an oddball or in case cpython has changed. Did not work. Try close and re-open instead. Appears to be working better. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 22:50:09 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 May 2020 02:50:09 +0000 Subject: [issue40452] IDLE: preserve clipboard on closure on Windows In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1589597409.66.0.703131892008.issue40452@roundup.psfhosted.org> Terry J. Reedy added the comment: Please write out a manual test example (steps 1, 2, ..., N) that fails now and passes with the patch. ---------- title: IDLE preserve clipboard on closure (Windows) -> IDLE: preserve clipboard on closure on Windows versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 23:00:12 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 May 2020 03:00:12 +0000 Subject: [issue40590] test_subprocess stuck on Windows, x64 In-Reply-To: <1589175898.73.0.75396943112.issue40590@roundup.psfhosted.org> Message-ID: <1589598012.49.0.563005889921.issue40590@roundup.psfhosted.org> Terry J. Reedy added the comment: CI now passes. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 23:01:20 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 May 2020 03:01:20 +0000 Subject: [issue40060] socket.TCP_NOTSENT_LOWAT is missing in official macOS builds In-Reply-To: <1585120826.63.0.863724436073.issue40060@roundup.psfhosted.org> Message-ID: <1589598080.7.0.667999533641.issue40060@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- components: +macOS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 23:11:55 2020 From: report at bugs.python.org (Shantanu) Date: Sat, 16 May 2020 03:11:55 +0000 Subject: [issue13601] sys.stderr should be line-buffered when stderr is not a TTY In-Reply-To: <1323868292.46.0.495967266587.issue13601@psf.upfronthosting.co.za> Message-ID: <1589598715.13.0.995066160644.issue13601@roundup.psfhosted.org> Shantanu added the comment: I'm wondering if this should be mentioned in Python 3.9's What's New, potentially at https://docs.python.org/3.9/whatsnew/3.9.html#sys ? This change broke one of mypy's tests on 3.9 and it was a little tricky to find what had changed. ---------- nosy: +hauntsaninja _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 23:36:21 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 16 May 2020 03:36:21 +0000 Subject: [issue40633] json.dumps() should encode float number NaN to null In-Reply-To: <1589550124.35.0.830023884715.issue40633@roundup.psfhosted.org> Message-ID: <1589600181.31.0.50987603252.issue40633@roundup.psfhosted.org> Raymond Hettinger added the comment: [Eric] > this is documented behavior [Mark] > I definitely wouldn't want to see nans translated to > "null" by default. I concur with both of these statements. I would support adding an option (off by default) to convert NaNs to None. While NaNs were originally intended to indicate an invalid value, they sometimes get used to denote missing values. In those situations, it would be reasonable to convert NaN to null. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 15 23:43:49 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 16 May 2020 03:43:49 +0000 Subject: [issue40633] json.dumps() should encode float number NaN to null In-Reply-To: <1589550124.35.0.830023884715.issue40633@roundup.psfhosted.org> Message-ID: <1589600629.58.0.447625181773.issue40633@roundup.psfhosted.org> Raymond Hettinger added the comment: One other issue just came to mind. While we could convert NaN to null during encoding, there isn't a reasonable way to reverse the process (a null could either be a NaN or a legitimate None). That would limit the utility of a new optional conversion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 00:58:04 2020 From: report at bugs.python.org (Ned Deily) Date: Sat, 16 May 2020 04:58:04 +0000 Subject: [issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts In-Reply-To: <1588435279.1.0.0339863635356.issue40477@roundup.psfhosted.org> Message-ID: <1589605084.69.0.224193516806.issue40477@roundup.psfhosted.org> Ned Deily added the comment: > After your final fix, if I understood you correctly, we will no longer have to open Terminal? That's correct. That's the way the Launcher works on previous version on macOS. > will it ever be possible to not have the terminal run in the future? That's the way the Launcher works. It's a very simple-minded application. Essentially all it does for you is to provide an easy way from the Finder to run a Python script in a terminal window, i.e. by double-clicking or by drag-and-drop. Like on other Unix-based systems, Python on macOS is typically used as a command line program that runs under a Unix shell in a terminal window of some sort. Python itself does not provide a macOS GUI application interface; that is something that IDLE does (and other third-party IDEs that support Python). The Launcher app dates back to the very earliest days of Mac OS X when Python for Classic MacOS (System 9) was ported over. The Launcher is not really used very much as far as I can tell and its age shows with some usability and even security concerns. If you are comfortable using a terminal window and a Unix shell, you may find it more convenient to just run scripts directly there rather than indirectly using the Launcher, e.g. $ cd Documents # or whatever Folder $ python3.8 your_script.py Or, to open Python in interactive mode, where you can enter statements and immediately see the results: $ python3.8 If you prefer a full-featured dev environment, you can use IDLE. > Is there no way to edit a previous comment? On the current bugs.python.org, no, sorry! > the Launcher Preferences window also opens when I run a script. Did I miss a setting? As far as I know, opening Preferences is a "feature" of the Launcher and can't be prevented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 01:02:29 2020 From: report at bugs.python.org (Jacob Underwood) Date: Sat, 16 May 2020 05:02:29 +0000 Subject: [issue40639] Strange behavior in changing nested dictionaries Message-ID: <1589605349.29.0.839939005018.issue40639@roundup.psfhosted.org> New submission from Jacob Underwood : I was experimenting with nested dictionaries when I came across strange behavior that I can not figure out at all. The following function, at least for me, has some weird behavior. Originally, it was a bit longer, but somehow it achieved its intended purpose in a strange way, allowing me to cut off the rest of the correct code and to leave only the following with the code still continuing to work: My original intention was to make a function that would use the provided keys (in the "keys" argument of the following function) in the form of a list to use all but the last key in the list to get to a nested dictionary within the provided dictionary arg. Then, using the last key in the list, set the key to the information provided. Finally, the function should have returned the full dictionary originally provided, but with the one change within one of the nested dictionaries of the provided dictionary. def input_into_nested_dict(dictionary, keys, information): its = information cdip = dictionary for key in keys[:-1]: cdip = cdip[key] cdip[keys[-1]] = its return dictionary So, an example dictionary of m = {'a':{'b':{'c':{'d':30}}}} An example list of y = ['a','b','c','test'] Test of n = input_into_nested_dict(m, y, 'hello') The strange thing is, n now correctly has {'a': {'b': {'c': {'d': 30, 'test': 'hello'}}}} which does not correspond to what this weird cut off function should do, as it should only provide {'d': 30, 'test': 'hello'} Furthermore, somehow this changes the global m, the dictionary provided to the function, making it {'a': {'b': {'c': {'d': 30, 'test': 'hello'}}}} (The strange variable names are left over from my original code, though removing them as they are now unnecessary changes the behavior again, even though I am pretty sure it should not (?)) Same function without the beginning variables: def b(dictionary, keys, information): for key in keys[:-1]: dictionary = dictionary[key] dictionary[keys[-1]] = information return dictionary Now, when ran with the same m (reset back to the original dictionary before it was somehow changed), y, and an n of n = b(m, y, 'hello') The result is now that n gets the correct dictionary it should get {'d': 30, 'test': 'hello'} Though, somehow m changing also continues, with it again getting {'a': {'b': {'c': {'d': 30, 'test': 'hello'}}}} If this makes no sense, I'm sorry I am new to Python and am not really good really giving this kind of information In addition to that, this is probably not even a bug at all and I am probably just missing something big? If true, I'm sorry about this post... I do not know if this happens to just me, this originally happened in 3.7.7 but I tried upgrading and it continued in the most recent version (3.8.3) Thank you! ---------- messages: 369008 nosy: jacob.underwood priority: normal severity: normal status: open title: Strange behavior in changing nested dictionaries type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 01:14:01 2020 From: report at bugs.python.org (Werner) Date: Sat, 16 May 2020 05:14:01 +0000 Subject: [issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts In-Reply-To: <1589605084.69.0.224193516806.issue40477@roundup.psfhosted.org> Message-ID: <038936ba-96c9-41ef-bee3-2c3657f42b8d@Spark> Werner added the comment: I believe, I found a simple way to get what you are looking for: Open Automator and create an app. Select ?execute Shell script? put in the editor: python3 $1 Save this as MyPythonLauncher or what you want. Test it: Drop a Python script on the app. It should execute without opening the Terminal (at least if it is a GUI-script). If this is not clear, write me on we.hintze at gmail.com -- Werner Hintze ? Auerstra?e 1 ? 10249 Berlin Tel.: +49 30 42 73 486 ? Mobil: +49 160 94 68 76 60 Am 16. Mai 2020, 06:58 +0200 schrieb Ned Deily : > > Ned Deily added the comment: > > > After your final fix, if I understood you correctly, we will no longer have to open Terminal? > > That's correct. That's the way the Launcher works on previous version on macOS. > > > will it ever be possible to not have the terminal run in the future? > > That's the way the Launcher works. It's a very simple-minded application. Essentially all it does for you is to provide an easy way from the Finder to run a Python script in a terminal window, i.e. by double-clicking or by drag-and-drop. Like on other Unix-based systems, Python on macOS is typically used as a command line program that runs under a Unix shell in a terminal window of some sort. Python itself does not provide a macOS GUI application interface; that is something that IDLE does (and other third-party IDEs that support Python). The Launcher app dates back to the very earliest days of Mac OS X when Python for Classic MacOS (System 9) was ported over. The Launcher is not really used very much as far as I can tell and its age shows with some usability and even security concerns. If you are comfortable using a terminal window and a Unix shell, you may find it more convenient to just run scripts directly there rather than indirectly using the Launcher, e.g. > > $ cd Documents # or whatever Folder > $ python3.8 your_script.py > > Or, to open Python in interactive mode, where you can enter statements and immediately see the results: > > $ python3.8 > > If you prefer a full-featured dev environment, you can use IDLE. > > > Is there no way to edit a previous comment? > > On the current bugs.python.org, no, sorry! > > > the Launcher Preferences window also opens when I run a script. Did I miss a setting? > > As far as I know, opening Preferences is a "feature" of the Launcher and can't be prevented. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 01:14:04 2020 From: report at bugs.python.org (Ned Deily) Date: Sat, 16 May 2020 05:14:04 +0000 Subject: [issue40622] Tests fail with python3.6 built with VS2019 In-Reply-To: <1589451897.46.0.783197129325.issue40622@roundup.psfhosted.org> Message-ID: <1589606044.08.0.602220312455.issue40622@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the report. Unfortunately, you are not actually building Python 3.6 here. Revision f3a5b7a is on the master branch, not 3.6. The fact that you are seeing a failure of test_peg_generator confirms that you are building from master (i.e. a pre-release of 3.9), since that test and the feature behind it are new in 3.9. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 01:16:17 2020 From: report at bugs.python.org (Ned Deily) Date: Sat, 16 May 2020 05:16:17 +0000 Subject: [issue40622] Tests fail with python3.6 built with VS2019 In-Reply-To: <1589451897.46.0.783197129325.issue40622@roundup.psfhosted.org> Message-ID: <1589606177.42.0.203461029811.issue40622@roundup.psfhosted.org> Ned Deily added the comment: P.S. If you *do* want to build the current HEAD of the 3.6 branch including as yet unreleased fixes: git checkout 3.6 If you want to build a specific release, use the v^ tags provided for each release: git checkout v3.6.8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 01:36:09 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sat, 16 May 2020 05:36:09 +0000 Subject: [issue38938] Possible performance improvement for heaqq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1589607369.26.0.0640500047821.issue38938@roundup.psfhosted.org> Dennis Sweeney added the comment: The attached recursive_merge.py should be much less ugly and still somewhat performant. It should be the same algorithm as that PR, just written recursively rather than iteratively. I got some text files from http://www.gwicks.net/dictionaries.htm and tried merging them line-by-line: py -3.9 -m pyperf timeit -s "from heapq import merge; from collections import deque" "deque(merge(open('english.txt'), open('dutch.txt'), open('french.txt'), open('german.txt'), open('italian.txt')), maxlen=0)" Mean +- std dev: 391 ms +- 9 ms py -3.9 -m pyperf timeit -s "from recursive_merge import merge; from collections import deque" "deque(merge(open('english.txt'), open('dutch.txt'), open('french.txt'), open('german.txt'), open('italian.txt')), maxlen=0)" Mean +- std dev: 262 ms +- 9 ms Perhaps that's a more real-world benchmark. ---------- Added file: https://bugs.python.org/file49156/recursive_merge.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 01:48:37 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 16 May 2020 05:48:37 +0000 Subject: [issue40639] Strange behavior in changing nested dictionaries In-Reply-To: <1589605349.29.0.839939005018.issue40639@roundup.psfhosted.org> Message-ID: <1589608117.12.0.761811867675.issue40639@roundup.psfhosted.org> Steven D'Aprano added the comment: Hi Jacob, and welcome. You said: "I was experimenting with nested dictionaries when I came across strange behavior that I can not figure out at all." This is a bug tracker, for reporting bugs, not a help desk for asking how to figure out Python's behaviour. Python is 30 years old and what you are calling "strange" has exactly how Python has worked for all that time. Sorry to tell you, but it is your understanding that is lacking, not a bug in the language. I can't really tell why you think it is "strange" -- I've been using Python for 20 years or so, and I'm not sure what you think is weird about this, it all seems perfectly natural to me. I'm having difficulty in seeing why you expect something different, sorry. This bug tracker is not the right place to get into a long discussion about Python's behaviour. There are plenty of other places, like the Python-List mailing list, or StackOverflow, or Reddit's r/learnpython. But I *guess* that maybe you expect that when you call your function input_into_nested_dict(m, y, 'hello') that the dict `m` is copied before being passed to the function? If that's what you think is happening, let me assure you that no it is not. Python never copies data structures unless you explicitly tell it to, and specifically assignment does not make copies either. So when you say `cdip = dictionary`, that doesn't make a copy of the input dict, it is just a new name for the original global dict. These may help you: https://nedbatchelder.com/text/names1.html https://www.youtube.com/watch?v=_AEJHKGk9ns Good luck! ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 02:02:21 2020 From: report at bugs.python.org (Chas Belov) Date: Sat, 16 May 2020 06:02:21 +0000 Subject: [issue40640] Tutorial for Continue missing ... line Message-ID: <1589608941.53.0.91951505263.issue40640@roundup.psfhosted.org> New submission from Chas Belov : The tutorial code for Continue at https://docs.python.org/3.7/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops is missing a ... null statement. Actual code/result: >>> for num in range(2, 10): ... if num % 2 == 0: ... print("Found an even number", num) ... continue ... print("Found a number", num) Found an even number 2 Found a number 3 Found an even number 4 Found a number 5 Found an even number 6 Found a number 7 Found an even number 8 Found a number 9 Expected code/result: >>> for num in range(2, 10): ... if num % 2 == 0: ... print("Found an even number", num) ... continue ... print("Found a number", num) ... Found an even number 2 Found a number 3 Found an even number 4 Found a number 5 Found an even number 6 Found a number 7 Found an even number 8 Found a number 9 ---------- assignee: docs at python components: Documentation messages: 369014 nosy: docorbit at sonic.net, docs at python priority: normal severity: normal status: open title: Tutorial for Continue missing ... line versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 02:06:29 2020 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 16 May 2020 06:06:29 +0000 Subject: [issue33797] json int encoding incorrect for dbus.Byte In-Reply-To: <1528389161.29.0.592728768989.issue33797@psf.upfronthosting.co.za> Message-ID: <1589609189.14.0.173890766381.issue33797@roundup.psfhosted.org> Zackery Spytz added the comment: Python 2 is EOL, so I think this issue should be closed. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 02:40:58 2020 From: report at bugs.python.org (Jacob Underwood) Date: Sat, 16 May 2020 06:40:58 +0000 Subject: [issue40639] Strange behavior in changing nested dictionaries In-Reply-To: <1589605349.29.0.839939005018.issue40639@roundup.psfhosted.org> Message-ID: <1589611258.84.0.631472147618.issue40639@roundup.psfhosted.org> Jacob Underwood added the comment: I know this post is closed, but I just wanted to say thank you for the reply and the help, and being so understanding of my many mistakes Have a good day/night!! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 02:57:50 2020 From: report at bugs.python.org (Chas Belov) Date: Sat, 16 May 2020 06:57:50 +0000 Subject: [issue40641] Reserved word pair used in lambda tutorial without being noted as a reserved word Message-ID: <1589612270.24.0.155728110455.issue40641@roundup.psfhosted.org> New submission from Chas Belov : In the tutorial for lambda expressions at https://docs.python.org/3.7/tutorial/controlflow.html#lambda-expressions the reserved word pair is introduced without noting that it is a reserved word. In the example given, I wasn't sure whether pair was a reserved word or whether the interpreter was parsing the plural "pairs" which is presumable an arbitrary name. Actual content: The above example uses a lambda expression to return a function. Another use is to pass a small function as an argument: >>> pairs = [(1, 'one'), (2, 'two'), (3, 'three'), (4, 'four')] >>> pairs.sort(key=lambda pair: pair[1]) >>> pairs [(4, 'four'), (1, 'one'), (3, 'three'), (2, 'two')] Candidate expected content: The above example uses a lambda expression to return a function. Another use is to pass a small function as an argument, for example, the reserved word pair to designate the position in a tuple pair: >>> items = [(1, 'one'), (2, 'two'), (3, 'three'), (4, 'four')] >>> items.sort(key=lambda pair: pair[1]) >>> items [(4, 'four'), (1, 'one'), (3, 'three'), (2, 'two')] ---------- assignee: docs at python components: Documentation messages: 369017 nosy: docorbit at sonic.net, docs at python priority: normal severity: normal status: open title: Reserved word pair used in lambda tutorial without being noted as a reserved word versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 03:24:22 2020 From: report at bugs.python.org (Isa) Date: Sat, 16 May 2020 07:24:22 +0000 Subject: =?utf-8?q?=5Bissue40605=5D_=C2=ABpython=C2=BB=3A_Aucun_fichier_ou_dossier?= =?utf-8?q?_de_ce_type?= In-Reply-To: <1589271541.65.0.191752664403.issue40605@roundup.psfhosted.org> Message-ID: <1589613862.16.0.119466383955.issue40605@roundup.psfhosted.org> Isa added the comment: Thank you, Terry J. Reedy I'll do that eventhough I don't like writing script... As far as the title is concerned: that is the error message I receive ;)... sorry, my PC speaks french ;D... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 03:38:34 2020 From: report at bugs.python.org (Ned Deily) Date: Sat, 16 May 2020 07:38:34 +0000 Subject: [issue33797] json int encoding incorrect for dbus.Byte In-Reply-To: <1528389161.29.0.592728768989.issue33797@psf.upfronthosting.co.za> Message-ID: <1589614714.27.0.996023276138.issue33797@roundup.psfhosted.org> Change by Ned Deily : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 03:40:57 2020 From: report at bugs.python.org (jpelizza) Date: Sat, 16 May 2020 07:40:57 +0000 Subject: [issue40642] Cpython "pystate.h" subdirectory wrong Message-ID: <1589614857.55.0.73631693439.issue40642@roundup.psfhosted.org> New submission from jpelizza : Line 9 of pystate.h is: #include "cpython/initconfig.h" should be: #include "./initconfig.h" since pystate.h is already inside cpython dir. ---------- components: C API messages: 369019 nosy: jpelizza priority: normal severity: normal status: open title: Cpython "pystate.h" subdirectory wrong type: compile error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 04:00:01 2020 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 16 May 2020 08:00:01 +0000 Subject: [issue40641] Reserved word pair used in lambda tutorial without being noted as a reserved word In-Reply-To: <1589612270.24.0.155728110455.issue40641@roundup.psfhosted.org> Message-ID: <1589616001.85.0.337163897264.issue40641@roundup.psfhosted.org> Mark Dickinson added the comment: `pair` isn't a reserved word here; it's just the formal parameter name. Think of the lambda here as being equivalent to a function def second(pair): return pair[1] You can replace the word "pair" here with any other valid Python identifier, and it'll still work the same way. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 04:04:41 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 16 May 2020 08:04:41 +0000 Subject: [issue15751] [subinterpreters] Make the PyGILState API compatible with subinterpreters In-Reply-To: <1345526301.75.0.455071650321.issue15751@psf.upfronthosting.co.za> Message-ID: <1589616281.28.0.372311543895.issue15751@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 04:18:55 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 16 May 2020 08:18:55 +0000 Subject: [issue40457] Python fails to compile/load _ssl module if OpenSSL is compiled with no-tls1-method In-Reply-To: <1588286494.27.0.412005858691.issue40457@roundup.psfhosted.org> Message-ID: <1589617135.68.0.64092960894.issue40457@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19432 pull_request: https://github.com/python/cpython/pull/20127 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 04:20:09 2020 From: report at bugs.python.org (STINNER Victor) Date: Sat, 16 May 2020 08:20:09 +0000 Subject: [issue40503] PEP 615: Add zoneinfo module In-Reply-To: <1588618281.16.0.913416553136.issue40503@roundup.psfhosted.org> Message-ID: <1589617209.97.0.491577503455.issue40503@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 62972d9d73e83d6eea157617cc69500ffec9e3f0 by Paul Ganssle in branch 'master': bpo-40503: PEP 615: Tests and implementation for zoneinfo (GH-19909) https://github.com/python/cpython/commit/62972d9d73e83d6eea157617cc69500ffec9e3f0 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 04:33:50 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 16 May 2020 08:33:50 +0000 Subject: [issue40457] Python fails to compile/load _ssl module if OpenSSL is compiled with no-tls1-method In-Reply-To: <1588286494.27.0.412005858691.issue40457@roundup.psfhosted.org> Message-ID: <1589618030.12.0.79793405094.issue40457@roundup.psfhosted.org> miss-islington added the comment: New changeset a669443dfb79fc6aca2544b885895814798db15b by Miss Islington (bot) in branch '3.8': bpo-40457: Support OpenSSL without TLS 1.0/1.1 (GH-19862) https://github.com/python/cpython/commit/a669443dfb79fc6aca2544b885895814798db15b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 04:45:10 2020 From: report at bugs.python.org (Christian Heimes) Date: Sat, 16 May 2020 08:45:10 +0000 Subject: [issue40457] Python fails to compile/load _ssl module if OpenSSL is compiled with no-tls1-method In-Reply-To: <1588286494.27.0.412005858691.issue40457@roundup.psfhosted.org> Message-ID: <1589618710.36.0.336395200143.issue40457@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 43b355e53fd0796990a8810cd3461c197e20a3b9 by Miss Islington (bot) in branch '3.7': [3.7] bpo-40457: Support OpenSSL without TLS 1.0/1.1 (GH-19862) (GH-20126) https://github.com/python/cpython/commit/43b355e53fd0796990a8810cd3461c197e20a3b9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 04:45:54 2020 From: report at bugs.python.org (Christian Heimes) Date: Sat, 16 May 2020 08:45:54 +0000 Subject: [issue40457] Python fails to compile/load _ssl module if OpenSSL is compiled with no-tls1-method In-Reply-To: <1588286494.27.0.412005858691.issue40457@roundup.psfhosted.org> Message-ID: <1589618754.67.0.247234033351.issue40457@roundup.psfhosted.org> Christian Heimes added the comment: Fixes have landed in 3.7 to 3.9. Thanks for the report! :) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 05:21:32 2020 From: report at bugs.python.org (Steve Dower) Date: Sat, 16 May 2020 09:21:32 +0000 Subject: [issue36264] os.path.expanduser should not use HOME on windows In-Reply-To: <1552320597.36.0.934790753816.issue36264@roundup.psfhosted.org> Message-ID: <1589620892.89.0.753821223174.issue36264@roundup.psfhosted.org> Steve Dower added the comment: Really, we shouldn't be using any environment variables on Windows here, because they open up too many security risks. There are API calls that are canonical, but the environment vars are compatibility helpers. Breakage due to HOME being overridden is serious because it won't show up in any other cases - Python will be the first to suffer the consequences, which means we are facing a targeted exploit. Not really much choice but to fix it (though there was a choice whether to release a security advisory or not... ;-) ) The documentation was definitely updated, and it was in NEWS, but you're right there was no DeprecationWarning, not that we'd have been able to show it to most impacted library developers anyway. Perhaps the best approach for the sake of POSIX compatibility is to set HOME on startup to the correct value? It won't normally be set, so anyone using it is likely broken on Windows, but if we make it valid then everyone can just rely on it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 05:24:03 2020 From: report at bugs.python.org (Steve Dower) Date: Sat, 16 May 2020 09:24:03 +0000 Subject: [issue40629] Error MSB4086 (numeric comparison) In-Reply-To: <1589498706.71.0.441152981554.issue40629@roundup.psfhosted.org> Message-ID: <1589621043.33.0.878973430921.issue40629@roundup.psfhosted.org> Steve Dower added the comment: Haven't looked at your logs yet (on my phone), but make sure you have as recent an install of the Windows SDK as you can handle. That's typically what our build files check version numbers on. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 05:39:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Sat, 16 May 2020 09:39:12 +0000 Subject: [issue40192] time.thread_time isn't outputting in nanoseconds in AIX In-Reply-To: <1586049332.22.0.327858503775.issue40192@roundup.psfhosted.org> Message-ID: <1589621952.59.0.605225892063.issue40192@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 45410862321ae509e8753f239b0ea28fdcef5bad by Batuhan Taskaya in branch 'master': bpo-40192: Use thread_cputime for time.thread_time to improve resolution (GH-19381) https://github.com/python/cpython/commit/45410862321ae509e8753f239b0ea28fdcef5bad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 05:39:36 2020 From: report at bugs.python.org (STINNER Victor) Date: Sat, 16 May 2020 09:39:36 +0000 Subject: [issue40055] test___all__ and test_distutils alters the enviroinment: pkg_resources.PEP440Warning In-Reply-To: <1585068690.81.0.102478946521.issue40055@roundup.psfhosted.org> Message-ID: <1589621976.49.0.626767162816.issue40055@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 05:42:39 2020 From: report at bugs.python.org (hai shi) Date: Sat, 16 May 2020 09:42:39 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1589622159.03.0.0791935359986.issue40275@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +19433 pull_request: https://github.com/python/cpython/pull/20128 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 05:44:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Sat, 16 May 2020 09:44:58 +0000 Subject: [issue40163] multissl doesn't support tarballs in /source/old/ In-Reply-To: <1585874938.56.0.268058447907.issue40163@roundup.psfhosted.org> Message-ID: <1589622298.19.0.521392202414.issue40163@roundup.psfhosted.org> STINNER Victor added the comment: Thanks for the fix! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 05:50:03 2020 From: report at bugs.python.org (hai shi) Date: Sat, 16 May 2020 09:50:03 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1589622603.96.0.00643277663986.issue40275@roundup.psfhosted.org> hai shi added the comment: OK, I continue to reduce the import module in test.supports. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 05:53:58 2020 From: report at bugs.python.org (hai shi) Date: Sat, 16 May 2020 09:53:58 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1589622838.69.0.531283510634.issue40275@roundup.psfhosted.org> hai shi added the comment: After PR20128, the import modules from 132 to 123. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 05:56:51 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 16 May 2020 09:56:51 +0000 Subject: [issue25920] PyOS_AfterFork should reset socketmodule's lock In-Reply-To: <1450739972.22.0.163393011494.issue25920@psf.upfronthosting.co.za> Message-ID: <1589623011.27.0.0525022931462.issue25920@roundup.psfhosted.org> Ronald Oussoren added the comment: The macOS test checks if the binary targets macOS 10.4 or earlier. Those versions of macOS have been out of support for a very long time, and we haven't had installers targeting those versions of macOS for a long time as well. 2.7 and 3.5 had installers targeting macOS 10.5, current installers target macOS 10.9. IMHO macOS 10.4 has moved into museum territory and I wouldn't bother supporting it anymore. Support for USE_GETADDRINFO_LOCK is only enabled for very old OS releases, the OS that stopped requiring this the latest is OpenBSD in 2013 (7 years ago). The other OSes stopped requiring this in code in 2007 (13 years ago). I'd drop this code instead of fixing it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 06:01:46 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 16 May 2020 10:01:46 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1589623306.35.0.889638849598.issue40275@roundup.psfhosted.org> miss-islington added the comment: New changeset 372fa3ead584876a975a61936b376259be636d27 by Hai Shi in branch 'master': bpo-40275: lazy import modules in test.support (GH-20128) https://github.com/python/cpython/commit/372fa3ead584876a975a61936b376259be636d27 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 06:05:13 2020 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 16 May 2020 10:05:13 +0000 Subject: [issue40641] Reserved word pair used in lambda tutorial without being noted as a reserved word In-Reply-To: <1589612270.24.0.155728110455.issue40641@roundup.psfhosted.org> Message-ID: <1589623513.65.0.779507720135.issue40641@roundup.psfhosted.org> Change by Mark Dickinson : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 06:06:38 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sat, 16 May 2020 10:06:38 +0000 Subject: [issue40192] time.thread_time isn't outputting in nanoseconds in AIX In-Reply-To: <1586049332.22.0.327858503775.issue40192@roundup.psfhosted.org> Message-ID: <1589623598.23.0.125905612267.issue40192@roundup.psfhosted.org> Batuhan Taskaya added the comment: Should we mention about AIX support in availability section @vstinner? https://docs.python.org/3/library/time.html#time.thread_time ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 06:08:43 2020 From: report at bugs.python.org (Paul Moore) Date: Sat, 16 May 2020 10:08:43 +0000 Subject: [issue36264] os.path.expanduser should not use HOME on windows In-Reply-To: <1552320597.36.0.934790753816.issue36264@roundup.psfhosted.org> Message-ID: <1589623723.11.0.0348173587851.issue36264@roundup.psfhosted.org> Paul Moore added the comment: > Perhaps the best approach for the sake of POSIX compatibility is to set HOME on startup to the correct value? If Python starts setting `HOME`, that has the potential to affect programs called in a subprocess, possibly breaking them (making them not find the user's config, for example). Even if we only set `HOME` when it's not already set, we can get this issue. (Vim, for example, will break if you set HOME to somewhere other than where the user has their config stored). Certainly, it's arguable that such programs are not respecting Windows conventions correctly, but in practical terms that's not really that relevant. The user will just see it as "Python can't call my program correctly". This is a very real issue, that I used to hit a lot in the past, when native Windows support was a lot less common in open source code than it is now. And it was nearly always made worse by the programs that tried to be "too clever" about hiding the differences between Windows and Unix. So I'm a strong -1 on Python doing anything with `HOME` here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 06:12:51 2020 From: report at bugs.python.org (STINNER Victor) Date: Sat, 16 May 2020 10:12:51 +0000 Subject: [issue40192] time.thread_time isn't outputting in nanoseconds in AIX In-Reply-To: <1586049332.22.0.327858503775.issue40192@roundup.psfhosted.org> Message-ID: <1589623971.35.0.295049449708.issue40192@roundup.psfhosted.org> STINNER Victor added the comment: I close the issue, since the commit was merged. "Availability: Windows, Linux, Unix systems supporting CLOCK_THREAD_CPUTIME_ID." covers AIX. But you can add AIX if you consider that it's not explicit enough. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 06:14:23 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sat, 16 May 2020 10:14:23 +0000 Subject: [issue40192] time.thread_time isn't outputting in nanoseconds in AIX In-Reply-To: <1586049332.22.0.327858503775.issue40192@roundup.psfhosted.org> Message-ID: <1589624063.17.0.0876233757069.issue40192@roundup.psfhosted.org> Batuhan Taskaya added the comment: > "Availability: Windows, Linux, Unix systems supporting CLOCK_THREAD_CPUTIME_ID." covers AIX. That was my thought too, thanks again! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 06:15:41 2020 From: report at bugs.python.org (STINNER Victor) Date: Sat, 16 May 2020 10:15:41 +0000 Subject: [issue25920] PyOS_AfterFork should reset socketmodule's lock In-Reply-To: <1450739972.22.0.163393011494.issue25920@psf.upfronthosting.co.za> Message-ID: <1589624141.4.0.326829743457.issue25920@roundup.psfhosted.org> STINNER Victor added the comment: > I'd drop this code instead of fixing it. Hum, FreeBSD, OpenBSD and NetBSD versions which require the fix also look very old. So I agree that it became safe to remove the fix. Would it make sense to only fix it on Python 3.10 and leave other versions with the bug? Or should fix all Python versions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 06:16:20 2020 From: report at bugs.python.org (STINNER Victor) Date: Sat, 16 May 2020 10:16:20 +0000 Subject: [issue40445] compileall.compile_dir docs aren't updated for bpo-38112 In-Reply-To: <1588203472.21.0.62841448361.issue40445@roundup.psfhosted.org> Message-ID: <1589624180.61.0.308158597715.issue40445@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 06:31:57 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 16 May 2020 10:31:57 +0000 Subject: [issue39305] Merge nntplib._NNTPBase and nntplib.NNTP In-Reply-To: <1578757948.77.0.383613154988.issue39305@roundup.psfhosted.org> Message-ID: <1589625117.95.0.844980426743.issue39305@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset aa92a7cf210c98ad94229f282221136d846942db by Dong-hee Na in branch 'master': bpo-39305: Update nntplib to merge nntplib.NNTP and nntplib._NNTPBase (GH-19817) https://github.com/python/cpython/commit/aa92a7cf210c98ad94229f282221136d846942db ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 06:33:18 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 16 May 2020 10:33:18 +0000 Subject: [issue39305] Merge nntplib._NNTPBase and nntplib.NNTP In-Reply-To: <1578757948.77.0.383613154988.issue39305@roundup.psfhosted.org> Message-ID: <1589625198.08.0.00130882896761.issue39305@roundup.psfhosted.org> Dong-hee Na added the comment: I am no closing this issue :) Thank you for the suggestion, Victor. And also thank you for the interest in this issue, Luciana :) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 07:29:24 2020 From: report at bugs.python.org (Edison Abahurire) Date: Sat, 16 May 2020 11:29:24 +0000 Subject: [issue40643] Improve doc-strings for datetime.strftime & strptime Message-ID: <1589628564.12.0.439754688359.issue40643@roundup.psfhosted.org> New submission from Edison Abahurire : The docstring for strftime is: ```def strftime(self, fmt): "Format using strftime()." ``` And that of strptime: ````def strptime(cls, date_string, format): 'string, format -> new datetime parsed from a string (like time.strptime()).' ```` I feel like both could use a better explanation for users who will access them using >>> help(datetime.strftime) and users using IDEs that provide doc-strings on-hover over a function. ---------- messages: 369040 nosy: edison.abahurire, nanjekyejoannah priority: normal severity: normal status: open title: Improve doc-strings for datetime.strftime & strptime _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 07:44:47 2020 From: report at bugs.python.org (=?utf-8?q?Pavol_Babin=C4=8D=C3=A1k?=) Date: Sat, 16 May 2020 11:44:47 +0000 Subject: [issue40644] Text representation of Windows' file attributes similar to stat.filemode() Message-ID: <1589629487.36.0.146516661583.issue40644@roundup.psfhosted.org> New submission from Pavol Babin??k : I'm using Windows and lets' say I have this directory structure listed with cmd: > dir /A ... 16.05.20 11:15 directory 16.05.20 10:47 0 hidden 16.05.20 11:25 link [regular] 16.05.20 10:47 0 readonly 16.05.20 11:15 0 regular 16.05.20 10:48 0 system ... or PowerShell: PS > dir -Force Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 16.5.20 11:15 directory -a-h-- 16.5.20 10:47 0 hidden -a---l 16.5.20 11:25 0 link -ar--- 16.5.20 10:47 0 readonly -a---- 16.5.20 11:15 0 regular -a--s- 16.5.20 10:48 0 system or attrib: > attrib A H hidden A link A R readonly A regular A S system I'd like to print file attributes in a text form. If I use stat.filemode(): >>> import os, stat >>> print("\n".join(["{} {}".format(stat.filemode(os.stat(n).st_mode), n) for n in os.listdir('.')])) drwxrwxrwx directory -rw-rw-rw- hidden -rw-rw-rw- link -r--r--r-- readonly -rw-rw-rw- regular -rw-rw-rw- system >>> not surprisingly I miss all windows attributes. On the top of that I get only values of stat.S_IWRITE and stat.S_IREAD as documented in os.chmod(). I'd like to have a new function, let's say fileattributes() which would behave like this: >>> print("\n".join(["{} {}".format(stat.fileattributes(os.stat(n).st_file_attributes), n) for n in os.listdir('.')])) d----- directory -a-h-- hidden -a---l link -ar--- readonly -a---- regular -a--s- system >>> In this example I have used same format of attributes as in PowerShell because it is most similar to filemode(). I guess link cannot be currently identified with contants in stat module. ---------- components: Library (Lib) messages: 369041 nosy: scrool priority: normal severity: normal status: open title: Text representation of Windows' file attributes similar to stat.filemode() type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 07:45:35 2020 From: report at bugs.python.org (Eric Wieser) Date: Sat, 16 May 2020 11:45:35 +0000 Subject: [issue37496] Support annotations in signature strings. In-Reply-To: <1562197526.36.0.0415942737779.issue37496@roundup.psfhosted.org> Message-ID: <1589629535.09.0.859718386187.issue37496@roundup.psfhosted.org> Eric Wieser added the comment: This seems somewhat related to https://bugs.python.org/issue31939 ---------- nosy: +Eric Wieser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 09:13:35 2020 From: report at bugs.python.org (Haoyu SUN) Date: Sat, 16 May 2020 13:13:35 +0000 Subject: [issue40633] json.dumps() should encode float number NaN to null In-Reply-To: <1589550124.35.0.830023884715.issue40633@roundup.psfhosted.org> Message-ID: <1589634815.26.0.176497914642.issue40633@roundup.psfhosted.org> Haoyu SUN added the comment: About using null in JSON to represnet NaN value of a float type, I prefer this logic: float is a numeric type that expecting a number as its value, "Not a Number" on a numeric type is equivalent to None (?Number ? NumericValues = Empty). If we need to capture an error in calculation or input data, we can use the allow_nan option to catch it. Database connectors such as SQLAlchemy translate an empty field as float('nan') for a float number field. Probably we can safely take it as a convention. No idea yet for representing infinity. Once encoded, there is no way to know a null originates from NaN or None without additional fields. The direct conversion from Python data types to JSON may lose part of information due to JSON's limited data types. When converting a BMP image to GIF, we have to eliminate some colors to fit in the small pallet and we do not expect to restore the full information BMP image has from its GIF counterpart. I suggest we make the JSON module have at least an option to generate standard-compliant JSON regardless potential loss of information, instead of leaving each application to have its subclass of JSONEncoder just for this corner case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 09:20:06 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 16 May 2020 13:20:06 +0000 Subject: [issue40633] json.dumps() should encode float number NaN to null In-Reply-To: <1589550124.35.0.830023884715.issue40633@roundup.psfhosted.org> Message-ID: <1589635206.11.0.495542609606.issue40633@roundup.psfhosted.org> Eric V. Smith added the comment: I don't think we want to generate output no matter what. Should datetime instances become null instead of raising an exception? Are there types other than float where some values are json serializable and others aren't? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 09:30:49 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 16 May 2020 13:30:49 +0000 Subject: [issue36264] os.path.expanduser should not use HOME on windows In-Reply-To: <1552320597.36.0.934790753816.issue36264@roundup.psfhosted.org> Message-ID: <1589635849.47.0.386281551103.issue36264@roundup.psfhosted.org> Jason R. Coombs added the comment: > Platform differences can be papered over with functions. I?m not suggesting that from within Python there should be another way to detect a home directory. The expanduser functionality as written is just fine for that, though I agree with Steve that using an API on Windows would be even better. The issue is that from outside Python there?s now no platform-agnostic way to override the home directory, either for tests or to suppress user-local configuration. In addition to the test case, there is a user-facing use-case that's made more complicated: - A user needs to bypass the logged-in user's state for a Python command. For example, there was a buggy release (of something) that stored some broken state in the users? home dir, and the workaround is to run some command with an alternate home dir. Communicating that technique to a multi-platform audience is now much more difficult. It was previously difficult enough because ?set an environment variable? is a shell-dependent operation, so already requires the user to have some expertise on how to set environment variables in their environment. This change requires the guidance to be more complicated or for the expertise to be greater. > Breakage due to HOME being overridden is serious because it won't show up in any other cases - Python will be the first to suffer the consequences Evidence is to the contrary. It seems other tools like 'git' honor the HOME directory: PS C:\Users\jaraco> $env:HOME = "C:\Users\jaraco\temp" PS C:\Users\jaraco> git config --global --list fatal: unable to read config file 'C:/Users/jaraco/temp/.gitconfig': No such file or directory Interestingly, I notice that Powershell does set the $HOME environment variable on Windows, reinforcing the concept that $HOME is a platform agnostic way to communicate a home directory. It does appear as if [Ruby honors HOME and sets it if unset on Windows](https://stackoverflow.com/a/13670703/70170). I'm not a fan of setting the variable, but there is precedent. It seems to me Python 3.8 is the outlier and that honoring $HOME, while somewhat awkward on Windows, was a valuable unifying behavior, and its removal without any plans for a replacement is causing harm. Just searching through some of the projects I have checked out, I find a few. Here's [another real-world example relying on Python honoring HOME to override home](https://github.com/jaraco/path/blob/7789c621bb494e7c2de871221638aa642126a805/test_path.py#L1142). [Until recently](https://github.com/python/cpython/commit/7ea9a85f132b32347fcbd2cbe1b553a2e9890b56), PDB used to look exclusively at $HOME and [the backport still does](https://github.com/jaraco/backports.pdb/blob/8fa8e80043a09103adac5b19cb29fe0cf5d0328c/backports/pdb.py#L164-L178). Devpi client [relies on setting home for tests](https://github.com/devpi/devpi/blob/7b2a40e87e9927a28eb554d0454130cd663e34f3/client/testing/test_use.py#L380). > we are facing a targeted exploit. What is the exploit? I don't think the downsides of honoring HOME on Windows were captured above. >From what I could tell, there was one (fairly obscure) case where HOME was set unexpectedly. That hardly seems like a justification to reverse a long-standing documented feature that aligns with the expectation of other tools in the ecosystem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 10:03:17 2020 From: report at bugs.python.org (Paul Ganssle) Date: Sat, 16 May 2020 14:03:17 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1589637797.96.0.314370768647.issue24416@roundup.psfhosted.org> Paul Ganssle added the comment: New changeset 1b97b9b0ad9a2ff8eb5c8f2e2e7c2aec1d13a330 by Paul Ganssle in branch 'master': bpo-24416: Return named tuple from date.isocalendar() (GH-20113) https://github.com/python/cpython/commit/1b97b9b0ad9a2ff8eb5c8f2e2e7c2aec1d13a330 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 10:17:08 2020 From: report at bugs.python.org (Paul Ganssle) Date: Sat, 16 May 2020 14:17:08 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1589638628.25.0.635993216096.issue24416@roundup.psfhosted.org> Paul Ganssle added the comment: This is now merged, thanks for the debate and opinions offered everyone, and thanks to Dong-hee for the implementation! The way we did the implementation, a pickle/unpickle cycle on the result of .isocalendar() will return a plain tuple. Despite the fact that I suggested it, I recognize that this is a /weird thing to do/, and I'm sorta banking on the fact that in all likelihood no one is relying on pickling and unpickling the result of .isocalendar() returning anything but a tuple (since, currently, that's already what it does, regardless of what the input type was). I suppose we'll have to see if it causes problems in the beta period, and I'll keep a close eye on it. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 10:25:04 2020 From: report at bugs.python.org (Paul Ganssle) Date: Sat, 16 May 2020 14:25:04 +0000 Subject: [issue40643] Improve doc-strings for datetime.strftime & strptime In-Reply-To: <1589628564.12.0.439754688359.issue40643@roundup.psfhosted.org> Message-ID: <1589639104.99.0.0226021864233.issue40643@roundup.psfhosted.org> Paul Ganssle added the comment: I agree, this can be improved (particularly the first one). I believe we'll need to change it in the C implementation as well as the pure python version. That said, the most useful thing for users would be a full formatting reference, which is too much to put in the docstring (and to maintain in at least 3 different places). I'm not sure *how* much better it can get, but at least the first one reads like a terrible self-referential dictionary entry "recyclist (n). a proponent of recyclism". At the very least it should disambiguate between `datetime.strftime`, `time.strftime` and `stftime(3)`. ---------- nosy: +p-ganssle priority: normal -> low stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 10:44:30 2020 From: report at bugs.python.org (Eryk Sun) Date: Sat, 16 May 2020 14:44:30 +0000 Subject: [issue36264] os.path.expanduser should not use HOME on windows In-Reply-To: <1552320597.36.0.934790753816.issue36264@roundup.psfhosted.org> Message-ID: <1589640270.78.0.403598541434.issue36264@roundup.psfhosted.org> Eryk Sun added the comment: > I?m not suggesting that from within Python there should be another way > to detect a home directory. The expanduser functionality as written is > just fine for that, though I agree with Steve that using an API on > Windows would be even better. I thought it might be useful for testing purposes if os.path (i.e. ntpath and posixpath) had a way to set the home directory that it uses in way that wouldn't affect other libraries and child processes. > It seems other tools like 'git' honor the HOME directory: Many cross-platform projects follow Unix conventions, which is simpler for development and documentation. These projects are often targeted at developers, who usually have a strong understanding of Unix conventions and system configuration. But Python is a general-purpose scripting language used for everything from system administration to major applications. It needs to follow platform conventions, but it should also abstract away platform differences as much as possible. > Interestingly, I notice that Powershell does set the $HOME environment Not for me in PowerShell 5 and 7: PS C:\> test-path 'env:userprofile' True PS C:\> test-path 'env:home' False ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 11:01:31 2020 From: report at bugs.python.org (Christian Heimes) Date: Sat, 16 May 2020 15:01:31 +0000 Subject: [issue40645] Use OpenSSL's HMAC API Message-ID: <1589641291.33.0.635001105595.issue40645@roundup.psfhosted.org> New submission from Christian Heimes : Python's hmac module provides a pure Python based implementation on top of the hashlib module. OpenSSL offers a dedicated HMAC implementation that has a couple of benefits over pure Python implementation: - OpenSSL HMAC is slightly faster and requires slightly less memory and allocations. - Python's HMAC only works for RFC 2104 HMACs with digests like MD5, SHA1, SHA2, and SHA3. Other digests types like Blake2 use a completely different style of HMAC. OpenSSL's HMAC API works for all sorts of digests. OpenSSL 3.0.0 also supports Blake2 MAC with its standard API. - OpenSSL HMAC is standard and compliance conform. Certain compliance restrictions require that MAC and keyed hashing is implemented in a certain way. Our HMAC code is considered a custom implementation of a crypto primitive and in violation of compliance rules. For 3.9 I plan to deprecate hmac.HMAC.digest_con, hmac.HMAC.inner, and hmac.HMAC.outer attributes. They are implementation specific details any way. I'm also going to provide a _hashlib.hmac_new() function so we can test the new code. For 3.10 I'll be switching over to _haslib.hmac_new() when the digestmod is a string or a callable that returns _hashlib.HASH code. ---------- assignee: christian.heimes components: Extension Modules messages: 369050 nosy: christian.heimes, gregory.p.smith priority: normal severity: normal stage: patch review status: open title: Use OpenSSL's HMAC API type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 11:06:40 2020 From: report at bugs.python.org (Christian Heimes) Date: Sat, 16 May 2020 15:06:40 +0000 Subject: [issue40645] Use OpenSSL's HMAC API In-Reply-To: <1589641291.33.0.635001105595.issue40645@roundup.psfhosted.org> Message-ID: <1589641600.59.0.884190480163.issue40645@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +19434 pull_request: https://github.com/python/cpython/pull/20129 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 11:11:36 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 16 May 2020 15:11:36 +0000 Subject: [issue40642] Cpython "pystate.h" subdirectory wrong In-Reply-To: <1589614857.55.0.73631693439.issue40642@roundup.psfhosted.org> Message-ID: <1589641896.35.0.631453477093.issue40642@roundup.psfhosted.org> Eric V. Smith added the comment: Won't either one work, since "Include" is in the "search path"? Is this causing an actual problem? You have this marked as "compile error", but haven't shown any information about the error, such as what compiler, how it's being invoked, and what the error message is. We need some more information. If this were to be changed (which I'm not advocating unless there's a real problem), would it be better as "initconfig.h" or "./initconfig.h"? I think they're equivalent. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 11:23:15 2020 From: report at bugs.python.org (STINNER Victor) Date: Sat, 16 May 2020 15:23:15 +0000 Subject: [issue39305] Merge nntplib._NNTPBase and nntplib.NNTP In-Reply-To: <1578757948.77.0.383613154988.issue39305@roundup.psfhosted.org> Message-ID: <1589642595.25.0.833049419423.issue39305@roundup.psfhosted.org> STINNER Victor added the comment: Thanks, that's a nice simplification of the code ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 11:26:40 2020 From: report at bugs.python.org (Henk-Jaap Wagenaar) Date: Sat, 16 May 2020 15:26:40 +0000 Subject: [issue40646] Builtins in doc show signature in documentation Message-ID: <1589642800.95.0.83659669973.issue40646@roundup.psfhosted.org> New submission from Henk-Jaap Wagenaar : Due to a certain discussion on extending zip, I was having looking at this page: https://docs.python.org/3/library/functions.html It lists the builtins at the top as e.g. all() which I think is confusing: running all() will actually fail. I think it should either (using "all" as example): 1. display as "all" 2. display as "all(iterable)" (what to do about 'overloaded' functions like e.g. range?) I am happy to provide a PR for the preferred option. ---------- assignee: docs at python components: Documentation messages: 369053 nosy: cryvate, docs at python priority: normal severity: normal status: open title: Builtins in doc show signature in documentation type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 11:27:30 2020 From: report at bugs.python.org (Martijn Pieters) Date: Sat, 16 May 2020 15:27:30 +0000 Subject: [issue40647] Building with a libreadline.so located outside the ld.so.conf search path fails Message-ID: <1589642850.04.0.521709964482.issue40647@roundup.psfhosted.org> New submission from Martijn Pieters : This issue goes back a long time. The libreadline handling in the modules setup.py doesn't add the location of the readline library to the runtime library paths: self.add(Extension('readline', ['readline.c'], library_dirs=['/usr/lib/termcap'], extra_link_args=readline_extra_link_args, libraries=readline_libs)) This requires the readline library to have been added to a traditional location or has taken care of either ld.so.conf or LD_LIBRARY_PATH. I'm building a series of Python binaries with a custom `--prefix` where I also installed a local copy of readline (so both are configured with the same prefix), and while setup.py finds the correct library, importing the compiled result fails because no `RPATH` is set. This could be fixed by adding the parent path of the located `libreadline` shared library as a `runtime_library_dirs` entry: readline_libdirs = None if do_readline not in self.lib_dirs: readline_libdirs = [ os.path.abspath(os.path.dirname(do_readline)) ] self.add(Extension('readline', ['readline.c'], library_dirs=['/usr/lib/termcap'], extra_link_args=readline_extra_link_args, runtime_library_dirs=readline_libdirs, libraries=readline_libs)) ---------- components: Extension Modules messages: 369054 nosy: mjpieters priority: normal severity: normal status: open title: Building with a libreadline.so located outside the ld.so.conf search path fails type: compile error versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 11:46:11 2020 From: report at bugs.python.org (Martijn Pieters) Date: Sat, 16 May 2020 15:46:11 +0000 Subject: [issue40647] Building with a libreadline.so located outside the ld.so.conf search path fails In-Reply-To: <1589642850.04.0.521709964482.issue40647@roundup.psfhosted.org> Message-ID: <1589643971.76.0.235929703362.issue40647@roundup.psfhosted.org> Martijn Pieters added the comment: Actually, this won't do it either, as `self.lib_dirs` already contains the --prefix. Clearly, I just need to add -R=${PREFIX}/lib to CPPFLAGS. ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 11:47:26 2020 From: report at bugs.python.org (=?utf-8?q?Pavol_Babin=C4=8D=C3=A1k?=) Date: Sat, 16 May 2020 15:47:26 +0000 Subject: [issue40648] File mode is not tested on Windows Message-ID: <1589644046.09.0.00935722474106.issue40648@roundup.psfhosted.org> New submission from Pavol Babin??k : >From what I can tell only place where file mode is tested is test_mode() method of class TestFilemode in test_stat.py. Relevant section for Windows (os.name != 'posix'): with open(TESTFN, 'w'): pass ... os.chmod(TESTFN, 0o700) st_mode, modestr = self.get_mode() self.assertEqual(modestr[:3], '-rw') self.assertS_IS("REG", st_mode) self.assertEqual(self.statmod.S_IFMT(st_mode), self.statmod.S_IFREG) Doesn't test that files under Windows can have only two modes: - 0o444 - If os.chmod() is missing stat.S_IWRITE. Effectively readonly. - 0o666 - Regular file by default. On the top of that I believe last two assertions are equivalent - test file is regular. But that would be for a different issue, I guess. ---------- components: Tests messages: 369056 nosy: scrool priority: normal severity: normal status: open title: File mode is not tested on Windows type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 11:54:44 2020 From: report at bugs.python.org (Martijn Pieters) Date: Sat, 16 May 2020 15:54:44 +0000 Subject: [issue40647] Building with a libreadline.so located outside the ld.so.conf search path fails In-Reply-To: <1589642850.04.0.521709964482.issue40647@roundup.psfhosted.org> Message-ID: <1589644484.62.0.43572281998.issue40647@roundup.psfhosted.org> Martijn Pieters added the comment: Last but not least, this is essentially a duplicate of https://bugs.python.org/issue4010 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 11:56:33 2020 From: report at bugs.python.org (=?utf-8?q?Pavol_Babin=C4=8D=C3=A1k?=) Date: Sat, 16 May 2020 15:56:33 +0000 Subject: [issue40648] File mode is not tested on Windows In-Reply-To: <1589644046.09.0.00935722474106.issue40648@roundup.psfhosted.org> Message-ID: <1589644593.89.0.400411490342.issue40648@roundup.psfhosted.org> Change by Pavol Babin??k : ---------- keywords: +patch pull_requests: +19435 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20130 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 12:03:43 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 16 May 2020 16:03:43 +0000 Subject: [issue40646] Builtins in doc show signature in documentation In-Reply-To: <1589642800.95.0.83659669973.issue40646@roundup.psfhosted.org> Message-ID: <1589645023.73.0.2260228029.issue40646@roundup.psfhosted.org> Eric V. Smith added the comment: It's a common convention to show a function with parens, even if it can't be called with no arguments. I don't think we want to make that table visually more complex by including all of the message signatures. open() has 8 params, min() and max() have multiple signatures, etc. You could argue that removing the parens would be an improvement, since all items in the table are functions, but I think it's fine as it is. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 12:15:06 2020 From: report at bugs.python.org (Paul Ganssle) Date: Sat, 16 May 2020 16:15:06 +0000 Subject: [issue40503] PEP 615: Add zoneinfo module In-Reply-To: <1588618281.16.0.913416553136.issue40503@roundup.psfhosted.org> Message-ID: <1589645706.4.0.465694402648.issue40503@roundup.psfhosted.org> Paul Ganssle added the comment: New changeset b17e49e0def23238b9e7f48c8a02e2d7bbf1f653 by Paul Ganssle in branch 'master': bpo-40503: Add documentation and what's new entry for zoneinfo (GH-20006) https://github.com/python/cpython/commit/b17e49e0def23238b9e7f48c8a02e2d7bbf1f653 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 13:18:51 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 16 May 2020 17:18:51 +0000 Subject: [issue36264] os.path.expanduser should not use HOME on windows In-Reply-To: <1552320597.36.0.934790753816.issue36264@roundup.psfhosted.org> Message-ID: <1589649531.39.0.618304534028.issue36264@roundup.psfhosted.org> Jason R. Coombs added the comment: > I thought it might be useful for testing purposes if os.path (i.e. ntpath and posixpath) had a way to set the home directory that it uses in way that wouldn't affect other libraries and child processes. I was thinking about this, and I'd argue that in the general case, you _want_ to be able to set the home directory in a way that affects child processes. If you care enough to try to isolate the behavior from the user-local state, you probably want other libraries and child processes to honor that isolation. This argument extends to there being a (preferably one) way override a home directory that's honored by tools and processes of all flavors (e.g. overriding USERPROFILE has no effect on git commands in a subprocess). I agree it may prove useful not to affect the global and subprocess state if possible, but I'd argue in that case, you could probably just patch the library under test directly. These processes patching $HOME really are attempting to suppress the user's local state (or simulate a specific state). > Not for me in PowerShell 5 and 7: Weird. You're right, I get the same thing for test-path. And indeed it's not set in the Python process. PS C:\WINDOWS\system32> test-path env:home False PS C:\WINDOWS\system32> python -c "import os; print(os.environ.get('HOME'))" None But strangely, $HOME seems to have some effect. PS C:\WINDOWS\system32> echo $HOME C:\Users\jaraco PS C:\WINDOWS\system32> cd $HOME PS C:\Users\jaraco> Do you know what that's about? I found a couple [Powershell users that seem to think setting $HOME is something you would want to do](https://stackoverflow.com/questions/32109375/in-powershell-how-do-i-set-home-variable-before-running-a-script). And [this Powershell documentation](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7#environment-variables-that-store-preferences) makes reference to $HOME. I see. Powershell defines $HOME as an [Automatic Variable](https://ss64.com/ps/syntax-automatic-variables.html) internally but doesn't expose it as an environment variable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 13:24:11 2020 From: report at bugs.python.org (hai shi) Date: Sat, 16 May 2020 17:24:11 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1589649851.34.0.915331641375.issue40275@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +19436 pull_request: https://github.com/python/cpython/pull/20131 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 13:36:12 2020 From: report at bugs.python.org (Christian Heimes) Date: Sat, 16 May 2020 17:36:12 +0000 Subject: [issue40645] Use OpenSSL's HMAC API In-Reply-To: <1589641291.33.0.635001105595.issue40645@roundup.psfhosted.org> Message-ID: <1589650572.08.0.847318422247.issue40645@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +19437 pull_request: https://github.com/python/cpython/pull/20132 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 14:39:10 2020 From: report at bugs.python.org (Chris AtLee) Date: Sat, 16 May 2020 18:39:10 +0000 Subject: [issue12800] 'tarfile.StreamError: seeking backwards is not allowed' when extract symlink In-Reply-To: <1313881060.54.0.449889075101.issue12800@psf.upfronthosting.co.za> Message-ID: <1589654350.37.0.258025888644.issue12800@roundup.psfhosted.org> Chris AtLee added the comment: Is there anything I can do to help get this landed? The PR in github works for me. ---------- nosy: +catlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 14:43:09 2020 From: report at bugs.python.org (P12 Pfx) Date: Sat, 16 May 2020 18:43:09 +0000 Subject: [issue38597] C Extension import limit In-Reply-To: <1572119300.64.0.0138111717141.issue38597@roundup.psfhosted.org> Message-ID: <1589654589.91.0.18869602521.issue38597@roundup.psfhosted.org> Change by P12 Pfx : ---------- nosy: +P12 Pfx _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 15:29:56 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 May 2020 19:29:56 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1589657396.53.0.550573284248.issue40275@roundup.psfhosted.org> Serhiy Storchaka added the comment: I think that there is no much benefit in avoiding to import modules which are imported in libregrtest. In particular threading, subprocess, tempdir, os, fnmatch, etc. You should minimize import of test.libregrtest + test.support, not just test.support. BTW, libregrtests imports now much more modules than test.support. Also, some modules, like bz2 are too small and do not have much dependencies. You will not save much on importing them lazily. On other hand, lazy import have its cost, so the real benefit will be even smaller. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 15:59:42 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 May 2020 19:59:42 +0000 Subject: [issue32893] ast.literal_eval() shouldn't accept booleans as numbers in AST In-Reply-To: <1519206981.62.0.467229070634.issue32893@psf.upfronthosting.co.za> Message-ID: <1589659182.96.0.26152392133.issue32893@roundup.psfhosted.org> Serhiy Storchaka added the comment: No longer reproduced. ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 15:59:49 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 16 May 2020 19:59:49 +0000 Subject: [issue38938] Possible performance improvement for heaqq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1589659189.68.0.559306183371.issue38938@roundup.psfhosted.org> Raymond Hettinger added the comment: For comparison, I'm attaching an iterative version that manipulates the tree nodes with all local variables. Try it out and see what you think. ---------- Added file: https://bugs.python.org/file49157/new_merge.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 16:07:08 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sat, 16 May 2020 20:07:08 +0000 Subject: [issue38870] Expose ast.unparse in the ast module In-Reply-To: <1574289269.61.0.90605518345.issue38870@roundup.psfhosted.org> Message-ID: <1589659628.15.0.679432782484.issue38870@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- pull_requests: +19438 pull_request: https://github.com/python/cpython/pull/20133 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 16:09:24 2020 From: report at bugs.python.org (Glenn Travis) Date: Sat, 16 May 2020 20:09:24 +0000 Subject: [issue40649] [Errno 1} Message-ID: <1589659764.36.0.211928166783.issue40649@roundup.psfhosted.org> New submission from Glenn Travis : A fellow on the X-Plane forum reported getting this: cd desktop/Ortho4XP-130 ianrobertson at Ians-iMac Ortho4XP-130 % python3 Ortho4XP_v130.py /Library/Frameworks/Python.framework/Versions/3.8/bin/python3: can't open file 'Ortho4XP_v130.py': [Errno 1] Operation not permitted he is able to run python3.8.2 from the terminal and get it to work with the interpreter for a print('Howdy') but Ortho4Xp not. is this a python thing, an ortho thing or some root cause from installing python? ---------- messages: 369065 nosy: TotallyLost priority: normal severity: normal status: open title: [Errno 1} _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 16:11:13 2020 From: report at bugs.python.org (Glenn Travis) Date: Sat, 16 May 2020 20:11:13 +0000 Subject: [issue40649] [Errno 1] In-Reply-To: <1589659764.36.0.211928166783.issue40649@roundup.psfhosted.org> Message-ID: <1589659873.84.0.217033270971.issue40649@roundup.psfhosted.org> Change by Glenn Travis : ---------- title: [Errno 1} -> [Errno 1] _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 16:27:10 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 16 May 2020 20:27:10 +0000 Subject: [issue37630] Investigate replacing SHA3 code with OpenSSL In-Reply-To: <1563535856.49.0.726904541971.issue37630@roundup.psfhosted.org> Message-ID: <1589660830.95.0.169198659725.issue37630@roundup.psfhosted.org> miss-islington added the comment: New changeset d5b3f6b7f9fc74438009af63f1de01bd77be9385 by Christian Heimes in branch 'master': bpo-37630: Use SHA3 and SHAKE XOF from OpenSSL (GH-16049) https://github.com/python/cpython/commit/d5b3f6b7f9fc74438009af63f1de01bd77be9385 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 16:36:00 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 16 May 2020 20:36:00 +0000 Subject: [issue38938] Possible performance improvement for heaqq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1589661360.46.0.760629345795.issue38938@roundup.psfhosted.org> Change by Raymond Hettinger : Removed file: https://bugs.python.org/file49157/new_merge.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 16:36:16 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 16 May 2020 20:36:16 +0000 Subject: [issue38938] Possible performance improvement for heaqq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1589661376.04.0.866710283339.issue38938@roundup.psfhosted.org> Change by Raymond Hettinger : Added file: https://bugs.python.org/file49158/new_merge.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 16:40:19 2020 From: report at bugs.python.org (Christian Heimes) Date: Sat, 16 May 2020 20:40:19 +0000 Subject: [issue37630] Investigate replacing SHA3 code with OpenSSL In-Reply-To: <1563535856.49.0.726904541971.issue37630@roundup.psfhosted.org> Message-ID: <1589661619.23.0.0101397029214.issue37630@roundup.psfhosted.org> Christian Heimes added the comment: I'll add a whatsnew later. ---------- versions: -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 16:51:35 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sat, 16 May 2020 20:51:35 +0000 Subject: [issue38870] Expose ast.unparse in the ast module In-Reply-To: <1574289269.61.0.90605518345.issue38870@roundup.psfhosted.org> Message-ID: <1589662295.46.0.801057150949.issue38870@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- pull_requests: +19439 pull_request: https://github.com/python/cpython/pull/20134 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 16:55:43 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sat, 16 May 2020 20:55:43 +0000 Subject: [issue40649] [Errno 1] In-Reply-To: <1589659764.36.0.211928166783.issue40649@roundup.psfhosted.org> Message-ID: <1589662543.62.0.09902522525.issue40649@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi Glenn, this is probably not a bug in Python and more information about the error and the context would be needed if it was. Bugs must be reproducible to be looked at and fixed and your post does not contain enough information to do so. You should redirect your friend to a forum like StackOverflow or the python-help mailing list to get help with his script. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 17:13:25 2020 From: report at bugs.python.org (Shantanu) Date: Sat, 16 May 2020 21:13:25 +0000 Subject: [issue34556] Add --upgrade-deps to venv module In-Reply-To: <1535729151.14.0.56676864532.issue34556@psf.upfronthosting.co.za> Message-ID: <1589663605.91.0.84385906385.issue34556@roundup.psfhosted.org> Change by Shantanu : ---------- nosy: +hauntsaninja nosy_count: 4.0 -> 5.0 pull_requests: +19440 pull_request: https://github.com/python/cpython/pull/20135 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 17:19:30 2020 From: report at bugs.python.org (Roundup Robot) Date: Sat, 16 May 2020 21:19:30 +0000 Subject: [issue39959] Bug on multiprocessing.shared_memory In-Reply-To: <1584128583.89.0.486447704556.issue39959@roundup.psfhosted.org> Message-ID: <1589663970.03.0.639287256074.issue39959@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 5.0 -> 6.0 pull_requests: +19441 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20136 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 17:46:15 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 16 May 2020 21:46:15 +0000 Subject: [issue38870] Expose ast.unparse in the ast module In-Reply-To: <1574289269.61.0.90605518345.issue38870@roundup.psfhosted.org> Message-ID: <1589665575.08.0.923411246936.issue38870@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset ce4a753dcb3eef3d68e892a6515490b1aa219651 by Batuhan Taskaya in branch 'master': bpo-38870: Do not separate factor prefixes in ast.unparse (GH-20133) https://github.com/python/cpython/commit/ce4a753dcb3eef3d68e892a6515490b1aa219651 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 17:53:29 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 16 May 2020 21:53:29 +0000 Subject: [issue38870] Expose ast.unparse in the ast module In-Reply-To: <1574289269.61.0.90605518345.issue38870@roundup.psfhosted.org> Message-ID: <1589666009.36.0.253925168966.issue38870@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 25160cdc4775a1ddb4e37c8bf5a6e31ad9c146ed by Batuhan Taskaya in branch 'master': bpo-38870: Don't put unnecessary parentheses on class declarations in ast.parse (GH-20134) https://github.com/python/cpython/commit/25160cdc4775a1ddb4e37c8bf5a6e31ad9c146ed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 18:09:58 2020 From: report at bugs.python.org (Eryk Sun) Date: Sat, 16 May 2020 22:09:58 +0000 Subject: [issue40644] Text representation of Windows' file attributes similar to stat.filemode() In-Reply-To: <1589629487.36.0.146516661583.issue40644@roundup.psfhosted.org> Message-ID: <1589666998.55.0.568709813825.issue40644@roundup.psfhosted.org> Eryk Sun added the comment: There's no reason this can't be generalized to file attributes/flags on other platforms such as st_flags on BSD/macOS and st_attributes on Linux (depending on bpo-39533 -- but statx only returns a small subset of attributes that are available via chattr and lsattr). Here's a table of approximately corresponding file attributes in BSD, Linux, and Windows: BSD [1] Linux Windows ------------------------------------------------------------------------ UF_NODUMP STATX_ATTR_NODUMP -d UF_APPEND STATX_ATTR_APPEND -a STATX_ATTR_ENCRYPTED -E FILE_ATTRIBUTE_ENCRYPTED -E UF_COMPRESSED STATX_ATTR_COMPRESSED -c FILE_ATTRIBUTE_COMPRESSED -C UF_IMMUTABLE STATX_ATTR_IMMUTABLE -i FILE_ATTRIBUTE_READONLY -R [2] UF_NOUNLINK FILE_ATTRIBUTE_READONLY -R [2] UF_READONLY FILE_ATTRIBUTE_READONLY -R UF_HIDDEN FILE_ATTRIBUTE_HIDDEN -H UF_SYSTEM FILE_ATTRIBUTE_SYSTEM -S UF_ARCHIVE FILE_ATTRIBUTE_ARCHIVE -A UF_SPARSE FILE_ATTRIBUTE_SPARSE_FILE -P UF_REPARSE FILE_ATTRIBUTE_REPARSE_POINT -L UF_OFFLINE FILE_ATTRIBUTE_OFFLINE -O [1] Not supported on all BSD platforms, including macOS. [2] Readonly applies to regular file data, not metadata or directory contents (index data). Also, it disallows unlink but allows rename. > not surprisingly I miss all windows attributes. On the top of that I > get only values of stat.S_IWRITE and stat.S_IREAD as documented in > os.chmod(). Windows doesn't implement a direct equivalent of the Unix file mode. But Windows file attributes partially overlap the Unix file mode for the S_IFMT filetype bits. In particular, WinAPI GetFileType classifies an open file based on the device type as one of FILE_TYPE_CHAR (S_IFCHR), FILE_TYPE_PIPE (S_IFIFO, S_IFSOCK), or FILE_TYPE_DISK (S_IFBLK, S_IFREG, S_IFDIR, S_IFLNK). For the latter, FILE_ATTRIBUTE_DIRECTORY and FILE_ATTRIBUTE_REPARSE_POINT distinguish S_IFDIR and reparse points, including S_IFLNK, depending on the reparse tag. The lack of either attribute indicates S_IFREG, and no support for file attributes indicates S_IFBLK. For example: >>> stat.filemode(os.stat('//./nul').st_mode) # S_IFCHR 'c---------' >>> stat.filemode(os.stat('//./pipe').st_mode) # S_IFIFO 'p---------' >>> stat.filemode(os.stat('//./C:').st_mode) # S_IFBLK 'b---------' (Apparently, we aren't fabricating any bogus permissions for the above cases.) Free of charge, you also get a hack that sets the execute bit on directories, and also on files that have a file extension in the set {".COM", ".EXE", ".BAT", ".CMD"}. Caveat emptor: this has nothing to do with whether the file or directory actually grants the caller execute access. >>> stat.filemode(os.stat('C:/').st_mode) # S_IFDIR 'drwxrwxrwx' >>> os.stat('C:/Temp/spam.bat').st_file_attributes & stat.FILE_ATTRIBUTE_READONLY 1 >>> os.readlink('C:/Temp/symlink.bat') 'spam.bat' >>> stat.filemode(os.lstat('C:/Temp/symlink.bat').st_mode) # S_IFLNK 'lrwxrwxrwx' >>> stat.filemode(os.stat('C:/Temp/symlink.bat').st_mode) # S_IFREG '-r-xr-xr-x' Regarding the permission mode bits, many environments (including Python) misuse FILE_ATTRIBUTE_READONLY as a write permission, i.e. readonly removes the S_IWUSR | S_IWGRP | S_IWOTH bits. Certainly readonly should be a factor in os.access(), but it is not a permission; no one can be granted permission to write to a readonly file. Using it as such is inconsistent with UF_IMMUTABLE in BSD and STATX_ATTR_IMMUTABLE in Linux. It's also inconsistent with how write permission works in Unix, since readonly disallows deleting the file, which has nothing to do with write permission on a file in Unix. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 18:13:07 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 16 May 2020 22:13:07 +0000 Subject: [issue32309] Implement asyncio.run_in_executor shortcut In-Reply-To: <1513194861.88.0.213398074469.issue32309@psf.upfronthosting.co.za> Message-ID: <1589667187.32.0.307248258736.issue32309@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 18:36:21 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 16 May 2020 22:36:21 +0000 Subject: [issue39740] Select module fails to build on Solaris 11.4 In-Reply-To: <1582564565.67.0.773509979349.issue39740@roundup.psfhosted.org> Message-ID: <1589668581.55.0.85781270059.issue39740@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 31245d19f2de03e57fd93c5169f00a36d7410fcf by Batuhan Taskaya in branch 'master': bpo-39740: Early declare devpoll_methods to support old compilers (GH-19281) https://github.com/python/cpython/commit/31245d19f2de03e57fd93c5169f00a36d7410fcf ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 18:36:44 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 16 May 2020 22:36:44 +0000 Subject: [issue40211] Clarify preadv and pwritev is supported AIX 7.1 and newer. In-Reply-To: <1586210459.59.0.898970260057.issue40211@roundup.psfhosted.org> Message-ID: <1589668604.1.0.937223124338.issue40211@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset cae2275949157490b469d79ef250387eca324b9e by Batuhan Taskaya in branch 'master': bpo-40211: Clarify os.preadv and os.pwritev are supported on AIX 7.1+ (GH-19401) https://github.com/python/cpython/commit/cae2275949157490b469d79ef250387eca324b9e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 18:38:06 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 16 May 2020 22:38:06 +0000 Subject: [issue40165] Hide stderror from the user if command failes In-Reply-To: <1585878723.67.0.918823600877.issue40165@roundup.psfhosted.org> Message-ID: <1589668686.17.0.72038213142.issue40165@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset d5a980a60790571ec88aba4e011c91e099e31e98 by Batuhan Taskaya in branch 'master': bpo-40165: Suppress stderr when checking if test_stty_match should be skipped (GH-19325) https://github.com/python/cpython/commit/d5a980a60790571ec88aba4e011c91e099e31e98 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 18:38:46 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sat, 16 May 2020 22:38:46 +0000 Subject: [issue40165] Hide stderror from the user if command failes In-Reply-To: <1585878723.67.0.918823600877.issue40165@roundup.psfhosted.org> Message-ID: <1589668726.65.0.972253283351.issue40165@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 18:39:28 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sat, 16 May 2020 22:39:28 +0000 Subject: [issue40211] Clarify preadv and pwritev is supported AIX 7.1 and newer. In-Reply-To: <1586210459.59.0.898970260057.issue40211@roundup.psfhosted.org> Message-ID: <1589668768.19.0.375216635141.issue40211@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 18:40:21 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sat, 16 May 2020 22:40:21 +0000 Subject: [issue39740] Select module fails to build on Solaris 11.4 In-Reply-To: <1582564565.67.0.773509979349.issue39740@roundup.psfhosted.org> Message-ID: <1589668821.94.0.558609843083.issue39740@roundup.psfhosted.org> Batuhan Taskaya added the comment: @RobHammann it should be resolved now, please feel free to re-open issue if you get into trouble (I manually tested on solaris) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 18:49:11 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 16 May 2020 22:49:11 +0000 Subject: [issue38870] Expose ast.unparse in the ast module In-Reply-To: <1574289269.61.0.90605518345.issue38870@roundup.psfhosted.org> Message-ID: <1589669351.09.0.289038344497.issue38870@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset e966af7cff78e14e1d289db587433504b4b53533 by Batuhan Taskaya in branch 'master': bpo-38870: Correctly handle empty docstrings in ast.unparse (GH-18768) https://github.com/python/cpython/commit/e966af7cff78e14e1d289db587433504b4b53533 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 19:04:06 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 May 2020 23:04:06 +0000 Subject: [issue40246] Different error messages for same error - invalid string prefixes In-Reply-To: <1586541958.33.0.891000303304.issue40246@roundup.psfhosted.org> Message-ID: <1589670246.81.0.289681855261.issue40246@roundup.psfhosted.org> Terry J. Reedy added the comment: > The >else"#fca"< code was added 6 years ago (commit 8b95d5e0bf00d9d0098579d29fd6bb9322071879) That was my typo in turtledemo.__main__ (similar lines before had the space) and I wish that it had been caught then. Why did compileall in the test suite not catch this SyntaxError before 3.6.0a6 was released? Does it intentionally skip .__main__ files? Should I add a test_turtledemo file (with checks for the presence of tkinter and turtle)? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 19:04:18 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 16 May 2020 23:04:18 +0000 Subject: [issue38870] Expose ast.unparse in the ast module In-Reply-To: <1574289269.61.0.90605518345.issue38870@roundup.psfhosted.org> Message-ID: <1589670258.94.0.439336028019.issue38870@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset dff92bb31f7db1a80ac431811f8108bd0ef9be43 by Batuhan Taskaya in branch 'master': bpo-38870: Implement round tripping support for typed AST in ast.unparse (GH-17797) https://github.com/python/cpython/commit/dff92bb31f7db1a80ac431811f8108bd0ef9be43 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 19:05:43 2020 From: report at bugs.python.org (Christian Heimes) Date: Sat, 16 May 2020 23:05:43 +0000 Subject: [issue40645] Use OpenSSL's HMAC API In-Reply-To: <1589641291.33.0.635001105595.issue40645@roundup.psfhosted.org> Message-ID: <1589670343.92.0.865945314968.issue40645@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 837f9e42e3a1ad03b340661afe85e67d2719334f by Christian Heimes in branch 'master': bpo-40645: Deprecated internal details of hmac.HMAC (GH-20132) https://github.com/python/cpython/commit/837f9e42e3a1ad03b340661afe85e67d2719334f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 19:16:40 2020 From: report at bugs.python.org (Minmin Gong) Date: Sat, 16 May 2020 23:16:40 +0000 Subject: [issue35890] Cleanup some non-consistent API callings In-Reply-To: <1549145315.91.0.561945747798.issue35890@roundup.psfhosted.org> Message-ID: <1589671000.88.0.851098350399.issue35890@roundup.psfhosted.org> Change by Minmin Gong : ---------- pull_requests: +19442 pull_request: https://github.com/python/cpython/pull/19974 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 19:21:07 2020 From: report at bugs.python.org (Glenn Travis) Date: Sat, 16 May 2020 23:21:07 +0000 Subject: [issue40649] [Errno 1] In-Reply-To: <1589659764.36.0.211928166783.issue40649@roundup.psfhosted.org> Message-ID: <1589671267.07.0.0194272588755.issue40649@roundup.psfhosted.org> Glenn Travis added the comment: I think that there is something odd going on with his python install. He just tried to run a very simple python script that I made for him, print('Hello there python interperter') And he got the same error message again. I do not know what more information you need, I sent the copy and paste terminal error text. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 19:23:34 2020 From: report at bugs.python.org (Glenn Travis) Date: Sat, 16 May 2020 23:23:34 +0000 Subject: [issue40649] [Errno 1] In-Reply-To: <1589659764.36.0.211928166783.issue40649@roundup.psfhosted.org> Message-ID: <1589671414.26.0.624141496092.issue40649@roundup.psfhosted.org> Change by Glenn Travis : Added file: https://bugs.python.org/file49159/errormessage.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 19:30:32 2020 From: report at bugs.python.org (Glenn Travis) Date: Sat, 16 May 2020 23:30:32 +0000 Subject: [issue40649] [Errno 1] In-Reply-To: <1589659764.36.0.211928166783.issue40649@roundup.psfhosted.org> Message-ID: <1589671832.45.0.80143833976.issue40649@roundup.psfhosted.org> Glenn Travis added the comment: I think that I will ask him to reinstall Python. Which can be a scary process for him. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 19:30:59 2020 From: report at bugs.python.org (Minmin Gong) Date: Sat, 16 May 2020 23:30:59 +0000 Subject: [issue40650] Pytime.c doesn't need to include windows.h Message-ID: <1589671859.24.0.478073605849.issue40650@roundup.psfhosted.org> New submission from Minmin Gong : Python/pytime.c includes windows.h for timeval. But it's not necessary to include the full header, because timeval is defined in winsock headers. ---------- messages: 369082 nosy: Minmin.Gong priority: normal severity: normal status: open title: Pytime.c doesn't need to include windows.h _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 19:31:30 2020 From: report at bugs.python.org (Minmin Gong) Date: Sat, 16 May 2020 23:31:30 +0000 Subject: [issue40650] Pytime.c doesn't need to include windows.h In-Reply-To: <1589671859.24.0.478073605849.issue40650@roundup.psfhosted.org> Message-ID: <1589671890.58.0.736112705621.issue40650@roundup.psfhosted.org> Change by Minmin Gong : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware type: -> enhancement versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 19:33:27 2020 From: report at bugs.python.org (Dongfang Qu) Date: Sat, 16 May 2020 23:33:27 +0000 Subject: [issue40651] class:`OrderedDict` Examples: LRU implementation has a bug. Message-ID: <1589672007.55.0.638241402645.issue40651@roundup.psfhosted.org> New submission from Dongfang Qu : class:`OrderedDict` Examples: LRU implementation has a bug. Details: The calls to the `__setitem__` method should also count as usages. ---------- assignee: docs at python components: Documentation messages: 369083 nosy: Dongfang Qu, docs at python priority: normal severity: normal status: open title: class:`OrderedDict` Examples: LRU implementation has a bug. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 19:33:46 2020 From: report at bugs.python.org (Furkan Onder) Date: Sat, 16 May 2020 23:33:46 +0000 Subject: [issue26329] os.path.normpath("//") returns // In-Reply-To: <1455116285.45.0.915370101527.issue26329@psf.upfronthosting.co.za> Message-ID: <1589672026.09.0.32297835178.issue26329@roundup.psfhosted.org> Furkan Onder added the comment: PR has been sent! ---------- nosy: +furkanonder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 19:34:07 2020 From: report at bugs.python.org (Minmin Gong) Date: Sat, 16 May 2020 23:34:07 +0000 Subject: [issue40650] Pytime.c doesn't need to include windows.h In-Reply-To: <1589671859.24.0.478073605849.issue40650@roundup.psfhosted.org> Message-ID: <1589672047.63.0.316575662713.issue40650@roundup.psfhosted.org> Change by Minmin Gong : ---------- keywords: +patch pull_requests: +19443 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20137 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 19:34:22 2020 From: report at bugs.python.org (Furkan Onder) Date: Sat, 16 May 2020 23:34:22 +0000 Subject: [issue26329] os.path.normpath("//") returns // In-Reply-To: <1455116285.45.0.915370101527.issue26329@psf.upfronthosting.co.za> Message-ID: <1589672062.6.0.781797710067.issue26329@roundup.psfhosted.org> Change by Furkan Onder : ---------- pull_requests: +19444 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20138 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 19:35:00 2020 From: report at bugs.python.org (Dongfang Qu) Date: Sat, 16 May 2020 23:35:00 +0000 Subject: [issue40651] class:`OrderedDict` Examples: LRU implementation has a bug. In-Reply-To: <1589672007.55.0.638241402645.issue40651@roundup.psfhosted.org> Message-ID: <1589672100.64.0.831872330681.issue40651@roundup.psfhosted.org> Dongfang Qu added the comment: Document of `collections`. https://docs.python.org/3/library/collections.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 19:46:31 2020 From: report at bugs.python.org (Dongfang Qu) Date: Sat, 16 May 2020 23:46:31 +0000 Subject: [issue40651] class:`OrderedDict` Examples: LRU implementation has a bug. In-Reply-To: <1589672007.55.0.638241402645.issue40651@roundup.psfhosted.org> Message-ID: <1589672791.56.0.361940703139.issue40651@roundup.psfhosted.org> Change by Dongfang Qu : ---------- keywords: +patch pull_requests: +19445 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20139 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 20:05:10 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 17 May 2020 00:05:10 +0000 Subject: [issue38870] Expose ast.unparse in the ast module In-Reply-To: <1574289269.61.0.90605518345.issue38870@roundup.psfhosted.org> Message-ID: <1589673910.14.0.106213285444.issue38870@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +19446 pull_request: https://github.com/python/cpython/pull/20141 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 21:40:54 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 17 May 2020 01:40:54 +0000 Subject: [issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) In-Reply-To: <1569848255.08.0.155489980043.issue38323@roundup.psfhosted.org> Message-ID: <1589679654.73.0.0946871124988.issue38323@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- pull_requests: +19447 pull_request: https://github.com/python/cpython/pull/20142 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 21:42:48 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 17 May 2020 01:42:48 +0000 Subject: [issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) In-Reply-To: <1569848255.08.0.155489980043.issue38323@roundup.psfhosted.org> Message-ID: <1589679768.14.0.659322198798.issue38323@roundup.psfhosted.org> Chris Jerdonek added the comment: I posted a draft PR for this issue: https://github.com/python/cpython/pull/20142 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 21:43:40 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 17 May 2020 01:43:40 +0000 Subject: [issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) In-Reply-To: <1569848255.08.0.155489980043.issue38323@roundup.psfhosted.org> Message-ID: <1589679820.27.0.23376490004.issue38323@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 21:57:33 2020 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 17 May 2020 01:57:33 +0000 Subject: [issue32309] Implement asyncio.run_in_executor shortcut In-Reply-To: <1513194861.88.0.213398074469.issue32309@psf.upfronthosting.co.za> Message-ID: <1589680653.52.0.485675643507.issue32309@roundup.psfhosted.org> Change by Kyle Stanley : ---------- pull_requests: +19448 pull_request: https://github.com/python/cpython/pull/20143 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 22:30:47 2020 From: report at bugs.python.org (kpysoze) Date: Sun, 17 May 2020 02:30:47 +0000 Subject: [issue40652] Test test_locale failed when running cpython test on Windows 10 x64 for version 3.9.0a6+ Message-ID: <1589682647.75.0.547799731095.issue40652@roundup.psfhosted.org> New submission from kpysoze : Test test_locale failed when running cpython test on Windows 10 x64 python.bat -m test -j3 on version Python 3.9.0a6+ 0:19:51 load avg: 0.00 [209/423/2] test_locale failed test test_locale failed -- Traceback (most recent call last): File "C:\personal\cpython\cpython\lib\test\test_locale.py", line 566, in test_getsetlocale_issue1813 locale.setlocale(locale.LC_CTYPE, loc) File "C:\personal\cpython\cpython\lib\locale.py", line 610, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting ---------- components: Windows messages: 369087 nosy: kpysoze, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Test test_locale failed when running cpython test on Windows 10 x64 for version 3.9.0a6+ type: crash versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 22:54:01 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 17 May 2020 02:54:01 +0000 Subject: [issue38870] Expose ast.unparse in the ast module In-Reply-To: <1574289269.61.0.90605518345.issue38870@roundup.psfhosted.org> Message-ID: <1589684041.38.0.994783337126.issue38870@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 6341fc7257d89d798675ad6e425f7eb0b6f2b4bb by Pablo Galindo in branch 'master': bpo-38870: Use subTest in test_unparse for better error reporting (GH-20141) https://github.com/python/cpython/commit/6341fc7257d89d798675ad6e425f7eb0b6f2b4bb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 23:05:19 2020 From: report at bugs.python.org (Minmin Gong) Date: Sun, 17 May 2020 03:05:19 +0000 Subject: [issue40653] _dirnameW is used outside HAVE_SYMLINK Message-ID: <1589684719.69.0.769333707176.issue40653@roundup.psfhosted.org> New submission from Minmin Gong : _dirnameW is defined inside #ifdef HAVE_SYMLINK/#endif, but it's used in os__getdiskusage_impl, which is outside HAVE_SYMLINK. So if HAVE_SYMLINK is not defined (e.g., on UWP), it'll have compiling issues. ---------- components: Windows messages: 369089 nosy: Minmin.Gong, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: _dirnameW is used outside HAVE_SYMLINK type: compile error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 23:06:25 2020 From: report at bugs.python.org (Minmin Gong) Date: Sun, 17 May 2020 03:06:25 +0000 Subject: [issue40653] _dirnameW is used outside HAVE_SYMLINK In-Reply-To: <1589684719.69.0.769333707176.issue40653@roundup.psfhosted.org> Message-ID: <1589684785.53.0.529974055551.issue40653@roundup.psfhosted.org> Change by Minmin Gong : ---------- keywords: +patch pull_requests: +19449 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20144 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 23:19:27 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 17 May 2020 03:19:27 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1589685567.4.0.669821490094.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 2c8cd06afe8e0abb52367f85978f19b88e2df53e by Lysandros Nikolaou in branch 'master': bpo-40334: Improvements to error-handling code in the PEG parser (GH-20003) https://github.com/python/cpython/commit/2c8cd06afe8e0abb52367f85978f19b88e2df53e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 23:26:35 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 17 May 2020 03:26:35 +0000 Subject: [issue40654] shutil.copyfile mutates symlink for absolute path Message-ID: <1589685995.41.0.350903765679.issue40654@roundup.psfhosted.org> New submission from Jason R. Coombs : In https://github.com/jaraco/path/issues/186, the Path project discovered a regression with Python 3.8. It seems that if one creates a symlink with an absolute path. I used `shutil.copytree('temp', 'temp2', True)` and it produced this result: ``` ~ # dir temp Volume in drive C has no label. Volume Serial Number is B8F4-40BB Directory of C:\Users\jaraco\temp 2020-05-16 11:05 PM . 2020-05-16 11:05 PM .. 2020-05-16 11:05 PM bar [c:\Users\jaraco\temp\foo] 2020-05-16 11:04 PM 0 foo 2 File(s) 0 bytes 2 Dir(s) 17,495,805,952 bytes free ~ # dir temp2 Volume in drive C has no label. Volume Serial Number is B8F4-40BB Directory of C:\Users\jaraco\temp2 2020-05-16 11:05 PM . 2020-05-16 11:05 PM .. 2020-05-16 11:06 PM bar [\\?\c:\Users\jaraco\temp\foo] 2020-05-16 11:04 PM 0 foo 2 File(s) 0 bytes 2 Dir(s) 17,495,846,912 bytes free ``` As you can see, in the copy, bar has an additional `\\?\` prefix on the symlink path. On Python 3.7 and earlier, the copy was made without mutating the metadata. ---------- components: Windows keywords: 3.8regression messages: 369091 nosy: jaraco, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: shutil.copyfile mutates symlink for absolute path type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 23:38:37 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 17 May 2020 03:38:37 +0000 Subject: [issue40652] Test test_locale failed when running cpython test on Windows 10 x64 for version 3.9.0a6+ In-Reply-To: <1589682647.75.0.547799731095.issue40652@roundup.psfhosted.org> Message-ID: <1589686717.91.0.816762083217.issue40652@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: See also https://bugs.python.org/issue37945 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 23:57:05 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 17 May 2020 03:57:05 +0000 Subject: [issue38938] Possible performance improvement for heaqq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1589687825.77.0.436440662664.issue38938@roundup.psfhosted.org> Change by Raymond Hettinger : Removed file: https://bugs.python.org/file49158/new_merge.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 16 23:57:27 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 17 May 2020 03:57:27 +0000 Subject: [issue38938] Possible performance improvement for heaqq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1589687847.09.0.220381262396.issue38938@roundup.psfhosted.org> Change by Raymond Hettinger : Added file: https://bugs.python.org/file49160/new_merge.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 00:14:59 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 17 May 2020 04:14:59 +0000 Subject: [issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad In-Reply-To: <1487329309.81.0.182915384821.issue29587@psf.upfronthosting.co.za> Message-ID: <1589688899.33.0.450152136839.issue29587@roundup.psfhosted.org> Chris Jerdonek added the comment: New changeset d7184d3dbd249444ec3961641dc08a9ad3c1ac34 by Chris Jerdonek in branch 'master': bpo-29587: Add another test for the gen.throw() fix. (GH-19859) https://github.com/python/cpython/commit/d7184d3dbd249444ec3961641dc08a9ad3c1ac34 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 00:25:55 2020 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 17 May 2020 04:25:55 +0000 Subject: [issue39976] Add "**other_popen_kwargs" to subprocess API signatures in docs In-Reply-To: <1584345163.73.0.77779853177.issue39976@roundup.psfhosted.org> Message-ID: <1589689555.72.0.306355067733.issue39976@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 2.0 -> 3.0 pull_requests: +19450 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20145 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 02:25:19 2020 From: report at bugs.python.org (Eryk Sun) Date: Sun, 17 May 2020 06:25:19 +0000 Subject: [issue40654] shutil.copyfile mutates symlink for absolute path In-Reply-To: <1589685995.41.0.350903765679.issue40654@roundup.psfhosted.org> Message-ID: <1589696719.74.0.749108410619.issue40654@roundup.psfhosted.org> Eryk Sun added the comment: Copying a symlink verbatim requires copying both the print name and the substitute name in the reparse buffer [1]. For a file, CopyFileExW: COPY_FILE_COPY_SYMLINK implements this by enabling the symlink privilege for the thread and copying the reparse point via FSCTL_GET_REPARSE_POINT and FSCTL_SET_REPARSE_POINT. For a directory, CreateDirectoryExW is implemented similarly when lpTemplateDirectory is a symlink or mount point. (For a "\\\\?\\Volume{GUID}\\" volume mountpoint as opposed to a bind mountpoint, CreateDirectoryExW punts to SetVolumeMountPointW, which also updates the system mountpoint manager.) If you can only have one or the other, the substitute name is more reliable according to the wording in [MS-FSCC] [2]. symlinks: A symbolic link has a substitute name and a print name associated with it. The substitute name is a pathname (section 2.1.5) identifying the target of the symbolic link. The print name SHOULD be an informative pathname, suitable for display to a user, that also identifies the target of the symbolic link. Either pathname can contain dot directory names as specified in section 2.1.5.1. mount points (junctions): A mount point has a substitute name and a print name associated with it. The substitute name is a pathname (section 2.1.5) identifying the target of the mount point. The print name SHOULD be an informative pathname (section 2.1.5), suitable for display to a user, that also identifies the target of the mount point. Neither of these pathnames can contain dot directory names. The operative weasel word is "should", instead of a reliable "must" (RFC2119). An example of the power of "should" is that PowerShell doesn't even set a print name when it creates a mount point via `New-Item -ItemType Junction`. I don't agree that nt.readlink should read junctions, but it does, so the potentially missing print name is a problem. If it were just symlinks created by CreateSymbolicLinkW, the print name is reliable because we know that it sets the print name to whatever was passed as lpTargetFileName. I suppose nt.readlink could fall back on using the substitute name if there's no print name. Also, if nt.readlink is used to manually resolve a broken path (e.g. ntpath._readlink_deep), and the process doesn't have long paths enabled, then the "\\?\" extended path from the substitute name is more reliable. (But one could also call _getfullpathname on the print name and convert the result to extended form if it's not already an extended path.) If you search around, you'll find some projects using the print name and some using the substitute name to implement POSIX readlink, but using the print name is more popular. Do you want 3.8 to revert to using the print name, at least for symlinks? (ntpath._readlink_deep would need to be modified to support long target paths.) Or would you rather that shutil used a more reliable way to copy symlinks verbatim on Windows? For example, use CopyFileExW for a file and CreateDirectoryEx for a directory. [1]: https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/ns-ntifs-_reparse_data_buffer [2]: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/b41f1cbf-10df-4a47-98d4-1c52a833d913 ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 02:32:53 2020 From: report at bugs.python.org (Ned Deily) Date: Sun, 17 May 2020 06:32:53 +0000 Subject: [issue35569] OSX: Enable IPV6_RECVPKTINFO In-Reply-To: <1545566447.14.0.0770528567349.issue35569@roundup.psfhosted.org> Message-ID: <1589697173.18.0.220057695438.issue35569@roundup.psfhosted.org> Ned Deily added the comment: New changeset 9a45bfe6f4aedd2a9d94cb12aa276057b15d8b63 by Erlend Egeberg Aasland in branch 'master': bpo-35569: Expose RFC 3542 IPv6 socket options on macOS (GH-19526) https://github.com/python/cpython/commit/9a45bfe6f4aedd2a9d94cb12aa276057b15d8b63 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 02:37:41 2020 From: report at bugs.python.org (Ned Deily) Date: Sun, 17 May 2020 06:37:41 +0000 Subject: [issue35569] Expose RFC 3542 IPv6 socket options on macOS In-Reply-To: <1545566447.14.0.0770528567349.issue35569@roundup.psfhosted.org> Message-ID: <1589697461.55.0.414476468538.issue35569@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the PR! Merged for 3.9.0b1 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed title: OSX: Enable IPV6_RECVPKTINFO -> Expose RFC 3542 IPv6 socket options on macOS versions: -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 02:46:10 2020 From: report at bugs.python.org (Hakan) Date: Sun, 17 May 2020 06:46:10 +0000 Subject: [issue40655] Fix from a bad programming practice 'from x import *', 'Lib / ctypes / test /'. Message-ID: <1589697970.08.0.120528668652.issue40655@roundup.psfhosted.org> New submission from Hakan : When I use [unimport](https://github.com/hakancelik96/unimport), I saw this problem and I am sending a PR to fix it. ---------- components: Tests messages: 369097 nosy: hakancelik priority: normal severity: normal status: open title: Fix from a bad programming practice 'from x import *', 'Lib / ctypes / test /'. 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 May 17 02:50:01 2020 From: report at bugs.python.org (Ned Deily) Date: Sun, 17 May 2020 06:50:01 +0000 Subject: [issue35569] Expose RFC 3542 IPv6 socket options on macOS In-Reply-To: <1545566447.14.0.0770528567349.issue35569@roundup.psfhosted.org> Message-ID: <1589698201.84.0.28957563107.issue35569@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +19451 pull_request: https://github.com/python/cpython/pull/20146 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 02:52:17 2020 From: report at bugs.python.org (Hakan) Date: Sun, 17 May 2020 06:52:17 +0000 Subject: [issue40655] Fix a bad programming practice from 'from x import *', 'Lib / ctypes / test /'. In-Reply-To: <1589697970.08.0.120528668652.issue40655@roundup.psfhosted.org> Message-ID: <1589698337.07.0.803167998956.issue40655@roundup.psfhosted.org> Change by Hakan : ---------- title: Fix from a bad programming practice 'from x import *', 'Lib / ctypes / test /'. -> Fix a bad programming practice from 'from x import *', 'Lib / ctypes / test /'. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 02:53:57 2020 From: report at bugs.python.org (Hakan) Date: Sun, 17 May 2020 06:53:57 +0000 Subject: [issue40655] Fix 'from x import *' which is bad programming practice from 'Lib/ctypes/test/'. In-Reply-To: <1589697970.08.0.120528668652.issue40655@roundup.psfhosted.org> Message-ID: <1589698437.74.0.328225216289.issue40655@roundup.psfhosted.org> Change by Hakan : ---------- title: Fix a bad programming practice from 'from x import *', 'Lib / ctypes / test /'. -> Fix 'from x import *' which is bad programming practice from 'Lib/ctypes/test/'. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 02:57:31 2020 From: report at bugs.python.org (Ned Deily) Date: Sun, 17 May 2020 06:57:31 +0000 Subject: [issue35569] Expose RFC 3542 IPv6 socket options on macOS In-Reply-To: <1545566447.14.0.0770528567349.issue35569@roundup.psfhosted.org> Message-ID: <1589698651.86.0.993971195093.issue35569@roundup.psfhosted.org> Ned Deily added the comment: New changeset fa098b6bc8662cceb944ad5a4a3e5eb63d3cb517 by Ned Deily in branch 'master': bpo-35569: add Erlend to Misc/ACKS (GH-20146) https://github.com/python/cpython/commit/fa098b6bc8662cceb944ad5a4a3e5eb63d3cb517 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 03:00:05 2020 From: report at bugs.python.org (Hakan) Date: Sun, 17 May 2020 07:00:05 +0000 Subject: [issue40655] Fix 'from x import *' which is bad programming practice from 'Lib/ctypes/test/'. In-Reply-To: <1589697970.08.0.120528668652.issue40655@roundup.psfhosted.org> Message-ID: <1589698805.07.0.95719627593.issue40655@roundup.psfhosted.org> Change by Hakan : ---------- keywords: +patch pull_requests: +19452 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20147 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 03:03:33 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 17 May 2020 07:03:33 +0000 Subject: [issue40655] Fix 'from x import *' which is bad programming practice from 'Lib/ctypes/test/'. In-Reply-To: <1589697970.08.0.120528668652.issue40655@roundup.psfhosted.org> Message-ID: <1589699013.03.0.91585502844.issue40655@roundup.psfhosted.org> Serhiy Storchaka added the comment: I do not think there is something wrong with the current code. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 03:08:36 2020 From: report at bugs.python.org (Hakan) Date: Sun, 17 May 2020 07:08:36 +0000 Subject: [issue40655] Fix 'from x import *' which is bad programming practice from 'Lib/ctypes/test/'. In-Reply-To: <1589697970.08.0.120528668652.issue40655@roundup.psfhosted.org> Message-ID: <1589699316.93.0.53828054699.issue40655@roundup.psfhosted.org> Hakan added the comment: Are code quality enhancement contributions not accepted? Since the 'from x import * `structure is used in the current code, it is not understood where the objects come from. I thought it would be good to fix this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 04:06:44 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 17 May 2020 08:06:44 +0000 Subject: [issue40656] Clean up detect_socket() in setup.py Message-ID: <1589702804.71.0.337147119677.issue40656@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : Rewrite to use `if cond`, iso. `if not cond` ---------- components: Build files: 0001-Clean-up-detect_socket.patch keywords: patch messages: 369101 nosy: erlendaasland priority: normal severity: normal status: open title: Clean up detect_socket() in setup.py type: enhancement versions: Python 3.9 Added file: https://bugs.python.org/file49161/0001-Clean-up-detect_socket.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 04:07:51 2020 From: report at bugs.python.org (Rosen Tomov) Date: Sun, 17 May 2020 08:07:51 +0000 Subject: [issue40657] Resource leaks with threading.Thread Message-ID: <1589702871.42.0.415645279958.issue40657@roundup.psfhosted.org> New submission from Rosen Tomov : In my project I'm using intensively threading to transfer HTTP data - reading is in separate thread and the process run smoothly. However when I've try to optimize stopping of the process and attempt to use the daemon threads. The result was 'Can't start new thread' error under Linux. In order to investigate the issue I've create small test program and found more interesting problem: using non daemon threads leaks handles (under Windows/x64 Semaphore type), while under Linux looks like leaks some other resource, can't say exactly what. When using a daemon threads no leaks handles under Windows but under Linux, after long time running the problem arrives, the only one solution is to reboot of Linux/ARM64, restarting the Python process didn't help! Of course the problem could be race condition or some locking problem, didn't investigate further and in Python's core source. Attached test programs reveals the problem very quickly, using Python 3.8.x interpreters. Also I've testing with lambdas and deletion and found that they do not influence the behavior. ---------- components: Interpreter Core files: thread.py messages: 369102 nosy: POCEH priority: normal severity: normal status: open title: Resource leaks with threading.Thread type: resource usage versions: Python 3.8 Added file: https://bugs.python.org/file49162/thread.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 04:30:05 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 17 May 2020 08:30:05 +0000 Subject: [issue40655] Fix 'from x import *' which is bad programming practice from 'Lib/ctypes/test/'. In-Reply-To: <1589697970.08.0.120528668652.issue40655@roundup.psfhosted.org> Message-ID: <1589704205.33.0.371099798172.issue40655@roundup.psfhosted.org> Serhiy Storchaka added the comment: Pure cosmetic changes to satisfy some aesthetic preferences are not accepted. Every changes has its cost (it consumes the time of core developers to review, has maintenance cost, and disturbs the history of the files) and should be made only if it has a clear benefit. Using star-import is not forbidden, otherwise such syntax would not be supported. ctypes may be one of modules for which using it is well justified: it contains a lot of names, and most of names have unique prefix ("c_") to avoid conflicts with builtins. Especially in tests. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 04:35:21 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 17 May 2020 08:35:21 +0000 Subject: [issue40656] Clean up detect_socket() in setup.py In-Reply-To: <1589702804.71.0.337147119677.issue40656@roundup.psfhosted.org> Message-ID: <1589704521.22.0.48324865624.issue40656@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : Removed file: https://bugs.python.org/file49161/0001-Clean-up-detect_socket.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 04:36:18 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 17 May 2020 08:36:18 +0000 Subject: [issue40656] Clean up detect_socket() in setup.py In-Reply-To: <1589702804.71.0.337147119677.issue40656@roundup.psfhosted.org> Message-ID: <1589704578.39.0.200644731451.issue40656@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : Added file: https://bugs.python.org/file49163/0001-bpo-40656-Clean-up-detect_socket.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 04:42:54 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 17 May 2020 08:42:54 +0000 Subject: [issue40318] Migrate to SQLite3 trace v2 API In-Reply-To: <1587210970.59.0.35117859461.issue40318@roundup.psfhosted.org> Message-ID: <1589704974.68.0.28938242978.issue40318@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 04:44:45 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 17 May 2020 08:44:45 +0000 Subject: [issue40656] Clean up detect_socket() in setup.py In-Reply-To: <1589702804.71.0.337147119677.issue40656@roundup.psfhosted.org> Message-ID: <1589705085.49.0.0861419430318.issue40656@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +19453 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20148 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 04:46:02 2020 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 May 2020 08:46:02 +0000 Subject: [issue40645] Use OpenSSL's HMAC API In-Reply-To: <1589641291.33.0.635001105595.issue40645@roundup.psfhosted.org> Message-ID: <1589705162.35.0.5352969374.issue40645@roundup.psfhosted.org> Christian Heimes added the comment: def new(key, msg=None, digestmod=''): # use fast HMAC if OpenSSL bindings are available and digestmod is # either a string or a callable that returns an OpenSSL HASH object. if _hashopenssl is not None: if isinstance(digestmod, str): return _hashopenssl.hmac_new(key, msg, digestmod) if callable(digestmod): digest = digestmod(b'') if isinstance(digest, _hashopenssl.HASH): return _hashopenssl.hmac_new(key, msg, digest.name) return HMAC(key, msg, digestmod) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 04:48:50 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 17 May 2020 08:48:50 +0000 Subject: [issue40656] Clean up detect_socket() in setup.py In-Reply-To: <1589702804.71.0.337147119677.issue40656@roundup.psfhosted.org> Message-ID: <1589705330.68.0.511578031524.issue40656@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : Removed file: https://bugs.python.org/file49163/0001-bpo-40656-Clean-up-detect_socket.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 04:54:19 2020 From: report at bugs.python.org (Edison Abahurire) Date: Sun, 17 May 2020 08:54:19 +0000 Subject: [issue40643] Improve doc-strings for datetime.strftime & strptime In-Reply-To: <1589628564.12.0.439754688359.issue40643@roundup.psfhosted.org> Message-ID: <1589705659.01.0.542795633518.issue40643@roundup.psfhosted.org> Edison Abahurire added the comment: Thanks for the review @p-ganssle. I'll request that you assign it to me, counting on your guidance while changing it in the C implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 04:53:20 2020 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 17 May 2020 08:53:20 +0000 Subject: [issue39657] Bezout and Chinese Remainder Theorem in the Standard Library? In-Reply-To: <1581889239.13.0.672135436609.issue39657@roundup.psfhosted.org> Message-ID: <1589705600.38.0.308962377118.issue39657@roundup.psfhosted.org> Mark Dickinson added the comment: Related (imath module discussions): #37132, #40028. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 05:04:17 2020 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 17 May 2020 09:04:17 +0000 Subject: [issue40455] GCC 10 compiler warnings In-Reply-To: <1588279868.77.0.13865368461.issue40455@roundup.psfhosted.org> Message-ID: <1589706257.82.0.432694024377.issue40455@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: -mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 05:24:36 2020 From: report at bugs.python.org (=?utf-8?q?Alex_Gr=C3=B6nholm?=) Date: Sun, 17 May 2020 09:24:36 +0000 Subject: [issue39148] DatagramProtocol + IPv6 does not work with ProactorEventLoop In-Reply-To: <1577530511.62.0.532247879973.issue39148@roundup.psfhosted.org> Message-ID: <1589707476.33.0.782187174784.issue39148@roundup.psfhosted.org> Alex Gr?nholm added the comment: The PR is still awaiting for a core developer to be reviewed. It's too bad we missed the 3.8.3 window, but perhaps this can get included in 3.9.0 at least. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 05:33:18 2020 From: report at bugs.python.org (=?utf-8?q?Pavol_Babin=C4=8D=C3=A1k?=) Date: Sun, 17 May 2020 09:33:18 +0000 Subject: [issue40644] Text representation of Windows' file attributes similar to stat.filemode() In-Reply-To: <1589629487.36.0.146516661583.issue40644@roundup.psfhosted.org> Message-ID: <1589707997.99.0.792559410017.issue40644@roundup.psfhosted.org> Pavol Babin??k added the comment: Thanks for exhaustive response! The way how I understand this is it might be beneficial to extend request to get text representation of file attributes on other architectures. I didn't know about statx() syscall. From what I can tell there is no binary, similar to 'stat', that would print attributes of a file in a text form. I guess there is no common way to print those attributes from statx()? --- I see that filemode() works consistently across platforms even on Windows. I guess I could use this everywhere: stat.filemode(stat.S_IFMT(os.lstat(n).st_mode) --- And finally modes on Windows won't be ever complete in filemode() because of lack of file modes. I still have some approximation with users' mode (rwx): format(stat.filemode(stat.S_IMODE(os.lstat(n).st_mode))[1:4] To get: r - as readable file or link w - as not readonly x - executable by file extension --- Is that accurate summary? I'm wondering if it would make sense to rename this issue to leave out Windows? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 05:34:38 2020 From: report at bugs.python.org (=?utf-8?q?Pavol_Babin=C4=8D=C3=A1k?=) Date: Sun, 17 May 2020 09:34:38 +0000 Subject: [issue40644] Text representation of Windows' file attributes similar to stat.filemode() In-Reply-To: <1589629487.36.0.146516661583.issue40644@roundup.psfhosted.org> Message-ID: <1589708078.54.0.561771839882.issue40644@roundup.psfhosted.org> Pavol Babin??k added the comment: In a second example I meant: stat.filemode(stat.S_IMODE(os.lstat(n).st_mode))[1:4] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 06:51:10 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 17 May 2020 10:51:10 +0000 Subject: [issue40649] [Errno 1] In-Reply-To: <1589659764.36.0.211928166783.issue40649@roundup.psfhosted.org> Message-ID: <1589712670.42.0.670574349662.issue40649@roundup.psfhosted.org> R?mi Lapeyre added the comment: The error message you linked does not show an issue with the Python installation but the permissions are wrong on the 'howdy.py' file, that's what the error message says: can't open file 'howdy.py': [Errno 1] Operation not permitted You have to check the permissions on the file to make sure the Python interpreter can read it. This is not a bug in the Python interpreter which this bug tracker is for, the python-help mailing list and StackOverflow will give you the help you are looking for. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 06:52:52 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 17 May 2020 10:52:52 +0000 Subject: [issue39976] Add "**other_popen_kwargs" to subprocess API signatures in docs In-Reply-To: <1584345163.73.0.77779853177.issue39976@roundup.psfhosted.org> Message-ID: <1589712772.37.0.136391401611.issue39976@roundup.psfhosted.org> Chris Jerdonek added the comment: New changeset 46545000c2a30b46aed717b546bc09e5bae7148f by Zackery Spytz in branch 'master': bpo-39976: Add **other_popen_kwargs to subprocess docs (GH-20145) https://github.com/python/cpython/commit/46545000c2a30b46aed717b546bc09e5bae7148f ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 06:57:19 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 17 May 2020 10:57:19 +0000 Subject: [issue39976] Add "**other_popen_kwargs" to subprocess API signatures in docs In-Reply-To: <1584345163.73.0.77779853177.issue39976@roundup.psfhosted.org> Message-ID: <1589713039.3.0.504084212249.issue39976@roundup.psfhosted.org> Chris Jerdonek added the comment: I'm not sure if this is worth backporting, but let me know if you think it should. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 07:12:28 2020 From: report at bugs.python.org (Edison Abahurire) Date: Sun, 17 May 2020 11:12:28 +0000 Subject: [issue40643] Improve doc-strings for datetime.strftime & strptime In-Reply-To: <1589628564.12.0.439754688359.issue40643@roundup.psfhosted.org> Message-ID: <1589713948.08.0.0099538106236.issue40643@roundup.psfhosted.org> Edison Abahurire added the comment: Hi, An enquiry here: On the web documentation of strftime (https://docs.python.org/3/library/datetime.html?highlight=strftime#datetime.time.strftime), What does this mean? "Format codes referring to hours, minutes or seconds will see 0 values." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 07:27:49 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 17 May 2020 11:27:49 +0000 Subject: [issue40152] Coroutine hangs if it performs async operations when handling exception sent using throw() In-Reply-To: <1585811221.57.0.633761551121.issue40152@roundup.psfhosted.org> Message-ID: <1589714869.93.0.970036149931.issue40152@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 07:49:13 2020 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 May 2020 11:49:13 +0000 Subject: [issue40645] Use OpenSSL's HMAC API In-Reply-To: <1589641291.33.0.635001105595.issue40645@roundup.psfhosted.org> Message-ID: <1589716153.55.0.605471996852.issue40645@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 54f2898fe7e4ca1f239e96284af3cc5b34d2ae02 by Christian Heimes in branch 'master': bpo-40645: Implement HMAC in C (GH-20129) https://github.com/python/cpython/commit/54f2898fe7e4ca1f239e96284af3cc5b34d2ae02 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 07:50:38 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 17 May 2020 11:50:38 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1589716238.17.0.543032208525.issue40334@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +19454 pull_request: https://github.com/python/cpython/pull/20151 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 08:04:02 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 17 May 2020 12:04:02 +0000 Subject: [issue38938] Possible performance improvement for heaqq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1589717042.45.0.911504575688.issue38938@roundup.psfhosted.org> Change by Dennis Sweeney : Removed file: https://bugs.python.org/file48747/iter_merge.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 08:04:15 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 17 May 2020 12:04:15 +0000 Subject: [issue38938] Possible performance improvement for heaqq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1589717055.95.0.531067343304.issue38938@roundup.psfhosted.org> Change by Dennis Sweeney : Removed file: https://bugs.python.org/file49156/recursive_merge.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 08:04:09 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 17 May 2020 12:04:09 +0000 Subject: [issue38938] Possible performance improvement for heaqq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1589717049.71.0.870544569431.issue38938@roundup.psfhosted.org> Change by Dennis Sweeney : Removed file: https://bugs.python.org/file48748/merge_recipe.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 08:05:47 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 17 May 2020 12:05:47 +0000 Subject: [issue38938] Possible performance improvement for heaqq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1589717147.13.0.0719197005795.issue38938@roundup.psfhosted.org> Change by Dennis Sweeney : Added file: https://bugs.python.org/file49164/tournament_heap.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 08:06:49 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 17 May 2020 12:06:49 +0000 Subject: [issue38938] Possible performance improvement for heaqq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1589717209.59.0.495891334809.issue38938@roundup.psfhosted.org> Change by Dennis Sweeney : Added file: https://bugs.python.org/file49165/losers.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 08:07:59 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 17 May 2020 12:07:59 +0000 Subject: [issue38938] Possible performance improvement for heaqq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1589717279.97.0.488642732574.issue38938@roundup.psfhosted.org> Change by Dennis Sweeney : Added file: https://bugs.python.org/file49166/recursive_merge.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 08:15:45 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 17 May 2020 12:15:45 +0000 Subject: [issue38938] Possible performance improvement for heaqq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1589717745.08.0.737191396269.issue38938@roundup.psfhosted.org> Dennis Sweeney added the comment: It seems to me that the code sprawl mostly comes from the separate handling of the four keyed/unkeyed and forward/reverse cases, which as far as I can tell requires a branch in the innermost loop if not unrolled into separate cases. I think recursive_merge.py is about as concise as possible while still efficiently handling all four cases. Is there any issue with recursion in this application? Even if there are 2**64-1 iterables, this would only mean 64 nested next() calls, which should be within the stack on most machines, no? I did the following benchmark: py -3.9 -m pyperf timeit -s "from [FILENAME] import merge; from collections import deque" "deque(merge(open('english.txt'), open('dutch.txt'), open('french.txt'), open('german.txt'), open('italian.txt')), maxlen=0)" new_merge.py: Mean +- std dev: 773 ms +- 16 ms tournament_heap.py: Mean +- std dev: 665 ms +- 42 ms losers.py: Mean +- std dev: 470 ms +- 31 ms Existing heapq: Mean +- std dev: 313 ms +- 2 ms recursive_merge.py: Mean +- std dev: 266 ms +- 3 ms I can look at some more diverse benchmarks (types, iterable length imbalance, lengths of an iterator's win-streak, etc.) soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 08:18:46 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 17 May 2020 12:18:46 +0000 Subject: [issue25920] PyOS_AfterFork should reset socketmodule's lock In-Reply-To: <1450739972.22.0.163393011494.issue25920@psf.upfronthosting.co.za> Message-ID: <1589717926.78.0.576994351451.issue25920@roundup.psfhosted.org> Ronald Oussoren added the comment: Technically this would be a functional change, I'd drop this code in 3.9 and trunk (although it is awfully close to the expected date for 3.9b1). Older versions would keep this code and the bug, that way the older python versions can still be used on these ancient OS versions (but users might run into this race condition). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 08:26:25 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 17 May 2020 12:26:25 +0000 Subject: [issue38938] Possible performance improvement for heaqq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1589718385.25.0.173171975077.issue38938@roundup.psfhosted.org> Change by Dennis Sweeney : Removed file: https://bugs.python.org/file49165/losers.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 08:26:51 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 17 May 2020 12:26:51 +0000 Subject: [issue38938] Possible performance improvement for heaqq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1589718411.56.0.771074078548.issue38938@roundup.psfhosted.org> Change by Dennis Sweeney : Added file: https://bugs.python.org/file49167/losers.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 08:48:00 2020 From: report at bugs.python.org (Yonatan Goldschmidt) Date: Sun, 17 May 2020 12:48:00 +0000 Subject: [issue4264] Patch: optimize code to use LIST_APPEND instead of calling list.append In-Reply-To: <1225913493.68.0.578631463812.issue4264@psf.upfronthosting.co.za> Message-ID: <1589719680.52.0.0546936361143.issue4264@roundup.psfhosted.org> Change by Yonatan Goldschmidt : ---------- nosy: +Yonatan Goldschmidt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 08:50:21 2020 From: report at bugs.python.org (Glenn Travis) Date: Sun, 17 May 2020 12:50:21 +0000 Subject: [issue40649] [Errno 1] In-Reply-To: <1589659764.36.0.211928166783.issue40649@roundup.psfhosted.org> Message-ID: <1589719821.55.0.588949202111.issue40649@roundup.psfhosted.org> Glenn Travis added the comment: ok, fine. So what permissions would indicate that "the Python interpreter can read it." The Get Info screenshot that he sent me looks just like mine with regard to permissions. The long list in terminal shows nothing special. I am not having problems running the scripts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 09:04:38 2020 From: report at bugs.python.org (Glenn Travis) Date: Sun, 17 May 2020 13:04:38 +0000 Subject: [issue40649] [Errno 1] In-Reply-To: <1589659764.36.0.211928166783.issue40649@roundup.psfhosted.org> Message-ID: <1589720678.79.0.828219760847.issue40649@roundup.psfhosted.org> Glenn Travis added the comment: As per your suggestion I have sent an email to python help, just looking for info regarding what you would consider the key permission settings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 09:23:15 2020 From: report at bugs.python.org (Julien Palard) Date: Sun, 17 May 2020 13:23:15 +0000 Subject: [issue12800] 'tarfile.StreamError: seeking backwards is not allowed' when extract symlink In-Reply-To: <1313881060.54.0.449889075101.issue12800@psf.upfronthosting.co.za> Message-ID: <1589721795.68.0.383050617013.issue12800@roundup.psfhosted.org> Julien Palard added the comment: Hi Chris, which exception did you got exactly? Was it caused by the r| mode or by a symlink (or file) already existing? ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 09:38:02 2020 From: report at bugs.python.org (Chris AtLee) Date: Sun, 17 May 2020 13:38:02 +0000 Subject: [issue12800] 'tarfile.StreamError: seeking backwards is not allowed' when extract symlink In-Reply-To: <1313881060.54.0.449889075101.issue12800@psf.upfronthosting.co.za> Message-ID: <1589722682.4.0.72393727526.issue12800@roundup.psfhosted.org> Chris AtLee added the comment: It's caused by the combination of the symlink existing, and having the tarfile opened in r| mode. If I run the attached test file in a fresh directory, I get the following exception: raceback (most recent call last): File "/home/catlee/.pyenv/versions/3.8.2/lib/python3.8/tarfile.py", line 2227, in makelink os.symlink(tarinfo.linkname, targetpath) FileExistsError: [Errno 17] File exists: 'message.txt' -> './symlink.txt' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "../test.py", line 12, in tf.extractall() File "/home/catlee/.pyenv/versions/3.8.2/lib/python3.8/tarfile.py", line 2024, in extractall self.extract(tarinfo, path, set_attrs=not tarinfo.isdir(), File "/home/catlee/.pyenv/versions/3.8.2/lib/python3.8/tarfile.py", line 2065, in extract self._extract_member(tarinfo, os.path.join(path, tarinfo.name), File "/home/catlee/.pyenv/versions/3.8.2/lib/python3.8/tarfile.py", line 2145, in _extract_member self.makelink(tarinfo, targetpath) File "/home/catlee/.pyenv/versions/3.8.2/lib/python3.8/tarfile.py", line 2237, in makelink self._extract_member(self._find_link_target(tarinfo), File "/home/catlee/.pyenv/versions/3.8.2/lib/python3.8/tarfile.py", line 2137, in _extract_member self.makefile(tarinfo, targetpath) File "/home/catlee/.pyenv/versions/3.8.2/lib/python3.8/tarfile.py", line 2176, in makefile source.seek(tarinfo.offset_data) File "/home/catlee/.pyenv/versions/3.8.2/lib/python3.8/tarfile.py", line 513, in seek raise StreamError("seeking backwards is not allowed") tarfile.StreamError: seeking backwards is not allowed ---------- Added file: https://bugs.python.org/file49168/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 09:39:42 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 17 May 2020 13:39:42 +0000 Subject: [issue40649] [Errno 1] In-Reply-To: <1589659764.36.0.211928166783.issue40649@roundup.psfhosted.org> Message-ID: <1589722782.26.0.982263443016.issue40649@roundup.psfhosted.org> R?mi Lapeyre added the comment: It's because application on recent versions of MacOS cannot access files in some directories without being granted permission explicitly, a permission model similar to what iOS and Android. You can grant them additional permission using System Preferences, see https://osxdaily.com/2018/10/09/fix-operation-not-permitted-terminal-error-macos/ for example. All applications on recent version of MacOS behaves like this and this is not a bug in Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 10:25:40 2020 From: report at bugs.python.org (=?utf-8?q?Pavol_Babin=C4=8D=C3=A1k?=) Date: Sun, 17 May 2020 14:25:40 +0000 Subject: [issue18262] ZipInfo.external_attr are not documented In-Reply-To: <1371622762.23.0.278457180872.issue18262@psf.upfronthosting.co.za> Message-ID: <1589725540.16.0.942929435594.issue18262@roundup.psfhosted.org> Pavol Babin??k added the comment: I'm interested in this documentation enhancement as well. Alex, I'm wondering if you could convert your patch to GitHub? [1] [1] https://devguide.python.org/pullrequest/#converting-an-existing-patch-from-b-p-o-to-github ---------- nosy: +scrool _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 10:56:41 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 17 May 2020 14:56:41 +0000 Subject: [issue40654] shutil.copyfile mutates symlink for absolute path In-Reply-To: <1589685995.41.0.350903765679.issue40654@roundup.psfhosted.org> Message-ID: <1589727401.33.0.724299723983.issue40654@roundup.psfhosted.org> Jason R. Coombs added the comment: Thank you Eryk for the thorough and informative investigation. Seriously, wow. > Do you want 3.8 to revert to using the print name, at least for symlinks? (ntpath._readlink_deep would need to be modified to support long target paths.) Or would you rather that shutil used a more reliable way to copy symlinks verbatim on Windows? For example, use CopyFileExW for a file and CreateDirectoryEx for a directory. In this case, my instinct is that `shutil` should devise a more reliable way to copy symlinks. It claims that it does to the extent the platform allows [1]. > symbolic links in the source tree are represented as symbolic links in the new tree and the metadata of the original links will be copied as far as the platform allows It hadn't occurred to me that the effect may be manifest in readlink, but I see that now too: ~ # py -3.7 -c "import os; print(os.readlink('temp/bar'))" c:\Users\jaraco\temp\foo ~ # py -3.8 -c "import os; print(os.readlink('temp/bar'))" \\?\c:\Users\jaraco\temp\foo So even if shutil.copyfile were to copy the symlinks exactly, the expectation would still be missed that the output of readlink doesn't match the input to symlink, so the expectation would still be missed. A user/programmer should be able to predict the output of 'readlink' given the input to 'symlink' (or cmd /c mklink). Based on that reasoning, my answer would be "both", but I'd put a priority on restoring the use of "print name" for `readlink`, as that may be sufficient to satisfy most (if not all) use-cases. [1]: https://docs.python.org/3/library/shutil.html#shutil.copytree ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 11:02:02 2020 From: report at bugs.python.org (=?utf-8?q?Pavol_Babin=C4=8D=C3=A1k?=) Date: Sun, 17 May 2020 15:02:02 +0000 Subject: [issue39533] Use `statx(2)` system call on Linux for extended `os.stat` information In-Reply-To: <1580703962.85.0.294314145935.issue39533@roundup.psfhosted.org> Message-ID: <1589727722.68.0.0357547890549.issue39533@roundup.psfhosted.org> Change by Pavol Babin??k : ---------- nosy: +scrool _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 11:02:57 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 17 May 2020 15:02:57 +0000 Subject: [issue40654] shutil.copyfile mutates symlink for absolute path In-Reply-To: <1589685995.41.0.350903765679.issue40654@roundup.psfhosted.org> Message-ID: <1589727777.06.0.0228191858741.issue40654@roundup.psfhosted.org> Jason R. Coombs added the comment: I strongly suspect bpo-37834 and GH-15231 is where the difference was introduced. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 11:06:39 2020 From: report at bugs.python.org (Edison Abahurire) Date: Sun, 17 May 2020 15:06:39 +0000 Subject: [issue40643] Improve doc-strings for datetime.strftime & strptime In-Reply-To: <1589628564.12.0.439754688359.issue40643@roundup.psfhosted.org> Message-ID: <1589727999.19.0.403771938666.issue40643@roundup.psfhosted.org> Edison Abahurire added the comment: Oh! I realized that statement is there because the strftime method used is inherited from the date class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 11:08:30 2020 From: report at bugs.python.org (Glenn Travis) Date: Sun, 17 May 2020 15:08:30 +0000 Subject: [issue40649] [Errno 1] In-Reply-To: <1589659764.36.0.211928166783.issue40649@roundup.psfhosted.org> Message-ID: <1589728110.98.0.119055383539.issue40649@roundup.psfhosted.org> Glenn Travis added the comment: I think that you are referring to Gatekeeper. Something that I have run into with various applications, such as certain utility files in Ortho4XP and even when adding aircraft to X-Plane(some of the developers refuse to become approved Apple developers). ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 11:18:44 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sun, 17 May 2020 15:18:44 +0000 Subject: [issue38870] Expose ast.unparse in the ast module In-Reply-To: <1574289269.61.0.90605518345.issue38870@roundup.psfhosted.org> Message-ID: <1589728724.33.0.7642950518.issue38870@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- pull_requests: +19455 pull_request: https://github.com/python/cpython/pull/20152 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 11:25:54 2020 From: report at bugs.python.org (Rauan Mukhamejanov) Date: Sun, 17 May 2020 15:25:54 +0000 Subject: [issue39959] Bug on multiprocessing.shared_memory In-Reply-To: <1584128583.89.0.486447704556.issue39959@roundup.psfhosted.org> Message-ID: <1589729154.59.0.128332610944.issue39959@roundup.psfhosted.org> Rauan Mukhamejanov added the comment: Not sure about "it can always be accessed and closed/unlinked by any process later on", as each process will be spawning its own resource_tracker, using a separate pipe. Thus, unregister calls from other processes will not have any effect. The documentation is indeed unclear that processes must share the resource_tracker. Can we introduce a new flag - "persist", that would indicate no resource tracking is needed? Registering will only happen if create=True and persist=False, meaning the user accepts the creating process must outlive all other processes that could connect to the shared memory. If persist=False, the user accepts the responsibility for manual cleaning up of the allocated memory. This will allow catering to a wider range of use cases, where readers/writer processes can exit and re-connect to shared_memory as they see fit. ---------- nosy: +rauanargyn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 11:28:06 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 17 May 2020 15:28:06 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1589729286.28.0.818316277864.issue40334@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +19456 pull_request: https://github.com/python/cpython/pull/20153 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 11:29:10 2020 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 May 2020 15:29:10 +0000 Subject: [issue39533] Use `statx(2)` system call on Linux for extended `os.stat` information In-Reply-To: <1580703962.85.0.294314145935.issue39533@roundup.psfhosted.org> Message-ID: <1589729350.21.0.519731834388.issue39533@roundup.psfhosted.org> Christian Heimes added the comment: The statx call was introduced by Kernel 4.11 in 2017. Major LTS Linux distributions like Debian 9, Ubuntu 16.04, and CentOS 7 use older Kernels like Linux 4.9 LTS or 3.10 LTS. In general we try to support older Kernel ABIs even when Python is compiled on a system with more recent ABI. This means you have to perform a runtime feature detection and fall back to old stat when the syscall fails. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 11:43:46 2020 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 May 2020 15:43:46 +0000 Subject: [issue37630] Investigate replacing SHA3 code with OpenSSL In-Reply-To: <1563535856.49.0.726904541971.issue37630@roundup.psfhosted.org> Message-ID: <1589730226.44.0.497925024677.issue37630@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +19457 pull_request: https://github.com/python/cpython/pull/20154 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 12:01:10 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 17 May 2020 16:01:10 +0000 Subject: [issue40661] The new parser segfaults when parsing invalid input Message-ID: <1589731270.13.0.765270340718.issue40661@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : The new peg parser segfaults when parsing the attached reproducer. this is due to the fact that the exception set by `tokenizer_error` is not properly propagated. ---------- components: Interpreter Core files: reproducer.py messages: 369132 nosy: gvanrossum, lys.nikolaou, pablogsal priority: release blocker severity: normal stage: needs patch status: open title: The new parser segfaults when parsing invalid input type: crash versions: Python 3.9 Added file: https://bugs.python.org/file49169/reproducer.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 12:04:49 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 17 May 2020 16:04:49 +0000 Subject: [issue40661] The new parser segfaults when parsing invalid input In-Reply-To: <1589731270.13.0.765270340718.issue40661@roundup.psfhosted.org> Message-ID: <1589731489.25.0.151931382723.issue40661@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I think we may need to test for the error indicator (and maybe PyErr_Ocurred for safety) before every alternative. Something like: diff --git a/Tools/peg_generator/pegen/c_generator.py b/Tools/peg_generator/pegen/c_generator.py index 8f9972bb41..61cb694628 100644 --- a/Tools/peg_generator/pegen/c_generator.py +++ b/Tools/peg_generator/pegen/c_generator.py @@ -468,10 +468,6 @@ class CParserGenerator(ParserGenerator, GrammarVisitor): memoize = self._should_memoize(node) with self.indent(): - self.print("if (p->error_indicator) {") - with self.indent(): - self.print("return NULL;") - self.print("}") self.print(f"{result_type} _res = NULL;") if memoize: self.print(f"if (_PyPegen_is_memoized(p, {node.name}_type, &_res))") @@ -685,6 +681,12 @@ class CParserGenerator(ParserGenerator, GrammarVisitor): def visit_Alt( self, node: Alt, is_loop: bool, is_gather: bool, rulename: Optional[str] ) -> None: + self.print("if (p->error_indicator == 1 || PyErr_Occurred()) {") + with self.indent(): + self.print("p->error_indicator = 1;") + self.print("return NULL;") + self.print("}") + self.print(f"{{ // {node}") with self.indent(): # Prepare variable declarations for the alternative ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 12:05:09 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 17 May 2020 16:05:09 +0000 Subject: [issue40661] The new parser segfaults when parsing invalid input In-Reply-To: <1589731270.13.0.765270340718.issue40661@roundup.psfhosted.org> Message-ID: <1589731509.71.0.0788258265378.issue40661@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Indeed, that diff solves the problem ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 12:09:25 2020 From: report at bugs.python.org (E. Paine) Date: Sun, 17 May 2020 16:09:25 +0000 Subject: [issue40452] IDLE: preserve clipboard on closure on Windows In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1589731765.87.0.365098228324.issue40452@roundup.psfhosted.org> E. Paine added the comment: Test example: 1) Open IDLE (shell or editor) 2) Copy some text in the IDLE window 3) Close the IDLE window (instance should end) 4) Paste into application of choice Without the patch, the clipboard is cleared when the instance ends so nothing is pasted. With the patch, the content remains in the clipboard as expected. Note: This is not a problem if clipboard history is turned on or the content is pasted before closure, however the order of events above is fairly common for me. Encoding: In the latest commit to the pull, I have changed the encoding from UTF-8 to UTF-16 and my reasoning is as follows: 1) Most importantly, using UTF-8, characters with a unicode value >=2^8 are incorrectly copied as multiple characters. UTF-8 does support these characters but uses a different number of bytes per character (which is presumably what is causing these issues - for example, "A?" is encoded as "\x41\xc4\x80", which pastes as "A??") UTF-16, however, correctly works for all characters supported by Tcl (see next point). 2) "Strings in Tcl are encoded using 16-bit Unicode characters" (https://www.tcl.tk/man/tcl8.2.3/TclCmd/encoding.htm). Therefore, the encoding we choose should have at least 16 bits allocated per character (meaning either UTF-16 or UTF-32). 3) Windows' "Unicode-enabled functions [...] use UTF-16 (wide character) encoding, which is [...] used for native Unicode encoding on Windows operating systems" (https://docs.microsoft.com/en-us/windows/win32/intl/unicode). For me, this was what decided the new encoding (between the two given in the previous point). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 12:19:13 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 17 May 2020 16:19:13 +0000 Subject: [issue40661] The new parser segfaults when parsing invalid input In-Reply-To: <1589731270.13.0.765270340718.issue40661@roundup.psfhosted.org> Message-ID: <1589732353.11.0.959943615012.issue40661@roundup.psfhosted.org> Guido van Rossum added the comment: How costly is PyErr_Occurred()? That worries me most, otherwise I?d accept this right away. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 12:30:21 2020 From: report at bugs.python.org (veganaiZe) Date: Sun, 17 May 2020 16:30:21 +0000 Subject: [issue40629] Error MSB4086 (numeric comparison) In-Reply-To: <1589498706.71.0.441152981554.issue40629@roundup.psfhosted.org> Message-ID: <1589733021.37.0.488965063981.issue40629@roundup.psfhosted.org> veganaiZe added the comment: Using Windows 10 SDK (from late 2019). It's essential for the 2015r3 tools (since the build tools don't include the standard lib headers! --Gimme a break Microsoft!) Here's the TL;DR from the log: 2>Building with tools version "4.0". 2>C:\src\cpython\PCbuild\python.props(111,31): error MSB4086: A numeric comparison was attempted on "$([System.Version]::Parse($(_RegistryVersion)))" that evaluates to "10.0.18362.0" instead of a number, in condition "$([System.Version]::Parse($(_RegistryVersion))) > $([System.Version]::Parse($(DefaultWindowsSDKVersion)))". [C:\src\cpython\PCbuild\_freeze_importlib.vcxproj] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 12:32:53 2020 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 May 2020 16:32:53 +0000 Subject: [issue37630] Investigate replacing SHA3 code with OpenSSL In-Reply-To: <1563535856.49.0.726904541971.issue37630@roundup.psfhosted.org> Message-ID: <1589733173.73.0.577370894342.issue37630@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 62ecd8a8f908282726d2f019c93efa1cf2e9e784 by Christian Heimes in branch 'master': bpo-37630: Fix spelling shake128 -> shake_128 (GH-20154) https://github.com/python/cpython/commit/62ecd8a8f908282726d2f019c93efa1cf2e9e784 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 13:35:18 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 17 May 2020 17:35:18 +0000 Subject: [issue40662] ast.get_source_segment behaviour with missing location info doesn't match doctoring Message-ID: <1589736918.78.0.989051663687.issue40662@roundup.psfhosted.org> New submission from Irit Katriel : The doctoring says "If some location information (lineno, end_lineno, col_offset, or end_col_offset) is missing, return None." However: >>> s = "12" >>> node = ast.parse(s).body[0] >>> ast.get_source_segment(s, node) '12' >>> del node.lineno >>> ast.get_source_segment(s, node) >>> node = ast.parse(s).body[0] >>> del node.end_lineno >>> ast.get_source_segment(s, node) Traceback (most recent call last): File "", line 1, in File "/Users/iritkatriel/src/cpython/Lib/ast.py", line 336, in get_source_segment end_lineno = node.end_lineno - 1 TypeError: unsupported operand type(s) for -: 'NoneType' and 'int' In other parts of ast.py there are hasattr checks for lineno/col_offset alongside checks for None for end_lineno/end_col_offset. So this difference in behaviour of the end_ fields seems intended. ---------- components: Library (Lib) messages: 369139 nosy: benjamin.peterson, brett.cannon, iritkatriel, pablogsal, yselivanov priority: normal pull_requests: 19458 severity: normal status: open title: ast.get_source_segment behaviour with missing location info doesn't match doctoring type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 13:36:39 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sun, 17 May 2020 17:36:39 +0000 Subject: [issue40663] Wrong generated annotation on subscripting Message-ID: <1589736999.01.0.252396126207.issue40663@roundup.psfhosted.org> New submission from Batuhan Taskaya : >>> from __future__ import annotations >>> a: Type[int, str] >>> b: Type[(int, str, *types)] >>> __annotations__ {'a': 'Type[int, str]', 'b': 'Type[int, str, *types]'} >>> ast.parse(__annotations__["b"]) Traceback (most recent call last): File "", line 1, in File "/home/isidentical/cpython/master/Lib/ast.py", line 50, in parse return compile(source, filename, mode, flags, File "", line 1 Type[int, str, *types] ^ SyntaxError: invalid syntax ---------- messages: 369140 nosy: BTaskaya priority: normal severity: normal status: open title: Wrong generated annotation on subscripting _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 13:39:43 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sun, 17 May 2020 17:39:43 +0000 Subject: [issue40662] ast.get_source_segment behaviour with missing location info doesn't match doctoring In-Reply-To: <1589736918.78.0.989051663687.issue40662@roundup.psfhosted.org> Message-ID: <1589737183.07.0.031718473005.issue40662@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 13:41:03 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sun, 17 May 2020 17:41:03 +0000 Subject: [issue40663] Wrong generated annotation on subscripting In-Reply-To: <1589736999.01.0.252396126207.issue40663@roundup.psfhosted.org> Message-ID: <1589737263.84.0.461433250737.issue40663@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch pull_requests: +19459 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20156 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 13:41:52 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sun, 17 May 2020 17:41:52 +0000 Subject: [issue40663] Wrong generated annotation on subscripting In-Reply-To: <1589736999.01.0.252396126207.issue40663@roundup.psfhosted.org> Message-ID: <1589737312.09.0.398613782576.issue40663@roundup.psfhosted.org> Batuhan Taskaya added the comment: $ python3.8 Python 3.8.0+ (heads/3.8:b9e5547f58, Nov 28 2019, 19:18:03) [GCC 9.2.1 20191008] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from __future__ import annotations >>> b: Type[(int, str, *types)] >>> __annotations__ {'b': 'Type[int, str, *types]'} $ python3.7 Python 3.7.5 (default, Apr 19 2020, 20:18:17) [GCC 9.2.1 20191008] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from __future__ import annotations >>> b: Type[(int, str, *types)] >>> __annotations__ {'b': 'Type[int, str, *types]'} >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 13:42:21 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sun, 17 May 2020 17:42:21 +0000 Subject: [issue40663] Wrong generated annotation on subscripting In-Reply-To: <1589736999.01.0.252396126207.issue40663@roundup.psfhosted.org> Message-ID: <1589737341.25.0.41092901996.issue40663@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- components: +Interpreter Core type: -> behavior versions: +Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 13:55:08 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 17 May 2020 17:55:08 +0000 Subject: [issue40662] ast.get_source_segment behaviour with missing location info doesn't match docstring In-Reply-To: <1589736918.78.0.989051663687.issue40662@roundup.psfhosted.org> Message-ID: <1589738108.98.0.945677401196.issue40662@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: ast.get_source_segment behaviour with missing location info doesn't match doctoring -> ast.get_source_segment behaviour with missing location info doesn't match docstring _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 14:00:48 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 17 May 2020 18:00:48 +0000 Subject: [issue40661] The new parser segfaults when parsing invalid input In-Reply-To: <1589731270.13.0.765270340718.issue40661@roundup.psfhosted.org> Message-ID: <1589738448.66.0.0607426329411.issue40661@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: A quick benchmark using xxl.py: Base time (master): Time: 9.386 seconds on an average of 20 runs With the patch in this issue: Time: 9.498 seconds on an average of 20 runs Sadly I could not test with PGO/LTO and without CPU isolation, so it would be great if someone could double-check these numbers. Also, I will be unable to do a PR until this night/tomorrow morning (London time) :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 14:05:48 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 17 May 2020 18:05:48 +0000 Subject: [issue40662] ast.get_source_segment behaviour with missing location info doesn't match docstring In-Reply-To: <1589736918.78.0.989051663687.issue40662@roundup.psfhosted.org> Message-ID: <1589738748.36.0.430408640277.issue40662@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +patch pull_requests: +19460 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20157 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 14:06:44 2020 From: report at bugs.python.org (Paul Ganssle) Date: Sun, 17 May 2020 18:06:44 +0000 Subject: [issue40536] Addition of a "list of available time zones" function to zoneinfo In-Reply-To: <1588785591.81.0.248136692657.issue40536@roundup.psfhosted.org> Message-ID: <1589738804.55.0.800455373523.issue40536@roundup.psfhosted.org> Change by Paul Ganssle : ---------- pull_requests: +19461 pull_request: https://github.com/python/cpython/pull/20158 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 14:09:42 2020 From: report at bugs.python.org (Paul Ganssle) Date: Sun, 17 May 2020 18:09:42 +0000 Subject: [issue40536] Addition of a "list of available time zones" function to zoneinfo In-Reply-To: <1588785591.81.0.248136692657.issue40536@roundup.psfhosted.org> Message-ID: <1589738982.94.0.80962043968.issue40536@roundup.psfhosted.org> Paul Ganssle added the comment: I've opened a PR adding this feature and tagged this as release blocker, since I'd like to make sure this is in the beta if ?ukasz does not object. The concerns about the stability of the function I expressed earlier have not changed much, though we did get some feedback from the tz database list that at least make me think that the new approach (excluding posix/, right/ and posixrules) is *probably* the right way to go. ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 14:11:42 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 17 May 2020 18:11:42 +0000 Subject: [issue40661] The new parser segfaults when parsing invalid input In-Reply-To: <1589731270.13.0.765270340718.issue40661@roundup.psfhosted.org> Message-ID: <1589739102.6.0.959039733322.issue40661@roundup.psfhosted.org> Guido van Rossum added the comment: I see almost no time difference for 'make time_stdlib': before 3.471, after 3.451. But I see a serious difference for 'make time_compile': before 3.474, after 4.996. That's over 40% slower (on the extreme case, xxl.py). I'll prepare a PR just in case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 14:14:46 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 17 May 2020 18:14:46 +0000 Subject: [issue40661] The new parser segfaults when parsing invalid input In-Reply-To: <1589731270.13.0.765270340718.issue40661@roundup.psfhosted.org> Message-ID: <1589739286.56.0.249708894032.issue40661@roundup.psfhosted.org> Change by Guido van Rossum : ---------- keywords: +patch pull_requests: +19462 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20159 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 14:49:03 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 17 May 2020 18:49:03 +0000 Subject: [issue38938] Possible performance improvement for heaqq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1589741343.2.0.97086940825.issue38938@roundup.psfhosted.org> Raymond Hettinger added the comment: Am leaning toward the iterative approach in new_merge.py because it most directly implements the core concept of storing the data in a binary tree. Merits: no recursion, no nested generators, avoids the clutter of left-empty and right-empty checks, easy to understand, simple and fast loops, all local variables or instance variables, no calls to memory allocator after then initial tree construction, runs well on PyPy, and easily Cythonized. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 15:16:27 2020 From: report at bugs.python.org (Nicolas Gimenez) Date: Sun, 17 May 2020 19:16:27 +0000 Subject: [issue40664] Documentation error: itertools.dropwhile(is_even, itertools.count()) output Message-ID: <1589742987.46.0.19794536776.issue40664@roundup.psfhosted.org> New submission from Nicolas Gimenez : On this page: https://docs.python.org/3/howto/functional.html The example: "itertools.dropwhile(is_even, itertools.count()) => 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ..." is wrong. It should be: "itertools.dropwhile(is_even, itertools.count()) => 1, 3, 5, 7, 9, ..." ---------- assignee: docs at python components: Documentation messages: 369146 nosy: docs at python, nicobao priority: normal severity: normal status: open title: Documentation error: itertools.dropwhile(is_even, itertools.count()) output versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 15:18:54 2020 From: report at bugs.python.org (Nicolas Gimenez) Date: Sun, 17 May 2020 19:18:54 +0000 Subject: [issue40664] Documentation error: itertools.dropwhile(is_even, itertools.count()) output In-Reply-To: <1589742987.46.0.19794536776.issue40664@roundup.psfhosted.org> Message-ID: <1589743134.61.0.344616882978.issue40664@roundup.psfhosted.org> Nicolas Gimenez added the comment: Relase: 0.32 Lang: English Python version: 3.8.3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 15:26:00 2020 From: report at bugs.python.org (gaborbernat) Date: Sun, 17 May 2020 19:26:00 +0000 Subject: [issue40536] Addition of a "list of available time zones" function to zoneinfo In-Reply-To: <1588785591.81.0.248136692657.issue40536@roundup.psfhosted.org> Message-ID: <1589743560.97.0.226263326193.issue40536@roundup.psfhosted.org> gaborbernat added the comment: I think semantically the correct expression would be available timezones, free function, set and no cache. Document the operation is expensive and users should cache if they want repeated access or provide an available timezones cached function ? my 2c ---------- nosy: +gaborbernat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 15:26:48 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Sun, 17 May 2020 19:26:48 +0000 Subject: [issue40536] Addition of a "list of available time zones" function to zoneinfo In-Reply-To: <1588785591.81.0.248136692657.issue40536@roundup.psfhosted.org> Message-ID: <1589743608.5.0.940198010404.issue40536@roundup.psfhosted.org> Change by Filipe La?ns : ---------- nosy: +FFY00 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 15:34:44 2020 From: report at bugs.python.org (ntninja) Date: Sun, 17 May 2020 19:34:44 +0000 Subject: [issue39533] Use `statx(2)` system call on Linux for extended `os.stat` information In-Reply-To: <1580703962.85.0.294314145935.issue39533@roundup.psfhosted.org> Message-ID: <1589744084.04.0.610596063335.issue39533@roundup.psfhosted.org> ntninja added the comment: I thought this might be the case, I'll look into adapting the patch accordingly then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 15:37:08 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Sun, 17 May 2020 19:37:08 +0000 Subject: [issue37496] Support annotations in signature strings. In-Reply-To: <1562197526.36.0.0415942737779.issue37496@roundup.psfhosted.org> Message-ID: <1589744228.95.0.161671588584.issue37496@roundup.psfhosted.org> Change by Filipe La?ns : ---------- nosy: +FFY00 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 15:40:44 2020 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 May 2020 19:40:44 +0000 Subject: [issue39533] Use `statx(2)` system call on Linux for extended `os.stat` information In-Reply-To: <1580703962.85.0.294314145935.issue39533@roundup.psfhosted.org> Message-ID: <1589744444.29.0.348552920988.issue39533@roundup.psfhosted.org> Christian Heimes added the comment: You can find an example in Python/bootstrap_hash.c that deals with getrandom syscall. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 15:41:31 2020 From: report at bugs.python.org (SilentGhost) Date: Sun, 17 May 2020 19:41:31 +0000 Subject: [issue40664] Documentation error: itertools.dropwhile(is_even, itertools.count()) output In-Reply-To: <1589742987.46.0.19794536776.issue40664@roundup.psfhosted.org> Message-ID: <1589744491.77.0.56574609018.issue40664@roundup.psfhosted.org> SilentGhost added the comment: Did you try running that? The documentation is correct, dropwhile works differently than filter. ---------- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 16:03:25 2020 From: report at bugs.python.org (Furkan Onder) Date: Sun, 17 May 2020 20:03:25 +0000 Subject: [issue34431] Docs does not eval allows code object as argument In-Reply-To: <1534608199.83.0.56676864532.issue34431@psf.upfronthosting.co.za> Message-ID: <1589745805.96.0.941044189527.issue34431@roundup.psfhosted.org> Furkan Onder added the comment: Hi Jonathan, Are you still planning to work on the patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 16:16:49 2020 From: report at bugs.python.org (Thomas Caswell) Date: Sun, 17 May 2020 20:16:49 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1589746609.45.0.0674778652837.issue40257@roundup.psfhosted.org> Change by Thomas Caswell : ---------- nosy: +tcaswell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 17:31:08 2020 From: report at bugs.python.org (Shantanu) Date: Sun, 17 May 2020 21:31:08 +0000 Subject: [issue40665] Use Argument Clinic for bisect Message-ID: <1589751068.08.0.269643939265.issue40665@roundup.psfhosted.org> New submission from Shantanu : As the title says! Am submitting a PR. ---------- components: Argument Clinic messages: 369153 nosy: hauntsaninja, larry priority: normal severity: normal status: open title: Use Argument Clinic for bisect _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 17:31:54 2020 From: report at bugs.python.org (Shantanu) Date: Sun, 17 May 2020 21:31:54 +0000 Subject: [issue40665] Use Argument Clinic for bisect In-Reply-To: <1589751068.08.0.269643939265.issue40665@roundup.psfhosted.org> Message-ID: <1589751114.08.0.131121723013.issue40665@roundup.psfhosted.org> Change by Shantanu : ---------- keywords: +patch pull_requests: +19463 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20163 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 18:38:35 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 17 May 2020 22:38:35 +0000 Subject: [issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca" In-Reply-To: <1588116558.63.0.121077562738.issue40431@roundup.psfhosted.org> Message-ID: <1589755115.11.0.152759634629.issue40431@roundup.psfhosted.org> Terry J. Reedy added the comment: I believe the file was synchronized across versions as new features have not recently been added. Backporting the fix to my typo should keep it that way. This is an example of why code review even of patches that 'work' is a good thing. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 19:11:07 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 17 May 2020 23:11:07 +0000 Subject: [issue40661] The new parser segfaults when parsing invalid input In-Reply-To: <1589731270.13.0.765270340718.issue40661@roundup.psfhosted.org> Message-ID: <1589757067.03.0.236613234874.issue40661@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +19464 pull_request: https://github.com/python/cpython/pull/20165 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 19:16:49 2020 From: report at bugs.python.org (Shantanu) Date: Sun, 17 May 2020 23:16:49 +0000 Subject: [issue40662] ast.get_source_segment behaviour with missing location info doesn't match docstring In-Reply-To: <1589736918.78.0.989051663687.issue40662@roundup.psfhosted.org> Message-ID: <1589757409.76.0.634748077768.issue40662@roundup.psfhosted.org> Shantanu added the comment: The code works on 3.8 for me, but has regressed on 3.9 master. Looks like this is caused by https://bugs.python.org/issue36287 (https://github.com/python/cpython/pull/18843) ---------- nosy: +hauntsaninja _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 19:37:13 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 17 May 2020 23:37:13 +0000 Subject: [issue40452] IDLE: preserve clipboard on closure on Windows In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1589758633.16.0.458425714325.issue40452@roundup.psfhosted.org> Terry J. Reedy added the comment: Now that I think about it, I have run into enough problems with ^V not pasting something copied with ^C that I always leave source windows open until successful. I had not noticed that there is only a problem between windows (but this may be true) or after closing IDLE or that it only occurs when copying *from* IDLE. In fact, the last might not be true if other apps have the same bug. (I will start paying more attention after this is fixed.) ---------- type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 19:52:37 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 17 May 2020 23:52:37 +0000 Subject: [issue40612] Make traceback module's formatting of SyntaxError more similar to system formatting In-Reply-To: <1589343535.08.0.511471445795.issue40612@roundup.psfhosted.org> Message-ID: <1589759557.24.0.199616195405.issue40612@roundup.psfhosted.org> Change by Guido van Rossum : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 20:02:07 2020 From: report at bugs.python.org (1v3m) Date: Mon, 18 May 2020 00:02:07 +0000 Subject: [issue38870] Expose ast.unparse in the ast module In-Reply-To: <1574289269.61.0.90605518345.issue38870@roundup.psfhosted.org> Message-ID: <1589760127.84.0.453929387531.issue38870@roundup.psfhosted.org> Change by 1v3m : ---------- nosy: +1v3m nosy_count: 7.0 -> 8.0 pull_requests: +19465 pull_request: https://github.com/python/cpython/pull/20166 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 20:57:49 2020 From: report at bugs.python.org (R. David Murray) Date: Mon, 18 May 2020 00:57:49 +0000 Subject: [issue40597] generated email message exceeds RFC-mandated limit of 998 characters In-Reply-To: <1589223619.93.0.38032538849.issue40597@roundup.psfhosted.org> Message-ID: <1589763469.26.0.394226828546.issue40597@roundup.psfhosted.org> R. David Murray added the comment: New changeset c1f1ddf30a595c2bfa3c06e54fb03fa212cd28b5 by Miss Islington (bot) in branch '3.8': bpo-40597: email: Use CTE if lines are longer than max_line_length consistently (gh-20038) (gh-20084) https://github.com/python/cpython/commit/c1f1ddf30a595c2bfa3c06e54fb03fa212cd28b5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 20:58:21 2020 From: report at bugs.python.org (R. David Murray) Date: Mon, 18 May 2020 00:58:21 +0000 Subject: [issue40597] generated email message exceeds RFC-mandated limit of 998 characters In-Reply-To: <1589223619.93.0.38032538849.issue40597@roundup.psfhosted.org> Message-ID: <1589763501.94.0.116642575749.issue40597@roundup.psfhosted.org> Change by R. David Murray : ---------- stage: backport needed -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 21:31:11 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 18 May 2020 01:31:11 +0000 Subject: [issue39801] list.insert is slow, likely due to manual memmove In-Reply-To: <1582992688.24.0.071544861703.issue39801@roundup.psfhosted.org> Message-ID: <1589765471.09.0.381434196678.issue39801@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 21:32:41 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 18 May 2020 01:32:41 +0000 Subject: [issue39705] Tutorial, 5.6 Looping Techniques, sorted() example In-Reply-To: <1582277071.44.0.766763125418.issue39705@roundup.psfhosted.org> Message-ID: <1589765561.09.0.857132430083.issue39705@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset eefd4e033334a2a1d3929d0f7978469e5b5c4e56 by Rahul Kumaresan in branch 'master': bpo-39705 : sorted() tutorial example under looping techniques improved (GH-18999) https://github.com/python/cpython/commit/eefd4e033334a2a1d3929d0f7978469e5b5c4e56 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 21:32:59 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 18 May 2020 01:32:59 +0000 Subject: [issue39705] Tutorial, 5.6 Looping Techniques, sorted() example In-Reply-To: <1582277071.44.0.766763125418.issue39705@roundup.psfhosted.org> Message-ID: <1589765579.69.0.959621916286.issue39705@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 May 17 21:41:38 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 18 May 2020 01:41:38 +0000 Subject: [issue13601] sys.stderr should be line-buffered when stderr is not a TTY In-Reply-To: <1323868292.46.0.495967266587.issue13601@psf.upfronthosting.co.za> Message-ID: <1589766098.74.0.426707796602.issue13601@roundup.psfhosted.org> Guido van Rossum added the comment: Can you submit a PR and CC me? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 21:53:09 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 18 May 2020 01:53:09 +0000 Subject: [issue39058] argparse should preserve argument ordering in Namespace In-Reply-To: <1576448164.39.0.171350779582.issue39058@roundup.psfhosted.org> Message-ID: <1589766789.79.0.103857375639.issue39058@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 9681953c99b686cf23d1c476a2b26d2ddbec7694 by Raymond Hettinger in branch 'master': bpo-39058: Preserve attribute order in argparse Namespace reprs. (GH-17621) https://github.com/python/cpython/commit/9681953c99b686cf23d1c476a2b26d2ddbec7694 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 21:53:39 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 18 May 2020 01:53:39 +0000 Subject: [issue39058] argparse should preserve argument ordering in Namespace In-Reply-To: <1576448164.39.0.171350779582.issue39058@roundup.psfhosted.org> Message-ID: <1589766819.43.0.845267075787.issue39058@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 May 17 21:54:34 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 18 May 2020 01:54:34 +0000 Subject: [issue39173] _AttributeHolder of argparse should support the sort function or not? In-Reply-To: <1577805833.81.0.166775558073.issue39173@roundup.psfhosted.org> Message-ID: <1589766874.04.0.68156316956.issue39173@roundup.psfhosted.org> Raymond Hettinger added the comment: Am marking this as closed, out-of-date. If needed, feel free to re-open. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 21:55:15 2020 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 18 May 2020 01:55:15 +0000 Subject: [issue40536] Addition of a "list of available time zones" function to zoneinfo In-Reply-To: <1588785591.81.0.248136692657.issue40536@roundup.psfhosted.org> Message-ID: <1589766915.07.0.202258834626.issue40536@roundup.psfhosted.org> Paul Ganssle added the comment: New changeset e527ec8abe0849e784ce100f53c2736986b670ae by Paul Ganssle in branch 'master': bpo-40536: Add zoneinfo.available_timezones (GH-20158) https://github.com/python/cpython/commit/e527ec8abe0849e784ce100f53c2736986b670ae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 21:56:54 2020 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 18 May 2020 01:56:54 +0000 Subject: [issue40536] Addition of a "list of available time zones" function to zoneinfo In-Reply-To: <1588785591.81.0.248136692657.issue40536@roundup.psfhosted.org> Message-ID: <1589767014.64.0.327042809816.issue40536@roundup.psfhosted.org> Paul Ganssle added the comment: I've merged the existing implementation, but I'm leaving this staged as "release blocker" so that ?ukasz can have final say on whether this goes into 3.9. Thanks for the help everyone! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 22:04:09 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 18 May 2020 02:04:09 +0000 Subject: [issue39076] Use types.SimpleNamespace for argparse.Namespace In-Reply-To: <1576600551.73.0.829151608014.issue39076@roundup.psfhosted.org> Message-ID: <1589767449.16.0.0302576736042.issue39076@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> rejected stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 22:25:25 2020 From: report at bugs.python.org (Zac Hatfield-Dodds) Date: Mon, 18 May 2020 02:25:25 +0000 Subject: [issue40661] The new parser segfaults when parsing invalid input In-Reply-To: <1589731270.13.0.765270340718.issue40661@roundup.psfhosted.org> Message-ID: <1589768725.29.0.111104838426.issue40661@roundup.psfhosted.org> Zac Hatfield-Dodds added the comment: I understand from Paul Ganssle that this bug was found using Hypothesmith in my stdlib property tests (reported at https://github.com/Zac-HD/stdlib-property-tests/issues/14). As discussed in https://github.com/we-like-parsers/cpython/issues/91 and https://pyfound.blogspot.com/2020/05/property-based-testing-for-python.html I'm keen to help out how I can, so if there's anything more specific than "write tools, write test, and wait" please let me know! Best, Zac ---------- nosy: +Zac Hatfield-Dodds _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 23:25:02 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 18 May 2020 03:25:02 +0000 Subject: [issue40452] IDLE: preserve clipboard on closure on Windows In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1589772302.69.0.76746922648.issue40452@roundup.psfhosted.org> Terry J. Reedy added the comment: eryksun, Piping to clip.exe is not working well. On the patch, I asked if you know what Windows system call it uses, but I cannot request your review there. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 23:36:21 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 18 May 2020 03:36:21 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1589772981.19.0.506842322215.issue40334@roundup.psfhosted.org> Raymond Hettinger added the comment: One minor nit: We're getting a nuisance compiler warning: test_peg_generator passed (2 min 40 sec) /var/folders/1b/3499qp8s7xv5w0fvjcgl45100000gn/T/tmp90rifd5z/parse.c:97:19: warning: code will never be executed [-Wunreachable-code] p->mark = _mark; ^~~~~ 1 warning generated. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 23:38:39 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 18 May 2020 03:38:39 +0000 Subject: [issue40665] Use Argument Clinic for bisect In-Reply-To: <1589751068.08.0.269643939265.issue40665@roundup.psfhosted.org> Message-ID: <1589773119.12.0.760747097772.issue40665@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 3a855b26aed02abf87fc1163ad0d564dc3da1ea3 by Shantanu in branch 'master': bpo-40665: Use Argument Clinic for the bisect module (GH-20163) https://github.com/python/cpython/commit/3a855b26aed02abf87fc1163ad0d564dc3da1ea3 ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 23:39:20 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 18 May 2020 03:39:20 +0000 Subject: [issue40665] Use Argument Clinic for bisect In-Reply-To: <1589751068.08.0.269643939265.issue40665@roundup.psfhosted.org> Message-ID: <1589773160.81.0.852384755026.issue40665@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks for the PR :-) ---------- assignee: -> rhettinger resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 23:44:50 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 18 May 2020 03:44:50 +0000 Subject: [issue4264] Patch: optimize code to use LIST_APPEND instead of calling list.append In-Reply-To: <1225913493.68.0.578631463812.issue4264@psf.upfronthosting.co.za> Message-ID: <1589773490.07.0.993120294503.issue4264@roundup.psfhosted.org> Raymond Hettinger added the comment: The advent of the LOAD_METHOD opcode addresses this issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 23:51:07 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 18 May 2020 03:51:07 +0000 Subject: [issue40651] class:`OrderedDict` Examples: LRU implementation has a bug. In-Reply-To: <1589672007.55.0.638241402645.issue40651@roundup.psfhosted.org> Message-ID: <1589773867.17.0.0895594604241.issue40651@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +19466 pull_request: https://github.com/python/cpython/pull/20167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 23:50:59 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 18 May 2020 03:50:59 +0000 Subject: [issue40651] class:`OrderedDict` Examples: LRU implementation has a bug. In-Reply-To: <1589672007.55.0.638241402645.issue40651@roundup.psfhosted.org> Message-ID: <1589773859.01.0.473304328469.issue40651@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset bb8635cc3bc3dd65996803849ee1a91cfbebae9c by qudongfang in branch 'master': bpo-40651: Improve LRU recipe in the OrderedDict documentation (GH-#20139) https://github.com/python/cpython/commit/bb8635cc3bc3dd65996803849ee1a91cfbebae9c ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 23:53:16 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 18 May 2020 03:53:16 +0000 Subject: [issue40651] class:`OrderedDict` Examples: LRU implementation has a bug. In-Reply-To: <1589672007.55.0.638241402645.issue40651@roundup.psfhosted.org> Message-ID: <1589773996.27.0.725735428814.issue40651@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks for PR :-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 17 23:58:37 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 18 May 2020 03:58:37 +0000 Subject: [issue40633] json.dumps() should encode float number NaN to null In-Reply-To: <1589550124.35.0.830023884715.issue40633@roundup.psfhosted.org> Message-ID: <1589774317.25.0.679236441135.issue40633@roundup.psfhosted.org> Raymond Hettinger added the comment: We could add an option to cause NaNs to raise an error, but I don't think it would get used. Otherwise, it's likely best to leave the module as-is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 00:06:33 2020 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 18 May 2020 04:06:33 +0000 Subject: [issue31033] Add argument to .cancel() of Task and Future In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1589774793.38.0.958888603393.issue31033@roundup.psfhosted.org> Change by Yury Selivanov : ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 00:06:53 2020 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 18 May 2020 04:06:53 +0000 Subject: [issue31033] Add argument to .cancel() of Task and Future In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1589774813.43.0.921471116091.issue31033@roundup.psfhosted.org> Yury Selivanov added the comment: Elevating to release blocker to make sure it's included. The PR is good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 00:30:33 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 18 May 2020 04:30:33 +0000 Subject: [issue19956] inspect.getsource(obj.foo) fails when foo is an injected method constructed from another method In-Reply-To: <1386804440.21.0.0153040236788.issue19956@psf.upfronthosting.co.za> Message-ID: <1589776233.4.0.457820309937.issue19956@roundup.psfhosted.org> Terry J. Reedy added the comment: Here is minimal reproducing code. import types import inspect class A: def say(self): print("A.say") a = A() class B: pass b = B() b.say = types.MethodType(a.say, b) Let us examine MethodType first. Calling 'b.say()' asks the previously neglected question: Is b.say a proper, sane callable? I claim not. With 3.9.0a6, the call fails with "TypeError: say() takes 1 positional argument but 2 were given". b.say() calls a.say(b), which calls A.say(a, b). If A.say took another parameter, such as 'name', 'b.say()' might work, but only by accident. Here is another buggy use of MethodType, b.A = types.MethodType(A, b) b.A() # TypeError: A() takes no arguments Again, given 'def __init__(self, something)', b.A() might work, but only by accident. types.MethodType is an example of "[This module] defines names for some object types that are used by the standard Python interpreter, but not exposed as builtins like int or str are." The names are mainly intended to be used for isinstance checks and rarely, if at all, for object creation. The MethodType entry lack a signature and only says "The type of methods of user-defined class instances." Its docstring, "method(function, instance)\n\nCreate a bound instance method object." does have a signature. However, 'function' must be a function compatible with being passed 'instance' as the first argument. This is false for both A and a.say; both result in buggy 'callables'. MethodType checks that its first argument, assigned to the .__func__ attribute, is callable (has a '.__call__' attribute) but apparently does not check further. As for getsource. For b.A and b.say, it raises "TypeError: module, class, method, function, traceback, frame, or code object was expected, got {type}", where type is 'type' and 'method' respectively. For both, the message is slightly confusing in that the function got something on the list (type=class). For both, getsource could be patched to work with the buggy inputs. I the latter is a bad idea. Built-in functions usually fail with buggy inputs. We should either improve the error message for methods or just close this. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 00:37:03 2020 From: report at bugs.python.org (veganaiZe) Date: Mon, 18 May 2020 04:37:03 +0000 Subject: [issue40629] Error MSB4086 (numeric comparison) In-Reply-To: <1589498706.71.0.441152981554.issue40629@roundup.psfhosted.org> Message-ID: <1589776623.35.0.386122826195.issue40629@roundup.psfhosted.org> veganaiZe added the comment: Probably a result of pulling in `msbuild` from .net 4.0 tools. I'm setting up a dedicated virtual machine. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 00:45:36 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 18 May 2020 04:45:36 +0000 Subject: [issue40661] The new parser segfaults when parsing invalid input In-Reply-To: <1589731270.13.0.765270340718.issue40661@roundup.psfhosted.org> Message-ID: <1589777136.9.0.929417729293.issue40661@roundup.psfhosted.org> Guido van Rossum added the comment: Zac: The reproducer here apparently uses a long string of weird accented characters. I'm not sure how to generalize from that to other things that Hyothes* could find. But maybe this helps: https://github.com/python/cpython/pull/20106#issuecomment-629742075 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 00:52:38 2020 From: report at bugs.python.org (Shantanu) Date: Mon, 18 May 2020 04:52:38 +0000 Subject: [issue13601] sys.stderr should be line-buffered when stderr is not a TTY In-Reply-To: <1323868292.46.0.495967266587.issue13601@psf.upfronthosting.co.za> Message-ID: <1589777558.03.0.419360792521.issue13601@roundup.psfhosted.org> Change by Shantanu : ---------- pull_requests: +19467 pull_request: https://github.com/python/cpython/pull/20168 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 01:08:00 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 18 May 2020 05:08:00 +0000 Subject: [issue13601] sys.stderr should be line-buffered when stderr is not a TTY In-Reply-To: <1323868292.46.0.495967266587.issue13601@psf.upfronthosting.co.za> Message-ID: <1589778480.19.0.339289234183.issue13601@roundup.psfhosted.org> miss-islington added the comment: New changeset d17f3d8315a3a775ab0807fc80acf92b1bd682f8 by Shantanu in branch 'master': bpo-13601: Mention stderr's line buffering in What's New (GH-20168) https://github.com/python/cpython/commit/d17f3d8315a3a775ab0807fc80acf92b1bd682f8 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 01:42:17 2020 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 18 May 2020 05:42:17 +0000 Subject: [issue22622] ElementTree only writes declaration when passed encoding In-Reply-To: <1413198968.88.0.623198680069.issue22622@psf.upfronthosting.co.za> Message-ID: <1589780537.81.0.478816713501.issue22622@roundup.psfhosted.org> Zackery Spytz added the comment: Python 2 is EOL, so I think this issue should be closed. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 01:47:38 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 18 May 2020 05:47:38 +0000 Subject: [issue31033] Add argument to .cancel() of Task and Future In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1589780858.43.0.246247027118.issue31033@roundup.psfhosted.org> Chris Jerdonek added the comment: New changeset da742ba826721da84140abc785856d4ccc2d787f by Chris Jerdonek in branch 'master': bpo-31033: Improve the traceback for cancelled asyncio tasks (GH-19951) https://github.com/python/cpython/commit/da742ba826721da84140abc785856d4ccc2d787f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 01:56:13 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 18 May 2020 05:56:13 +0000 Subject: [issue31033] Improve traceback of cancelled tasks / add cancel() msg argument In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1589781373.27.0.720300663197.issue31033@roundup.psfhosted.org> Chris Jerdonek added the comment: Thanks so much, Yury. (Removing the "release blocker" flag now that it has been merged.) ---------- priority: release blocker -> normal resolution: -> fixed stage: patch review -> resolved status: open -> closed title: Add argument to .cancel() of Task and Future -> Improve traceback of cancelled tasks / add cancel() msg argument _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 02:04:35 2020 From: report at bugs.python.org (Zac Hatfield-Dodds) Date: Mon, 18 May 2020 06:04:35 +0000 Subject: [issue40661] The new parser segfaults when parsing invalid input In-Reply-To: <1589731270.13.0.765270340718.issue40661@roundup.psfhosted.org> Message-ID: <1589781875.12.0.981820641874.issue40661@roundup.psfhosted.org> Zac Hatfield-Dodds added the comment: I know what else it might find either, but I still think it's worth running property-based tests in CI to find out! The demo I wrote for my language summit talk doesn't have any parser tests, but still would have caught this bug in the pull request that introduced it. The specific reproducer here is odd, because it's reported as an internal error in Hypothesmith - I use the `compile()` builtin to check that strings valid against an approximate grammar are actually valid. It's structurally less complex than typical outputs because it's only a fragment of the tree being generated, but because shrinking doesn't run for generation-time errors it's also much harder to interpret than usual. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 02:06:59 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 18 May 2020 06:06:59 +0000 Subject: [issue31131] asyncio.wait_for() TimeoutError doesn't provide full traceback In-Reply-To: <1502103995.24.0.900898482206.issue31131@psf.upfronthosting.co.za> Message-ID: <1589782019.26.0.854456602495.issue31131@roundup.psfhosted.org> Chris Jerdonek added the comment: This issue was just resolved by the combination of #40607 followed by #31033 (merged for 3.9.0 beta 1). Running the example code above now results in the following: Traceback (most recent call last): File "/.../cpython/test-31131.py", line 5, in run await asyncio.sleep(1000000) File "/.../cpython/Lib/asyncio/tasks.py", line 669, in sleep return await future asyncio.exceptions.CancelledError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/.../cpython/Lib/asyncio/tasks.py", line 507, in wait_for fut.result() asyncio.exceptions.CancelledError The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/.../cpython/test-31131.py", line 15, in main(run()) File "/.../cpython/test-31131.py", line 11, in main loop.run_until_complete(future) File "/.../cpython/Lib/asyncio/base_events.py", line 642, in run_until_complete return future.result() File "/.../cpython/Lib/asyncio/tasks.py", line 509, in wait_for raise exceptions.TimeoutError() from exc asyncio.exceptions.TimeoutError As you can see the traceback now includes the exception chain from the TimeoutError to the point of interruption: await asyncio.sleep(1000000). ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Improve traceback of cancelled tasks / add cancel() msg argument versions: +Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 02:09:08 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 18 May 2020 06:09:08 +0000 Subject: [issue40607] asyncio.wait_for should reraise future exception even if timeout expires In-Reply-To: <1589283187.27.0.827786043193.issue40607@roundup.psfhosted.org> Message-ID: <1589782148.5.0.741365673847.issue40607@roundup.psfhosted.org> Chris Jerdonek added the comment: Thank you again, Roman and all. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 02:17:28 2020 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 18 May 2020 06:17:28 +0000 Subject: [issue22622] ElementTree only writes declaration when passed encoding In-Reply-To: <1413198968.88.0.623198680069.issue22622@psf.upfronthosting.co.za> Message-ID: <1589782648.18.0.119174839709.issue22622@roundup.psfhosted.org> Stefan Behnel added the comment: Right, thanks. Closing since this works in Py3. ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 02:21:41 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 18 May 2020 06:21:41 +0000 Subject: [issue39148] DatagramProtocol + IPv6 does not work with ProactorEventLoop In-Reply-To: <1577530511.62.0.532247879973.issue39148@roundup.psfhosted.org> Message-ID: <1589782901.78.0.688840038665.issue39148@roundup.psfhosted.org> miss-islington added the comment: New changeset 442634c42fcaf31c636f693951a97734042c3e7b by Kjell Braden in branch 'master': bpo-39148: enable ipv6 for datagrams in Proactor (GH-19121) https://github.com/python/cpython/commit/442634c42fcaf31c636f693951a97734042c3e7b ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 02:23:01 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 18 May 2020 06:23:01 +0000 Subject: [issue39148] DatagramProtocol + IPv6 does not work with ProactorEventLoop In-Reply-To: <1577530511.62.0.532247879973.issue39148@roundup.psfhosted.org> Message-ID: <1589782981.46.0.277861261716.issue39148@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19468 pull_request: https://github.com/python/cpython/pull/20169 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 02:42:32 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 18 May 2020 06:42:32 +0000 Subject: [issue39148] DatagramProtocol + IPv6 does not work with ProactorEventLoop In-Reply-To: <1577530511.62.0.532247879973.issue39148@roundup.psfhosted.org> Message-ID: <1589784152.75.0.429009425975.issue39148@roundup.psfhosted.org> miss-islington added the comment: New changeset 94d9c5e5afdee4f46be9d9faaa39d6be40c34849 by Miss Islington (bot) in branch '3.8': bpo-39148: enable ipv6 for datagrams in Proactor (GH-19121) https://github.com/python/cpython/commit/94d9c5e5afdee4f46be9d9faaa39d6be40c34849 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 02:42:34 2020 From: report at bugs.python.org (Michael Felt) Date: Mon, 18 May 2020 06:42:34 +0000 Subject: [issue39148] DatagramProtocol + IPv6 does not work with ProactorEventLoop In-Reply-To: <1577530511.62.0.532247879973.issue39148@roundup.psfhosted.org> Message-ID: <1589784154.96.0.828717495014.issue39148@roundup.psfhosted.org> Michael Felt added the comment: Bot failed for AIX https://buildbot.python.org/all/#builders/227/builds/978 with: 0:07:11 Re-running test_asyncio in verbose mode Failed to import test module: test.test_asyncio.test_events Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/loader.py", line 436, in _find_test_path module = self._get_module_from_name(name) File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/loader.py", line 377, in _get_module_from_name __import__(name) File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_asyncio/test_events.py", line 239, in class EventLoopTestsMixin: File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_asyncio/test_events.py", line 1262, in EventLoopTestsMixin @unittest.skipUnless(support.IPV6_ENABLED, 'IPv6 not supported or enabled') AttributeError: module 'test.support' has no attribute 'IPV6_ENABLED' test test_asyncio crashed -- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/libregrtest/runtest.py", line 270, in _runtest_inner refleak = _runtest_inner2(ns, test_name) File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/libregrtest/runtest.py", line 234, in _runtest_inner2 test_runner() File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/libregrtest/runtest.py", line 208, in _test_module raise Exception("errors while loading tests") Exception: errors while loading tests 1 test failed again: test_asyncio ---------- nosy: +Michael.Felt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 02:52:37 2020 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 18 May 2020 06:52:37 +0000 Subject: [issue40633] json.dumps() should encode float number NaN to null In-Reply-To: <1589550124.35.0.830023884715.issue40633@roundup.psfhosted.org> Message-ID: <1589784757.12.0.561355491992.issue40633@roundup.psfhosted.org> Mark Dickinson added the comment: ... but I'm an idiot, since that option is already there (allow_nan=False), and I've just checked that we are in fact using it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 02:55:38 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 18 May 2020 06:55:38 +0000 Subject: [issue40633] json.dumps() should encode float number NaN to null In-Reply-To: <1589550124.35.0.830023884715.issue40633@roundup.psfhosted.org> Message-ID: <1589784938.78.0.316012852686.issue40633@roundup.psfhosted.org> Raymond Hettinger added the comment: I missed that as well ;-) Shall we close this now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 02:48:02 2020 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 18 May 2020 06:48:02 +0000 Subject: [issue40633] json.dumps() should encode float number NaN to null In-Reply-To: <1589550124.35.0.830023884715.issue40633@roundup.psfhosted.org> Message-ID: <1589784482.52.0.439994429676.issue40633@roundup.psfhosted.org> Mark Dickinson added the comment: > We could add an option to cause NaNs to raise an error, but I don't think it would get used. If that option were extended to also cause infinities to raise an error, then I'd use it. We have code that's producing JSON without knowing in advance exactly who the JSON consumer will be, and in particular whether the consumer will be strict in what it accepts or not. In that situation, it's preferable for us to discover that we're producing invalid JSON early (e.g., when running our own unit tests) rather than much later, when it turns out that the customer is using the "wrong" relational database. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 03:01:26 2020 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 18 May 2020 07:01:26 +0000 Subject: [issue40633] json.dumps() should encode float number NaN to null In-Reply-To: <1589550124.35.0.830023884715.issue40633@roundup.psfhosted.org> Message-ID: <1589785286.06.0.484392002865.issue40633@roundup.psfhosted.org> Eric V. Smith added the comment: I think it should be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 03:15:43 2020 From: report at bugs.python.org (Nathaniel Smith) Date: Mon, 18 May 2020 07:15:43 +0000 Subject: [issue39148] DatagramProtocol + IPv6 does not work with ProactorEventLoop In-Reply-To: <1577530511.62.0.532247879973.issue39148@roundup.psfhosted.org> Message-ID: <1589786143.19.0.410730658199.issue39148@roundup.psfhosted.org> Change by Nathaniel Smith : ---------- pull_requests: +19469 pull_request: https://github.com/python/cpython/pull/20170 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 03:56:05 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 18 May 2020 07:56:05 +0000 Subject: [issue34956] _tkinter built on macOS 10.14 does not link to Tcl and Tk in /Library/Frameworks In-Reply-To: <1539228548.05.0.788709270274.issue34956@psf.upfronthosting.co.za> Message-ID: <1589788565.45.0.0510321608373.issue34956@roundup.psfhosted.org> Change by Ned Deily : ---------- keywords: +patch pull_requests: +19470 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20171 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 03:56:53 2020 From: report at bugs.python.org (Nathaniel Smith) Date: Mon, 18 May 2020 07:56:53 +0000 Subject: [issue39148] DatagramProtocol + IPv6 does not work with ProactorEventLoop In-Reply-To: <1577530511.62.0.532247879973.issue39148@roundup.psfhosted.org> Message-ID: <1589788613.68.0.530787096258.issue39148@roundup.psfhosted.org> Nathaniel Smith added the comment: New changeset 58205a0217e91232cc1e945dbfe4e387d636eb76 by Nathaniel J. Smith in branch 'master': bpo-39148: fixup to account for IPV6_ENABLED being moved (GH-20170) https://github.com/python/cpython/commit/58205a0217e91232cc1e945dbfe4e387d636eb76 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 04:01:55 2020 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Mon, 18 May 2020 08:01:55 +0000 Subject: [issue40666] TarFile.add does not support pathlib.Path as a value to first argument. Message-ID: <1589788915.52.0.458653938585.issue40666@roundup.psfhosted.org> Change by ???? ????????? : ---------- components: Library (Lib) nosy: socketpair priority: normal severity: normal status: open title: TarFile.add does not support pathlib.Path as a value to first argument. versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 04:07:53 2020 From: report at bugs.python.org (Nathaniel Smith) Date: Mon, 18 May 2020 08:07:53 +0000 Subject: [issue39148] DatagramProtocol + IPv6 does not work with ProactorEventLoop In-Reply-To: <1577530511.62.0.532247879973.issue39148@roundup.psfhosted.org> Message-ID: <1589789273.94.0.804812006915.issue39148@roundup.psfhosted.org> Nathaniel Smith added the comment: I think I fixed the buildbot issues in GH-20170, but I can't seem to reach the buildbot site right now, so it's hard to know for sure! ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 04:08:12 2020 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 18 May 2020 08:08:12 +0000 Subject: [issue40633] json.dumps() should encode float number NaN to null In-Reply-To: <1589550124.35.0.830023884715.issue40633@roundup.psfhosted.org> Message-ID: <1589789292.86.0.303678506666.issue40633@roundup.psfhosted.org> Mark Dickinson added the comment: Agreed; closing. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 04:33:03 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 18 May 2020 08:33:03 +0000 Subject: [issue34956] _tkinter built on macOS 10.14 does not link to Tcl and Tk in /Library/Frameworks In-Reply-To: <1539228548.05.0.788709270274.issue34956@psf.upfronthosting.co.za> Message-ID: <1589790783.46.0.853719515837.issue34956@roundup.psfhosted.org> Ned Deily added the comment: New changeset 1731d6da263e9a2d6e783e87a8a5d5ce58fda46d by Ned Deily in branch 'master': bpo-34956: Fix macOS _tkinter use of Tcl/Tk in /Library/Frameworks (GH-20171) https://github.com/python/cpython/commit/1731d6da263e9a2d6e783e87a8a5d5ce58fda46d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 05:06:49 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 18 May 2020 09:06:49 +0000 Subject: [issue40667] [Windows] Add global python and python3 commands Message-ID: <1589792809.51.0.970244169965.issue40667@roundup.psfhosted.org> New submission from Steve Dower : So I'm totally sick of being abused on the internet about the whole PATH issue, and want to put this up as an alternative. I'm willing to do the work, but I'm worried that my emotional state about the whole thing is blinding me to obvious issues. In short, add a new option to the installer to "Add global python3.exe and python.exe commands". Also replace the current PATH option on the first page (not under Customize) with this. I'll also embed a "Learn More" link to the (new) doc page that explains the impact. The option will pass an extra flag to the *launcher* installer to include more copies of py.exe, renamed to python3.exe and python.exe (we already pass a similar option to add file associations). These additional copies will be just as global as py.exe (depending on whether the user is admin or not) and obviously work identically. Importantly, this does *not* drop an arbitrary/writable directory on PATH, and it keeps the DLLs out of the search path. There are some risks: * these may overtake people's existing installs and replace them with something more clever (this annoys people) * these add an extra process in the chain, which can break callers who need the process ID/handle (this annoys people) * this won't put Scripts on PATH (this annoys people) * changing anything at all annoys people * would remove python3.dll and python39.dll from PATH (probably for the best), and also vcruntime*.dll (which is a *good* thing) and anything installed by packages/tools into sys.prefix (which is a *massive* security vulnerability) * the help text for the launcher is not obvious above the help for the default Python interpreter * shebang lines will start being noticed * things should work in a venv because of both PATH and VIRTUALENV variables, but I'm not going to stake my life on this * "python3.exe" could launch Python 2, but I'm not too concerned by this I feel like this option is the best of a bad lot. But if people weigh in and say it's worse than doing nothing, then I'll do nothing. (Including ?ukasz in case he wants to veto adding this to 3.9 after beta 1. It's not a language change, and barely even an installer change - just a few optional copies of the existing launcher plus some docs. But as I mentioned above it *will* break some people.) ---------- components: Windows messages: 369196 nosy: lukasz.langa, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: [Windows] Add global python and python3 commands type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 05:10:27 2020 From: report at bugs.python.org (Zac Hatfield-Dodds) Date: Mon, 18 May 2020 09:10:27 +0000 Subject: [issue40668] Catastrophic loss of precision in colorsys module Message-ID: <1589793027.58.0.382499292423.issue40668@roundup.psfhosted.org> New submission from Zac Hatfield-Dodds : As part of the Mentored Sprints at PyCon US, Marielle wrote some property-based tests [1] for the colorsys module [2], which found two bugs. Taking a YIQ color, converting to RGB, and back to YIQ can result in the Y coordinate varying by more 0.1 (where [0, 1] is the range of possible values). For example: (0.0 1.0 2.2204460492503136e-16) -> RGB -> (0.0 1.1102230246251568e-16 1.0) Taking an RGB color and converting though HSV-RBG-HSV can result in very different saturation values - up to having S1==0 and S2==1. For example: (0.0 1.0 2.2204460492503136e-16) -> RGB -> (0.0 1.1102230246251568e-16 1.0) You can reproduce additional examples and get error bounds from [3]. [1] https://pyfound.blogspot.com/2020/05/property-based-testing-for-python.html [2] https://docs.python.org/3/library/colorsys.html [3] https://github.com/Zac-HD/stdlib-property-tests/pull/13 ---------- components: Library (Lib) messages: 369197 nosy: Zac Hatfield-Dodds priority: normal severity: normal status: open title: Catastrophic loss of precision in colorsys module 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 Mon May 18 05:25:04 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Mon, 18 May 2020 09:25:04 +0000 Subject: [issue38938] Possible performance improvement for heaqq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1589793904.74.0.641391073146.issue38938@roundup.psfhosted.org> Dennis Sweeney added the comment: I mostly like new_merge.py too, especially the dynamic reduction of the tree. However, it looks like ``list(merge([2],[1],[1]))`` currently fails, and I think what's missing is the following in the sibling-promotion: + if sibling.left is not None: + sibling.left.parent = sibling.right.parent = parent Also for what it's worth, I think both appearances of "c1 if c1.value < c2.value else c2" should become "c2 if c2.value < c1.value else c1" for stability. I've attached winners.py, which is similar to new_merge.py, but replaces the "while node.left is not None: node = node.source" traversal with a single "node = node.leaf" call and adds a fast yield-from for the last iterator. I don't think it's much more complex either. ---------- Added file: https://bugs.python.org/file49170/winners.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 05:35:58 2020 From: report at bugs.python.org (Tal Einat) Date: Mon, 18 May 2020 09:35:58 +0000 Subject: [issue40452] IDLE: preserve clipboard on closure on Windows In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1589794558.12.0.589419765967.issue40452@roundup.psfhosted.org> Tal Einat added the comment: I can reproduce this behavior on macOS as well, so this doesn't seem to be Windows-specific. This does not happen with other apps in general, so it is not normal behavior for apps. Testing with a minimal tkinter app (see code below) gives similar behavior, so this appears to be an issue with tkinter and/or tcl/tk. import tkinter text = tkinter.Text() text.pack() tkinter.mainloop() ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 05:47:57 2020 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 18 May 2020 09:47:57 +0000 Subject: [issue35967] Better platform.processor support In-Reply-To: <1549895363.53.0.252912531241.issue35967@roundup.psfhosted.org> Message-ID: <1589795277.51.0.682676842116.issue35967@roundup.psfhosted.org> Marc-Andre Lemburg added the comment: Thanks, Jason. I'll have a closer look at the issue and report back later this week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 06:18:08 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 18 May 2020 10:18:08 +0000 Subject: [issue40629] Error MSB4086 (numeric comparison) In-Reply-To: <1589498706.71.0.441152981554.issue40629@roundup.psfhosted.org> Message-ID: <1589797088.08.0.0420141778858.issue40629@roundup.psfhosted.org> Steve Dower added the comment: Yeah, that looks like a version of .NET that pre-dates Version being made comparable, which probably means you're not getting the MSBuild installed with VS. Check out "where MSBuild" or %MSBUILD% to see if there's something obvious overriding it, and use the MSBUILD variable to override it yourself if necessary. Good luck! Would love to hear if you find an approach that doesn't involve just setting up a whole machine! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 06:22:39 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 18 May 2020 10:22:39 +0000 Subject: [issue40654] shutil.copyfile mutates symlink for absolute path In-Reply-To: <1589685995.41.0.350903765679.issue40654@roundup.psfhosted.org> Message-ID: <1589797359.47.0.481918262408.issue40654@roundup.psfhosted.org> Steve Dower added the comment: This is only an issue for broken symlinks, right? (More precisely, those that cannot be resolved, which may include very long paths on some machines.) Fixing copy is my preferred option. Also Jason, what do you need to be able to test against prerelease? It would be nice to find these impacts during alpha/beta rather than three bug fix releases later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 06:32:00 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 18 May 2020 10:32:00 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1589797920.93.0.253889033392.issue40334@roundup.psfhosted.org> Lysandros Nikolaou added the comment: I'm not getting any compiler warnings on macOS (clang) and on Ubuntu (gcc) and I can't find any related warnings on the Windows Github Actions logs either. Could you maybe post a verbose log of test_peg_generator, Raymond? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 06:52:40 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 18 May 2020 10:52:40 +0000 Subject: [issue40669] PEG Parser benchmarks fail if memory_profiler is not installed Message-ID: <1589799160.45.0.969493803644.issue40669@roundup.psfhosted.org> New submission from Lysandros Nikolaou : Running the PEG Parser benchmarks requires having memory_profiler installed. In Tools/peg_generator: ? peg_generator git:(master) make time_stdlib ../../python -m zipfile -e data/xxl.zip data ../../python scripts/benchmark.py --parser=cpython --target=xxl compile Traceback (most recent call last): File "/home/lysnikolaou/repos/cpython/Tools/peg_generator/scripts/benchmark.py", line 9, in import memory_profiler ModuleNotFoundError: No module named 'memory_profiler' I propose to make that optional and only compute the timing benchmarks, in case memory_profiler is not available, since it's these benchmarks that are most important and most frequently run. ---------- assignee: lys.nikolaou messages: 369204 nosy: gvanrossum, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: PEG Parser benchmarks fail if memory_profiler is not installed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 06:52:49 2020 From: report at bugs.python.org (Michael Felt) Date: Mon, 18 May 2020 10:52:49 +0000 Subject: [issue39148] DatagramProtocol + IPv6 does not work with ProactorEventLoop In-Reply-To: <1577530511.62.0.532247879973.issue39148@roundup.psfhosted.org> Message-ID: <1589799169.53.0.235010590956.issue39148@roundup.psfhosted.org> Michael Felt added the comment: I could not "fathom" the buildbot test results - however, a manual build of PR29170 on 3.9 works: I'll try 3.8, but then from master (assuming it is already part of master) -- and that works as well. Thanks for the quick update! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 07:00:05 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 18 May 2020 11:00:05 +0000 Subject: [issue40669] PEG Parser benchmarks fail if memory_profiler is not installed In-Reply-To: <1589799160.45.0.969493803644.issue40669@roundup.psfhosted.org> Message-ID: <1589799605.97.0.951559417387.issue40669@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- keywords: +patch pull_requests: +19471 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20172 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 07:49:27 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 18 May 2020 11:49:27 +0000 Subject: [issue31033] Improve traceback of cancelled tasks / add cancel() msg argument In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1589802567.63.0.211377587641.issue31033@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- pull_requests: +19472 pull_request: https://github.com/python/cpython/pull/20173 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 08:32:37 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 12:32:37 +0000 Subject: [issue40503] PEP 615: Add zoneinfo module In-Reply-To: <1588618281.16.0.913416553136.issue40503@roundup.psfhosted.org> Message-ID: <1589805157.44.0.298560121137.issue40503@roundup.psfhosted.org> STINNER Victor added the comment: I suggest to open a separated issue to discuss how tzdata can be installed on Travis CI, Azure Pipelines, Buildbots, etc. when running tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 08:42:06 2020 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 18 May 2020 12:42:06 +0000 Subject: [issue40646] Builtins in doc show signature in documentation In-Reply-To: <1589642800.95.0.83659669973.issue40646@roundup.psfhosted.org> Message-ID: <1589805726.17.0.47000247393.issue40646@roundup.psfhosted.org> Eric V. Smith added the comment: "message signatures" -> "function signatures" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 08:44:21 2020 From: report at bugs.python.org (Edison Abahurire) Date: Mon, 18 May 2020 12:44:21 +0000 Subject: [issue40670] supplying an empty string to timeit causes an IndentationError Message-ID: <1589805861.06.0.616610250992.issue40670@roundup.psfhosted.org> New submission from Edison Abahurire : The Error can be evidenced below: ``` >>> >>> import timeit >>> >>> timeit.timeit('', number=10000) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.8/timeit.py", line 232, in timeit return Timer(stmt, setup, timer, globals).timeit(number) File "/usr/lib/python3.8/timeit.py", line 131, in __init__ code = compile(src, dummy_src_name, "exec") File "", line 7 _t1 = _timer() ^ IndentationError: expected an indented block >>> ``` ---------- messages: 369208 nosy: anthonypjshaw, edison.abahurire priority: normal severity: normal status: open title: supplying an empty string to timeit causes an IndentationError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 08:47:57 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 12:47:57 +0000 Subject: [issue40536] Addition of a "list of available time zones" function to zoneinfo In-Reply-To: <1588785591.81.0.248136692657.issue40536@roundup.psfhosted.org> Message-ID: <1589806077.54.0.431635105586.issue40536@roundup.psfhosted.org> STINNER Victor added the comment: def valid_key(fpath): try: with open(fpath, "rb") as f: return f.read(4) == b"TZif" except Exception: # pragma: nocover return False Why not only catching "except OSError:" rather than any exception? Or even "except (FileNotFoundError, PermissionError):" if you want to be pedantic :-p ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 08:52:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 12:52:52 +0000 Subject: [issue40548] Always run GitHub action jobs, even on documentation-only jobs In-Reply-To: <1588873177.1.0.956855864504.issue40548@roundup.psfhosted.org> Message-ID: <1589806372.5.0.671157534809.issue40548@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c444108dd62672f2b41539bcc8f15da44501f405 by Filipe La?ns in branch 'master': bpo-40548: Github Actions: update actions/checkout to v2 (GH-20164) https://github.com/python/cpython/commit/c444108dd62672f2b41539bcc8f15da44501f405 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 08:53:36 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 18 May 2020 12:53:36 +0000 Subject: [issue26317] Build Problem with GCC + Macintosh OS X 10.11 El Capitain In-Reply-To: <1454992584.65.0.198275659625.issue26317@psf.upfronthosting.co.za> Message-ID: <1589806416.11.0.187769773452.issue26317@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +19474 pull_request: https://github.com/python/cpython/pull/20176 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 08:52:02 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Mon, 18 May 2020 12:52:02 +0000 Subject: [issue40548] Always run GitHub action jobs, even on documentation-only jobs In-Reply-To: <1588873177.1.0.956855864504.issue40548@roundup.psfhosted.org> Message-ID: <1589806322.32.0.118849769193.issue40548@roundup.psfhosted.org> Change by Filipe La?ns : ---------- pull_requests: +19473 pull_request: https://github.com/python/cpython/pull/20164 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 09:05:53 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 13:05:53 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1589807153.67.0.780143856712.issue1635741@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 09:07:20 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 13:07:20 +0000 Subject: [issue40671] Convert _hashlib to PEP 489 multiphase initialization Message-ID: <1589807240.02.0.725265164424.issue40671@roundup.psfhosted.org> New submission from STINNER Victor : In Modules/_hashopenssl.c:PyInit__hashlib(), PyModule_AddObject() can be replaced with PyModule_AddType() to add the 3 types: this function does the Py_INCREF for us, which reduces errors if the function fails. The results of other PyModule_AddObject() calls should also be checked to handle errors. The following _hashlibstate_global macro is no longer used: #define _hashlibstate_global ((_hashlibstate *)PyModule_GetState(PyState_FindModule(&_hashlibmodule))) EVPnew() got a module parameter, so it doesn't need _hashlibstate_global anymore. Dong-hee, Hai: Maybe it's time to convert this module to PEP 489 multiphase initialization? Hai: do you want to work on a PR? -- Question: do EVPobject and HMACobject rely on a global state somewhere in OpenSSL? Or is it safe to use them in subinterpreters, with multiple instances of _hashlib? EVPobject and HMACobject have "lock" member. Even if converting the module to PEP 489 is not enough to make it compatible with subinterpreters (I don't know, maybe it's enought, see my question), it should help for that :-) Note: the current code is already quite clean, I like it :-) cc Petr & Christian. ---------- components: Library (Lib) messages: 369211 nosy: christian.heimes, corona10, petr.viktorin, shihai1991, vstinner priority: normal severity: normal status: open title: Convert _hashlib to PEP 489 multiphase initialization type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 09:10:30 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 18 May 2020 13:10:30 +0000 Subject: [issue40654] shutil.copyfile mutates symlink for absolute path In-Reply-To: <1589685995.41.0.350903765679.issue40654@roundup.psfhosted.org> Message-ID: <1589807430.85.0.975842403827.issue40654@roundup.psfhosted.org> Jason R. Coombs added the comment: > This is only an issue for broken symlinks, right? (More precisely, those that cannot be resolved, which may include very long paths on some machines.) Unfortunately, no. In the original post above, you can see temp/bar points to C:\Users\jaraco\temp\foo, which exists. Yet os.readlink returns \\?\C:\Users\jaraco\temp\foo. That's the root cause of the issue with copytree. > what do you need to be able to test against prerelease? It would be nice to find these impacts during alpha/beta rather than three bug fix releases later. I need a mechanically-reproducible technique to test dozens of projects against pre-releases on Windows. Historically, I've had Travis as my prime CI (non-existent Windows support) and AppVeyor for select projects that demanded some Windows testing. I've recently started migrating to Azure Pipelines, which has nice multi-platform support and that's why I've started catching these issues. Presumably, I'll be able to add a pre-release of Python 3.9 to the pipelines config at jaraco/skeleton - that will ensure that all projects I maintain going forward will get tested on the pre-release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 09:13:35 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 18 May 2020 13:13:35 +0000 Subject: [issue40671] Convert _hashlib to PEP 489 multiphase initialization In-Reply-To: <1589807240.02.0.725265164424.issue40671@roundup.psfhosted.org> Message-ID: <1589807615.77.0.971988412157.issue40671@roundup.psfhosted.org> Change by Christian Heimes : ---------- assignee: -> christian.heimes stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 09:17:25 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 18 May 2020 13:17:25 +0000 Subject: [issue26317] Build Problem with GCC + Macintosh OS X 10.11 El Capitain In-Reply-To: <1454992584.65.0.198275659625.issue26317@psf.upfronthosting.co.za> Message-ID: <1589807845.46.0.391585188908.issue26317@roundup.psfhosted.org> Ned Deily added the comment: New changeset 0da546665075aefbb476e192ed64122d340164f4 by Ned Deily in branch 'master': bpo-26317: Support OBJC and OBJCXX configure command line variables (GH-20176) https://github.com/python/cpython/commit/0da546665075aefbb476e192ed64122d340164f4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 09:22:08 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 13:22:08 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1589808128.77.0.457882717743.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: Serhiy: > I think that there is no much benefit in avoiding to import modules which are imported in libregrtest. Well, we should also enhance libregrtest in this case :-) > You should minimize import of test.libregrtest + test.support, not just test.support. Good idea. > Also, some modules, like bz2 are too small and do not have much dependencies. You will not save much on importing them lazily. On other hand, lazy import have its cost, so the real benefit will be even smaller. FYI bz2 and lzma can me some headaches when experimenting isolated subinterpreters while I was testing modules which don't use them. bz2 and lzma are not compatible with subintepreters and so caused crashes. IMO in an ideal world, running test_xxx should start with an empty sys.modules and only imports what it needs. The problem are also side effects, not only memory footprint. I created this issue because test_threading crashed on AIX because of a bug at fork in the logging module. Except that test_threading and threading modules *don't* importing logging. It's non obvious to get a crash in logging while testing the threading module. For me, these are tests are no longer "unit" tests, but more "integration" tests if we test indirectly "half of the stdlib" (I exaggerate on purpose ;-)). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 09:23:20 2020 From: report at bugs.python.org (=?utf-8?q?Lum=C3=ADr_Balhar?=) Date: Mon, 18 May 2020 13:23:20 +0000 Subject: [issue38112] Compileall improvements In-Reply-To: <1568210479.53.0.901531773072.issue38112@roundup.psfhosted.org> Message-ID: <1589808200.82.0.707110902883.issue38112@roundup.psfhosted.org> Change by Lum?r Balhar : ---------- nosy: +frenzy nosy_count: 4.0 -> 5.0 pull_requests: +19475 pull_request: https://github.com/python/cpython/pull/20174 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 09:23:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 13:23:44 +0000 Subject: [issue38112] Compileall improvements In-Reply-To: <1568210479.53.0.901531773072.issue38112@roundup.psfhosted.org> Message-ID: <1589808224.15.0.823891037566.issue38112@roundup.psfhosted.org> STINNER Victor added the comment: New changeset adc72bb2f9a5d8b548ee04405e19a184e5699e8d by Lum?r 'Frenzy' Balhar in branch 'master': bpo-38112: Document that compileall.compile_[dir,file] also accept multiple opt levels (GH-20174) https://github.com/python/cpython/commit/adc72bb2f9a5d8b548ee04405e19a184e5699e8d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 09:25:23 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 18 May 2020 13:25:23 +0000 Subject: [issue40671] Convert _hashlib to PEP 489 multiphase initialization In-Reply-To: <1589807240.02.0.725265164424.issue40671@roundup.psfhosted.org> Message-ID: <1589808323.49.0.140199051655.issue40671@roundup.psfhosted.org> Christian Heimes added the comment: OpenSSL's EVP and HMAC API depend on global state in OpenSSL, but they are still safe to be used in subinterpreters. OpenSSL ensures that the internal data structures are initialized in a thread-safe manner. The internal state cannot leak across subinterpreters. OpenSSL has process global configuration, but Python's ssl and hashlib module do not expose these features. The Python wrappers EVPobject, EVPXOFobject and HMACobject are **not** safe to be transfered across subinterpreters. The lock shouldn't matter here. It's used to release the GIL and block other threads from feeding into an object at the same time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 09:31:56 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 13:31:56 +0000 Subject: [issue40246] Different error messages for same error - invalid string prefixes In-Reply-To: <1586541958.33.0.891000303304.issue40246@roundup.psfhosted.org> Message-ID: <1589808716.76.0.659273231503.issue40246@roundup.psfhosted.org> STINNER Victor added the comment: "make install" ignores compileall errors no? If I recall correctly, only an error is logged into stdlib, "make install" doesn't fail. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 09:38:16 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 18 May 2020 13:38:16 +0000 Subject: [issue26317] _scproxy and Python Launcher fail to build wtih GNU gcc on macOS 10.13+ In-Reply-To: <1454992584.65.0.198275659625.issue26317@psf.upfronthosting.co.za> Message-ID: <1589809096.44.0.715941636679.issue26317@roundup.psfhosted.org> Ned Deily added the comment: Thanks everyone for their comments and reviews and a very big thank you to Jeffrey for working through the details and providing a solid PR. The change will appear in the 3.9.0b1 pre-release. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed title: Build Problem with GCC + Macintosh OS X 10.11 El Capitain -> _scproxy and Python Launcher fail to build wtih GNU gcc on macOS 10.13+ versions: +Python 3.9 -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 09:39:53 2020 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 18 May 2020 13:39:53 +0000 Subject: [issue5537] LWPCookieJar cannot handle cookies with expirations of 2038 or greater on 32-bit platforms In-Reply-To: <1237744231.54.0.279066174651.issue5537@psf.upfronthosting.co.za> Message-ID: <1589809193.28.0.384252860123.issue5537@roundup.psfhosted.org> Paul Ganssle added the comment: > Should we fix utcfromtimestamp() internally to avoid the OverflowError, rather than only fixing the http.cookiejar module? I'm not a big fan of utcfromtimestamp (as you can see here: https://blog.ganssle.io/articles/2019/11/utcnow.html ), but it seems we do have the same issue in `datetime.datetime.fromtimestamp`, so I think maybe we should spawn a new issue to at least look into the possibility? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 09:40:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 13:40:27 +0000 Subject: [issue25920] PyOS_AfterFork should reset socketmodule's lock In-Reply-To: <1450739972.22.0.163393011494.issue25920@psf.upfronthosting.co.za> Message-ID: <1589809227.75.0.5444014804.issue25920@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +19476 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20177 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 09:46:37 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 13:46:37 +0000 Subject: [issue25920] PyOS_AfterFork should reset socketmodule's lock In-Reply-To: <1450739972.22.0.163393011494.issue25920@psf.upfronthosting.co.za> Message-ID: <1589809597.18.0.0236797951645.issue25920@roundup.psfhosted.org> STINNER Victor added the comment: I wrote PR 20177 to avoid the netdb_lock in socket.getaddrinfo(), but the lock is still used on platforms which don't provide gethostbyname_r(): #if !defined(HAVE_GETHOSTBYNAME_R) && !defined(MS_WINDOWS) # define USE_GETHOSTBYNAME_LOCK #endif ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 09:49:04 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 18 May 2020 13:49:04 +0000 Subject: [issue40548] Always run GitHub action jobs, even on documentation-only jobs In-Reply-To: <1588873177.1.0.956855864504.issue40548@roundup.psfhosted.org> Message-ID: <1589809744.83.0.828937591128.issue40548@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19477 pull_request: https://github.com/python/cpython/pull/20178 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 09:49:13 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 18 May 2020 13:49:13 +0000 Subject: [issue40548] Always run GitHub action jobs, even on documentation-only jobs In-Reply-To: <1588873177.1.0.956855864504.issue40548@roundup.psfhosted.org> Message-ID: <1589809753.17.0.245137878737.issue40548@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19478 pull_request: https://github.com/python/cpython/pull/20179 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 09:52:29 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 18 May 2020 13:52:29 +0000 Subject: [issue40671] Convert _hashlib to PEP 489 multiphase initialization In-Reply-To: <1589807240.02.0.725265164424.issue40671@roundup.psfhosted.org> Message-ID: <1589809949.77.0.568201557694.issue40671@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +19479 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20180 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 09:52:59 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 13:52:59 +0000 Subject: [issue40671] Convert _hashlib to PEP 489 multiphase initialization In-Reply-To: <1589807240.02.0.725265164424.issue40671@roundup.psfhosted.org> Message-ID: <1589809979.01.0.534408810465.issue40671@roundup.psfhosted.org> STINNER Victor added the comment: > The Python wrappers EVPobject, EVPXOFobject and HMACobject are **not** safe to be transfered across subinterpreters. No Python object must be shared between two interpreter and no object should be transfered form one interpreter to another. That's not specific to _hashlib, but a general guidelines for subinterpreters ;-) Converting _hashlib should allow to have one _hashlib module instance per interpreter ;-) (Rather than sharing the same instance between all interpereters which caused so many issues!) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 09:59:47 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 18 May 2020 13:59:47 +0000 Subject: [issue39162] setup.py not picking up tkinter headers from non-system macOS Tcl and Tk frameworks In-Reply-To: <1577694906.58.0.783001060452.issue39162@roundup.psfhosted.org> Message-ID: <1589810387.05.0.967298061523.issue39162@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the report and the PR. Yes, detect_tkinter_darwin() had a number of problems due mainly to how Apple has first deprecated and more recently removed the option to have header files installed in the running system. Plus some nasty quirks of how the Tcl and Tk frameworks are built make it difficult to use them without hacks for embedding while supporting Python build options. Your analysis was helpful. In the end, I tried to fix this and some more general problems in detect_tkinter_darwin() with PR 20171 for Issue34956 which will be available in 3.9.0b1. ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> _tkinter built on macOS 10.14 does not link to Tcl and Tk in /Library/Frameworks title: setup.py not picking up tkinter headers -> setup.py not picking up tkinter headers from non-system macOS Tcl and Tk frameworks versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 10:03:05 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 14:03:05 +0000 Subject: [issue40600] Add option to disallow > 1 instance of an extension module In-Reply-To: <1589235149.46.0.0630975096351.issue40600@roundup.psfhosted.org> Message-ID: <1589810585.8.0.253218330604.issue40600@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Subinterpreters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 10:02:44 2020 From: report at bugs.python.org (anthony shaw) Date: Mon, 18 May 2020 14:02:44 +0000 Subject: [issue34956] _tkinter built on macOS 10.14 does not link to Tcl and Tk in /Library/Frameworks In-Reply-To: <1539228548.05.0.788709270274.issue34956@psf.upfronthosting.co.za> Message-ID: <1589810564.34.0.476625762209.issue34956@roundup.psfhosted.org> Change by anthony shaw : ---------- nosy: +anthonypjshaw nosy_count: 4.0 -> 5.0 pull_requests: +19480 pull_request: https://github.com/python/cpython/pull/17753 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 10:04:21 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 18 May 2020 14:04:21 +0000 Subject: [issue34956] _tkinter built on macOS 10.14 does not link to Tcl and Tk in /Library/Frameworks In-Reply-To: <1539228548.05.0.788709270274.issue34956@psf.upfronthosting.co.za> Message-ID: <1589810661.2.0.678965957237.issue34956@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: -19480 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 10:05:38 2020 From: report at bugs.python.org (Felipe Rodrigues) Date: Mon, 18 May 2020 14:05:38 +0000 Subject: [issue40042] Enum Flag: psuedo-members have None for name attribute Message-ID: <1589810738.21.0.092571074978.issue40042@roundup.psfhosted.org> New submission from Felipe Rodrigues : Hi, Can you elaborate on this? Thanks! ---------- nosy: +fbidu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 10:06:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 14:06:45 +0000 Subject: [issue26317] _scproxy and Python Launcher fail to build wtih GNU gcc on macOS 10.13+ In-Reply-To: <1454992584.65.0.198275659625.issue26317@psf.upfronthosting.co.za> Message-ID: <1589810805.23.0.88454776564.issue26317@roundup.psfhosted.org> STINNER Victor added the comment: This change broke the Python compilation on FreeBSD: https://buildbot.python.org/all/#/builders/152/builds/855 Either revert it (and re-apply a fixed change after beta1), or fix it. I suggest to block Python 3.9 beta1 release until it's resolved. I consider that FreeBSD is a supported platform. ---------- nosy: +vstinner priority: normal -> release blocker resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 10:07:02 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 18 May 2020 14:07:02 +0000 Subject: [issue40548] Always run GitHub action jobs, even on documentation-only jobs In-Reply-To: <1588873177.1.0.956855864504.issue40548@roundup.psfhosted.org> Message-ID: <1589810822.57.0.876884755618.issue40548@roundup.psfhosted.org> miss-islington added the comment: New changeset 9ecf25e04cb0b97f7f9a12f50b87ac4fad5dc3f5 by Miss Islington (bot) in branch '3.7': bpo-40548: Github Actions: update actions/checkout to v2 (GH-20164) https://github.com/python/cpython/commit/9ecf25e04cb0b97f7f9a12f50b87ac4fad5dc3f5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 10:08:34 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 18 May 2020 14:08:34 +0000 Subject: [issue26317] _scproxy and Python Launcher fail to build wtih GNU gcc on macOS 10.13+ In-Reply-To: <1454992584.65.0.198275659625.issue26317@psf.upfronthosting.co.za> Message-ID: <1589810914.54.0.312214495169.issue26317@roundup.psfhosted.org> Ned Deily added the comment: Sorry about that! Looking now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 10:16:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 14:16:27 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1589811387.27.0.315933739882.issue35907@roundup.psfhosted.org> STINNER Victor added the comment: > The solution is incomplete because it fixes just this single security issue, not the inherent fragility of this file. If you want to propose a change to make the file "less fragile", please open a *new* separated issue. The issue is about an exact vulnerability, the "local_file://" scheme, which has been fixed. I close again the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 10:17:11 2020 From: report at bugs.python.org (hai shi) Date: Mon, 18 May 2020 14:17:11 +0000 Subject: [issue40671] Convert _hashlib to PEP 489 multiphase initialization In-Reply-To: <1589807240.02.0.725265164424.issue40671@roundup.psfhosted.org> Message-ID: <1589811431.66.0.561474502887.issue40671@roundup.psfhosted.org> hai shi added the comment: > Hai: do you want to work on a PR? Oh, Looks like I am late, Christian have crated a PR ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 10:18:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 14:18:46 +0000 Subject: [issue40548] Always run GitHub action jobs, even on documentation-only jobs In-Reply-To: <1588873177.1.0.956855864504.issue40548@roundup.psfhosted.org> Message-ID: <1589811526.81.0.993893051658.issue40548@roundup.psfhosted.org> STINNER Victor added the comment: The initial issue (be able to make a GitHub action job mandatory) is now fixed, I close the issue. Making Windows x64 job mandatory is now tracked at: https://github.com/python/core-workflow/issues/368 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 10:07:52 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 18 May 2020 14:07:52 +0000 Subject: [issue40548] Always run GitHub action jobs, even on documentation-only jobs In-Reply-To: <1588873177.1.0.956855864504.issue40548@roundup.psfhosted.org> Message-ID: <1589810872.99.0.881370246032.issue40548@roundup.psfhosted.org> miss-islington added the comment: New changeset d8cbfa2f2a9a972caf9cbc2b1e2565c456e08888 by Miss Islington (bot) in branch '3.8': bpo-40548: Github Actions: update actions/checkout to v2 (GH-20164) https://github.com/python/cpython/commit/d8cbfa2f2a9a972caf9cbc2b1e2565c456e08888 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 10:19:55 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 18 May 2020 14:19:55 +0000 Subject: [issue40669] PEG Parser benchmarks fail if memory_profiler is not installed In-Reply-To: <1589799160.45.0.969493803644.issue40669@roundup.psfhosted.org> Message-ID: <1589811595.49.0.544992129302.issue40669@roundup.psfhosted.org> Guido van Rossum added the comment: Why not just install it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 10:33:18 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 18 May 2020 14:33:18 +0000 Subject: [issue40654] shutil.copyfile mutates symlink for absolute path In-Reply-To: <1589685995.41.0.350903765679.issue40654@roundup.psfhosted.org> Message-ID: <1589812398.77.0.722341957261.issue40654@roundup.psfhosted.org> Steve Dower added the comment: Ah right, it's realpath() that has the final step to remove an unnecessary \\?\ prefix. Firstly, I still think fixing copy is more important and more valuable. Given the possibility that the print name won't point to the real target, I'd much prefer to keep reading the substitute name. In this case, this looks like a change between versions (3.7->3.8) rather than a bug (assuming the symlink works, which hasn't been mentioned yet), and while it does result in needing a test update in Path, I don't think it makes sense to push that fix upstream. Changing readlink to always return the correct path was deliberate. Unless you're specifically testing single steps through symlink chains, you probably want to just use realpath anyway. Presumably you weren't using that beforehand because it didn't work, but the same fix fixed that, and we do extra work to retain the existing behaviour of the higher-level function (including rejecting junctions, unlike readlink). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 10:35:33 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 18 May 2020 14:35:33 +0000 Subject: [issue40654] shutil.copyfile mutates symlink for absolute path In-Reply-To: <1589685995.41.0.350903765679.issue40654@roundup.psfhosted.org> Message-ID: <1589812533.23.0.107396820025.issue40654@roundup.psfhosted.org> Steve Dower added the comment: > Presumably, I'll be able to add a pre-release of Python 3.9 to the pipelines config at jaraco/skeleton - that will ensure that all projects I maintain going forward will get tested on the pre-release. I don't have a straightforward task for it, but these should give you a Python 3.9 prerelease version (or any version you like if you replace "-Prerelease" with "-Version x.y.z", IIRC): nuget install python -Prerelease -OutputDirectory . -ExcludeVersion .\python\tools\python.exe ... nuget install pythonx86 -Prerelease -OutputDirectory . -ExcludeVersion .\pythonx86\tools\python.exe ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 10:36:28 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 18 May 2020 14:36:28 +0000 Subject: [issue40669] PEG Parser benchmarks fail if memory_profiler is not installed In-Reply-To: <1589799160.45.0.969493803644.issue40669@roundup.psfhosted.org> Message-ID: <1589812588.44.0.195264143447.issue40669@roundup.psfhosted.org> Lysandros Nikolaou added the comment: Because `make time` and all the related Makefile targets use the local built Python in the cpython parent directory. In order to install it, one would have to go through various steps, like installing openssl, configuring python with ssl support, building and installing python, creating a venv etc. Since it's more time-consuming that just running `make time` and since it's only needed for something that in most cases is not the most important thing, I think we can just go ahead and make it optional. Is there a downside to this change I'm missing? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 10:42:58 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 18 May 2020 14:42:58 +0000 Subject: [issue40661] The new parser segfaults when parsing invalid input In-Reply-To: <1589731270.13.0.765270340718.issue40661@roundup.psfhosted.org> Message-ID: <1589812978.46.0.75010019532.issue40661@roundup.psfhosted.org> Guido van Rossum added the comment: Unfortunately, I do not understand enough about how Hypothes* works to be helpful here, other than by offering encouragement. (And please don't try to educate me. I have too many other things. Sorry.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 10:44:26 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 18 May 2020 14:44:26 +0000 Subject: [issue40669] PEG Parser benchmarks fail if memory_profiler is not installed In-Reply-To: <1589799160.45.0.969493803644.issue40669@roundup.psfhosted.org> Message-ID: <1589813066.59.0.262799277323.issue40669@roundup.psfhosted.org> Guido van Rossum added the comment: Soon nobody will remember to look at the memory stats at all. But I will review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 10:49:01 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 14:49:01 +0000 Subject: [issue40669] PEG Parser benchmarks fail if memory_profiler is not installed In-Reply-To: <1589799160.45.0.969493803644.issue40669@roundup.psfhosted.org> Message-ID: <1589813341.08.0.630280484916.issue40669@roundup.psfhosted.org> STINNER Victor added the comment: Doc/Makefile uses a virtual environment to install Sphinx and Sphinx extensions. I suggest to do something similar. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 10:51:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 14:51:54 +0000 Subject: [issue26317] _scproxy and Python Launcher fail to build wtih GNU gcc on macOS 10.13+ In-Reply-To: <1454992584.65.0.198275659625.issue26317@psf.upfronthosting.co.za> Message-ID: <1589813514.31.0.985098690647.issue26317@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19481 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/20177 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:00:19 2020 From: report at bugs.python.org (Eryk Sun) Date: Mon, 18 May 2020 15:00:19 +0000 Subject: [issue40667] [Windows] Add global python and python3 commands In-Reply-To: <1589792809.51.0.970244169965.issue40667@roundup.psfhosted.org> Message-ID: <1589814019.53.0.555670779389.issue40667@roundup.psfhosted.org> Eryk Sun added the comment: > these may overtake people's existing installs and replace them > with something more clever (this annoys people) In particular, installing the launchers to %SystemRoot% means that in some contexts, such as the search path that CreateProcessW and SearchPathW use, the launcher commands will take precedence over %PATH%. > shebang lines will start being noticed > "python3.exe" could launch Python 2, but I'm not too concerned by this The launcher can get the name of the current process to restrict its behavior. For "python3.exe", run as "py.exe -3", which is subject to PY_PYTHON3. For "python2.exe", run as "py.exe -2", which is subject to PY_PYTHON2. For "python.exe", run as "py.exe", which is subject to shebangs, VIRTUAL_ENV, and PY_PYTHON. Since the loader doesn't resolve symbolic links, these extra names can actually just be symlinks if the filesystem supports them and the installer is allowed to create them. If installing the launchers to %SystemRoot%, the filesystem must be NTFS and we must have admin access, so symlinks should be supported. > these add an extra process in the chain, which can break callers > who need the process ID/handle The launcher could facilitate finding the image path when programs need to spawn the interpreter directly as a child process. Maybe when running as "python2.exe" and "python3.exe", the launcher's -0p option could print just the image path that it would execute instead of the list of installed versions. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:05:07 2020 From: report at bugs.python.org (Kevin Mooney) Date: Mon, 18 May 2020 15:05:07 +0000 Subject: [issue39026] pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure In-Reply-To: <1576078444.86.0.577960577024.issue39026@roundup.psfhosted.org> Message-ID: <1589814307.37.0.253311888826.issue39026@roundup.psfhosted.org> Change by Kevin Mooney : ---------- keywords: +patch nosy: +Kevin Mooney nosy_count: 5.0 -> 6.0 pull_requests: +19482 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20181 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:11:46 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 18 May 2020 15:11:46 +0000 Subject: [issue26317] _scproxy and Python Launcher fail to build wtih GNU gcc on macOS 10.13+ In-Reply-To: <1454992584.65.0.198275659625.issue26317@psf.upfronthosting.co.za> Message-ID: <1589814706.89.0.893707860985.issue26317@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +19483 pull_request: https://github.com/python/cpython/pull/20182 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:12:17 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 18 May 2020 15:12:17 +0000 Subject: [issue40669] PEG Parser benchmarks fail if memory_profiler is not installed In-Reply-To: <1589799160.45.0.969493803644.issue40669@roundup.psfhosted.org> Message-ID: <1589814737.2.0.0721049943482.issue40669@roundup.psfhosted.org> Lysandros Nikolaou added the comment: > Doc/Makefile uses a virtual environment to install Sphinx and Sphinx extensions. I suggest to do something similar. I like this approach. Let me try it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:15:08 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 18 May 2020 15:15:08 +0000 Subject: [issue40670] supplying an empty string to timeit causes an IndentationError In-Reply-To: <1589805861.06.0.616610250992.issue40670@roundup.psfhosted.org> Message-ID: <1589814908.66.0.437066863038.issue40670@roundup.psfhosted.org> R?mi Lapeyre added the comment: Is this different than what you would expect? Supplying garbage to timeit will result in an error: >>> from timeit import timeit >>> timeit('weofinwofinwe') Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/timeit.py", line 232, in timeit return Timer(stmt, setup, timer, globals).timeit(number) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/timeit.py", line 176, in timeit timing = self.inner(it, self.timer) File "", line 6, in inner NameError: name 'weofinwofinwe' is not defined If you want to time an empty loop, you can use: >>> timeit('pass', number=10000) 0.0001043230000021822 ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:15:31 2020 From: report at bugs.python.org (Eryk Sun) Date: Mon, 18 May 2020 15:15:31 +0000 Subject: [issue40667] [Windows] Add global python and python3 commands In-Reply-To: <1589792809.51.0.970244169965.issue40667@roundup.psfhosted.org> Message-ID: <1589814931.1.0.871138259196.issue40667@roundup.psfhosted.org> Eryk Sun added the comment: > For "python.exe", run as "py.exe", which is subject to shebangs, > VIRTUAL_ENV, and PY_PYTHON. Maybe in the "python[w].exe" case, it should skip shebang processing. That way only py[w].exe would handle shebangs, such as for the template command that gets installed as the default .py[w] file association: C:\Windows\py[w].exe "%1" %*. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:16:16 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 15:16:16 +0000 Subject: [issue39026] pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure In-Reply-To: <1576078444.86.0.577960577024.issue39026@roundup.psfhosted.org> Message-ID: <1589814976.74.0.573404689392.issue39026@roundup.psfhosted.org> STINNER Victor added the comment: IMO a better approach would be to add "cpython_" prefix to all header files living in Include/cpython/. It would prevent bad surprises. I tried to avoid adding a prefix when I added Include/internal/ but I got many practical issues. Depending where the #include is done, I got different errors. Adding a prefix prevents this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:21:42 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 18 May 2020 15:21:42 +0000 Subject: [issue40536] Addition of a "list of available time zones" function to zoneinfo In-Reply-To: <1588785591.81.0.248136692657.issue40536@roundup.psfhosted.org> Message-ID: <1589815302.14.0.0100404210155.issue40536@roundup.psfhosted.org> ?ukasz Langa added the comment: This goes into 3.9, but please settle on a final design long before October. Scratch that, please do it ideally before beta 2. I'm downgrading from release blocker, exception handling can be discussed and changed after beta 1 as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:21:48 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 18 May 2020 15:21:48 +0000 Subject: [issue40536] Addition of a "list of available time zones" function to zoneinfo In-Reply-To: <1588785591.81.0.248136692657.issue40536@roundup.psfhosted.org> Message-ID: <1589815308.85.0.781221711688.issue40536@roundup.psfhosted.org> Change by ?ukasz Langa : ---------- priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:24:36 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 18 May 2020 15:24:36 +0000 Subject: [issue40164] Upgrade Windows and macOS installer builds to OpenSSL 1.1.1g In-Reply-To: <1585875388.92.0.251240838882.issue40164@roundup.psfhosted.org> Message-ID: <1589815476.04.0.171418320177.issue40164@roundup.psfhosted.org> ?ukasz Langa added the comment: Should this still be open? ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:28:33 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 18 May 2020 15:28:33 +0000 Subject: [issue40164] Upgrade Windows and macOS installer builds to OpenSSL 1.1.1g In-Reply-To: <1585875388.92.0.251240838882.issue40164@roundup.psfhosted.org> Message-ID: <1589815713.29.0.0558643666473.issue40164@roundup.psfhosted.org> Ned Deily added the comment: I believe the Windows builds are still using 1.1.1f. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:31:36 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 18 May 2020 15:31:36 +0000 Subject: [issue26317] _scproxy and Python Launcher fail to build wtih GNU gcc on macOS 10.13+ In-Reply-To: <1454992584.65.0.198275659625.issue26317@psf.upfronthosting.co.za> Message-ID: <1589815896.73.0.0484474512393.issue26317@roundup.psfhosted.org> Ned Deily added the comment: New changeset 951ab58024de9b5a21f0b979cdbea51e1049d781 by Ned Deily in branch 'master': Revert "bpo-26317: Support OBJC and OBJCXX configure command line variables (GH-20176)" (GH-20182) https://github.com/python/cpython/commit/951ab58024de9b5a21f0b979cdbea51e1049d781 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:32:22 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 18 May 2020 15:32:22 +0000 Subject: [issue26317] _scproxy and Python Launcher fail to build wtih GNU gcc on macOS 10.13+ In-Reply-To: <1454992584.65.0.198275659625.issue26317@psf.upfronthosting.co.za> Message-ID: <1589815942.43.0.419418812659.issue26317@roundup.psfhosted.org> Ned Deily added the comment: I'm not sure yet exactly what the problem is but it's almost certainly a difference between GNU make and BSD make and something that needs to be checked on FreeBSD. With the 3.9.0b1 cutoff coming very soon, I likely won't be able to test on FreeBSD before then so I have reverted the change for now. Sigh! ---------- priority: release blocker -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:32:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 15:32:49 +0000 Subject: [issue26317] _scproxy and Python Launcher fail to build wtih GNU gcc on macOS 10.13+ In-Reply-To: <1454992584.65.0.198275659625.issue26317@psf.upfronthosting.co.za> Message-ID: <1589815969.4.0.261120716486.issue26317@roundup.psfhosted.org> STINNER Victor added the comment: I tested manually and I confirm that FreeBSD builds again, thanks :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:34:19 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 15:34:19 +0000 Subject: [issue40661] The new parser segfaults when parsing invalid input In-Reply-To: <1589731270.13.0.765270340718.issue40661@roundup.psfhosted.org> Message-ID: <1589816059.08.0.682054307349.issue40661@roundup.psfhosted.org> STINNER Victor added the comment: I don't think that such bug should block Python 3.9 beta1 (I'm talking about the "release blocker" priority). There is still time before 3.9 final to fix it. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:40:07 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 15:40:07 +0000 Subject: [issue38544] test_venv: test_isolation() failed on AMD64 Windows7 SP1 3.x: directory not empty: Scripts\ In-Reply-To: <1571653144.99.0.203555280128.issue38544@roundup.psfhosted.org> Message-ID: <1589816407.1.0.363491845695.issue38544@roundup.psfhosted.org> STINNER Victor added the comment: I didn't see this race condition recently, I just close the issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:40:30 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 15:40:30 +0000 Subject: [issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10 In-Reply-To: <1572192430.43.0.755831692199.issue38605@roundup.psfhosted.org> Message-ID: <1589816430.71.0.283233749185.issue38605@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: [typing] PEP 563: Postponed evaluation of annotations: enable it by default before Python 4.0 -> [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:41:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 15:41:12 +0000 Subject: [issue38798] test_asyncio.test_sendfile.test_sendfile_ssl_pre_and_post_data(): Overlapped still has pending operation at deallocation error on AMD64 Windows8.1 Non-Debug 3.x In-Reply-To: <1573740243.81.0.265051465688.issue38798@roundup.psfhosted.org> Message-ID: <1589816472.74.0.88087384062.issue38798@roundup.psfhosted.org> STINNER Victor added the comment: I didn't see this race condition recently, I just close the issue as out of date. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:41:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 15:41:45 +0000 Subject: [issue38815] test_ssl: test_min_max_version() fails on FreeBSD and Fedora In-Reply-To: <1573836860.92.0.531253629667.issue38815@roundup.psfhosted.org> Message-ID: <1589816505.04.0.927019822921.issue38815@roundup.psfhosted.org> STINNER Victor added the comment: I'm not sure why, but test_ssl does not pass on FreeBSD and Fedora, so I close the issue. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:43:16 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 15:43:16 +0000 Subject: [issue39983] test.regrtest: test marked as failed (env changed), but no warning: test_multiprocessing_forkserver In-Reply-To: <1584397271.26.0.591205335177.issue39983@roundup.psfhosted.org> Message-ID: <1589816596.88.0.0640582866528.issue39983@roundup.psfhosted.org> STINNER Victor added the comment: "Warning -- Unraisable exception" is now logged, but the exceptions is not when sys.stderr is redirected. That's better than nothing, so I close the issue. Moreover, test_multiprocessing_forkserver has been fixed. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:43:23 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 18 May 2020 15:43:23 +0000 Subject: [issue38815] test_ssl: test_min_max_version() fails on FreeBSD and Fedora In-Reply-To: <1573836860.92.0.531253629667.issue38815@roundup.psfhosted.org> Message-ID: <1589816603.97.0.750971008844.issue38815@roundup.psfhosted.org> Christian Heimes added the comment: Please don't close tickets assigned to an owner without consent. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:49:59 2020 From: report at bugs.python.org (Zachary Ware) Date: Mon, 18 May 2020 15:49:59 +0000 Subject: [issue40667] [Windows] Add global python and python3 commands In-Reply-To: <1589792809.51.0.970244169965.issue40667@roundup.psfhosted.org> Message-ID: <1589816999.55.0.809646317332.issue40667@roundup.psfhosted.org> Zachary Ware added the comment: I'm in favor of this. I especially want this with the self-name-checking that Eryk mentioned, and even more if each installed Python adds its own symlink to `py.exe` with its own version (i.e. the Python 3.9 installer adds `python3.9.exe -> py.exe`). I'm good with the base change even without these enhancements, though. (Maybe at some point in the future we can do something crazy like have the launcher just load the appropriate python3X.dll and run as the python process itself, but that is its own can of worms and should not stand in the way of this improvement :)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:51:14 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 15:51:14 +0000 Subject: [issue40003] test.regrtest: add an option to run test.bisect_cmd on failed tests, use it on Refleaks buildbots In-Reply-To: <1584546495.72.0.913336015216.issue40003@roundup.psfhosted.org> Message-ID: <1589817074.26.0.0674565215433.issue40003@roundup.psfhosted.org> STINNER Victor added the comment: While it would be nice, I'm not sure if it's a good idea to make buildbot jobs even longer. I wrote this issue to investigate an issue that I fixed in the meanwhile, so I close the issue. ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:51:04 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 18 May 2020 15:51:04 +0000 Subject: [issue40669] PEG Parser benchmarks fail if memory_profiler is not installed In-Reply-To: <1589799160.45.0.969493803644.issue40669@roundup.psfhosted.org> Message-ID: <1589817064.22.0.682583098035.issue40669@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +19484 pull_request: https://github.com/python/cpython/pull/20183 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:54:45 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 18 May 2020 15:54:45 +0000 Subject: [issue40667] [Windows] Add global python and python3 commands In-Reply-To: <1589792809.51.0.970244169965.issue40667@roundup.psfhosted.org> Message-ID: <1589817285.75.0.0887428197765.issue40667@roundup.psfhosted.org> Steve Dower added the comment: The self-name checking is not something I'm volunteering to write, btw, nor any new options. But feel free to put those up as separate issues. I'm also not getting into symbolic links here - WiX doesn't support them natively, and custom actions are the source of 99% of issues, so I don't want to add one. It'll be multiple complete copies of py.exe (which the installer will compress). And I wasn't even going to bother with pythonw.exe. Literally nobody has ever complained about those. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:55:35 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 18 May 2020 15:55:35 +0000 Subject: [issue40667] [Windows] Add global python and python3 commands In-Reply-To: <1589792809.51.0.970244169965.issue40667@roundup.psfhosted.org> Message-ID: <1589817335.35.0.45356684624.issue40667@roundup.psfhosted.org> Steve Dower added the comment: Oh, and there certainly won't be a python2.exe :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 11:55:34 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 15:55:34 +0000 Subject: [issue40410] test_multiprocessing_forktest_terminate() timed out after 15 min on s390x Fedora LTO + PGO 3.x In-Reply-To: <1588021254.28.0.401763643257.issue40410@roundup.psfhosted.org> Message-ID: <1589817334.86.0.660201179545.issue40410@roundup.psfhosted.org> STINNER Victor added the comment: I didn't see the failure recently, I close the issue as out of date. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:12:58 2020 From: report at bugs.python.org (Matteo Bertucci) Date: Mon, 18 May 2020 16:12:58 +0000 Subject: [issue40439] Error in an external reference In-Reply-To: <1588175008.34.0.523121738721.issue40439@roundup.psfhosted.org> Message-ID: <1589818378.85.0.0382916430737.issue40439@roundup.psfhosted.org> Change by Matteo Bertucci : ---------- keywords: +patch nosy: +Akarys nosy_count: 4.0 -> 5.0 pull_requests: +19485 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20184 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:13:30 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 16:13:30 +0000 Subject: [issue38815] test_ssl: test_min_max_version() fails on FreeBSD and Fedora In-Reply-To: <1573836860.92.0.531253629667.issue38815@roundup.psfhosted.org> Message-ID: <1589818410.2.0.0721065076823.issue38815@roundup.psfhosted.org> STINNER Victor added the comment: > Please don't close tickets assigned to an owner without consent. Can you please elaborate why you reopened the issue? The initial "test_ssl: test_min_max_version() fails on FreeBSD and Fedora" issue is now fixed. For example, test_ssl pass on AMD64 Fedora Stable LTO 3.x buildbot and it no longer uses the OPENSSL_CONF=/non-existing-file workaround. https://buildbot.python.org/all/#/builders/112/builds/850 "ssl.OPENSSL_VERSION: OpenSSL 1.1.1g FIPS 21 Apr 2020" Same for AMD64 FreeBSD Shared 3.x: https://buildbot.python.org/all/#/builders/152/builds/852 "ssl.OPENSSL_VERSION: OpenSSL 1.1.1g 21 Apr 2020" If there are remaining new issues, I would prefer to open new issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:14:35 2020 From: report at bugs.python.org (Kevin Mooney) Date: Mon, 18 May 2020 16:14:35 +0000 Subject: [issue39026] pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure In-Reply-To: <1576078444.86.0.577960577024.issue39026@roundup.psfhosted.org> Message-ID: <1589818475.85.0.551462838702.issue39026@roundup.psfhosted.org> Kevin Mooney added the comment: Ok, I think I see. Is there a concern that removing the cpython/ prefix might lead to the wrong initconfig.h being included? So your proposal is all includes in the root will do #include "cpython/cpython_foo.h" And any includes done in the cpython dir will be #include "cpython_foo.h" Currently there's only one file in the cpython dir that includes another, which would explain why this has never come up before. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:17:23 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 18 May 2020 16:17:23 +0000 Subject: [issue40653] _dirnameW is used outside HAVE_SYMLINK In-Reply-To: <1589684719.69.0.769333707176.issue40653@roundup.psfhosted.org> Message-ID: <1589818643.15.0.873458228691.issue40653@roundup.psfhosted.org> Steve Dower added the comment: New changeset 7f21c9ac872acc2114aee3313d132b016550ff42 by Minmin Gong in branch 'master': bpo-40653: Move _dirnameW out of #ifdef HAVE_SYMLINK/#endif (GH-20144) https://github.com/python/cpython/commit/7f21c9ac872acc2114aee3313d132b016550ff42 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:17:36 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 18 May 2020 16:17:36 +0000 Subject: [issue40653] _dirnameW is used outside HAVE_SYMLINK In-Reply-To: <1589684719.69.0.769333707176.issue40653@roundup.psfhosted.org> Message-ID: <1589818656.54.0.150797916177.issue40653@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +19486 pull_request: https://github.com/python/cpython/pull/20185 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:17:44 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 18 May 2020 16:17:44 +0000 Subject: [issue40653] _dirnameW is used outside HAVE_SYMLINK In-Reply-To: <1589684719.69.0.769333707176.issue40653@roundup.psfhosted.org> Message-ID: <1589818664.11.0.14974516065.issue40653@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19487 pull_request: https://github.com/python/cpython/pull/20186 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:17:56 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 18 May 2020 16:17:56 +0000 Subject: [issue40661] The new parser segfaults when parsing invalid input In-Reply-To: <1589731270.13.0.765270340718.issue40661@roundup.psfhosted.org> Message-ID: <1589818676.7.0.527761813069.issue40661@roundup.psfhosted.org> Guido van Rossum added the comment: Okay, deferring the blocker. But I'll still land Lysandros' fix ASAP. ---------- priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:18:07 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 18 May 2020 16:18:07 +0000 Subject: [issue40653] _dirnameW is used outside HAVE_SYMLINK In-Reply-To: <1589684719.69.0.769333707176.issue40653@roundup.psfhosted.org> Message-ID: <1589818687.26.0.738463161294.issue40653@roundup.psfhosted.org> Steve Dower added the comment: Thanks! Nice catch. Closing this, but I'll keep an eye on the backports. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:21:34 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 18 May 2020 16:21:34 +0000 Subject: [issue40650] Pytime.c doesn't need to include windows.h In-Reply-To: <1589671859.24.0.478073605849.issue40650@roundup.psfhosted.org> Message-ID: <1589818894.28.0.283434949527.issue40650@roundup.psfhosted.org> Steve Dower added the comment: Missing piece of information, it's also _documented_ as being part of the winsock headers: https://docs.microsoft.com/en-us/windows/win32/api/winsock/ns-winsock-timeval Plenty of things get included inadvertently, but they can't be relied upon. In this case it seems like an okay change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:22:47 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 18 May 2020 16:22:47 +0000 Subject: [issue40650] Pytime.c doesn't need to include windows.h In-Reply-To: <1589671859.24.0.478073605849.issue40650@roundup.psfhosted.org> Message-ID: <1589818967.84.0.665069125924.issue40650@roundup.psfhosted.org> Steve Dower added the comment: Also, for future reference, compile-only changes typically don't require a NEWS entry (since users are not going to be interested in reading it in the changelog, and we have commit messages for developers). We have the ability to skip the requirement on the PR, so feel free to just ignore the failure until we get to take a look. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:23:07 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 18 May 2020 16:23:07 +0000 Subject: [issue40650] Pytime.c doesn't need to include windows.h In-Reply-To: <1589671859.24.0.478073605849.issue40650@roundup.psfhosted.org> Message-ID: <1589818987.76.0.362266883497.issue40650@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +19488 pull_request: https://github.com/python/cpython/pull/20187 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:23:00 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 18 May 2020 16:23:00 +0000 Subject: [issue40650] Pytime.c doesn't need to include windows.h In-Reply-To: <1589671859.24.0.478073605849.issue40650@roundup.psfhosted.org> Message-ID: <1589818980.02.0.215876682813.issue40650@roundup.psfhosted.org> Steve Dower added the comment: New changeset f660567937277cc3a2cd53af77bbb18e905427e8 by Minmin Gong in branch 'master': bpo-40650: Include winsock2.h in pytime.c, instead of a full windows.h (GH-20137) https://github.com/python/cpython/commit/f660567937277cc3a2cd53af77bbb18e905427e8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:23:14 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 18 May 2020 16:23:14 +0000 Subject: [issue40650] Pytime.c doesn't need to include windows.h In-Reply-To: <1589671859.24.0.478073605849.issue40650@roundup.psfhosted.org> Message-ID: <1589818994.89.0.356651848061.issue40650@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +19489 pull_request: https://github.com/python/cpython/pull/20188 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:23:13 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 18 May 2020 16:23:13 +0000 Subject: [issue40650] Pytime.c doesn't need to include windows.h In-Reply-To: <1589671859.24.0.478073605849.issue40650@roundup.psfhosted.org> Message-ID: <1589818993.22.0.303437613773.issue40650@roundup.psfhosted.org> Change by Steve Dower : ---------- nosy: -miss-islington resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:25:14 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 18 May 2020 16:25:14 +0000 Subject: [issue40666] TarFile.add does not support pathlib.Path as a value to first argument. Message-ID: <1589819114.18.0.725229759893.issue40666@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +ethan.furman, lars.gustaebel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:27:12 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 18 May 2020 16:27:12 +0000 Subject: [issue35890] Cleanup some non-consistent API callings In-Reply-To: <1549145315.91.0.561945747798.issue35890@roundup.psfhosted.org> Message-ID: <1589819232.81.0.587858859348.issue35890@roundup.psfhosted.org> Steve Dower added the comment: Thanks for the additional cleanup. In future, we'd still like a separate issue for new changes (that aren't fixing up something caused by the earlier change). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:30:06 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 18 May 2020 16:30:06 +0000 Subject: [issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10 In-Reply-To: <1572192430.43.0.755831692199.issue38605@roundup.psfhosted.org> Message-ID: <1589819406.33.0.951502786031.issue38605@roundup.psfhosted.org> Guido van Rossum added the comment: Too bad nobody took any action here after the positive outcome of the discussion at the summit. ---------- components: +Interpreter Core -Library (Lib) stage: -> needs patch type: -> behavior versions: -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:32:37 2020 From: report at bugs.python.org (E. Paine) Date: Mon, 18 May 2020 16:32:37 +0000 Subject: [issue40452] IDLE: preserve clipboard on closure on Windows In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1589819557.27.0.160562538218.issue40452@roundup.psfhosted.org> Change by E. Paine : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:34:28 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 18 May 2020 16:34:28 +0000 Subject: [issue40653] _dirnameW is used outside HAVE_SYMLINK In-Reply-To: <1589684719.69.0.769333707176.issue40653@roundup.psfhosted.org> Message-ID: <1589819668.05.0.394159863431.issue40653@roundup.psfhosted.org> miss-islington added the comment: New changeset 6da26f8cec5c3f012e2fd001042ccadcd8aba640 by Miss Islington (bot) in branch '3.7': bpo-40653: Move _dirnameW out of GH-ifdef HAVE_SYMLINK/GH-endif (GH-20144) https://github.com/python/cpython/commit/6da26f8cec5c3f012e2fd001042ccadcd8aba640 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:34:41 2020 From: report at bugs.python.org (Rahul Kumaresan) Date: Mon, 18 May 2020 16:34:41 +0000 Subject: [issue40640] Tutorial for Continue missing ... line In-Reply-To: <1589608941.53.0.91951505263.issue40640@roundup.psfhosted.org> Message-ID: <1589819681.47.0.158042349206.issue40640@roundup.psfhosted.org> Change by Rahul Kumaresan : ---------- nosy: +rahul-kumi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:36:09 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 18 May 2020 16:36:09 +0000 Subject: [issue40653] _dirnameW is used outside HAVE_SYMLINK In-Reply-To: <1589684719.69.0.769333707176.issue40653@roundup.psfhosted.org> Message-ID: <1589819769.61.0.204546439531.issue40653@roundup.psfhosted.org> miss-islington added the comment: New changeset ddd5bbdeec8cf18ef074b3506c96d22ac3dc1f93 by Miss Islington (bot) in branch '3.8': bpo-40653: Move _dirnameW out of GH-ifdef HAVE_SYMLINK/GH-endif (GH-20144) https://github.com/python/cpython/commit/ddd5bbdeec8cf18ef074b3506c96d22ac3dc1f93 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:37:32 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 18 May 2020 16:37:32 +0000 Subject: [issue38815] test_ssl: test_min_max_version() fails on FreeBSD and Fedora In-Reply-To: <1573836860.92.0.531253629667.issue38815@roundup.psfhosted.org> Message-ID: <1589819852.36.0.244657150175.issue38815@roundup.psfhosted.org> Christian Heimes added the comment: If you think that a ticket no longer apply, please use the pending status and give me a chance to verify the result. I haven't looked into the issue and I don't have time to do it right now. ---------- stage: resolved -> commit review status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:39:19 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 18 May 2020 16:39:19 +0000 Subject: [issue40650] Pytime.c doesn't need to include windows.h In-Reply-To: <1589671859.24.0.478073605849.issue40650@roundup.psfhosted.org> Message-ID: <1589819959.96.0.445308539901.issue40650@roundup.psfhosted.org> miss-islington added the comment: New changeset 8e49c1fcf15969ca5c585648a5520617cc0566e6 by Miss Islington (bot) in branch '3.7': bpo-40650: Include winsock2.h in pytime.c, instead of a full windows.h (GH-20137) https://github.com/python/cpython/commit/8e49c1fcf15969ca5c585648a5520617cc0566e6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:39:34 2020 From: report at bugs.python.org (Rahul Kumaresan) Date: Mon, 18 May 2020 16:39:34 +0000 Subject: [issue40657] Resource leaks with threading.Thread In-Reply-To: <1589702871.42.0.415645279958.issue40657@roundup.psfhosted.org> Message-ID: <1589819974.51.0.632735889601.issue40657@roundup.psfhosted.org> Change by Rahul Kumaresan : ---------- nosy: +rahul-kumi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:39:58 2020 From: report at bugs.python.org (Rahul Kumaresan) Date: Mon, 18 May 2020 16:39:58 +0000 Subject: [issue40666] TarFile.add does not support pathlib.Path as a value to first argument. Message-ID: <1589819998.97.0.413369827381.issue40666@roundup.psfhosted.org> Change by Rahul Kumaresan : ---------- nosy: +rahul-kumi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:40:23 2020 From: report at bugs.python.org (Rahul Kumaresan) Date: Mon, 18 May 2020 16:40:23 +0000 Subject: [issue40670] supplying an empty string to timeit causes an IndentationError In-Reply-To: <1589805861.06.0.616610250992.issue40670@roundup.psfhosted.org> Message-ID: <1589820023.96.0.116875068557.issue40670@roundup.psfhosted.org> Change by Rahul Kumaresan : ---------- nosy: +rahul-kumi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:40:45 2020 From: report at bugs.python.org (Rahul Kumaresan) Date: Mon, 18 May 2020 16:40:45 +0000 Subject: [issue40042] Enum Flag: psuedo-members have None for name attribute In-Reply-To: <1589810738.21.0.092571074978.issue40042@roundup.psfhosted.org> Message-ID: <1589820045.59.0.696119984206.issue40042@roundup.psfhosted.org> Change by Rahul Kumaresan : ---------- nosy: +rahul-kumi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:41:01 2020 From: report at bugs.python.org (Rahul Kumaresan) Date: Mon, 18 May 2020 16:41:01 +0000 Subject: [issue40646] Builtins in doc show signature in documentation In-Reply-To: <1589642800.95.0.83659669973.issue40646@roundup.psfhosted.org> Message-ID: <1589820061.11.0.157111574427.issue40646@roundup.psfhosted.org> Change by Rahul Kumaresan : ---------- nosy: +rahul-kumi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:41:08 2020 From: report at bugs.python.org (Rahul Kumaresan) Date: Mon, 18 May 2020 16:41:08 +0000 Subject: [issue40646] Builtins in doc show signature in documentation In-Reply-To: <1589642800.95.0.83659669973.issue40646@roundup.psfhosted.org> Message-ID: <1589820068.36.0.613245057723.issue40646@roundup.psfhosted.org> Change by Rahul Kumaresan : ---------- nosy: -rahul-kumi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:42:21 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 18 May 2020 16:42:21 +0000 Subject: [issue40650] Pytime.c doesn't need to include windows.h In-Reply-To: <1589671859.24.0.478073605849.issue40650@roundup.psfhosted.org> Message-ID: <1589820141.69.0.511791669604.issue40650@roundup.psfhosted.org> miss-islington added the comment: New changeset ab9d9535aad5e627cb9ae471f186e27a65e48c6e by Miss Islington (bot) in branch '3.8': bpo-40650: Include winsock2.h in pytime.c, instead of a full windows.h (GH-20137) https://github.com/python/cpython/commit/ab9d9535aad5e627cb9ae471f186e27a65e48c6e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:42:53 2020 From: report at bugs.python.org (Rahul Kumaresan) Date: Mon, 18 May 2020 16:42:53 +0000 Subject: [issue40620] Range tutorial shorthand could be made clearer In-Reply-To: <1589436772.42.0.96031331267.issue40620@roundup.psfhosted.org> Message-ID: <1589820173.84.0.18577892392.issue40620@roundup.psfhosted.org> Change by Rahul Kumaresan : ---------- nosy: +rahul-kumi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:49:34 2020 From: report at bugs.python.org (Rahul Kumaresan) Date: Mon, 18 May 2020 16:49:34 +0000 Subject: [issue25872] multithreading traceback KeyError when modifying file In-Reply-To: <1450200064.35.0.872448112145.issue25872@psf.upfronthosting.co.za> Message-ID: <1589820574.37.0.781025054259.issue25872@roundup.psfhosted.org> Change by Rahul Kumaresan : ---------- nosy: +rahul-kumi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:50:11 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 18 May 2020 16:50:11 +0000 Subject: [issue35890] Cleanup some non-consistent API callings In-Reply-To: <1549145315.91.0.561945747798.issue35890@roundup.psfhosted.org> Message-ID: <1589820611.72.0.602477371702.issue35890@roundup.psfhosted.org> Steve Dower added the comment: New changeset 98e42d1f882b9b59f587d538c562dbc7d11c64c3 by Minmin Gong in branch 'master': bpo-35890: Use RegQueryInfoKeyW and CryptAcquireContextW explicitly (GH-19974) https://github.com/python/cpython/commit/98e42d1f882b9b59f587d538c562dbc7d11c64c3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:50:20 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 18 May 2020 16:50:20 +0000 Subject: [issue35890] Cleanup some non-consistent API callings In-Reply-To: <1549145315.91.0.561945747798.issue35890@roundup.psfhosted.org> Message-ID: <1589820620.35.0.145815580199.issue35890@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +19490 pull_request: https://github.com/python/cpython/pull/20189 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 12:57:18 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 18 May 2020 16:57:18 +0000 Subject: [issue35890] Cleanup some non-consistent API callings In-Reply-To: <1549145315.91.0.561945747798.issue35890@roundup.psfhosted.org> Message-ID: <1589821038.93.0.980115440142.issue35890@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +19491 pull_request: https://github.com/python/cpython/pull/20190 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 13:10:02 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 18 May 2020 17:10:02 +0000 Subject: [issue35890] Cleanup some non-consistent API callings In-Reply-To: <1549145315.91.0.561945747798.issue35890@roundup.psfhosted.org> Message-ID: <1589821802.6.0.663613367005.issue35890@roundup.psfhosted.org> miss-islington added the comment: New changeset 460eac20a625d5dcef409dadc120a26d272a8013 by Miss Islington (bot) in branch '3.8': bpo-35890: Use RegQueryInfoKeyW and CryptAcquireContextW explicitly (GH-19974) https://github.com/python/cpython/commit/460eac20a625d5dcef409dadc120a26d272a8013 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 13:12:38 2020 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 18 May 2020 17:12:38 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1589821958.56.0.610375512684.issue40257@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 13:15:59 2020 From: report at bugs.python.org (Jacob Middag) Date: Mon, 18 May 2020 17:15:59 +0000 Subject: [issue32803] smtplib: LMTP broken in the case of multiple RCPT In-Reply-To: <1518132309.75.0.467229070634.issue32803@psf.upfronthosting.co.za> Message-ID: <1589822159.13.0.590742254414.issue32803@roundup.psfhosted.org> Jacob Middag added the comment: Could anyone take a look to the PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 13:23:20 2020 From: report at bugs.python.org (Roman Skurikhin) Date: Mon, 18 May 2020 17:23:20 +0000 Subject: [issue40672] asyncio.wait_for: process future result produced during cancelation Message-ID: <1589822600.1.0.30867318872.issue40672@roundup.psfhosted.org> New submission from Roman Skurikhin : In https://bugs.python.org/issue40607 asyncio.wait_for behavior was changed so it propagates exceptions that happened during cancellation. But it still raises `TimeoutError` if cancelation ends with some value being returned. In the following example value `42` is lost: import asyncio async def return_42_on_cancel(): try: await asyncio.sleep(20) except asyncio.CancelledError: return 42 # `return` is useless in this block. async def main(): try: await asyncio.wait_for(return_42_on_cancel(), timeout=1) except asyncio.TimeoutError: print('Timeout') asyncio.run(main()) I think it's better to either: 1) Return that value from `asyncio.wait_for`. The motivation here is that if the task returns something, we shouldn't conceal it. I also searched through GitHub and found some places where others catch `CancelledError` and return value (https://github.com/grpc/grpc/blob/44fb37c99f2853cc23f04fba15468980d9e28e41/src/python/grpcio/grpc/experimental/aio/_interceptor.py#L328). It can also be used with some coroutines developed to be wrapped with `wait_for`, for example suppose the following equation solving function: async def solve_iteratively(initial_x, next_approximation): result = initial_x try: while True: result = next_approximation(result) await asyncio.sleep(0) except asyncio.CancelledError: return result It allows us to control its execution time using asyncio.wait_for. 2) Add some warning about the value is thrown away (in debug mode) and document it somewhere. === I am a newbie here, so sorry if it is wrong to create such "proposal" issues. ---------- components: asyncio messages: 369278 nosy: Roman Skurikhin, asvetlov, yselivanov priority: normal severity: normal status: open title: asyncio.wait_for: process future result produced during cancelation type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 13:25:14 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 18 May 2020 17:25:14 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1589822714.41.0.248485357474.issue40257@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 08b47c367a08f571a986366aa33828d3951fa88d by Serhiy Storchaka in branch 'master': bpo-40257: Revert changes to inspect.getdoc() (GH-20073) https://github.com/python/cpython/commit/08b47c367a08f571a986366aa33828d3951fa88d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 13:32:09 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 18 May 2020 17:32:09 +0000 Subject: [issue40661] The new parser segfaults when parsing invalid input In-Reply-To: <1589731270.13.0.765270340718.issue40661@roundup.psfhosted.org> Message-ID: <1589823129.79.0.781182336511.issue40661@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 7b7a21bc4fd063b26a2d1882fddc458861497812 by Lysandros Nikolaou in branch 'master': bpo-40661: Fix segfault when parsing invalid input (GH-20165) https://github.com/python/cpython/commit/7b7a21bc4fd063b26a2d1882fddc458861497812 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 13:32:26 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 18 May 2020 17:32:26 +0000 Subject: [issue40661] The new parser segfaults when parsing invalid input In-Reply-To: <1589731270.13.0.765270340718.issue40661@roundup.psfhosted.org> Message-ID: <1589823146.78.0.848878961308.issue40661@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 May 18 13:42:17 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 18 May 2020 17:42:17 +0000 Subject: [issue40528] Improve / Clear ASDL generator In-Reply-To: <1588763820.27.0.218398998224.issue40528@roundup.psfhosted.org> Message-ID: <1589823737.15.0.914853050876.issue40528@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 63b8e0cba3d43e53a8dd8878ee1443c8427f462d by Batuhan Taskaya in branch 'master': bpo-40528: Improve AST generation script to do builds simultaneously (GH-19968) https://github.com/python/cpython/commit/63b8e0cba3d43e53a8dd8878ee1443c8427f462d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 13:46:42 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 18 May 2020 17:46:42 +0000 Subject: [issue40662] ast.get_source_segment behaviour with missing location info doesn't match docstring In-Reply-To: <1589736918.78.0.989051663687.issue40662@roundup.psfhosted.org> Message-ID: <1589824002.48.0.493482803474.issue40662@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +3.9regression -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 14:14:19 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 18 May 2020 18:14:19 +0000 Subject: [issue40662] ast.get_source_segment behaviour with missing location info doesn't match docstring In-Reply-To: <1589736918.78.0.989051663687.issue40662@roundup.psfhosted.org> Message-ID: <1589825659.65.0.899762045908.issue40662@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset e6578a226d8a8a13d1062d154fad0fef28ee2416 by Irit Katriel in branch 'master': bpo-40662: Fixed ast.get_source_segment for ast nodes that have incomplete location information (GH-20157) https://github.com/python/cpython/commit/e6578a226d8a8a13d1062d154fad0fef28ee2416 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 14:17:15 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 18 May 2020 18:17:15 +0000 Subject: [issue40662] ast.get_source_segment behaviour with missing location info doesn't match docstring In-Reply-To: <1589736918.78.0.989051663687.issue40662@roundup.psfhosted.org> Message-ID: <1589825835.16.0.124349774711.issue40662@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 May 18 14:23:53 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 18 May 2020 18:23:53 +0000 Subject: [issue40663] Wrong generated annotation on subscripting In-Reply-To: <1589736999.01.0.252396126207.issue40663@roundup.psfhosted.org> Message-ID: <1589826233.03.0.188978533772.issue40663@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 2135e10dc717c00d10d899d232bebfc59bb25032 by Batuhan Taskaya in branch 'master': bpo-40663: Correctly handle annotations with subscripts in ast_unparse.c (GH-20156) https://github.com/python/cpython/commit/2135e10dc717c00d10d899d232bebfc59bb25032 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 14:27:47 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 18 May 2020 18:27:47 +0000 Subject: [issue40669] PEG Parser benchmarks fail if memory_profiler is not installed In-Reply-To: <1589799160.45.0.969493803644.issue40669@roundup.psfhosted.org> Message-ID: <1589826467.48.0.630083417064.issue40669@roundup.psfhosted.org> miss-islington added the comment: New changeset dc31800f86fbcd40ee616984820b885d8adaa6a7 by Lysandros Nikolaou in branch 'master': bpo-40669: Install PEG benchmarking dependencies in a venv (GH-20183) https://github.com/python/cpython/commit/dc31800f86fbcd40ee616984820b885d8adaa6a7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 14:28:37 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 18 May 2020 18:28:37 +0000 Subject: [issue40669] PEG Parser benchmarks fail if memory_profiler is not installed In-Reply-To: <1589799160.45.0.969493803644.issue40669@roundup.psfhosted.org> Message-ID: <1589826517.05.0.853777187164.issue40669@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 14:34:00 2020 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 18 May 2020 18:34:00 +0000 Subject: [issue40672] asyncio.wait_for: process future result produced during cancelation In-Reply-To: <1589822600.1.0.30867318872.issue40672@roundup.psfhosted.org> Message-ID: <1589826840.53.0.621770379743.issue40672@roundup.psfhosted.org> Yury Selivanov added the comment: > 2) Add some warning about the value is thrown away (in debug mode) and document it somewhere. The documentation update is definitely something that needs to be done in 3.9. Want to submit a PR? We can also issue a warning in asyncio debug mode. I'm really not sure about "1) Return that value from `asyncio.wait_for`.". > I am a newbie here, so sorry if it is wrong to create such "proposal" issues. The issue is clear, thanks for submitting it! Keep up the great work. ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 14:41:47 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 18 May 2020 18:41:47 +0000 Subject: [issue38870] Expose ast.unparse in the ast module In-Reply-To: <1574289269.61.0.90605518345.issue38870@roundup.psfhosted.org> Message-ID: <1589827307.01.0.730237156001.issue38870@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset d71a6492dbd5434dfa6a0ad95e3ad98aa690887a by CyberSaxosTiGER in branch 'master': bpo-38870: correctly escape unprintable characters on ast.unparse (GH-20166) https://github.com/python/cpython/commit/d71a6492dbd5434dfa6a0ad95e3ad98aa690887a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 14:48:19 2020 From: report at bugs.python.org (Tal Einat) Date: Mon, 18 May 2020 18:48:19 +0000 Subject: [issue40452] IDLE: preserve clipboard on closure on Windows In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1589827699.03.0.971082558431.issue40452@roundup.psfhosted.org> Tal Einat added the comment: I closed the PR but IMO this issue should remain open. I am changing the title, though, since this is not actually Windows-specific. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 14:48:35 2020 From: report at bugs.python.org (Tal Einat) Date: Mon, 18 May 2020 18:48:35 +0000 Subject: [issue40452] IDLE: preserve clipboard on closure In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1589827715.56.0.931626871017.issue40452@roundup.psfhosted.org> Change by Tal Einat : ---------- stage: resolved -> needs patch status: closed -> open title: IDLE: preserve clipboard on closure on Windows -> IDLE: preserve clipboard on closure _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 15:14:54 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 18 May 2020 19:14:54 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1589829294.0.0.0394878176776.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 75b863aa97016c6813709eb620c43295f84dd51f by Lysandros Nikolaou in branch 'master': bpo-40334: Reproduce error message for type comments on bare '*' in the new parser (GH-20151) https://github.com/python/cpython/commit/75b863aa97016c6813709eb620c43295f84dd51f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 15:35:25 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Mon, 18 May 2020 19:35:25 +0000 Subject: [issue40663] Wrong generated annotation on subscripting In-Reply-To: <1589736999.01.0.252396126207.issue40663@roundup.psfhosted.org> Message-ID: <1589830525.77.0.403700640345.issue40663@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- pull_requests: +19492 pull_request: https://github.com/python/cpython/pull/20191 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 15:44:00 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Mon, 18 May 2020 19:44:00 +0000 Subject: [issue40663] Wrong generated annotation on subscripting In-Reply-To: <1589736999.01.0.252396126207.issue40663@roundup.psfhosted.org> Message-ID: <1589831040.99.0.294334793369.issue40663@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- pull_requests: +19493 pull_request: https://github.com/python/cpython/pull/20192 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 16:48:56 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 18 May 2020 20:48:56 +0000 Subject: [issue38870] Expose ast.unparse in the ast module In-Reply-To: <1574289269.61.0.90605518345.issue38870@roundup.psfhosted.org> Message-ID: <1589834936.02.0.871885745837.issue38870@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset c102a148256b00b7d48c51a1a97df19042e603de by Batuhan Taskaya in branch 'master': bpo-38870: Don't omit parenthesis when unparsing a slice in ast.unparse https://github.com/python/cpython/commit/c102a148256b00b7d48c51a1a97df19042e603de ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 17:13:51 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Mon, 18 May 2020 21:13:51 +0000 Subject: [issue40528] Improve / Clear ASDL generator In-Reply-To: <1588763820.27.0.218398998224.issue40528@roundup.psfhosted.org> Message-ID: <1589836431.22.0.65237806667.issue40528@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- pull_requests: +19494 pull_request: https://github.com/python/cpython/pull/20193 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 17:15:54 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 18 May 2020 21:15:54 +0000 Subject: [issue40669] PEG Parser benchmarks fail if memory_profiler is not installed In-Reply-To: <1589799160.45.0.969493803644.issue40669@roundup.psfhosted.org> Message-ID: <1589836554.15.0.435377669643.issue40669@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +19495 pull_request: https://github.com/python/cpython/pull/20194 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 17:22:13 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 18 May 2020 21:22:13 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1589836933.74.0.965352374335.issue40257@roundup.psfhosted.org> ?ukasz Langa added the comment: Looks like the revert is solving the issue? ---------- priority: release blocker -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 17:30:13 2020 From: report at bugs.python.org (Petter S) Date: Mon, 18 May 2020 21:30:13 +0000 Subject: [issue40673] UrlOpener raises different exceptions based on implementation detail Message-ID: <1589837413.34.0.736050920356.issue40673@roundup.psfhosted.org> New submission from Petter S : The following code crashes with TypeError: URLopener().open("unknown_proxy://test") the expected behavior is an OSError, which is normally raised for unknown protocols. This implementation of directly calling a method called "unknown_proxy" is fragile and was recently the subject of a security issue: https://bugs.python.org/issue35907 (CVE-2019-9948) Would be good to make this more robust. ---------- components: Library (Lib) messages: 369291 nosy: Petter S priority: normal severity: normal status: open title: UrlOpener raises different exceptions based on implementation detail type: enhancement 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 May 18 17:31:00 2020 From: report at bugs.python.org (Petter S) Date: Mon, 18 May 2020 21:31:00 +0000 Subject: [issue40673] urllib.request.URLopener raises different exceptions based on implementation detail In-Reply-To: <1589837413.34.0.736050920356.issue40673@roundup.psfhosted.org> Message-ID: <1589837460.13.0.675438210083.issue40673@roundup.psfhosted.org> Change by Petter S : ---------- title: UrlOpener raises different exceptions based on implementation detail -> urllib.request.URLopener raises different exceptions based on implementation detail _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 17:31:43 2020 From: report at bugs.python.org (Petter S) Date: Mon, 18 May 2020 21:31:43 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1589837503.02.0.129125708416.issue35907@roundup.psfhosted.org> Petter S added the comment: OK: https://bugs.python.org/issue40673 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 17:32:25 2020 From: report at bugs.python.org (Petter S) Date: Mon, 18 May 2020 21:32:25 +0000 Subject: [issue40673] urllib.request.URLopener raises different exceptions based on implementation detail In-Reply-To: <1589837413.34.0.736050920356.issue40673@roundup.psfhosted.org> Message-ID: <1589837545.07.0.409314226798.issue40673@roundup.psfhosted.org> Petter S added the comment: I can fix this, but it does not have high priority. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 17:37:08 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 18 May 2020 21:37:08 +0000 Subject: [issue40673] urllib.request.URLopener raises different exceptions based on implementation detail In-Reply-To: <1589837413.34.0.736050920356.issue40673@roundup.psfhosted.org> Message-ID: <1589837828.0.0.138121740599.issue40673@roundup.psfhosted.org> R?mi Lapeyre added the comment: URLOpener has been deprecated since Python3.3 (https://github.com/python/cpython/blob/master/Lib/urllib/request.py#L1703-L1705) maybe it should just be removed from the codebase? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 17:38:40 2020 From: report at bugs.python.org (Petter S) Date: Mon, 18 May 2020 21:38:40 +0000 Subject: [issue40673] urllib.request.URLopener raises different exceptions based on implementation detail In-Reply-To: <1589837413.34.0.736050920356.issue40673@roundup.psfhosted.org> Message-ID: <1589837920.74.0.526279218824.issue40673@roundup.psfhosted.org> Petter S added the comment: I see. Perhaps that is the resolution then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 18:03:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 22:03:04 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1589839384.28.0.636192927478.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: New changeset a3ec3ad9e20e7d9ed148d4cfbd22aebec608b42a by Hai Shi in branch 'master': bpo-40275: More lazy imports in test.support (GH-20131) https://github.com/python/cpython/commit/a3ec3ad9e20e7d9ed148d4cfbd22aebec608b42a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 18:08:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 22:08:32 +0000 Subject: [issue39026] pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure In-Reply-To: <1576078444.86.0.577960577024.issue39026@roundup.psfhosted.org> Message-ID: <1589839712.43.0.523406520227.issue39026@roundup.psfhosted.org> STINNER Victor added the comment: I propose to rename "cpython/initconfig.h" to "cpython/cpython_initconfig.h". #include "cpython/initconfig.h" would become: #include "cpython/cpython_initconfig.h" So it becomes possible to include a cpython_xxx.h header from another cpython_xxx.h header (as done py cpython/pystate.h which includes cpython/initconfig.h). -- Maybe a simpler change is simply to remove #include "cpython/initconfig.h" from cpython/pystate.h. Currently, cpython/pystate.h is included indirectly by Python.h at line 137, whereas cpython/initconfig.h is included by Python.h at line 135 (two lines before). C extensions must include "Python.h" first and when "Python.h" is used, pystate.h gets the cpython/initconfig.h definitions as expected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 18:11:40 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 22:11:40 +0000 Subject: [issue40669] PEG Parser benchmarks fail if memory_profiler is not installed In-Reply-To: <1589799160.45.0.969493803644.issue40669@roundup.psfhosted.org> Message-ID: <1589839900.33.0.678851081872.issue40669@roundup.psfhosted.org> STINNER Victor added the comment: > bpo-40669: Install PEG benchmarking dependencies in a venv (GH-20183) I like this approach :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 18:13:59 2020 From: report at bugs.python.org (Aaron Meurer) Date: Mon, 18 May 2020 22:13:59 +0000 Subject: [issue39820] Bracketed paste mode for REPL In-Reply-To: <1583105435.88.0.337448475427.issue39820@roundup.psfhosted.org> Message-ID: <1589840039.15.0.027685186192.issue39820@roundup.psfhosted.org> Aaron Meurer added the comment: Related issue https://bugs.python.org/issue32019 ---------- nosy: +asmeurer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 18:16:22 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 22:16:22 +0000 Subject: [issue40673] urllib.request.URLopener raises different exceptions based on implementation detail In-Reply-To: <1589837413.34.0.736050920356.issue40673@roundup.psfhosted.org> Message-ID: <1589840182.85.0.132103949161.issue40673@roundup.psfhosted.org> STINNER Victor added the comment: > URLOpener has been deprecated since Python3.3 (https://github.com/python/cpython/blob/master/Lib/urllib/request.py#L1703-L1705) maybe it should just be removed from the codebase? It emits a DeprecationWarning since at least Python 3.6, so yes, it's now fine to remove the feature. It's also documented as deprecated in: https://docs.python.org/dev/library/urllib.request.html#urllib.request.URLopener Maybe we kept it longer than usual because it was common in Python 2.7 to use it, and we tried to keep support for code base compatible with Python 2 and Python 3? I don't know. I'm fine with removing the class in Python 3.10, but IMO it's too late for Python 3.9 (feature freeze is today). ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 18:20:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 May 2020 22:20:54 +0000 Subject: [issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10 In-Reply-To: <1572192430.43.0.755831692199.issue38605@roundup.psfhosted.org> Message-ID: <1589840454.21.0.175798160261.issue38605@roundup.psfhosted.org> STINNER Victor added the comment: > Too bad nobody took any action here after the positive outcome of the discussion at the summit. I didn't understand it this way. I understood that some people were not 100% comfortable to target 3.9. The question was 3.9 or 3.10. Since the release cycle is now shorter (1 years), only targeting 3.10 is not a big deal ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 18:24:44 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 18 May 2020 22:24:44 +0000 Subject: [issue35890] Cleanup some non-consistent API callings In-Reply-To: <1549145315.91.0.561945747798.issue35890@roundup.psfhosted.org> Message-ID: <1589840684.58.0.628474354782.issue35890@roundup.psfhosted.org> Steve Dower added the comment: New changeset 930badd414dd2376b1875e1775cb40855a87e180 by Steve Dower in branch '3.7': bpo-35890: Use RegQueryInfoKeyW and CryptAcquireContextW explicitly (GH-19974) https://github.com/python/cpython/commit/930badd414dd2376b1875e1775cb40855a87e180 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 18:26:31 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 18 May 2020 22:26:31 +0000 Subject: [issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10 In-Reply-To: <1572192430.43.0.755831692199.issue38605@roundup.psfhosted.org> Message-ID: <1589840791.58.0.945522756141.issue38605@roundup.psfhosted.org> ?ukasz Langa added the comment: We'll make this an announced 3.10 feature early on. The discussion at the Summit wasn't as clear cut to me: 35% of participants would rather see this default later than 3.9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 18:33:36 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 18 May 2020 22:33:36 +0000 Subject: [issue40452] IDLE: preserve clipboard on closure In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1589841216.01.0.0662719094602.issue40452@roundup.psfhosted.org> Terry J. Reedy added the comment: Thanks Tal. I should have inquired about behavior on *nix before putting so much effort into a Windows-only workaround, and not try to rush something into the beta coming out today or tomorrow. I will return to trying to do an invisible paste into a bare Text widget. ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 18:36:16 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 18 May 2020 22:36:16 +0000 Subject: [issue31033] Improve traceback of cancelled tasks / add cancel() msg argument In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1589841376.96.0.230326300218.issue31033@roundup.psfhosted.org> Chris Jerdonek added the comment: New changeset ff7a8b03c49153021d6de5d0b2fa8b5163059ed6 by Chris Jerdonek in branch 'master': Use _PyErr_ChainStackItem() inside gen_send_ex(). (GH-20173) https://github.com/python/cpython/commit/ff7a8b03c49153021d6de5d0b2fa8b5163059ed6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 18:37:13 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 18 May 2020 22:37:13 +0000 Subject: [issue40669] PEG Parser benchmarks fail if memory_profiler is not installed In-Reply-To: <1589799160.45.0.969493803644.issue40669@roundup.psfhosted.org> Message-ID: <1589841433.1.0.419300696296.issue40669@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 3764069f3ba2a7e932837ae19265059339dc86e3 by Pablo Galindo in branch 'master': bpo-40669: Use requirements.pip when installing PEG dependencies (GH-20194) https://github.com/python/cpython/commit/3764069f3ba2a7e932837ae19265059339dc86e3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 18:38:09 2020 From: report at bugs.python.org (Shantanu) Date: Mon, 18 May 2020 22:38:09 +0000 Subject: [issue40614] ast.parse doesn't respect feature_version for debug f-strings In-Reply-To: <1589354255.32.0.89059001676.issue40614@roundup.psfhosted.org> Message-ID: <1589841489.5.0.0682042208543.issue40614@roundup.psfhosted.org> Change by Shantanu : ---------- keywords: +patch pull_requests: +19496 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20196 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 18:39:16 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 18 May 2020 22:39:16 +0000 Subject: [issue40674] Deprecate urllib.request.urlretrieve() and cleanup() Message-ID: <1589841556.43.0.170691169258.issue40674@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- components: Library (Lib) nosy: remi.lapeyre priority: normal severity: normal status: open title: Deprecate urllib.request.urlretrieve() and cleanup() type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 18:40:41 2020 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 18 May 2020 22:40:41 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1589841641.86.0.977040019713.issue40257@roundup.psfhosted.org> Matthias Bussonnier added the comment: > Looks like the revert is solving the issue? It appears to do so as far as I can tell, and most test pass on nightly, the rest seem to be unrelated to changes in current 3.9. Many thanks to Serhiy for all the work on making documentation better, and there are definitively case where a version of getowndoc, or something that discriminate where the docstring comes from would be useful. I also agree that having _some_ ability to extend docstring would be nice but it's likely for another issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 18:46:23 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 18 May 2020 22:46:23 +0000 Subject: [issue40674] Deprecate urllib.request.urlretrieve() and cleanup() Message-ID: <1589841983.87.0.952425764902.issue40674@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch pull_requests: +19497 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20197 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 18:51:20 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 18 May 2020 22:51:20 +0000 Subject: [issue40672] asyncio.wait_for: process future result produced during cancelation In-Reply-To: <1589822600.1.0.30867318872.issue40672@roundup.psfhosted.org> Message-ID: <1589842280.96.0.606529326486.issue40672@roundup.psfhosted.org> Chris Jerdonek added the comment: Regarding the documentation, I'm not sure we _need_ to say what happens in this edge case for 3.9. It was already unspecified before 3.9, so we're not any worse off. (The change in issue 40607 was, however, documented.) I'd rather come to agreement on (1) first. Because if we document it now, then it could be interpreted as defined behavior and so harder to change later due to backwards compat guarantees. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 19:25:00 2020 From: report at bugs.python.org (Kevin Mooney) Date: Mon, 18 May 2020 23:25:00 +0000 Subject: [issue39026] pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure In-Reply-To: <1589839712.43.0.523406520227.issue39026@roundup.psfhosted.org> Message-ID: Kevin Mooney added the comment: Ok, so there are three potential solutions 1. Add cpython_ prefix to cpython headers 2. Remove cpython/initconfig.h from cpython/pystate.h 3. Include initconfig.h rather than cpython/initconfig.h 1 intoduces verbosity and touches more than the other solutions. 2 introduces a dependency on the include order. 3 adds potential nasty surprises. Doing nothing means C API users need to adapt their include paths. I'd appreciate your guidance on which path is preferable. On Mon, 18 May 2020, 23:08 STINNER Victor, wrote: > > STINNER Victor added the comment: > > I propose to rename "cpython/initconfig.h" to > "cpython/cpython_initconfig.h". > > #include "cpython/initconfig.h" > > would become: > > #include "cpython/cpython_initconfig.h" > > So it becomes possible to include a cpython_xxx.h header from another > cpython_xxx.h header (as done py cpython/pystate.h which includes > cpython/initconfig.h). > > -- > > Maybe a simpler change is simply to remove #include "cpython/initconfig.h" > from cpython/pystate.h. Currently, cpython/pystate.h is included indirectly > by Python.h at line 137, whereas cpython/initconfig.h is included by > Python.h at line 135 (two lines before). > > C extensions must include "Python.h" first and when "Python.h" is used, > pystate.h gets the cpython/initconfig.h definitions as expected. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 19:38:02 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 18 May 2020 23:38:02 +0000 Subject: [issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors In-Reply-To: <1588867521.75.0.200197181166.issue40546@roundup.psfhosted.org> Message-ID: <1589845082.71.0.210867077646.issue40546@roundup.psfhosted.org> Lysandros Nikolaou added the comment: Fixed in GH-20072 and bpo-40612. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 19:42:09 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 18 May 2020 23:42:09 +0000 Subject: [issue40614] ast.parse doesn't respect feature_version for debug f-strings In-Reply-To: <1589354255.32.0.89059001676.issue40614@roundup.psfhosted.org> Message-ID: <1589845329.76.0.803638912638.issue40614@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- nosy: +lys.nikolaou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 19:44:10 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 18 May 2020 23:44:10 +0000 Subject: [issue39839] Non-working error handler when creating a task with assigning a variable In-Reply-To: <1583259870.1.0.174919125514.issue39839@roundup.psfhosted.org> Message-ID: <1589845450.41.0.166416699389.issue39839@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 20:58:36 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 19 May 2020 00:58:36 +0000 Subject: [issue39839] Non-working error handler when creating a task with assigning a variable In-Reply-To: <1583259870.1.0.174919125514.issue39839@roundup.psfhosted.org> Message-ID: <1589849916.32.0.245439177086.issue39839@roundup.psfhosted.org> Chris Jerdonek added the comment: I took a look at this. Basically, the reason the exception handler isn't firing when the task is still in scope is that the exception handler is only a handler of "last resort." You can see that the exception handler is called inside Task.__del__ here: https://github.com/python/cpython/blob/3764069f3ba2a7e932837ae19265059339dc86e3/Lib/asyncio/tasks.py#L167-L176 The reason to do it this way is that if the Task is still in scope, there's still a chance that the caller might want to handle the exception themselves, e.g. by awaiting on the Task themselves. It's only when all references to the task go away that you know that the Task's exceptions can no longer be handled manually. Maybe this would be worth clarifying somewhere in the Error Handling API docs: https://docs.python.org/3/library/asyncio-eventloop.html#error-handling-api If you agree, we can change this issue to a documentation issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 21:04:50 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 19 May 2020 01:04:50 +0000 Subject: [issue39060] asyncio.Task.print_stack doesn't print the full stack In-Reply-To: <1576489918.95.0.196774987509.issue39060@roundup.psfhosted.org> Message-ID: <1589850290.23.0.395296872814.issue39060@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 21:08:13 2020 From: report at bugs.python.org (Sahil) Date: Tue, 19 May 2020 01:08:13 +0000 Subject: [issue40675] Add missing mimetypes for fonts Message-ID: <1589850493.36.0.16198127877.issue40675@roundup.psfhosted.org> New submission from Sahil : Currently guess_type method of mimetype fails to identity fonts from their extensions. ---------- components: Library (Lib) messages: 369312 nosy: sahil.prajapati priority: normal pull_requests: 19498 severity: normal status: open title: Add missing mimetypes for fonts _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 21:09:07 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 19 May 2020 01:09:07 +0000 Subject: [issue36456] task.cancel unbound recursion In-Reply-To: <1553741574.55.0.426835875653.issue36456@roundup.psfhosted.org> Message-ID: <1589850547.56.0.0364820635054.issue36456@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 21:13:58 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 19 May 2020 01:13:58 +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: <1589850838.5.0.83965492434.issue38306@roundup.psfhosted.org> Chris Jerdonek added the comment: Is this issue the same as this one? https://bugs.python.org/issue32309 ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 21:36:49 2020 From: report at bugs.python.org (Shantanu) Date: Tue, 19 May 2020 01:36:49 +0000 Subject: [issue40676] Use Argument Clinic for csv Message-ID: <1589852209.46.0.104557950942.issue40676@roundup.psfhosted.org> New submission from Shantanu : To do all the functions in csv, we'd need to have support for **kwargs, tracked in https://bugs.python.org/issue20291. Am attaching a PR for the ones that can be made to work today. ---------- components: Argument Clinic messages: 369314 nosy: hauntsaninja, larry priority: normal severity: normal status: open title: Use Argument Clinic for csv _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 21:38:19 2020 From: report at bugs.python.org (Shantanu) Date: Tue, 19 May 2020 01:38:19 +0000 Subject: [issue40676] Use Argument Clinic for csv In-Reply-To: <1589852209.46.0.104557950942.issue40676@roundup.psfhosted.org> Message-ID: <1589852299.53.0.957331514561.issue40676@roundup.psfhosted.org> Change by Shantanu : ---------- keywords: +patch pull_requests: +19499 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20200 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 21:53:10 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 01:53:10 +0000 Subject: [issue31033] Improve traceback of cancelled tasks / add cancel() msg argument In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1589853190.62.0.801714180225.issue31033@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +19500 pull_request: https://github.com/python/cpython/pull/20202 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 21:54:07 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 01:54:07 +0000 Subject: [issue40669] PEG Parser benchmarks fail if memory_profiler is not installed In-Reply-To: <1589799160.45.0.969493803644.issue40669@roundup.psfhosted.org> Message-ID: <1589853247.42.0.783044888656.issue40669@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19501 pull_request: https://github.com/python/cpython/pull/20203 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 22:14:19 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 19 May 2020 02:14:19 +0000 Subject: [issue31033] Improve traceback of cancelled tasks / add cancel() msg argument In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1589854459.53.0.958139929947.issue31033@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset f02c3048dc2f22053a2ba56ef5987967b89c4be3 by Miss Islington (bot) in branch '3.9': Use _PyErr_ChainStackItem() inside gen_send_ex(). (GH-20173) (#20202) https://github.com/python/cpython/commit/f02c3048dc2f22053a2ba56ef5987967b89c4be3 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 22:22:06 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 19 May 2020 02:22:06 +0000 Subject: [issue40668] Catastrophic loss of precision in colorsys module In-Reply-To: <1589793027.58.0.382499292423.issue40668@roundup.psfhosted.org> Message-ID: <1589854926.22.0.211751462032.issue40668@roundup.psfhosted.org> Raymond Hettinger added the comment: See https://bugs.python.org/issue14323 ---------- nosy: +rhettinger, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 22:31:36 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 02:31:36 +0000 Subject: [issue40669] PEG Parser benchmarks fail if memory_profiler is not installed In-Reply-To: <1589799160.45.0.969493803644.issue40669@roundup.psfhosted.org> Message-ID: <1589855496.29.0.325908816734.issue40669@roundup.psfhosted.org> miss-islington added the comment: New changeset 3d062829deadcb8355e97090aba47138eb9bc649 by Miss Islington (bot) in branch '3.9': bpo-40669: Use requirements.pip when installing PEG dependencies (GH-20194) https://github.com/python/cpython/commit/3d062829deadcb8355e97090aba47138eb9bc649 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 23:03:35 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 03:03:35 +0000 Subject: [issue32309] Implement asyncio.run_in_executor shortcut In-Reply-To: <1513194861.88.0.213398074469.issue32309@psf.upfronthosting.co.za> Message-ID: <1589857415.55.0.710496541013.issue32309@roundup.psfhosted.org> miss-islington added the comment: New changeset cc2bbc2227c3f5ed9d8f6b3bd052e6f9e68279d2 by Kyle Stanley in branch 'master': bpo-32309: Implement asyncio.to_thread() (GH-20143) https://github.com/python/cpython/commit/cc2bbc2227c3f5ed9d8f6b3bd052e6f9e68279d2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 18 23:40:26 2020 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 19 May 2020 03:40:26 +0000 Subject: [issue39631] Fix file association MIME type on Windows In-Reply-To: <1581670182.52.0.370257427786.issue39631@roundup.psfhosted.org> Message-ID: <1589859626.46.0.602187347583.issue39631@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 5.0 -> 6.0 pull_requests: +19502 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20205 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 00:08:16 2020 From: report at bugs.python.org (Minmin Gong) Date: Tue, 19 May 2020 04:08:16 +0000 Subject: [issue40677] IO_REPARSE_TAG_APPEXECLINK is not defined in old Windows SDK Message-ID: <1589861296.48.0.956665413821.issue40677@roundup.psfhosted.org> New submission from Minmin Gong : Python 3.8 introduces IO_REPARSE_TAG_APPEXECLINK, but this macro is not defined in Windows SDKs before 10. Need to manually define it. ---------- components: Windows messages: 369319 nosy: Minmin.Gong, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: IO_REPARSE_TAG_APPEXECLINK is not defined in old Windows SDK type: compile error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 00:09:24 2020 From: report at bugs.python.org (Minmin Gong) Date: Tue, 19 May 2020 04:09:24 +0000 Subject: [issue40677] IO_REPARSE_TAG_APPEXECLINK is not defined in old Windows SDK In-Reply-To: <1589861296.48.0.956665413821.issue40677@roundup.psfhosted.org> Message-ID: <1589861364.94.0.565234884979.issue40677@roundup.psfhosted.org> Change by Minmin Gong : ---------- keywords: +patch pull_requests: +19503 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20206 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 01:18:48 2020 From: report at bugs.python.org (hai shi) Date: Tue, 19 May 2020 05:18:48 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1589865528.83.0.0366007590698.issue40275@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +19504 pull_request: https://github.com/python/cpython/pull/20207 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 02:05:54 2020 From: report at bugs.python.org (Ram Rachum) Date: Tue, 19 May 2020 06:05:54 +0000 Subject: [issue40678] Full list of Python lexical rules Message-ID: <1589868354.8.0.399926907796.issue40678@roundup.psfhosted.org> New submission from Ram Rachum : I'm a noob on parsing, learning about it, so it's possible I've made a mistake somewhere. I know there's this page: https://docs.python.org/3/reference/grammar.html Which is a full listing of Python's grammar. However, looking at this page: https://docs.python.org/3/reference/lexical_analysis.html I see rules that aren't written there, like longstringitem. I'm guessing that's because these are lexing rules, while the former was a list of parsing rules? If that's the case, shouldn't there also be a full, authoritative list of Python's lexical rules? Possibly alongside the parsing rules? ---------- assignee: docs at python components: Documentation messages: 369320 nosy: cool-RR, docs at python, georg.brandl, gvanrossum priority: normal severity: normal status: open title: Full list of Python lexical rules type: enhancement versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 02:06:26 2020 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 19 May 2020 06:06:26 +0000 Subject: [issue37616] [3.10 prep] zip path incorrect In-Reply-To: <1563432035.85.0.841643784863.issue37616@roundup.psfhosted.org> Message-ID: <1589868386.33.0.878162744083.issue37616@roundup.psfhosted.org> Anthony Sottile added the comment: via https://github.com/python/cpython/commit/b4d4aef8433da2657c8d80207686124d15d32054 ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 02:28:09 2020 From: report at bugs.python.org (Shantanu) Date: Tue, 19 May 2020 06:28:09 +0000 Subject: [issue20177] Derby #8: Convert 28 sites to Argument Clinic across 2 files In-Reply-To: <1389138574.32.0.892814928986.issue20177@psf.upfronthosting.co.za> Message-ID: <1589869689.67.0.388360339478.issue20177@roundup.psfhosted.org> Change by Shantanu : ---------- nosy: +hauntsaninja nosy_count: 5.0 -> 6.0 pull_requests: +19505 pull_request: https://github.com/python/cpython/pull/20208 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 02:44:39 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 19 May 2020 06:44:39 +0000 Subject: [issue40452] IDLE: preserve clipboard on closure In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1589870679.04.0.343088228591.issue40452@roundup.psfhosted.org> Tal Einat added the comment: Looking into this further, this seems to be an issue in tkinter rather than with tcl/tk. Running `wish a.tcl` with the following simple script does leave its text in the clipboard: pack [text .t] .t insert 1.0 "Test text" clipboard clear clipboard append -- [.t get 1.0 end] exit On the other hand, the following equivalent Python script leaves the clipboard empty: import tkinter text = tkinter.Text() text.pack() text.clipboard_clear() text.clipboard_append("Testing again") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 03:38:17 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Tue, 19 May 2020 07:38:17 +0000 Subject: [issue27501] Add typing.py class describing a PEP 3118 buffer object In-Reply-To: <1468346843.82.0.455431578723.issue27501@psf.upfronthosting.co.za> Message-ID: <1589873897.47.0.915370650051.issue27501@roundup.psfhosted.org> Change by Jakub Stasiak : ---------- nosy: +jstasiak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 03:44:09 2020 From: report at bugs.python.org (=?utf-8?b?TWljaGHFgiBHw7Nybnk=?=) Date: Tue, 19 May 2020 07:44:09 +0000 Subject: [issue1294959] Add sys.platlibdir to use /usr/lib64 on Fedora and SuSE Message-ID: <1589874249.83.0.542616716743.issue1294959@roundup.psfhosted.org> Micha? G?rny added the comment: Does this mean that platforms using /usr/lib64 for shared libraries are now forced to install Python into /usr/lib64/python*? ---------- nosy: +mgorny _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 03:57:29 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 19 May 2020 07:57:29 +0000 Subject: [issue40679] show class name in method invocation TypeError Message-ID: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> New submission from Chris Jerdonek : When calling an instance method incorrectly, you will often get a TypeError that is some variation of the following: Traceback (most recent call last): File "/.../test.py", line 6, in a.foo(1) TypeError: foo() takes 1 positional argument but 2 were given However, when multiple classes have method foo() and the type of "a" isn't immediately obvious, this often isn't enough to know what method was being called. Thus, it would be more helpful if the error message includes also the class that foo() belongs to, or alternatively the type of the object. (These can be different when subclasses are involved.) For comparison, if you call a method that doesn't exist, you will get a message that looks like the following: Traceback (most recent call last): File "/.../test.py", line 6, in a.bar(1) AttributeError: 'A' object has no attribute 'bar' So taking from this as an example, the message in the first case could be something like-- TypeError: foo() for 'A' object takes 1 positional argument but 2 were given ---------- messages: 369324 nosy: chris.jerdonek priority: normal severity: normal status: open title: show class name in method invocation TypeError type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 04:11:12 2020 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 19 May 2020 08:11:12 +0000 Subject: [issue26317] _scproxy and Python Launcher fail to build wtih GNU gcc on macOS 10.13+ In-Reply-To: <1454992584.65.0.198275659625.issue26317@psf.upfronthosting.co.za> Message-ID: <1589875872.61.0.735201642998.issue26317@roundup.psfhosted.org> Arfrever Frehtes Taifersar Arahesis added the comment: Also there was FLAFS typo in this line, which is probably not needed at all: OBJCFLAFS=@OBJCFLAGS@ AC_SUBST(OBJCXX) was added, but there was no usage of @OBJCXX@ anywhere... ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 04:37:45 2020 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Tue, 19 May 2020 08:37:45 +0000 Subject: [issue1294959] Add sys.platlibdir to use /usr/lib64 on Fedora and SuSE Message-ID: <1589877465.24.0.26793121182.issue1294959@roundup.psfhosted.org> Miro Hron?ok added the comment: > Does this mean that platforms using /usr/lib64 for shared libraries are now forced to install Python into /usr/lib64/python*? Not at all. This means that it is possible to do so. It remains optional. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 05:04:14 2020 From: report at bugs.python.org (=?utf-8?b?TWljaGHFgiBHw7Nybnk=?=) Date: Tue, 19 May 2020 09:04:14 +0000 Subject: [issue1294959] Add sys.platlibdir to use /usr/lib64 on Fedora and SuSE Message-ID: <1589879054.01.0.00134067404672.issue1294959@roundup.psfhosted.org> Micha? G?rny added the comment: > Not at all. This means that it is possible to do so. It remains optional. ...but then sys.platlibdir is going to incorrectly list 'lib', isn't it? According to https://docs.python.org/3.9/library/sys.html#sys.platlibdir it's used 'to build the path of platform-specific dynamic libraries and the path of the standard library'. This means that people relying on it for the former will get 32-bit libraries instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 05:05:25 2020 From: report at bugs.python.org (Albert Christianto) Date: Tue, 19 May 2020 09:05:25 +0000 Subject: [issue31963] AMD64 Debian PGO 3.x buildbot: compilation failed with an internal compiler error in create_edge In-Reply-To: <1510005461.16.0.213398074469.issue31963@psf.upfronthosting.co.za> Message-ID: <1589879125.6.0.167264096095.issue31963@roundup.psfhosted.org> Albert Christianto added the comment: Hi admins, I need help for compiling and building Python-3.7.7. My system is Ubuntu 16.04 LTS, gcc 5.4.0 20160609 this is the configuration cmd for compling python ./configure --enable-optimizations --enable-shared when i compiled it, i get these similar error ``` Parser/tokenizer.c: In function ?PyTokenizer_FindEncodingFilename?: Parser/tokenizer.c:1909:1: error: the control flow of function ?PyTokenizer_FindEncodingFilename? does not match its profile data (counter ?arcs?) [-Werror=coverage-mismatch] } ^ Parser/tokenizer.c:1909:1: error: the control flow of function ?PyTokenizer_FindEncodingFilename? does not match its profile data (counter ?time_profiler?) [-Werror=coverage-mismatch] Parser/tokenizer.c: In function ?tok_get?: Parser/tokenizer.c:1909:1: error: the control flow of function ?tok_get? does not match its profile data (counter ?arcs?) [-Werror=coverage-mismatch] Parser/tokenizer.c:1909:1: error: the control flow of function ?tok_get? does not match its profile data (counter ?single?) [-Werror=coverage-mismatch] Parser/tokenizer.c:1909:1: error: the control flow of function ?tok_get? does not match its profile data (counter ?time_profiler?) [-Werror=coverage-mismatch] gcc -pthread -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fprofile-use -fprofile-correction -I. -I./Include -fPIC -DPy_BUILD_CORE -o Objects/bytes_methods.o Objects/bytes_methods.c Objects/boolobject.c: In function ?bool_xor?: Objects/boolobject.c:185:1: error: the control flow of function ?bool_xor? does not match its profile data (counter ?arcs?) [-Werror=coverage-mismatch] }; ^ Objects/boolobject.c:185:1: error: the control flow of function ?bool_xor? does not match its profile data (counter ?indirect_call?) [-Werror=coverage-mismatch] Objects/boolobject.c:185:1: error: the control flow of function ?bool_xor? does not match its profile data (counter ?time_profiler?) [-Werror=coverage-mismatch] Objects/boolobject.c: In function ?bool_or?: Objects/boolobject.c:185:1: error: the control flow of function ?bool_or? does not match its profile data (counter ?arcs?) [-Werror=coverage-mismatch] Objects/boolobject.c:185:1: error: the control flow of function ?bool_or? does not match its profile data (counter ?indirect_call?) [-Werror=coverage-mismatch] Objects/boolobject.c:185:1: error: the control flow of function ?bool_or? does not match its profile data (counter ?time_profiler?) [-Werror=coverage-mismatch] Objects/boolobject.c: In function ?bool_and?: Objects/boolobject.c:185:1: error: the control flow of function ?bool_and? does not match its profile data (counter ?arcs?) [-Werror=coverage-mismatch] Objects/boolobject.c:185:1: error: the control flow of function ?bool_and? does not match its profile data (counter ?indirect_call?) [-Werror=coverage-mismatch] Objects/boolobject.c:185:1: error: the control flow of function ?bool_and? does not match its profile data (counter ?time_profiler?) [-Werror=coverage-mismatch] Objects/boolobject.c: In function ?bool_new?: Objects/boolobject.c:185:1: error: the control flow of function ?bool_new? does not match its profile data (counter ?arcs?) [-Werror=coverage-mismatch] Objects/boolobject.c:185:1: error: the control flow of function ?bool_new? does not match its profile data (counter ?time_profiler?) [-Werror=coverage-mismatch] gcc -pthread -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fprofile-use -fprofile-correction -I. -I./Include -fPIC -DPy_BUILD_CORE -o Objects/bytearrayobject.o Objects/bytearrayobject.c cc1: some warnings being treated as errors Makefile:1652: recipe for target 'Objects/boolobject.o' failed make[1]: *** [Objects/boolobject.o] Error 1 make[1]: *** Waiting for unfinished jobs.... Objects/abstract.c: In function ?PyObject_GetIter?: Objects/abstract.c:2642:1: error: the control flow of function ?PyObject_GetIter? does not match its profile data (counter ?arcs?) [-Werror=coverage-mismatch] } ^ Objects/abstract.c:2642:1: error: the control flow of function ?PyObject_GetIter? does not match its profile data (counter ?indirect_call?) [-Werror=coverage-mismatch] Objects/abstract.c:2642:1: error: the control flow of function ?PyObject_GetIter? does not match its profile data (counter ?time_profiler?) [-Werror=coverage-mismatch] Objects/abstract.c: In function ?PySequence_InPlaceRepeat?: Objects/abstract.c:2642:1: error: the control flow of function ?PySequence_InPlaceRepeat? does not match its profile data (counter ?arcs?) [-Werror=coverage-mismatch] Objects/abstract.c:2642:1: error: the control flow of function ?PySequence_InPlaceRepeat? does not match its profile data (counter ?indirect_call?) [-Werror=coverage-mismatch] Objects/abstract.c:2642:1: error: the control flow of function ?PySequence_InPlaceRepeat? does not match its profile data (counter ?time_profiler?) [-Werror=coverage-mismatch] Objects/abstract.c: In function ?PySequence_InPlaceConcat?: Objects/abstract.c:2642:1: error: the control flow of function ?PySequence_InPlaceConcat? does not match its profile data (counter ?arcs?) [-Werror=coverage-mismatch] Objects/abstract.c:2642:1: error: the control flow of function ?PySequence_InPlaceConcat? does not match its profile data (counter ?indirect_call?) [-Werror=coverage-mismatch] Objects/abstract.c:2642:1: error: the control flow of function ?PySequence_InPlaceConcat? does not match its profile data (counter ?time_profiler?) [-Werror=coverage-mismatch] Objects/abstract.c: In function ?PySequence_Repeat?: Objects/abstract.c:2642:1: error: the control flow of function ?PySequence_Repeat? does not match its profile data (counter ?arcs?) [-Werror=coverage-mismatch] Objects/abstract.c:2642:1: error: the control flow of function ?PySequence_Repeat? does not match its profile data (counter ?indirect_call?) [-Werror=coverage-mismatch] Objects/abstract.c:2642:1: error: the control flow of function ?PySequence_Repeat? does not match its profile data (counter ?time_profiler?) [-Werror=coverage-mismatch] Objects/abstract.c: In function ?PySequence_Concat?: Objects/abstract.c:2642:1: error: the control flow of function ?PySequence_Concat? does not match its profile data (counter ?arcs?) [-Werror=coverage-mismatch] Objects/abstract.c:2642:1: error: the control flow of function ?PySequence_Concat? does not match its profile data (counter ?indirect_call?) [-Werror=coverage-mismatch] Objects/abstract.c:2642:1: error: the control flow of function ?PySequence_Concat? does not match its profile data (counter ?time_profiler?) [-Werror=coverage-mismatch] Objects/abstract.c: In function ?PyObject_CopyData?: Objects/abstract.c:2642:1: error: the control flow of function ?PyObject_CopyData? does not match its profile data (counter ?arcs?) [-Werror=coverage-mismatch] Objects/abstract.c:2642:1: error: the control flow of function ?PyObject_CopyData? does not match its profile data (counter ?time_profiler?) [-Werror=coverage-mismatch] Objects/abstract.c: In function ?PyObject_LengthHint?: Objects/abstract.c:2642:1: error: the control flow of function ?PyObject_LengthHint? does not match its profile data (counter ?arcs?) [-Werror=coverage-mismatch] Objects/abstract.c:2642:1: error: the control flow of function ?PyObject_LengthHint? does not match its profile data (counter ?indirect_call?) [-Werror=coverage-mismatch] Objects/abstract.c:2642:1: error: the control flow of function ?PyObject_LengthHint? does not match its profile data (counter ?time_profiler?) [-Werror=coverage-mismatch] cc1: some warnings being treated as errors Makefile:1652: recipe for target 'Parser/tokenizer.o' failed make[1]: *** [Parser/tokenizer.o] Error 1 cc1: some warnings being treated as errors Makefile:1652: recipe for target 'Objects/abstract.o' failed make[1]: *** [Objects/abstract.o] Error 1 make[1]: Leaving directory '/home/ion/Documents/Python-3.7.7' Makefile:534: recipe for target 'profile-opt' failed make: *** [profile-opt] Error 2 ``` what should i do to fix this? thank you very much. best regards, Albert Christianto ---------- nosy: +albertchristianto1994 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 05:18:47 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 09:18:47 +0000 Subject: [issue39976] Add "**other_popen_kwargs" to subprocess API signatures in docs In-Reply-To: <1584345163.73.0.77779853177.issue39976@roundup.psfhosted.org> Message-ID: <1589879927.24.0.93919472243.issue39976@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +19506 pull_request: https://github.com/python/cpython/pull/20210 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 05:18:56 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 09:18:56 +0000 Subject: [issue39976] Add "**other_popen_kwargs" to subprocess API signatures in docs In-Reply-To: <1584345163.73.0.77779853177.issue39976@roundup.psfhosted.org> Message-ID: <1589879936.56.0.962466375586.issue39976@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19507 pull_request: https://github.com/python/cpython/pull/20211 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 05:28:03 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 19 May 2020 09:28:03 +0000 Subject: [issue39976] Add "**other_popen_kwargs" to subprocess API signatures in docs In-Reply-To: <1584345163.73.0.77779853177.issue39976@roundup.psfhosted.org> Message-ID: <1589880483.37.0.837115331972.issue39976@roundup.psfhosted.org> Chris Jerdonek added the comment: New changeset 257e11cebde6b29177a206abd1e395367799ed42 by Miss Islington (bot) in branch '3.8': bpo-39976: Add **other_popen_kwargs to subprocess docs (GH-20145) https://github.com/python/cpython/commit/257e11cebde6b29177a206abd1e395367799ed42 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 05:28:26 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 19 May 2020 09:28:26 +0000 Subject: [issue39976] Add "**other_popen_kwargs" to subprocess API signatures in docs In-Reply-To: <1584345163.73.0.77779853177.issue39976@roundup.psfhosted.org> Message-ID: <1589880505.99.0.442201776072.issue39976@roundup.psfhosted.org> Chris Jerdonek added the comment: New changeset 05525fff8a46f4d479cc029e4ea57b35b153f015 by Miss Islington (bot) in branch '3.7': bpo-39976: Add **other_popen_kwargs to subprocess docs (GH-20145) https://github.com/python/cpython/commit/05525fff8a46f4d479cc029e4ea57b35b153f015 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 05:43:37 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 09:43:37 +0000 Subject: [issue32309] Implement asyncio.run_in_executor shortcut In-Reply-To: <1513194861.88.0.213398074469.issue32309@psf.upfronthosting.co.za> Message-ID: <1589881417.44.0.484581815358.issue32309@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19508 pull_request: https://github.com/python/cpython/pull/20212 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 06:03:29 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 10:03:29 +0000 Subject: [issue32309] Implement asyncio.run_in_executor shortcut In-Reply-To: <1513194861.88.0.213398074469.issue32309@psf.upfronthosting.co.za> Message-ID: <1589882609.13.0.596601950532.issue32309@roundup.psfhosted.org> miss-islington added the comment: New changeset e2991308c9b49547d9762157ac913dda94b5eb32 by Miss Islington (bot) in branch '3.9': bpo-32309: Implement asyncio.to_thread() (GH-20143) https://github.com/python/cpython/commit/e2991308c9b49547d9762157ac913dda94b5eb32 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 06:17:56 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 19 May 2020 10:17:56 +0000 Subject: [issue40124] Clearer assertion error In-Reply-To: <1585654498.8.0.880221845215.issue40124@roundup.psfhosted.org> Message-ID: <1589883476.72.0.363639455337.issue40124@roundup.psfhosted.org> Chris Jerdonek added the comment: How about we review Phil's PR, which adds a message to the assertion. And then we can keep this issue open to discuss converting the assertion to an exception. I think Phil's PR is an improvement. ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 06:33:58 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 19 May 2020 10:33:58 +0000 Subject: [issue37616] [3.10 prep] zip path incorrect In-Reply-To: <1563432035.85.0.841643784863.issue37616@roundup.psfhosted.org> Message-ID: <1589884438.45.0.875501127304.issue37616@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal nosy_count: 2.0 -> 3.0 pull_requests: +19509 pull_request: https://github.com/python/cpython/pull/20214 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 06:59:25 2020 From: report at bugs.python.org (Shani Armon) Date: Tue, 19 May 2020 10:59:25 +0000 Subject: [issue40509] In argparse, allow REMAINDER(...) arguments in a mutually exclusive group In-Reply-To: <1588674644.49.0.299540849008.issue40509@roundup.psfhosted.org> Message-ID: <1589885965.82.0.325951086578.issue40509@roundup.psfhosted.org> Shani Armon added the comment: Bumping, since no reply was made to my previous comment. If this is not relevant at all can this be closed or marked as such, so that it may be raised in python-dev? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 07:45:46 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 19 May 2020 11:45:46 +0000 Subject: [issue40452] Tkinter/IDLE: preserve clipboard on closure In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1589888746.0.0.683401870738.issue40452@roundup.psfhosted.org> Terry J. Reedy added the comment: I ran your tkinter code on Windows, without IDLE, and the clipboard was clear thereafter. I added 'test.mainloop()' and observed the following. 1. Close immediately, clipboard is clear, as before. 2. Paste 'Testing again' into 'text' with ^V and close, and clipboard is still clear. 3. Paste elsewhere (here, Command Prompt, or IDLE), close, and 'Testing again' can be pasted anywhere. 4. When I run from an IDLE editor, paste into the editor (which in running in the IDLE process rather than the user process where the test code is running, and close, 'Testing again' remains on the clipboard. It appears that either a. tkinter clear the clipboard unless pasted into another process, or b. tkinter (or tk) always clears the clipboard on exit and it is gone unless pulled out of the process first by pasting elsewhere. The best option is for this to be fixed. The example codes are not quite equivalent. Tkinter clipboard_clear and _append call self.tk.call with the equivalent arguments *plus*, self._options({'displayof':text._w}) == ('-displayof', '.!text') However, commenting out the addition had no visible effect. ---------- components: +Tkinter stage: patch review -> needs patch title: IDLE: preserve clipboard on closure -> Tkinter/IDLE: preserve clipboard on closure _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 07:49:51 2020 From: report at bugs.python.org (Michael Felt) Date: Tue, 19 May 2020 11:49:51 +0000 Subject: [issue40680] thread_cputime isn't supported by AIX5 Message-ID: <1589888991.61.0.317317587375.issue40680@roundup.psfhosted.org> New submission from Michael Felt : issue40192 introduced the use of nanosecond reporting of time. The new routine called is not available in AIX 5.3: xlc_r -O -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 -O -I../git/python-3.9/Include/internal -IObjects -IInclude -IPython -I. -I../git/python-3.9/Include -I/opt/include -DPy_BUILD_CORE_BUILTIN -DPy_BUILD_CORE_BUILTIN -I../git/python-3.9/Include/internal -c ../git/python-3.9/Modules/timemodule.c -o Modules/timemodule.o "../git/python-3.9/Modules/timemodule.c", line 1358.22: 1506-275 (S) Unexpected text tc encountered. "../git/python-3.9/Modules/timemodule.c", line 1358.5: 1506-045 (S) Undeclared identifier thread_cputime_t. "../git/python-3.9/Modules/timemodule.c", line 1359.29: 1506-045 (S) Undeclared identifier tc. "../git/python-3.9/Modules/timemodule.c", line 1861.19: 1506-196 (W) Initialization between types "void*" and "int(*)(struct _object*)" is not allowed. make: 1254-004 The error code from the last command is 1. ---------- components: Build, Library (Lib) messages: 369335 nosy: Michael.Felt priority: normal severity: normal status: open title: thread_cputime isn't supported by AIX5 versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 07:57:44 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 19 May 2020 11:57:44 +0000 Subject: [issue40680] thread_cputime isn't supported by AIX5 In-Reply-To: <1589888991.61.0.317317587375.issue40680@roundup.psfhosted.org> Message-ID: <1589889464.32.0.526668819348.issue40680@roundup.psfhosted.org> Batuhan Taskaya added the comment: Does AIX 5.3 officially supported by IBM? As far as I can locate, it is deprecated long time ago. ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 07:59:21 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 19 May 2020 11:59:21 +0000 Subject: [issue40680] thread_cputime isn't supported by AIX5 In-Reply-To: <1589888991.61.0.317317587375.issue40680@roundup.psfhosted.org> Message-ID: <1589889561.84.0.872392566081.issue40680@roundup.psfhosted.org> Batuhan Taskaya added the comment: My source: https://www.ibm.com/support/pages/aix-support-lifecycle-information ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 08:20:43 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 19 May 2020 12:20:43 +0000 Subject: [issue39631] Fix file association MIME type on Windows In-Reply-To: <1581670182.52.0.370257427786.issue39631@roundup.psfhosted.org> Message-ID: <1589890843.78.0.0973950495927.issue39631@roundup.psfhosted.org> Steve Dower added the comment: New changeset 8c862e51248c5ebfec787badec88eb58c9267e1e by Zackery Spytz in branch 'master': bpo-39631: Fix file association MIME type in the Windows installer (GH-20205) https://github.com/python/cpython/commit/8c862e51248c5ebfec787badec88eb58c9267e1e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 08:20:40 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 19 May 2020 12:20:40 +0000 Subject: [issue40452] Tkinter/IDLE: preserve clipboard on closure In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1589890840.64.0.822454814906.issue40452@roundup.psfhosted.org> Tal Einat added the comment: Note that Tcl/Tk once had exactly the same issue on Windows, and they added specific code to "render" to the clipboard upon exit if the current app is the "clipboard owner". https://core.tcl-lang.org/tk/tktview/732662 This was fixed here: https://core.tcl-lang.org/tk/tktview/939389 Note that Tcl/Tk has separate OS-specific implementations of "TkClipCleanup" for Windows, macOS and "Unix". https://github.com/tcltk/tk/search?q=TkClipCleanup This only appears to be called by TkCloseDisplay, which is turn is never called elsewhere in the Tk codebase. tkinter never appears to call either of those functions. Perhaps this is the core issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 08:20:49 2020 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 19 May 2020 12:20:49 +0000 Subject: [issue38787] PEP 573: Module State Access from C Extension Methods In-Reply-To: <1573655440.57.0.563143759574.issue38787@roundup.psfhosted.org> Message-ID: <1589890849.05.0.277290127126.issue38787@roundup.psfhosted.org> Change by Petr Viktorin : ---------- pull_requests: +19510 pull_request: https://github.com/python/cpython/pull/20215 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 08:20:57 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 12:20:57 +0000 Subject: [issue39631] Fix file association MIME type on Windows In-Reply-To: <1581670182.52.0.370257427786.issue39631@roundup.psfhosted.org> Message-ID: <1589890857.09.0.848730717585.issue39631@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +19511 pull_request: https://github.com/python/cpython/pull/20216 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 08:22:19 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 19 May 2020 12:22:19 +0000 Subject: [issue40677] IO_REPARSE_TAG_APPEXECLINK is not defined in old Windows SDK In-Reply-To: <1589861296.48.0.956665413821.issue40677@roundup.psfhosted.org> Message-ID: <1589890939.69.0.561099460616.issue40677@roundup.psfhosted.org> Steve Dower added the comment: New changeset 711f9e180a48baba62301735b7f1a58ef0d0e93a by Minmin Gong in branch 'master': bpo-40677: Define IO_REPARSE_TAG_APPEXECLINK explicitly (GH-20206) https://github.com/python/cpython/commit/711f9e180a48baba62301735b7f1a58ef0d0e93a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 08:22:30 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 12:22:30 +0000 Subject: [issue40677] IO_REPARSE_TAG_APPEXECLINK is not defined in old Windows SDK In-Reply-To: <1589861296.48.0.956665413821.issue40677@roundup.psfhosted.org> Message-ID: <1589890950.35.0.379839375186.issue40677@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +19512 pull_request: https://github.com/python/cpython/pull/20217 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 08:22:37 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 12:22:37 +0000 Subject: [issue40677] IO_REPARSE_TAG_APPEXECLINK is not defined in old Windows SDK In-Reply-To: <1589861296.48.0.956665413821.issue40677@roundup.psfhosted.org> Message-ID: <1589890957.7.0.943802663549.issue40677@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19513 pull_request: https://github.com/python/cpython/pull/20218 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 08:22:33 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 19 May 2020 12:22:33 +0000 Subject: [issue33065] IDLE debugger: failure stepping through module loading In-Reply-To: <1520917336.65.0.467229070634.issue33065@psf.upfronthosting.co.za> Message-ID: <1589890953.49.0.611910232396.issue33065@roundup.psfhosted.org> Terry J. Reedy added the comment: SO duplicate. https://stackoverflow.com/questions/61310989/python-idle-importing-xlrd-error-generated-in-debug-mode-attributeerror-mo ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 08:23:12 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 12:23:12 +0000 Subject: [issue39631] Fix file association MIME type on Windows In-Reply-To: <1581670182.52.0.370257427786.issue39631@roundup.psfhosted.org> Message-ID: <1589890992.44.0.422095584537.issue39631@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19515 pull_request: https://github.com/python/cpython/pull/20220 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 08:23:02 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 12:23:02 +0000 Subject: [issue39631] Fix file association MIME type on Windows In-Reply-To: <1581670182.52.0.370257427786.issue39631@roundup.psfhosted.org> Message-ID: <1589890982.63.0.293305399162.issue39631@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19514 pull_request: https://github.com/python/cpython/pull/20219 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 08:25:32 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 19 May 2020 12:25:32 +0000 Subject: [issue39631] Fix file association MIME type on Windows In-Reply-To: <1581670182.52.0.370257427786.issue39631@roundup.psfhosted.org> Message-ID: <1589891132.06.0.754016663935.issue39631@roundup.psfhosted.org> Steve Dower added the comment: Actually, now that I've gone and hit merge, I've changed my mind about the NEWS entry. I'll add it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 08:25:54 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 19 May 2020 12:25:54 +0000 Subject: [issue40677] IO_REPARSE_TAG_APPEXECLINK is not defined in old Windows SDK In-Reply-To: <1589861296.48.0.956665413821.issue40677@roundup.psfhosted.org> Message-ID: <1589891154.53.0.165605491082.issue40677@roundup.psfhosted.org> Steve Dower added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 08:39:14 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 12:39:14 +0000 Subject: [issue40677] IO_REPARSE_TAG_APPEXECLINK is not defined in old Windows SDK In-Reply-To: <1589861296.48.0.956665413821.issue40677@roundup.psfhosted.org> Message-ID: <1589891954.0.0.164988683966.issue40677@roundup.psfhosted.org> miss-islington added the comment: New changeset 560d6436611900bc23d3dd1158acbe6fa39b2c9b by Miss Islington (bot) in branch '3.8': bpo-40677: Define IO_REPARSE_TAG_APPEXECLINK explicitly (GH-20206) https://github.com/python/cpython/commit/560d6436611900bc23d3dd1158acbe6fa39b2c9b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 08:39:23 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 12:39:23 +0000 Subject: [issue39631] Fix file association MIME type on Windows In-Reply-To: <1581670182.52.0.370257427786.issue39631@roundup.psfhosted.org> Message-ID: <1589891963.63.0.0282811486791.issue39631@roundup.psfhosted.org> miss-islington added the comment: New changeset c06983bc30e02700552c91be45559ca27fabc08e by Miss Islington (bot) in branch '3.9': bpo-39631: Fix file association MIME type in the Windows installer (GH-20205) https://github.com/python/cpython/commit/c06983bc30e02700552c91be45559ca27fabc08e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 08:40:31 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 12:40:31 +0000 Subject: [issue40677] IO_REPARSE_TAG_APPEXECLINK is not defined in old Windows SDK In-Reply-To: <1589861296.48.0.956665413821.issue40677@roundup.psfhosted.org> Message-ID: <1589892031.38.0.927927471957.issue40677@roundup.psfhosted.org> miss-islington added the comment: New changeset 76d9a9cdc11c7b0153f9717d6edd1b681d5d1da5 by Miss Islington (bot) in branch '3.9': bpo-40677: Define IO_REPARSE_TAG_APPEXECLINK explicitly (GH-20206) https://github.com/python/cpython/commit/76d9a9cdc11c7b0153f9717d6edd1b681d5d1da5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 08:41:15 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 12:41:15 +0000 Subject: [issue39631] Fix file association MIME type on Windows In-Reply-To: <1581670182.52.0.370257427786.issue39631@roundup.psfhosted.org> Message-ID: <1589892075.72.0.17534132013.issue39631@roundup.psfhosted.org> miss-islington added the comment: New changeset 076da79bc75b9aac8b7bc9685253fa7162c25698 by Miss Islington (bot) in branch '3.7': bpo-39631: Fix file association MIME type in the Windows installer (GH-20205) https://github.com/python/cpython/commit/076da79bc75b9aac8b7bc9685253fa7162c25698 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 08:42:59 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 12:42:59 +0000 Subject: [issue39631] Fix file association MIME type on Windows In-Reply-To: <1581670182.52.0.370257427786.issue39631@roundup.psfhosted.org> Message-ID: <1589892179.92.0.619930957117.issue39631@roundup.psfhosted.org> miss-islington added the comment: New changeset 46fc3ec056ff7ce65e9b96f14bd0b06aa1d0c62d by Miss Islington (bot) in branch '3.8': bpo-39631: Fix file association MIME type in the Windows installer (GH-20205) https://github.com/python/cpython/commit/46fc3ec056ff7ce65e9b96f14bd0b06aa1d0c62d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 08:43:30 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 19 May 2020 12:43:30 +0000 Subject: [issue40681] shelve.open() should accept pathlib.Path Message-ID: <1589892210.12.0.905216269999.issue40681@roundup.psfhosted.org> New submission from R?mi Lapeyre : This should target Python3.10, current behavior is: Python 3.10.0a0 (heads/master:19e3e00264, May 19 2020, 14:40:31) [Clang 11.0.3 (clang-1103.0.32.29)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import shelve, pathlib >>> shelve.open(pathlib.Path('spam')) Traceback (most recent call last): File "", line 1, in File "/Users/remi/src/cpython/Lib/shelve.py", line 243, in open return DbfilenameShelf(filename, flag, protocol, writeback) File "/Users/remi/src/cpython/Lib/shelve.py", line 227, in __init__ Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback) File "/Users/remi/src/cpython/Lib/dbm/__init__.py", line 78, in open result = whichdb(file) if 'n' not in flag else None File "/Users/remi/src/cpython/Lib/dbm/__init__.py", line 113, in whichdb f = io.open(filename + ".pag", "rb") TypeError: unsupported operand type(s) for +: 'PosixPath' and 'str' >>> ---------- components: Library (Lib) messages: 369349 nosy: remi.lapeyre priority: normal severity: normal status: open title: shelve.open() should accept pathlib.Path type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 08:44:58 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 19 May 2020 12:44:58 +0000 Subject: [issue40681] shelve.open() should accept pathlib.Path In-Reply-To: <1589892210.12.0.905216269999.issue40681@roundup.psfhosted.org> Message-ID: <1589892298.75.0.505861427542.issue40681@roundup.psfhosted.org> Batuhan Taskaya added the comment: Duplicate of bpo-40563 ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 08:58:31 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 May 2020 12:58:31 +0000 Subject: [issue31963] AMD64 Debian PGO 3.x buildbot: compilation failed with an internal compiler error in create_edge In-Reply-To: <1510005461.16.0.213398074469.issue31963@psf.upfronthosting.co.za> Message-ID: <1589893111.4.0.465574493741.issue31963@roundup.psfhosted.org> STINNER Victor added the comment: > I need help for compiling and building Python-3.7.7. My system is Ubuntu 16.04 LTS, gcc 5.4.0 20160609 You have different options: * Upgrade Ubuntu to the newer LTS to get a more recent C compiler * Don't use PGO Also, you might use a pre-built package rather than build Python yourself? See https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 08:59:19 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 19 May 2020 12:59:19 +0000 Subject: [issue40681] shelve.open() should accept pathlib.Path In-Reply-To: <1589892210.12.0.905216269999.issue40681@roundup.psfhosted.org> Message-ID: <1589893159.78.0.289850088438.issue40681@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Support pathlike objects on dbm/shelve _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 08:52:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 May 2020 12:52:52 +0000 Subject: [issue37616] [3.10 prep] zip path incorrect In-Reply-To: <1563432035.85.0.841643784863.issue37616@roundup.psfhosted.org> Message-ID: <1589892772.81.0.769319553059.issue37616@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner nosy_count: 3.0 -> 4.0 pull_requests: +19516 pull_request: https://github.com/python/cpython/pull/20225 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 09:19:23 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 May 2020 13:19:23 +0000 Subject: [issue1294959] Add sys.platlibdir to use /usr/lib64 on Fedora and SuSE Message-ID: <1589894363.12.0.0928207748304.issue1294959@roundup.psfhosted.org> STINNER Victor added the comment: If you don't use the new --with-platlibdir configuration option, Python 3.9 behaves exactly as Python 3.8: there is zero change. Python 3.9 only builds a different sys.path if sys.platlibdir is different than "lib". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 09:21:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 May 2020 13:21:12 +0000 Subject: [issue39026] pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure In-Reply-To: <1576078444.86.0.577960577024.issue39026@roundup.psfhosted.org> Message-ID: <1589894472.65.0.389419404904.issue39026@roundup.psfhosted.org> STINNER Victor added the comment: > 2. Remove cpython/initconfig.h from cpython/pystate.h Let's start with that and see if it's enough to fix the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 09:37:42 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 19 May 2020 13:37:42 +0000 Subject: [issue40667] [Windows] Add global python and python3 commands In-Reply-To: <1589792809.51.0.970244169965.issue40667@roundup.psfhosted.org> Message-ID: <1589895462.7.0.322954286204.issue40667@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +19517 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20226 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 09:44:16 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 19 May 2020 13:44:16 +0000 Subject: [issue39631] Fix file association MIME type on Windows In-Reply-To: <1581670182.52.0.370257427786.issue39631@roundup.psfhosted.org> Message-ID: <1589895856.64.0.0556091832642.issue39631@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +19518 pull_request: https://github.com/python/cpython/pull/20227 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 10:03:36 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 May 2020 14:03:36 +0000 Subject: [issue40514] [subinterpreters] Add --experimental-isolated-subinterpreters build option In-Reply-To: <1588684431.91.0.693668036583.issue40514@roundup.psfhosted.org> Message-ID: <1589897016.87.0.949343836162.issue40514@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19519 pull_request: https://github.com/python/cpython/pull/20228 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 10:16:24 2020 From: report at bugs.python.org (=?utf-8?b?TWljaGHFgiBHw7Nybnk=?=) Date: Tue, 19 May 2020 14:16:24 +0000 Subject: [issue1294959] Add sys.platlibdir to use /usr/lib64 on Fedora and SuSE Message-ID: <1589897784.06.0.103157986933.issue1294959@roundup.psfhosted.org> Micha? G?rny added the comment: Can we clarify the wording to clearly indicate it's to be used only for Python modules/extensions and not system dynamic libs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 10:25:15 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 19 May 2020 14:25:15 +0000 Subject: [issue40668] Catastrophic loss of precision in colorsys module In-Reply-To: <1589793027.58.0.382499292423.issue40668@roundup.psfhosted.org> Message-ID: <1589898315.17.0.321556471517.issue40668@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is correct. Colorspaces for RGB an YIQ are different. Not all RGB colors can be represented in YIQ and vice versa. For YIQ color (0, 1, 0) you need RGB color (0.9468822170900693, -0.27478764629897834, -1.1085450346420322), but the G and B components are out of the range [0, 1]. So yiq_to_rgb() returns the closes RGB color to the original code, and it is (0.9468822170900693, 0, 0). It is the best that you can get. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 10:32:55 2020 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 19 May 2020 14:32:55 +0000 Subject: [issue40683] Beta release does not distribute zoneinfo Message-ID: <1589898775.24.0.801857102039.issue40683@roundup.psfhosted.org> New submission from Paul Ganssle : Apparently something is wrong with make install for beta 1 and the `zoneinfo` module is not installed with it (only _zoneinfo). When I run a local build `./python -c "import zoneinfo"` works, but when I do `make install` I get ImportError: $ bin/python3 -c "import zoneinfo" Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'zoneinfo' I assume this wasn't caught earlier because Lib/test/test_zoneinfo is *also* not being installed. The C extension, _zoneinfo, is installed properly. I don't know if it is working on Windows. ---------- assignee: p-ganssle messages: 369357 nosy: lukasz.langa, p-ganssle priority: critical severity: normal stage: needs patch status: open title: Beta release does not distribute zoneinfo type: compile error versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 10:32:46 2020 From: report at bugs.python.org (Micah R Ledbetter) Date: Tue, 19 May 2020 14:32:46 +0000 Subject: [issue40682] random.Random.seed() with version=1 does not consistently match Python 2 behavior Message-ID: <1589898766.59.0.355441549613.issue40682@roundup.psfhosted.org> New submission from Micah R Ledbetter : When using the random.Random class, using the .seed() method with version=1 does not always reproduce the same results as the .seed() method did in Python 2. >From the docs, I did expect this, but on closer inspection, I can't tell whether I made a bad assumption or whether there is a bug in the module. The docs state an intention of compatibility with older versions of Python: https://docs.python.org/3.9/library/random.html#notes-on-reproducibility > Most of the random module?s algorithms and seeding functions are subject to change across Python versions, but two aspects are guaranteed not to change: > > If a new seeding method is added, then a backward compatible seeder will be offered. > > The generator?s random() method will continue to produce the same sequence when the compatible seeder is given the same seed. It's not clear from the docstring in the code whether this is intended to cover Python 2.7 behavior: https://github.com/python/cpython/blob/3.9/Lib/random.py#L134 > For version 2 (the default), all of the bits are used if *a* is a str, > bytes, or bytearray. For version 1 (provided for reproducing random > sequences from older versions of Python), the algorithm for str and > bytes generates a narrower range of seeds. But the results I've spot checked sometimes do match the Python 2 results, and sometimes are the Python 2 result +1. I wrote a python script that calls the .seed() method with version=1 under Python 3, and without a version= argument under Python 2. It uses a wordlist I happen to have in /usr/share/dict that I copied to $PWD. #!/usr/bin/env python import os, random, sys mydir = os.path.dirname(os.path.abspath(__file__)) r = random.Random() maxidx = None with open('{}/web2'.format(mydir)) as webdict: for idx, raw_word in enumerate(webdict.readlines()): word = raw_word.strip() if sys.version_info[0] == 2: r.seed(word) elif sys.version_info[0] == 3: r.seed(word, version=1) else: raise Exception("Unexpected python version") print("{}: {}".format(word, r.randrange(0, 65535, 1))) if maxidx != None and idx >= maxidx: break I also wrote a shell script to run my Python script with the Python versions I happen to have installed locally, along with Python 2.7 and 3.4-3.9 in the ci-image Docker container linked from the Python download page. #!/bin/sh set -eux mkdir -p results /usr/bin/python test.py > results/macos10.15.4.system.python2.7.16 /Library/Frameworks/Python.framework/Versions/3.8/bin/python3 test.py > results/macos10.15.4.system.python3.8.2 docker run -v $PWD:/testpy:rw -u root -it --rm quay.io/python-devs/ci-image sh -c 'python3.9 /testpy/test.py > /testpy/results/ci-image.python3.9' docker run -v $PWD:/testpy:rw -u root -it --rm quay.io/python-devs/ci-image sh -c 'python3.8 /testpy/test.py > /testpy/results/ci-image.python3.8' docker run -v $PWD:/testpy:rw -u root -it --rm quay.io/python-devs/ci-image sh -c 'python3.7 /testpy/test.py > /testpy/results/ci-image.python3.7' docker run -v $PWD:/testpy:rw -u root -it --rm quay.io/python-devs/ci-image sh -c 'python3.6 /testpy/test.py > /testpy/results/ci-image.python3.6' docker run -v $PWD:/testpy:rw -u root -it --rm quay.io/python-devs/ci-image sh -c 'python3.5 /testpy/test.py > /testpy/results/ci-image.python3.5' docker run -v $PWD:/testpy:rw -u root -it --rm quay.io/python-devs/ci-image sh -c 'python2.7 /testpy/test.py > /testpy/results/ci-image.python2.7' I've made a github repo that contains both scripts and the results: https://github.com/mrled/random-Random-seed-version-testing I ran the script on my Mac, which means I used the system installed Python binaries that came with macOS x86_64, but the ci-image Python versions are running under an x86_64 Linux virtual machine (because of how Docker for Mac works). To summarize the results: * The Python 2.7 on my Mac works the same as the Python 2.7 on the ci-image * The Python 3.8 on my Mac works the same as Pythons 3.5-3.9 on the ci-image * Python 3.4 is different from both (although it is now unsupported anyway) A sample of the results. I haven't programmatically analyzed them, but from my spot checks, they all appear to be like this: > head results.ci-image.python2.7 | > head results.ci-image.python3.9 A: 8866 | A: 8867 a: 56458 | a: 56459 aa: 29724 | aa: 29724 aal: 11248 | aal: 11248 aalii: 16623 | aalii: 16623 aam: 62302 | aam: 62303 Aani: 31381 | Aani: 31381 aardvark: 6397 | aardvark: 6397 aardwolf: 32525 | aardwolf: 32526 Aaron: 32019 | Aaron: 32019 ---------- components: Library (Lib) messages: 369356 nosy: mrled priority: normal severity: normal status: open title: random.Random.seed() with version=1 does not consistently match Python 2 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 May 19 10:39:22 2020 From: report at bugs.python.org (John Levon) Date: Tue, 19 May 2020 14:39:22 +0000 Subject: [issue37790] subprocess.Popen() is sometimes slower in python3 under illumos In-Reply-To: <1565210160.36.0.538688157223.issue37790@roundup.psfhosted.org> Message-ID: <1589899162.07.0.821078734824.issue37790@roundup.psfhosted.org> John Levon added the comment: I checked, and the supposition this is due to lack of closefrom() doesn't seem to be correct. Running the test case and looking at 'truss' output, there is no large number of close() that one would expect if this was the issue. I don't see Alexander's 2-time speedup however: root at piano:/export/src/cpython# /export/python3/bin/python3 ./1.py 11.679689645767212 root at piano:/export/src/cpython# vi 1.p^C root at piano:/export/src/cpython# /export/python3/bin/python3 ./1.py foo 10.402687549591064 root at piano:/export/src/cpython# python2.7 ./1.py 10.0434100628 Any difference doesn't seem to be distinguishable from noise on my system. If I run this: from __future__ import print_function import os import sys import time def getoutput(cmd): # Hand-crafted variant if len(sys.argv) >1: import shlex, tempfile f, fpath = tempfile.mkstemp() status = os.system("{ " + cmd + "; } >" + shlex.quote(fpath) + " 2>&1") with os.fdopen(f, "r") as tfile: output = tfile.read() os.unlink(fpath) if output[-1:] == '\n': output = output[:-1] return output else: import subprocess p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=None, close_fds=True) return p.communicate()[0] t = time.time() for file in getoutput("find /usr/bin -type f 2>/dev/null").decode().split('\n'): diff = getoutput("/usr/bin/objdump '%s' 2>/dev/null" % file) then I get more variation than can be measured by changing close_fds. Running something similar (no decode()) under python 2.7 is *slower* than python3. So, something other than closefrom() is going on here. ---------- title: subprocess.Popen() is extremely slow (with close_fds=True which is the default) on Illumos -> subprocess.Popen() is sometimes slower in python3 under illumos _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 10:41:22 2020 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 19 May 2020 14:41:22 +0000 Subject: [issue40683] Beta release does not distribute zoneinfo In-Reply-To: <1589898775.24.0.801857102039.issue40683@roundup.psfhosted.org> Message-ID: <1589899282.0.0.710376427369.issue40683@roundup.psfhosted.org> Paul Ganssle added the comment: I think I found the problem: these directories are not included in the Makefile.pre.in LIBSUBDIRS variable: https://github.com/python/cpython/blob/a355a06fcc7ef2232736dceb012ae623335cd7ab/Makefile.pre.in#L1373 PR incoming. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 10:42:28 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 19 May 2020 14:42:28 +0000 Subject: [issue40682] random.Random.seed() with version=1 does not consistently match Python 2 behavior In-Reply-To: <1589898766.59.0.355441549613.issue40682@roundup.psfhosted.org> Message-ID: <1589899348.81.0.774427109558.issue40682@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +mark.dickinson, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 10:43:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 May 2020 14:43:49 +0000 Subject: [issue1294959] Add sys.platlibdir to use /usr/lib64 on Fedora and SuSE Message-ID: <1589899429.82.0.764979405899.issue1294959@roundup.psfhosted.org> STINNER Victor added the comment: > Can we clarify the wording to clearly indicate it's to be used only for Python modules/extensions and not system dynamic libs? Sure. Can you please propose a different wording? English is not my first language. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 10:44:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 May 2020 14:44:58 +0000 Subject: [issue40683] Beta release does not distribute zoneinfo In-Reply-To: <1589898775.24.0.801857102039.issue40683@roundup.psfhosted.org> Message-ID: <1589899498.03.0.83911843397.issue40683@roundup.psfhosted.org> STINNER Victor added the comment: FYI my notes about adding new files and directories in Python: https://pythondev.readthedocs.io/files.html ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 10:45:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 May 2020 14:45:04 +0000 Subject: [issue40683] Beta release does not distribute test_zoneinfo In-Reply-To: <1589898775.24.0.801857102039.issue40683@roundup.psfhosted.org> Message-ID: <1589899504.27.0.568330497653.issue40683@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Beta release does not distribute zoneinfo -> Beta release does not distribute test_zoneinfo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 10:52:18 2020 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 19 May 2020 14:52:18 +0000 Subject: [issue40683] Beta release does not distribute test_zoneinfo In-Reply-To: <1589898775.24.0.801857102039.issue40683@roundup.psfhosted.org> Message-ID: <1589899938.47.0.56046365667.issue40683@roundup.psfhosted.org> Change by Paul Ganssle : ---------- keywords: +patch pull_requests: +19520 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20229 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 10:56:18 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 May 2020 14:56:18 +0000 Subject: [issue1294959] Add sys.platlibdir and configure --with-platlibdir to use /usr/lib64 on Fedora and SuSE Message-ID: <1589900178.76.0.247267799248.issue1294959@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Add sys.platlibdir to use /usr/lib64 on Fedora and SuSE -> Add sys.platlibdir and configure --with-platlibdir to use /usr/lib64 on Fedora and SuSE _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 11:00:36 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 May 2020 15:00:36 +0000 Subject: [issue40684] make install doesn't respect configure --with-platlibdir=lib64 In-Reply-To: <1589900431.1.0.74204081601.issue40684@roundup.psfhosted.org> Message-ID: <1589900436.45.0.0281008372923.issue40684@roundup.psfhosted.org> Change by STINNER Victor : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 11:00:31 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 May 2020 15:00:31 +0000 Subject: [issue40684] make install doesn't respect configure --with-platlibdir=lib64 Message-ID: <1589900431.1.0.74204081601.issue40684@roundup.psfhosted.org> New submission from STINNER Victor : bpo-1294959 added --with-platlibdir option to configure, but "make install" doesn't fully respect it. Example: ./configure --prefix /opt/py39b1 --with-platlibdir=lib64 make make install I get: /opt/py39b1/lib/python3.9/lib-dynload/readline.cpython-39-x86_64-linux-gnu.so whereas Python doesn't use this directory: $ /opt/py39b1/bin/python3.9 -m site Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] sys.path = [ '/home/vstinner/Python-3.9.0b1', '/opt/py39b1/lib64/python39.zip', '/opt/py39b1/lib64/python3.9', '/opt/py39b1/lib64/lib-dynload', '/home/vstinner/.local/lib/python3.9/site-packages', '/opt/py39b1/lib64/python3.9/site-packages', ] USER_BASE: '/home/vstinner/.local' (exists) USER_SITE: '/home/vstinner/.local/lib/python3.9/site-packages' (exists) ENABLE_USER_SITE: True Python looks into /opt/py39b1/lib64/lib-dynload ("lib64") make install writes into /opt/py39b1/lib/python3.9/lib-dynload/ ("lib") ---------- components: Build messages: 369362 nosy: vstinner priority: normal severity: normal status: open title: make install doesn't respect configure --with-platlibdir=lib64 versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 11:04:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 May 2020 15:04:46 +0000 Subject: [issue40684] make install doesn't respect configure --with-platlibdir=lib64 In-Reply-To: <1589900431.1.0.74204081601.issue40684@roundup.psfhosted.org> Message-ID: <1589900686.27.0.321842970701.issue40684@roundup.psfhosted.org> STINNER Victor added the comment: The Fedora package is built using --libdir=/usr/lib64 --with-platlibdir=lib64 which works around the issue: + /builddir/build/BUILD/Python-3.9.0b1/configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-platlibdir=lib64 --enable-ipv6 --enable-shared --with-computed-gotos=yes --with-dbmliborder=gdbm:ndbm:bdb --with-system-expat --with-system-ffi --enable-loadable-sqlite-extensions --with-dtrace --with-lto --with-ssl-default-suites=openssl --with-valgrind --without-ensurepip --enable-optimizations ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 11:04:49 2020 From: report at bugs.python.org (Code436) Date: Tue, 19 May 2020 15:04:49 +0000 Subject: [issue40685] IDLE not working Message-ID: <1589900689.83.0.325441243452.issue40685@roundup.psfhosted.org> New submission from Code436 : Randomlly Python IDLE doesn't launch (not even the editor) ---------- assignee: terry.reedy components: IDLE messages: 369364 nosy: Coder436, terry.reedy priority: normal severity: normal status: open title: IDLE not working versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 11:05:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 May 2020 15:05:04 +0000 Subject: [issue1294959] Add sys.platlibdir and configure --with-platlibdir to use /usr/lib64 on Fedora and SuSE Message-ID: <1589900704.22.0.908802319116.issue1294959@roundup.psfhosted.org> STINNER Victor added the comment: I created bpo-40684: make install doesn't respect configure --with-platlibdir=lib64. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 11:16:22 2020 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 19 May 2020 15:16:22 +0000 Subject: [issue40683] Beta release does not distribute zoneinfo or test_zoneinfo In-Reply-To: <1589898775.24.0.801857102039.issue40683@roundup.psfhosted.org> Message-ID: <1589901382.23.0.606426940569.issue40683@roundup.psfhosted.org> Paul Ganssle added the comment: Victor: Might be worth updating your notes to indicate that any subdirectory (not just test subdirectories) need to go into LIBSUBDIRS. zoneinfo uses a subdirectory for both the tests and the zoneinfo module, and *neither* were included in the installation in this case. ---------- title: Beta release does not distribute test_zoneinfo -> Beta release does not distribute zoneinfo or test_zoneinfo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 11:17:20 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 19 May 2020 15:17:20 +0000 Subject: [issue40685] IDLE not working In-Reply-To: <1589900689.83.0.325441243452.issue40685@roundup.psfhosted.org> Message-ID: <1589901440.41.0.374599697453.issue40685@roundup.psfhosted.org> Eric V. Smith added the comment: This is almost surely a problem in your environment, and not a bug in python. This bug tracker is for reporting bugs in python. I suggest you look for help elsewhere, such as the python-list mailing list (https://mail.python.org/mailman/listinfo/python-list) or the python-tutor mailing list (https://mail.python.org/mailman/listinfo/tutor). But even if this is a bug in python, you've given us no information to use to help you. Given what you've told us, how would you expect us to respond? You'll need to provide a lot more information before we can even begin to guess what problem you're having. ---------- nosy: +eric.smith status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 11:19:06 2020 From: report at bugs.python.org (=?utf-8?b?TWljaGHFgiBHw7Nybnk=?=) Date: Tue, 19 May 2020 15:19:06 +0000 Subject: [issue1294959] Add sys.platlibdir and configure --with-platlibdir to use /usr/lib64 on Fedora and SuSE Message-ID: <1589901546.48.0.273829210964.issue1294959@roundup.psfhosted.org> Micha? G?rny added the comment: > Can you please propose a different wording? English is not my first language. Mine neither but I'll try. How about: 'Name of the platform-specific library directory. It is used to build the path of the standard library and C extension modules of the standard library.' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 11:24:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 May 2020 15:24:58 +0000 Subject: [issue40683] Beta release does not distribute zoneinfo or test_zoneinfo In-Reply-To: <1589898775.24.0.801857102039.issue40683@roundup.psfhosted.org> Message-ID: <1589901898.25.0.561283456133.issue40683@roundup.psfhosted.org> STINNER Victor added the comment: We have multiple "install" buildbot which only run tests on the *installed* Python. I understand that we missed the issue because not only the implementation was broken by "make install", but the whole test was missing as well :-p > Victor: Might be worth updating your notes to indicate that any subdirectory (not just test subdirectories) need to go into LIBSUBDIRS. Done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 11:55:25 2020 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 19 May 2020 15:55:25 +0000 Subject: [issue40683] Beta release does not distribute zoneinfo or test_zoneinfo In-Reply-To: <1589898775.24.0.801857102039.issue40683@roundup.psfhosted.org> Message-ID: <1589903725.85.0.09721743593.issue40683@roundup.psfhosted.org> Paul Ganssle added the comment: New changeset 2abededbc4165d2daa14ae9d74b1f33cce0593d7 by Paul Ganssle in branch 'master': bpo-40683: Add zoneinfo to LIBSUBDIRS (#20229) https://github.com/python/cpython/commit/2abededbc4165d2daa14ae9d74b1f33cce0593d7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 11:55:34 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 15:55:34 +0000 Subject: [issue40683] Beta release does not distribute zoneinfo or test_zoneinfo In-Reply-To: <1589898775.24.0.801857102039.issue40683@roundup.psfhosted.org> Message-ID: <1589903734.37.0.305516354954.issue40683@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +19521 pull_request: https://github.com/python/cpython/pull/20230 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 12:13:22 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 16:13:22 +0000 Subject: [issue40683] Beta release does not distribute zoneinfo or test_zoneinfo In-Reply-To: <1589898775.24.0.801857102039.issue40683@roundup.psfhosted.org> Message-ID: <1589904802.83.0.991390878478.issue40683@roundup.psfhosted.org> miss-islington added the comment: New changeset b5bd4358fc2dea2e7c84d0c56974627fc43217cd by Miss Islington (bot) in branch '3.9': bpo-40683: Add zoneinfo to LIBSUBDIRS (GH-20229) https://github.com/python/cpython/commit/b5bd4358fc2dea2e7c84d0c56974627fc43217cd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 12:28:13 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 19 May 2020 16:28:13 +0000 Subject: [issue37616] [3.10 prep] zip path incorrect In-Reply-To: <1563432035.85.0.841643784863.issue37616@roundup.psfhosted.org> Message-ID: <1589905693.13.0.601087832975.issue37616@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 2a561b5f6830aee39cf05dc70c24e26c3558dda0 by Pablo Galindo in branch 'master': bpo-37616: Handle version information more gracefully in getpath.c (GH-20214) https://github.com/python/cpython/commit/2a561b5f6830aee39cf05dc70c24e26c3558dda0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 12:38:23 2020 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 19 May 2020 16:38:23 +0000 Subject: [issue40683] Beta release does not distribute zoneinfo or test_zoneinfo In-Reply-To: <1589898775.24.0.801857102039.issue40683@roundup.psfhosted.org> Message-ID: <1589906303.0.0.674343136207.issue40683@roundup.psfhosted.org> Paul Ganssle added the comment: Victor has confirmed that this is working on Windows, so I think the current state of the 3.9 and master branches is now fixed. The last question remaining is whether this justifies a quick b2 release (or if there's another mechanism for a "fixup" release like b1.post0). ?ukasz, what do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 12:41:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 May 2020 16:41:28 +0000 Subject: [issue40686] Compiler warnings in _zoneinfo.c on Windows build in 64-bit Message-ID: <1589906488.33.0.285207996013.issue40686@roundup.psfhosted.org> New submission from STINNER Victor : c:\vstinner\python\3.9\modules\_zoneinfo.c(903): warning C4267: '=': conversion from 'size_t' to 'unsigned int', possible loss of data [C:\vstinner\python\3.9\PCbuild\_ zoneinfo.vcxproj] c:\vstinner\python\3.9\modules\_zoneinfo.c(904): warning C4267: '=': conversion from 'size_t' to 'unsigned int', possible loss of data [C:\vstinner\python\3.9\PCbuild\_ zoneinfo.vcxproj] c:\vstinner\python\3.9\modules\_zoneinfo.c(1224): warning C4068: unknown pragma [C:\vstinner\python\3.9\PCbuild\_zoneinfo.vcxproj] c:\vstinner\python\3.9\modules\_zoneinfo.c(1225): warning C4068: unknown pragma [C:\vstinner\python\3.9\PCbuild\_zoneinfo.vcxproj] c:\vstinner\python\3.9\modules\_zoneinfo.c(1227): warning C4068: unknown pragma [C:\vstinner\python\3.9\PCbuild\_zoneinfo.vcxproj] c:\vstinner\python\3.9\modules\_zoneinfo.c(1770): warning C4244: '=': conversion from 'ssize_t' to 'uint8_t', possible loss of data [C:\vstinner\python\3.9\PCbuild\_zon einfo.vcxproj] c:\vstinner\python\3.9\modules\_zoneinfo.c(2408): warning C4028: formal parameter 2 different from declaration [C:\vstinner\python\3.9\PCbuild\_zoneinfo.vcxproj] ---------- components: Build messages: 369374 nosy: p-ganssle, vstinner priority: normal severity: normal status: open title: Compiler warnings in _zoneinfo.c on Windows build in 64-bit versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 12:47:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 May 2020 16:47:52 +0000 Subject: [issue40645] Use OpenSSL's HMAC API In-Reply-To: <1589641291.33.0.635001105595.issue40645@roundup.psfhosted.org> Message-ID: <1589906872.77.0.39293307897.issue40645@roundup.psfhosted.org> STINNER Victor added the comment: Compiler warning on 64-bit Windows: c:\vstinner\python\3.9\modules\_hashopenssl.c(1427): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 13:04:22 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 19 May 2020 17:04:22 +0000 Subject: [issue40683] Beta release does not distribute zoneinfo or test_zoneinfo In-Reply-To: <1589898775.24.0.801857102039.issue40683@roundup.psfhosted.org> Message-ID: <1589907862.5.0.176189491628.issue40683@roundup.psfhosted.org> ?ukasz Langa added the comment: The beta releases are every three weeks now because of the release schedule being adjusted to allow Linux distributions to release the new version in the Autumn distributions. I understand that you're eager to have your feature up and running. I feel like shipping the fixed version in beta2 will be sufficient. If we released a beta1.5 later in the week, that would be overkill given the already aggressive schedule as you'd then have a beta2 two weeks later, no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 13:11:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 May 2020 17:11:24 +0000 Subject: [issue37616] [3.10 prep] zip path incorrect In-Reply-To: <1563432035.85.0.841643784863.issue37616@roundup.psfhosted.org> Message-ID: <1589908284.45.0.575135620906.issue37616@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Interpreter Core resolution: -> fixed versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 13:12:28 2020 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 19 May 2020 17:12:28 +0000 Subject: [issue40683] Beta release does not distribute zoneinfo or test_zoneinfo In-Reply-To: <1589898775.24.0.801857102039.issue40683@roundup.psfhosted.org> Message-ID: <1589908348.01.0.70821139851.issue40683@roundup.psfhosted.org> Paul Ganssle added the comment: No worries ?ukasz, I figured it would be worth bringing up because normally the releases aren't so broken that they aren't usable in the common case. That said, this won't break any *existing* code, it'll just prevent people on Linux machines from using zoneinfo. I don't think waiting 3 weeks is a big deal. I'm planning to release a backport soon anyway, and I expect people probably won't adopt new-in-3.9 modules without a backport during the beta period *anyway*, since they can't deploy any code using that feature to prod. I'm going to resolve this issue. Thanks for the quick response ?ukasz and for the quick review Victor! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 13:20:42 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Tue, 19 May 2020 17:20:42 +0000 Subject: [issue32604] [subinterpreters] PEP 554 implementation: add interpreters module In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1589908842.22.0.385622417518.issue32604@roundup.psfhosted.org> Joannah Nanjekye added the comment: New changeset 9d17cbf33df7cfb67ca0f37f6463ba5c18676641 by Joannah Nanjekye in branch 'master': bpo-32604: PEP 554 for use in test suite (GH-19985) https://github.com/python/cpython/commit/9d17cbf33df7cfb67ca0f37f6463ba5c18676641 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 13:20:47 2020 From: report at bugs.python.org (Ben Spiller) Date: Tue, 19 May 2020 17:20:47 +0000 Subject: [issue40687] Windows py.exe launcher interacts badly with Windows store python.exe shim Message-ID: <1589908847.77.0.104996036032.issue40687@roundup.psfhosted.org> New submission from Ben Spiller : The py.exe launcher doc states "If no relevant options are set, the commands python and python2 will use the latest Python 2.x version installed" ... which was indeed working reliably until Microsoft added their weird python.exe shim (which either terminates with no output or brings up the Microsoft Store page) as part of https://devblogs.microsoft.com/python/python-in-the-windows-10-may-2019-update/ Now, I find scripts that start with "#!/usr/bin/env python" cause py.exe to run the Windows python.exe shim which confusingly terminates with no output (unless run with no arguments). I think to stop lots of developers banging theirs heads against this brick wall, py.exe should include some logic to ignore the C:\Users\XXX\AppData\Local\Microsoft\WindowsApps\python.exe shim, since for someone with py.exe installed, running that is _never_ what you'd want. (or alternatively, work with Microsoft to get this decision reversed, but that may be harder!) Lots of people are hitting this e.g. https://superuser.com/questions/1437590/typing-python-on-windows-10-version-1903-command-prompt-opens-microsoft-stor , https://stackoverflow.com/questions/57485491/python-python3-executes-in-command-prompt-but-does-not-run-correctly Here's the output: py myscript.py launcher build: 32bit launcher executable: Console File 'C:\Users\XXX\AppData\Local\py.ini' non-existent Using global configuration file 'C:\WINDOWS\py.ini' Called with command line: apama-build\build.py -h maybe_handle_shebang: read 256 bytes maybe_handle_shebang: BOM not found, using UTF-8 parse_shebang: found command: python searching PATH for python executable Python on path: C:\Users\XXX\AppData\Local\Microsoft\WindowsApps\python.exe located python on PATH: C:\Users\XXX\AppData\Local\Microsoft\WindowsApps\python.exe run_child: about to run 'C:\Users\XXX\AppData\Local\Microsoft\WindowsApps\python.exe myscript.py' child process exit code: 9009 >py -0 Installed Pythons found by py Launcher for Windows -3.8-64 * -3.7-64 -3.6-64 -2.7-64 (nb: was surprising that it didn't run any of those installed versions!) ---------- components: Windows messages: 369379 nosy: benspiller, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Windows py.exe launcher interacts badly with Windows store python.exe shim versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 13:21:07 2020 From: report at bugs.python.org (Ben Spiller) Date: Tue, 19 May 2020 17:21:07 +0000 Subject: [issue40687] Windows py.exe launcher interacts badly with Windows store python.exe shim In-Reply-To: <1589908847.77.0.104996036032.issue40687@roundup.psfhosted.org> Message-ID: <1589908867.28.0.0231873202205.issue40687@roundup.psfhosted.org> Change by Ben Spiller : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 13:26:03 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 19 May 2020 17:26:03 +0000 Subject: [issue40679] show class name in method invocation TypeError In-Reply-To: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> Message-ID: <1589909163.36.0.64079667867.issue40679@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 13:42:16 2020 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 19 May 2020 17:42:16 +0000 Subject: [issue40028] Math module method to find prime factors for non-negative int n In-Reply-To: <1584733974.83.0.0417466712916.issue40028@roundup.psfhosted.org> Message-ID: <1589910136.15.0.101611721644.issue40028@roundup.psfhosted.org> Change by Mark Dickinson : ---------- versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 13:44:02 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 19 May 2020 17:44:02 +0000 Subject: [issue40687] Windows py.exe launcher interacts badly with Windows store python.exe shim In-Reply-To: <1589908847.77.0.104996036032.issue40687@roundup.psfhosted.org> Message-ID: <1589910242.0.0.889032907611.issue40687@roundup.psfhosted.org> Steve Dower added the comment: If someone remembers where the other "shebangs on Windows don't make sense" issue is, I think we can close this one in favour of that. Though it's also an important point for issue40667 - if "python.exe" becomes the launcher, then this will get stuck in an infinite loop (and process memory exhaustion is the worst kind of hang on Windows). ---------- versions: +Python 3.10, Python 3.9 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 13:54:27 2020 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 19 May 2020 17:54:27 +0000 Subject: [issue40684] make install doesn't respect configure --with-platlibdir=lib64 In-Reply-To: <1589900431.1.0.74204081601.issue40684@roundup.psfhosted.org> Message-ID: <1589910867.37.0.917502152286.issue40684@roundup.psfhosted.org> Change by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 14:11:43 2020 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 19 May 2020 18:11:43 +0000 Subject: [issue27501] Add typing.py class describing a PEP 3118 buffer object In-Reply-To: <1468346843.82.0.455431578723.issue27501@psf.upfronthosting.co.za> Message-ID: <1589911903.84.0.00100776625864.issue27501@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 14:40:32 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 19 May 2020 18:40:32 +0000 Subject: [issue13248] deprecated in 3.2/3.3, should be removed in 3.5 or ??? In-Reply-To: <1319392186.66.0.823106983991.issue13248@psf.upfronthosting.co.za> Message-ID: <1589913632.18.0.941344912006.issue13248@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 15:05:35 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Tue, 19 May 2020 19:05:35 +0000 Subject: [issue40688] PEG Generator: Fix scripts to always use the correct parser Message-ID: <1589915135.03.0.240212573029.issue40688@roundup.psfhosted.org> New submission from Lysandros Nikolaou : All the scripts in Tools/peg_generator/scripts need to be updated, since they mostly assume that ast.parse and compile use the old parser. We can use the _peg_parser extension module instead, but it well need some enhancements so that it also supports compilation to bytecode. ---------- assignee: lys.nikolaou components: Demos and Tools messages: 369381 nosy: gvanrossum, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: PEG Generator: Fix scripts to always use the correct parser type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 15:08:52 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Tue, 19 May 2020 19:08:52 +0000 Subject: [issue40688] PEG Generator: Fix scripts to always use the correct parser In-Reply-To: <1589915135.03.0.240212573029.issue40688@roundup.psfhosted.org> Message-ID: <1589915332.15.0.773888617476.issue40688@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- keywords: +patch pull_requests: +19522 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20235 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 15:36:17 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Tue, 19 May 2020 19:36:17 +0000 Subject: [issue40679] show class name in method invocation TypeError In-Reply-To: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> Message-ID: <1589916977.97.0.900581945533.issue40679@roundup.psfhosted.org> Change by Dennis Sweeney : ---------- keywords: +patch nosy: +Dennis Sweeney nosy_count: 2.0 -> 3.0 pull_requests: +19523 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20236 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 15:46:47 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Tue, 19 May 2020 19:46:47 +0000 Subject: [issue40679] show class name in method invocation TypeError In-Reply-To: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> Message-ID: <1589917607.9.0.58727945156.issue40679@roundup.psfhosted.org> Dennis Sweeney added the comment: The attached PR isn't exactly what you requested, but it's a very minimal code change that uses the existing __qualname__ functionality to change the message to TypeError: A.foo() takes 1 positional argument but 2 were given Does that address those problems? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 15:49:43 2020 From: report at bugs.python.org (E. Paine) Date: Tue, 19 May 2020 19:49:43 +0000 Subject: [issue40452] Tkinter/IDLE: preserve clipboard on closure In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1589917783.47.0.714254461808.issue40452@roundup.psfhosted.org> E. Paine added the comment: I'm (sadly) not particularly familiar with C, though I have tried to trace the calls of TkClipCleanup. As @taleinat mentioned, it is called by the TkCloseDisplay, though, in turn, I believe this method is called by the DeleteWindowsExitProc method. The name "DeleteWindowsExitProc" is passed, in the Initialize method, to the TkCreateThreadExitHandler method (I assume method references work in a similar-enough way to Python?) along with the tsdPtr object. I stopped tracing it at this point, and instead worked from the Python end. The Tkapp_New method calls the Tcl_CreateInterp method and I have three questions about this (each only applicable depending on the answer to the previous one): 1. Is the Tkapp_New method the correct one to be looking at for tcl/tk initialisation (I can't find where _tkinter.create is implemented)? 2. Is there a reason why the call is to tcl rather than tk? 3. Would changing this to tk cause the fix in tk to be applied? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 15:55:58 2020 From: report at bugs.python.org (Niels Thykier) Date: Tue, 19 May 2020 19:55:58 +0000 Subject: [issue40689] The only supported minidom attribute iteration (NamedNodeMap) is O(n^2) Message-ID: <1589918158.28.0.599642797497.issue40689@roundup.psfhosted.org> New submission from Niels Thykier : Hi, The only official supported iteration over all attributes on an element via the minidom XML API require an O(n?) iterator. It happens because the `item` method generates a list of all attribute names, look up the attribute name at the given index and then throws away the list (only to recompute it on next lookup). There are also a `.values()` method that looks very promising, only it has "strings-attached" in the form of the following disclaimer: """There are also experimental methods that give this class more mapping behavior. [...]""" (source: https://docs.python.org/3/library/xml.dom.html) The word "experimental" makes it hard for me to ask projects to migrate to `.values()` because I have to convince them to accept the risk of adopting the "unsupported APIs". For me, any of the following would solve the issue: * Bless the mapping based API as supported to the same extend as `item` + `length` in the DOM API. * Optimize `item` to avoid the performance issue. * Provide an alternative (but supported) way of iterating over all attributes. Preferably one that enables you to get the node directly without having to use `Element.getAttributeNode()` or similar. The code in question highlighting the problematic code in the minidom API: ``` class NamedNodeMap(object): [...] def item(self, index): try: return self[list(self._attrs.keys())[index]] except IndexError: return None ``` ---------- components: XML messages: 369384 nosy: nthykier priority: normal severity: normal status: open title: The only supported minidom attribute iteration (NamedNodeMap) is O(n^2) type: performance versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 16:09:11 2020 From: report at bugs.python.org (Eryk Sun) Date: Tue, 19 May 2020 20:09:11 +0000 Subject: [issue40667] [Windows] Add global python and python3 commands In-Reply-To: <1589792809.51.0.970244169965.issue40667@roundup.psfhosted.org> Message-ID: <1589918951.57.0.222351460053.issue40667@roundup.psfhosted.org> Eryk Sun added the comment: If .py files are associated with py.exe, handling the shebang "#!/usr/bin/env python[3]" might spawn the python[3].exe launcher recursively if it handles shebangs (see bpo-40687). To avoid this, process() can set a flag based on the image name that prevents calling maybe_handle_shebang(). I still think it would be for the best if the python3.exe launcher ran as "py -3", and the python.exe launcher ran as "py", based simply on checking the image name. Also, I think these two launchers should drop all command-line option support, i.e. -h, --help, --list, --list-paths, -0[p], and -X[.Y][-32|-64]. This keeps the command-line interface for the "python" command consistent across the board. PY_PYTHON3 would set the default for the "python3.exe" launcher, and PY_PYTHON would set the default for the "python.exe" launcher. For whatever reason, PY_PYTHON could be set to 2 to make the python.exe launcher run 2.x. (Even in Ubuntu I install the python-is-python3 package, but sadly some people are stuck maintaining 2.x code.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 16:17:05 2020 From: report at bugs.python.org (Vitalii) Date: Tue, 19 May 2020 20:17:05 +0000 Subject: [issue40690] unittest: if FunctionTestCase is imported, the loader loads "tests" from it Message-ID: <1589919425.78.0.0609580372109.issue40690@roundup.psfhosted.org> New submission from Vitalii : In [2]: from unittest import FunctionTestCase In [3]: loader.loadTestsFromTestCase(FunctionTestCase) Out[3]: ]> In [4]: test = _._tests[0]; test Out[4]: In [5]: test._testFunc Out[5]: 'runTest' In [6]: test._testFunc.__name__ *** AttributeError: 'str' object has no attribute '__name__' ---------- components: Tests messages: 369386 nosy: pwtail priority: normal severity: normal status: open title: unittest: if FunctionTestCase is imported, the loader loads "tests" from it type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 16:25:56 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 19 May 2020 20:25:56 +0000 Subject: [issue40452] Tkinter/IDLE: preserve clipboard on closure In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1589919956.96.0.645852238874.issue40452@roundup.psfhosted.org> Tal Einat added the comment: Indeed, you've got that pretty much correct. The call chain is: Tk.__init__ _tkinter_create_impl (called as _tkinter.create() from Python) Tkapp_New Tkapp_New does a lot of things. In particular, it calls Tcl_CreateInterp and later Tcl_AppInit. Tcl_AppInit (apparently a local copy is usually used!) calls Tcl_Init and later Tk_Init. At this point the call chain enters tcl/tk code. Tk_Init calls Initialize (except on cygwin - I'm ignoring this). The inline comment for Initialize says "The core of the initialization code for Tk, called from Tk_Init and Tk_SafeInit." And at the very end of Initialize, we find the call TkCreateThreadExitHandler(DeleteWindowsExitProc, tsdPtr). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 16:26:27 2020 From: report at bugs.python.org (Vitalii) Date: Tue, 19 May 2020 20:26:27 +0000 Subject: [issue40690] unittest: if FunctionTestCase is imported, the loader loads "tests" from it In-Reply-To: <1589919425.78.0.0609580372109.issue40690@roundup.psfhosted.org> Message-ID: <1589919987.65.0.0392375586045.issue40690@roundup.psfhosted.org> Change by Vitalii : ---------- keywords: +patch pull_requests: +19524 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20237 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 16:44:05 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 19 May 2020 20:44:05 +0000 Subject: [issue40645] Use OpenSSL's HMAC API In-Reply-To: <1589641291.33.0.635001105595.issue40645@roundup.psfhosted.org> Message-ID: <1589921045.09.0.898773530907.issue40645@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +19526 pull_request: https://github.com/python/cpython/pull/20238 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 16:46:25 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 19 May 2020 20:46:25 +0000 Subject: [issue40645] Use OpenSSL's HMAC API In-Reply-To: <1589641291.33.0.635001105595.issue40645@roundup.psfhosted.org> Message-ID: <1589921185.27.0.6015977653.issue40645@roundup.psfhosted.org> Christian Heimes added the comment: Thanks, Victor! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 16:52:04 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 19 May 2020 20:52:04 +0000 Subject: [issue40452] Tkinter/IDLE: preserve clipboard on closure In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1589921524.56.0.199346665558.issue40452@roundup.psfhosted.org> Tal Einat added the comment: During finalization, TkFinalizeThread would call DeleteWindowsExitProc (registered via TkCreateThreadExitHandler). This in turn is set as a thread-exit handler via Tcl_CreateThreadExitHandler upon the first call to TkCreateThreadExitHandler. Now we're out of Tk and into Tcl itself. TkFinalizeThread would be called by Tcl's Tck_FinalizeThread. This, in turn, is called by Tcl_Finalize (for thread number zero?). And _tkinter sets an atexit handler to call Tcl_Finalize. Ah, but no! That handler is actually not set, due to the "#if 0" before it! So the Tcl/Tk finalization is actually skipped, causing this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 16:57:46 2020 From: report at bugs.python.org (Chris Danis) Date: Tue, 19 May 2020 20:57:46 +0000 Subject: [issue40691] misleading output from difflib unified_diff Message-ID: <1589921866.61.0.952751122807.issue40691@roundup.psfhosted.org> New submission from Chris Danis : When difflib.unified_diff is asked to produce a diff of inputs a.txt and b.txt (attached), with 10 context lines, it produces the following: --- codfw/groupLoadsBySection live +++ codfw/groupLoadsBySection generated @@ -90,37 +90,31 @@ }, "s4": { "api": { "db2106": 300, "db2110": 100 }, "contributions": { "db2084:3314": 100, "db2091:3314": 100 }, - "dump": { - "db2073": 100 - }, - "logpager": { - "db2084:3314": 100, - "db2091:3314": 100 - }, - "recentchanges": { - "db2084:3314": 100, - "db2091:3314": 100 - }, - "recentchangeslinked": { - "db2084:3314": 100, - "db2091:3314": 100 - }, - "vslow": { - "db2073": 100 + "logpager": { + "db2084:3314": 100, + "db2091:3314": 100 + }, + "recentchanges": { + "db2084:3314": 100, + "db2091:3314": 100 + }, + "recentchangeslinked": { + "db2084:3314": 100, + "db2091:3314": 100 }, "watchlist": { "db2084:3314": 100, "db2091:3314": 100 } }, "s5": { "api": { "db2075": 300, "db2128": 100 However, this could simply and much more readably be rendered as: @@ -90,38 +90,32 @@ }, "s4": { "api": { "db2106": 3, "db2110": 1 }, "contributions": { "db2084:3314": 1, "db2091:3314": 1 }, - "dump": { - "db2073": 1 - }, "logpager": { "db2084:3314": 1, "db2091:3314": 1 }, "recentchanges": { "db2084:3314": 1, "db2091:3314": 1 }, "recentchangeslinked": { "db2084:3314": 1, "db2091:3314": 1 }, - "vslow": { - "db2073": 1 - }, "watchlist": { "db2084:3314": 1, "db2091:3314": 1 } }, "s5": { "api": { "db2059": 1, "db2066": 1 }, (This is what diff -u10 produces.) ---------- components: Library (Lib) files: a.txt messages: 369390 nosy: cdanis priority: normal severity: normal status: open title: misleading output from difflib unified_diff versions: Python 3.7 Added file: https://bugs.python.org/file49171/a.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 16:57:56 2020 From: report at bugs.python.org (Chris Danis) Date: Tue, 19 May 2020 20:57:56 +0000 Subject: [issue40691] misleading output from difflib unified_diff In-Reply-To: <1589921866.61.0.952751122807.issue40691@roundup.psfhosted.org> Message-ID: <1589921876.47.0.577481295556.issue40691@roundup.psfhosted.org> Change by Chris Danis : Added file: https://bugs.python.org/file49172/b.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 16:58:46 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 19 May 2020 20:58:46 +0000 Subject: [issue40452] Tkinter/IDLE: preserve clipboard on closure In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1589921926.32.0.34384822532.issue40452@roundup.psfhosted.org> Tal Einat added the comment: Indeed, adding a simple _tkinter.destroy() method which invokes Tcl_Finalize, and calling it in the Tk.destroy() method, makes copied text remain available after closing IDLE! I did the above to test my hypothesis, but I'm not sure it would be a proper fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 17:03:21 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 19 May 2020 21:03:21 +0000 Subject: [issue40452] Tkinter/IDLE: preserve clipboard on closure In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1589922201.88.0.234704347553.issue40452@roundup.psfhosted.org> Tal Einat added the comment: epaine, if you'd like to create a new PR based on these findings, I'd be happy to review it! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 17:07:44 2020 From: report at bugs.python.org (Asheesh Laroia) Date: Tue, 19 May 2020 21:07:44 +0000 Subject: [issue40692] Adjust test_concurrent_futures to run more of its tests if multiprocessing.synchronize is missing Message-ID: <1589922464.68.0.792694033918.issue40692@roundup.psfhosted.org> New submission from Asheesh Laroia : Some parts of test_concurrent_futures make sense to run even on Python builds where multiprocessing.synchronize is absent. At the moment, test_concurrent_futures.py skips all tests in the file if multiprocessing.synchronize is missing from the Python build. I have a patch to enable more tests, which I'll submit as a GitHub pull request. The reason I want this patch is while working on CPython on Android, I saw that test_concurrent_futures refused to run its test suite, and I became very afraid that this meant that asyncio on CPython on Android was doomed. In fact, I was afraid for no reason. I want future people porting CPython to be less scared than I was. :) I discovered that the only part of concurrent.futures that requires multiprocessing.synchronize is concurrent.futures.ProcessPoolExecutor. concurrent.futures.ProcessPoolExecutor already has a way to check at runtime if it can work on the host system, so this patch leans on that. This patch fixes a few other tests to skip themselves in the case that ProcessPoolExecutor cannot function. I tested this by building CPython (with my patch) with adding a configure flag on macOS: $ ./configure --with-pydebug --with-openssl=$(brew --prefix openssl) ac_cv_posix_semaphores_enabled=no Why multiprocessing.synchronize is missing ------------------------------------------ multiprocessing.synchronize imports _multiprocessing.SemLock, which is based on a libc function called sem_open(), which implements named semaphores, which allows the creation of lock-esque counters that can be used from multiple processes. multiprocessing.c currently only creates the SemLock property if sem_open() is considered "working" through a check in ./configure; I've short-circuited that check above to be a "no". On Android, sem_open() exists but simply returns ENOSYS; see its implementation here: https://android.googlesource.com/platform/external/pthreads/+/master/sem_open.c Android isn't the only platform missing sem_open() Past work --------- issue3770 is an older conversation about a related issue. issue3770 has also attracted comments from someone who wants CPython's test suite to run to completion on their platform lacking sem_open() and therefore lacking multiprocessing.synchronize. This patch should solve their problem, I hope. Future work ----------- Automated testing: In order to prevent regressions, I'm interested in hosting a buildbot for at least one year, hopefully in perpetuity, on which we call ./configure with ac_cv_posix_semaphores_enabled=no. I'd like to improve the error message when the user imports multiprocessing.synchronize so it points at some new documentation text that I (or someone) adds to CPython, rather than the issue number. I'm OK taking on the work of writing those docs in a follow-up issue if we merge this. Thanks ------ Thanks to Zachary Ware for discussing this with me in an CPython contributor office hours time slot before I filed the issue. Thanks to Dr. Russell Keith-Magee, Glyph Lefkowitz, Nathaniel Smith, and Geoffrey Thomas for informal conversations and technical research. ---------- components: Tests, asyncio messages: 369393 nosy: asheesh, asvetlov, yselivanov, zach.ware priority: normal severity: normal status: open title: Adjust test_concurrent_futures to run more of its tests if multiprocessing.synchronize is missing type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 17:15:04 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 19 May 2020 21:15:04 +0000 Subject: [issue40682] random.Random.seed() with version=1 does not consistently match Python 2 behavior In-Reply-To: <1589898766.59.0.355441549613.issue40682@roundup.psfhosted.org> Message-ID: <1589922904.58.0.990715718476.issue40682@roundup.psfhosted.org> Steven D'Aprano added the comment: 3.5 and 3.6 are now only accepting security fixes. Only the stability of random.random is guaranteed across versions, but you are calling randrange: https://docs.python.org/3/library/random.html#notes-on-reproducibility So I am pretty sure that this will not be considered a bug (unless it is a design bug). Personally I think that the lack of reproducibility of the full range of random methods is a rather large annoyance: if you care about reproducibility, including doctests, you cannot use anything in the module except random.random, but have to write your own implementation (possibly by copying and pasting). I don't have a good solution for this though. ---------- nosy: +steven.daprano versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 17:15:05 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 19 May 2020 21:15:05 +0000 Subject: [issue40452] Tkinter/IDLE: preserve clipboard on closure In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1589922905.14.0.630230036559.issue40452@roundup.psfhosted.org> Terry J. Reedy added the comment: After reporting my experiments above, msg369334, I made further failing efforts to simulate pasting into another process, as in 3 and 4. It might be that a concrete key event is needed. So I strongly suspect that the solution for IDLE is indeed a tkinter solution, and it seems that patching _tkinter.c is needed. (And a solution only for IDLE would not help other tkinter users.) Please continue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 17:24:50 2020 From: report at bugs.python.org (Roundup Robot) Date: Tue, 19 May 2020 21:24:50 +0000 Subject: [issue40692] Adjust test_concurrent_futures to run more of its tests if multiprocessing.synchronize is missing In-Reply-To: <1589922464.68.0.792694033918.issue40692@roundup.psfhosted.org> Message-ID: <1589923490.89.0.62336559046.issue40692@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 4.0 -> 5.0 pull_requests: +19527 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20239 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 17:48:57 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 19 May 2020 21:48:57 +0000 Subject: [issue40667] [Windows] Add global python and python3 commands In-Reply-To: <1589792809.51.0.970244169965.issue40667@roundup.psfhosted.org> Message-ID: <1589924937.83.0.190005000462.issue40667@roundup.psfhosted.org> Steve Dower added the comment: > To avoid this, process() can set a flag based on the image name that prevents calling maybe_handle_shebang(). Or the other solution, which is stop treating "usr/bin/env" as "search PATH" - I'm sure there's another issue open somewhere saying this is the best approach. At the same time, one other gap is that this would leave the global Scripts folder off of PATH. On one hand, good (for all the same reasons). But on the other hand, people legitimately complain about it and we don't yet have a workaround. Since the whole point of this exercise is to minimise complaining, it's looking better to just leave people with the devil they know... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 17:53:50 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 19 May 2020 21:53:50 +0000 Subject: [issue38870] Expose ast.unparse in the ast module In-Reply-To: <1574289269.61.0.90605518345.issue38870@roundup.psfhosted.org> Message-ID: <1589925230.64.0.834921019788.issue38870@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- pull_requests: +19528 pull_request: https://github.com/python/cpython/pull/20240 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 18:07:51 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 19 May 2020 22:07:51 +0000 Subject: [issue40684] make install doesn't respect configure --with-platlibdir=lib64 In-Reply-To: <1589900431.1.0.74204081601.issue40684@roundup.psfhosted.org> Message-ID: <1589926071.28.0.940457480636.issue40684@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 18:10:10 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 19 May 2020 22:10:10 +0000 Subject: [issue39631] Fix file association MIME type on Windows In-Reply-To: <1581670182.52.0.370257427786.issue39631@roundup.psfhosted.org> Message-ID: <1589926210.01.0.96765331746.issue39631@roundup.psfhosted.org> Steve Dower added the comment: New changeset 92327a9913150f5bb55b2727a2c5d50f9b7b6e55 by Steve Dower in branch 'master': bpo-39631: Adds NEWS entry (GH-20227) https://github.com/python/cpython/commit/92327a9913150f5bb55b2727a2c5d50f9b7b6e55 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 18:10:50 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 22:10:50 +0000 Subject: [issue39631] Fix file association MIME type on Windows In-Reply-To: <1581670182.52.0.370257427786.issue39631@roundup.psfhosted.org> Message-ID: <1589926250.38.0.864619959112.issue39631@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19530 pull_request: https://github.com/python/cpython/pull/20242 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 18:10:41 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 22:10:41 +0000 Subject: [issue39631] Fix file association MIME type on Windows In-Reply-To: <1581670182.52.0.370257427786.issue39631@roundup.psfhosted.org> Message-ID: <1589926241.49.0.811000323564.issue39631@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19529 pull_request: https://github.com/python/cpython/pull/20241 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 18:11:00 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 22:11:00 +0000 Subject: [issue39631] Fix file association MIME type on Windows In-Reply-To: <1581670182.52.0.370257427786.issue39631@roundup.psfhosted.org> Message-ID: <1589926260.23.0.798063888419.issue39631@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19531 pull_request: https://github.com/python/cpython/pull/20243 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 18:11:47 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 19 May 2020 22:11:47 +0000 Subject: [issue39631] Fix file association MIME type on Windows In-Reply-To: <1581670182.52.0.370257427786.issue39631@roundup.psfhosted.org> Message-ID: <1589926307.29.0.285966930388.issue39631@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 May 19 18:14:20 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 22:14:20 +0000 Subject: [issue38870] Expose ast.unparse in the ast module In-Reply-To: <1574289269.61.0.90605518345.issue38870@roundup.psfhosted.org> Message-ID: <1589926460.89.0.224858823097.issue38870@roundup.psfhosted.org> miss-islington added the comment: New changeset dd74b6fde31aff9aa46c4fc2a830c569764e1b63 by Batuhan Taskaya in branch 'master': bpo-38870: invalid escape sequence (GH-20240) https://github.com/python/cpython/commit/dd74b6fde31aff9aa46c4fc2a830c569764e1b63 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 18:14:27 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 22:14:27 +0000 Subject: [issue38870] Expose ast.unparse in the ast module In-Reply-To: <1574289269.61.0.90605518345.issue38870@roundup.psfhosted.org> Message-ID: <1589926467.69.0.315500207691.issue38870@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19532 pull_request: https://github.com/python/cpython/pull/20244 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 18:17:14 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 22:17:14 +0000 Subject: [issue39631] Fix file association MIME type on Windows In-Reply-To: <1581670182.52.0.370257427786.issue39631@roundup.psfhosted.org> Message-ID: <1589926634.86.0.777717696771.issue39631@roundup.psfhosted.org> miss-islington added the comment: New changeset 67bbb5d4381b6121a4f61ba945c58056e5894846 by Miss Islington (bot) in branch '3.7': bpo-39631: Adds NEWS entry (GH-20227) https://github.com/python/cpython/commit/67bbb5d4381b6121a4f61ba945c58056e5894846 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 18:19:32 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 22:19:32 +0000 Subject: [issue39631] Fix file association MIME type on Windows In-Reply-To: <1581670182.52.0.370257427786.issue39631@roundup.psfhosted.org> Message-ID: <1589926772.55.0.839824724191.issue39631@roundup.psfhosted.org> miss-islington added the comment: New changeset 381ceeaa5980643fa1f958f112f373d7a197e6e8 by Miss Islington (bot) in branch '3.8': bpo-39631: Adds NEWS entry (GH-20227) https://github.com/python/cpython/commit/381ceeaa5980643fa1f958f112f373d7a197e6e8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 18:27:53 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 May 2020 22:27:53 +0000 Subject: [issue40514] [subinterpreters] Add --experimental-isolated-subinterpreters build option In-Reply-To: <1588684431.91.0.693668036583.issue40514@roundup.psfhosted.org> Message-ID: <1589927273.67.0.261295855355.issue40514@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 9512ad74b0fcaff023c1ade75313dc8e249aef78 by Victor Stinner in branch '3.9': [3.9] bpo-40514: Remove --with-experimental-isolated-subinterpreters in 3.9 (GH-20228) https://github.com/python/cpython/commit/9512ad74b0fcaff023c1ade75313dc8e249aef78 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 18:33:51 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 22:33:51 +0000 Subject: [issue38870] Expose ast.unparse in the ast module In-Reply-To: <1574289269.61.0.90605518345.issue38870@roundup.psfhosted.org> Message-ID: <1589927631.8.0.158303202616.issue38870@roundup.psfhosted.org> miss-islington added the comment: New changeset 059279d8706074489144f6ba8ccc8723e0b85007 by Miss Islington (bot) in branch '3.9': bpo-38870: invalid escape sequence (GH-20240) https://github.com/python/cpython/commit/059279d8706074489144f6ba8ccc8723e0b85007 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 18:35:58 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 22:35:58 +0000 Subject: [issue40645] Use OpenSSL's HMAC API In-Reply-To: <1589641291.33.0.635001105595.issue40645@roundup.psfhosted.org> Message-ID: <1589927758.65.0.128711960082.issue40645@roundup.psfhosted.org> miss-islington added the comment: New changeset aca4670ad695d4b01c7880fe3d0af817421945bd by Christian Heimes in branch 'master': bpo-40645: restrict HMAC key len to INT_MAX (GH-20238) https://github.com/python/cpython/commit/aca4670ad695d4b01c7880fe3d0af817421945bd ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 18:36:05 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 22:36:05 +0000 Subject: [issue40645] Use OpenSSL's HMAC API In-Reply-To: <1589641291.33.0.635001105595.issue40645@roundup.psfhosted.org> Message-ID: <1589927765.55.0.449946046899.issue40645@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19533 pull_request: https://github.com/python/cpython/pull/20245 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 18:44:42 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 May 2020 22:44:42 +0000 Subject: [issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter In-Reply-To: <1588693682.5.0.219755904926.issue40521@roundup.psfhosted.org> Message-ID: <1589928282.52.0.969976107666.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19534 pull_request: https://github.com/python/cpython/pull/20246 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 18:53:00 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 19 May 2020 22:53:00 +0000 Subject: [issue40645] Use OpenSSL's HMAC API In-Reply-To: <1589641291.33.0.635001105595.issue40645@roundup.psfhosted.org> Message-ID: <1589928780.41.0.224293298651.issue40645@roundup.psfhosted.org> miss-islington added the comment: New changeset 6ed37430d31e915103ab5decd14d757eb2d159d5 by Miss Islington (bot) in branch '3.9': bpo-40645: restrict HMAC key len to INT_MAX (GH-20238) https://github.com/python/cpython/commit/6ed37430d31e915103ab5decd14d757eb2d159d5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 18:59:51 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 19 May 2020 22:59:51 +0000 Subject: [issue40679] show class name in method invocation TypeError In-Reply-To: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> Message-ID: <1589929191.82.0.845820074409.issue40679@roundup.psfhosted.org> Chris Jerdonek added the comment: Thanks! I think it does. Also, I see now that using the __qualname__ is better than including the object's type for locating the method because you can have cases like super().foo() or even-- class A: def foo(self): pass def bar(): pass A.foo = bar ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 19:22:10 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 May 2020 23:22:10 +0000 Subject: [issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter In-Reply-To: <1588693682.5.0.219755904926.issue40521@roundup.psfhosted.org> Message-ID: <1589930530.79.0.671830315651.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19535 pull_request: https://github.com/python/cpython/pull/20247 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 19:47:54 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 19 May 2020 23:47:54 +0000 Subject: [issue40452] Tkinter/IDLE: preserve clipboard on closure In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1589932074.03.0.0378891404676.issue40452@roundup.psfhosted.org> Terry J. Reedy added the comment: The #if 0 was added by Guido in 43ff8683fe68424b9c179ee4970bb865e11036d6 in 1998, before the tcl/tk clip fix for Windows. * Temporarily get rid of the registration of Tcl_Finalize() as a low-level Python exit handler. This can attempt to call Python code at a point that the interpreter and thread state have already been destroyed, causing a Bus Error. Given the intended use of Py_AtExit(), I'm not convinced that it's a good idea to call it earlier during Python's finalization sequence... (Although this is the only use for it in the entire distribution.) The code has a comment that was part of a multifile svn merge, so author unknown. /* This was not a good idea; through bindings, Tcl_Finalize() may invoke Python code but at that point the interpreter and thread state have already been destroyed! */ Calling Tcl_Finalize() within Tk.destroy avoids this as .destroy is called while python is running, either explicitly or when the associated window is closed. However, it is possible to have more than 1 Tk instance, either accidentally or on purpose*, each with its own .tk, which I presume is the 'associated tcl interpreter' instance. So Tk.destroy may be called more than once and each call must not disable other Tk instances. To test: Create 2 roots and two Tk windows, destroy 1. Does the other window disappear? Does root2.withdraw raise? Does adding widgets raise? If yes, we would either need to count working Tk instances or try calling less shutdown stuff. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 19:48:04 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 19 May 2020 23:48:04 +0000 Subject: [issue40452] Tkinter/IDLE: preserve clipboard on closure In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1589932084.28.0.373913530104.issue40452@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 19:57:22 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 May 2020 23:57:22 +0000 Subject: [issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter In-Reply-To: <1588693682.5.0.219755904926.issue40521@roundup.psfhosted.org> Message-ID: <1589932642.27.0.215001390409.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 0509c4547fc95cc32a91ac446a26192c3bfdf157 by Victor Stinner in branch 'master': bpo-40521: Fix update_slot() when INTERN_NAME_STRINGS is not defined (#20246) https://github.com/python/cpython/commit/0509c4547fc95cc32a91ac446a26192c3bfdf157 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 20:18:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 May 2020 00:18:28 +0000 Subject: [issue32309] Implement asyncio.run_in_executor shortcut In-Reply-To: <1513194861.88.0.213398074469.issue32309@psf.upfronthosting.co.za> Message-ID: <1589933908.78.0.0684578566345.issue32309@roundup.psfhosted.org> STINNER Victor added the comment: Note for myself: Python 3.9 release manager (Lukasz) approved adding the feature to Python 3.9.0 beta2: https://github.com/python/cpython/pull/20212#pullrequestreview-414278938 ---------- nosy: +vstinner versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 20:28:33 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 20 May 2020 00:28:33 +0000 Subject: [issue40682] random.Random.seed() with version=1 does not consistently match Python 2 behavior In-Reply-To: <1589898766.59.0.355441549613.issue40682@roundup.psfhosted.org> Message-ID: <1589934513.86.0.371839512309.issue40682@roundup.psfhosted.org> Raymond Hettinger added the comment: The parts that are supposed to be stable are the seeding and the output of calls to random(). The sessions shown below show that this working as intended. The downstream algorithms such as randrange() are not protected by the reproducibility guarantees. While we try not to change them unnecessarily, they are allowed to change and to generate different sequences. At some point in Python 3's history, we changed randrange() so that it often gives different results than before. The reason for the change is that the old algorithm wasn't as evenly distributed as it should have been. ------ Sessions showing that the output of random() is stable ------ Python 2.7.17 (v2.7.17:c2f86d86e6, Oct 19 2019, 16:24:34) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license()" for more information. >>> import random >>> random.seed('superman123') >>> [random.random() for i in range(5)] [0.6740635277890739, 0.3455289115553195, 0.6883176146073614, 0.3824266890084288, 0.9839811707434662] Python 3.8.3 (v3.8.3:6f8c8320e9, May 13 2020, 16:29:34) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license()" for more information. >>> import random >>> random.seed('superman123', version=1) >>> [random.random() for i in range(5)] [0.6740635277890739, 0.3455289115553195, 0.6883176146073614, 0.3824266890084288, 0.9839811707434662] ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 20:50:18 2020 From: report at bugs.python.org (Y Ono) Date: Wed, 20 May 2020 00:50:18 +0000 Subject: [issue40693] pathlib.Path will be broken with os.chdir command. Message-ID: <1589935818.51.0.287299786193.issue40693@roundup.psfhosted.org> New submission from Y Ono : ``` import os from pathlib import Path os.chdir(Path(__file__).parent) print(Path(__file__).absolute()) ``` I put the code into a file in `/tmp/test.py`, and execute it from `/tmp/` directory like below. Then the output showed `/tmp/scripts/scripts/test.py`. ``` $ python scripts/test.py /tmp/scripts/scripts/test.py ``` After executing `os.chdir`, pathlib's path handling is completely broken. ---------- components: C API messages: 369410 nosy: Y Ono priority: normal severity: normal status: open title: pathlib.Path will be broken with os.chdir command. versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 20:58:34 2020 From: report at bugs.python.org (Y Ono) Date: Wed, 20 May 2020 00:58:34 +0000 Subject: [issue40693] pathlib.Path will be broken with os.chdir command. In-Reply-To: <1589935818.51.0.287299786193.issue40693@roundup.psfhosted.org> Message-ID: <1589936314.74.0.552531494458.issue40693@roundup.psfhosted.org> Y Ono added the comment: It's the same as when executing `os.path.abspath`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 21:06:40 2020 From: report at bugs.python.org (Irv Kalb) Date: Wed, 20 May 2020 01:06:40 +0000 Subject: [issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched In-Reply-To: <1575141041.2.0.751349559914.issue38946@roundup.psfhosted.org> Message-ID: <1589936800.95.0.957267478096.issue38946@roundup.psfhosted.org> Irv Kalb added the comment: If possible, I would like to raise the priority of this issue. I teach Python and I use IDLE every day. This bug makes using IDLE for teaching extremely difficult. Hopefully new information: I have just bought a new Mac, which is running Catalina (MacOS 10.15). I am using Python/IDLE 3.7.3, and I am seeing the same issue. And it does seem to behave differently depending on if I created the file(s) on my computer (fails) vs downloading files from the internet (opens just fine). (For background info, I have used IDLE for years on my older Mac with MacOS 10.12 without seeing this problem.) I have my Mac Finder set to open all ".py" files using IDLE.app in the Python 3.7 folder. In the Finder, if I select one or more files and double click, each file opens in an editor window in IDLE. But after that, with IDLE still open, double clicking on any other .py file is ignored. I can edit and save any open file, but I can no longer open additional files by double clicking in the Finder, or by dragging a file to the IDLE icon in my Dock. Further info: If I am in IDLE and have an editing window open, then I choose to open a different file using File -> Open File, and navigate to another Python file, then the open file closes, and the new file opens - even if I have not saved any changed in the first file. I never use the command line. I just double click on Python files, and want to see them open in IDLE. That's how I teach my students, and I typically have multiple small sample files open at the same time. This bug makes it impossible to teach and work this way. If it would help, I would be happy to create a small movie demonstrating this problem. ---------- nosy: +IrvKalb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 22:25:46 2020 From: report at bugs.python.org (Karl Ding) Date: Wed, 20 May 2020 02:25:46 +0000 Subject: [issue40291] socket library support for CAN_J1939 In-Reply-To: <1586928559.09.0.469111314858.issue40291@roundup.psfhosted.org> Message-ID: <1589941546.53.0.0811741371384.issue40291@roundup.psfhosted.org> Change by Karl Ding : ---------- pull_requests: +19536 pull_request: https://github.com/python/cpython/pull/20248 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 22:28:23 2020 From: report at bugs.python.org (Karl Ding) Date: Wed, 20 May 2020 02:28:23 +0000 Subject: [issue40291] socket library support for CAN_J1939 In-Reply-To: <1586928559.09.0.469111314858.issue40291@roundup.psfhosted.org> Message-ID: <1589941703.53.0.186997767464.issue40291@roundup.psfhosted.org> Karl Ding added the comment: Should this be added to the What's New for 3.9? I see a smaller change that exposes the CAN_RAW_JOIN_FILTERS constant mentioned. I've created https://github.com/python/cpython/pull/20248 if this is needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 22:31:55 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 20 May 2020 02:31:55 +0000 Subject: [issue40291] socket library support for CAN_J1939 In-Reply-To: <1586928559.09.0.469111314858.issue40291@roundup.psfhosted.org> Message-ID: <1589941915.56.0.201915278734.issue40291@roundup.psfhosted.org> miss-islington added the comment: New changeset 550f30c8f33a2ba844db2ce3da8a897b3e882c9a by karl ding in branch 'master': bpo-40291: Mention socket.CAN_J1939 in What's New (GH-20248) https://github.com/python/cpython/commit/550f30c8f33a2ba844db2ce3da8a897b3e882c9a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 22:32:04 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 20 May 2020 02:32:04 +0000 Subject: [issue40291] socket library support for CAN_J1939 In-Reply-To: <1586928559.09.0.469111314858.issue40291@roundup.psfhosted.org> Message-ID: <1589941924.78.0.630508533962.issue40291@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19537 pull_request: https://github.com/python/cpython/pull/20249 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 19 22:37:24 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 20 May 2020 02:37:24 +0000 Subject: [issue40291] socket library support for CAN_J1939 In-Reply-To: <1586928559.09.0.469111314858.issue40291@roundup.psfhosted.org> Message-ID: <1589942244.4.0.481553973405.issue40291@roundup.psfhosted.org> miss-islington added the comment: New changeset 12fa658d0565c6c53d25f464f29ef596a0df5e2a by Miss Islington (bot) in branch '3.9': bpo-40291: Mention socket.CAN_J1939 in What's New (GH-20248) https://github.com/python/cpython/commit/12fa658d0565c6c53d25f464f29ef596a0df5e2a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 00:47:05 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 20 May 2020 04:47:05 +0000 Subject: [issue40694] gen.throw() with multiple yield froms skips intermediate exceptions Message-ID: <1589950025.34.0.136144385368.issue40694@roundup.psfhosted.org> New submission from Chris Jerdonek : Here is another gen.throw() exception chain example similar to the examples in issue 29587: https://bugs.python.org/issue29587 def f(): yield def g(): try: raise RuntimeError('a') except Exception as exc: print(f'handling: {exc!r}') yield from f() def h(): try: raise RuntimeError('b') except Exception as exc: print(f'handling: {exc!r}') yield from g() gen = h() gen.send(None) gen.throw(ValueError) Output: handling: RuntimeError('b') handling: RuntimeError('a') Traceback (most recent call last): File "/.../test.py", line 13, in h raise RuntimeError('b') RuntimeError: b During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/.../test.py", line 20, in gen.throw(ValueError) File "/.../test.py", line 16, in h yield from g() File "/.../test.py", line 9, in g yield from f() File "/.../test.py", line 2, in f yield ValueError The issue is that "RuntimeError: a" is skipped. It should also appear in the exception chain. I believe this has the same root cause as issue 29590: https://bugs.python.org/issue29590 ---------- components: Interpreter Core messages: 369416 nosy: chris.jerdonek priority: normal severity: normal status: open title: gen.throw() with multiple yield froms skips intermediate exceptions versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 00:49:18 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 20 May 2020 04:49:18 +0000 Subject: [issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw() In-Reply-To: <1487341428.62.0.272190755105.issue29590@psf.upfronthosting.co.za> Message-ID: <1589950158.7.0.372568209135.issue29590@roundup.psfhosted.org> Chris Jerdonek added the comment: I just filed a related issue to this that's also similar to issue 29587: https://bugs.python.org/issue40694 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 01:10:36 2020 From: report at bugs.python.org (SilentGhost) Date: Wed, 20 May 2020 05:10:36 +0000 Subject: [issue40693] pathlib.Path will be broken with os.chdir command. In-Reply-To: <1589935818.51.0.287299786193.issue40693@roundup.psfhosted.org> Message-ID: <1589951436.88.0.0931963191741.issue40693@roundup.psfhosted.org> Change by SilentGhost : ---------- components: +Library (Lib) nosy: +pitrou stage: -> needs patch type: -> behavior versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 01:18:25 2020 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 20 May 2020 05:18:25 +0000 Subject: [issue39673] Map errno==ETIME to TimeoutError In-Reply-To: <1582019519.42.0.474248510986.issue39673@roundup.psfhosted.org> Message-ID: <1589951905.16.0.334610160391.issue39673@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 2.0 -> 3.0 pull_requests: +19538 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20253 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 01:20:42 2020 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 20 May 2020 05:20:42 +0000 Subject: [issue39673] Map errno==ETIME to TimeoutError In-Reply-To: <1582019519.42.0.474248510986.issue39673@roundup.psfhosted.org> Message-ID: <1589952042.18.0.741003858199.issue39673@roundup.psfhosted.org> Change by Zackery Spytz : ---------- versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 02:09:13 2020 From: report at bugs.python.org (Zachary Ware) Date: Wed, 20 May 2020 06:09:13 +0000 Subject: [issue40693] pathlib.Path will be broken with os.chdir command. In-Reply-To: <1589935818.51.0.287299786193.issue40693@roundup.psfhosted.org> Message-ID: <1589954953.32.0.564435295395.issue40693@roundup.psfhosted.org> Zachary Ware added the comment: I don't see anything broken here: `__file__` is "scripts/test.py", `Path(__file__).parent` is "scripts", and `__file__` doesn't change just because the working directory changed (it's a static string set at import time, which is only a relative path because you ran the file using a relative path). ---------- nosy: +zach.ware resolution: -> not a bug stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 02:17:56 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 20 May 2020 06:17:56 +0000 Subject: [issue40693] pathlib.Path will be broken with os.chdir command. In-Reply-To: <1589935818.51.0.287299786193.issue40693@roundup.psfhosted.org> Message-ID: <1589955476.73.0.57118193133.issue40693@roundup.psfhosted.org> Eric V. Smith added the comment: https://stackoverflow.com/questions/7116889/is-module-file-attribute-absolute-or-relative and https://bugs.python.org/issue18416 might help explain behavior. I agree it's working as designed. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 02:46:51 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 20 May 2020 06:46:51 +0000 Subject: [issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched In-Reply-To: <1575141041.2.0.751349559914.issue38946@roundup.psfhosted.org> Message-ID: <1589957211.6.0.380652495704.issue38946@roundup.psfhosted.org> Terry J. Reedy added the comment: This is not really an IDLE issue; I only tagged it as such to make it easy for IDLE users to find. It might or not be a python-install Catalina-upgrade issue. It definitely is an Apple issue in that they care little for Python, nothing for tcl/tk, and released something that broke even 64-bit apps. On my copy of Mohave, if x.py is open in IDLE, double clicking x.py in Finder does not open x.py in a new window. Rather, it raises the existing x.py window to the top and makes it the active window. This is what it should do. IDLE File=>Open has a shortcut -- Command-O. Either opens a IDLE-specific Finder-like window. The main difference from the Finder-app window is that selections are guaranteed to open in IDLE regardless of Finder/system settings. And once you have a file open, File-open/Command-C opens the IDLE-Finder dialog in the directory containing that file, with that file highlighted and others listed. So I consider this superior to the OS File Manager. I also make great use of File=>Recent Files to open files. Irv, file closing when you open another is a different issue from files not opening (but I don't know that a separate tracker issue would be useful). It seems crazy, and was not reported by anyone else yet, but I will believe it without a movie. Does this happen with IDLE's open dialog, or only with Finder itself? If the latter, use the former. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 03:09:01 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Wed, 20 May 2020 07:09:01 +0000 Subject: [issue40679] show class name in method invocation TypeError In-Reply-To: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> Message-ID: <1589958541.62.0.734803330361.issue40679@roundup.psfhosted.org> Dennis Sweeney added the comment: While trying to write tests, I stumbled across something interesting: _PyObject_FunctionString as discussed here ( https://bugs.python.org/issue37645 ) returns a string that also includes the module name where applicable. For example, the module name is included behind the qualname in the following situation: >>> from random import Random >>> Random.seed(a=1, **{"a":2}) Traceback (most recent call last): File "", line 1, in Random.seed(a=1, **{"a":2}) TypeError: random.Random.seed() got multiple values for keyword argument 'a' or: >>> class A: ... def foo(bar): ... pass ... >>> A().foo(bar=1, **{"bar":2}) Traceback (most recent call last): File "", line 1, in TypeError: __main__.A.foo() got multiple values for keyword argument 'bar' >From what I can tell, this seems to happen mostly during the CALL_FUNCTION_EX instruction (unpacking *args and **kwargs), while we don't get this level of qualification during the actual do_call_core. Maybe _PyObject_FunctionString should ideally be used everywhere applicable, but there seems to be a different issue with that: the _PyEval_EvalCode function where the error handling occurs doesn't receive a reference to the function, only references to the function's code object and qualname (unless I'm missing to something). Should the signature of _PyEval_EvalCode be modified? Or should we be satisfied with the half-measure of including the qualname but not the module (at least for now)? Is there a good reason for the different qualifiers for functions when encountering different types of invalid arguments? There's also a block that I couldn't figure out how to reach in tests from Python code: at https://github.com/python/cpython/blob/master/Python/ceval.c#L4233 ("keywords must be strings" when passing as two arrays), I don't know how to reach this code in a way that isn't a SyntaxError first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 03:25:59 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 20 May 2020 07:25:59 +0000 Subject: [issue40679] show class name in method invocation TypeError In-Reply-To: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> Message-ID: <1589959559.41.0.824133835194.issue40679@roundup.psfhosted.org> Chris Jerdonek added the comment: > Or should we be satisfied with the half-measure of including the qualname but not the module (at least for now)? This is something I was wondering myself, too (also for other contexts). Let's take things one step at a time and limit ourselves just to __qualname__ in this issue. Including the module name can be discussed in a separate issue. (This question also comes up for the __repr__ of objects -- sometimes it includes the fully qualified name and sometimes it doesn't.) For your last question, does this work? >>> def foo(**kwargs): pass ... >>> foo(**{1: 2}) Traceback (most recent call last): File "", line 1, in TypeError: keywords must be strings (Also, the corrected link is here: https://github.com/python/cpython/blob/master/Python/ceval.c#L4182 ) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 03:34:02 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 20 May 2020 07:34:02 +0000 Subject: [issue40679] show class name in method invocation TypeError In-Reply-To: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> Message-ID: <1589960042.46.0.460523036244.issue40679@roundup.psfhosted.org> Chris Jerdonek added the comment: Oh, I see now I was hitting a different line: https://github.com/python/cpython/blob/master/Objects/call.c#L1009 Maybe my suggestion is enough to help you (I didn't really look closely at the code), or maybe you were already aware of that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 03:35:48 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Wed, 20 May 2020 07:35:48 +0000 Subject: [issue40679] show class name in method invocation TypeError In-Reply-To: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> Message-ID: <1589960148.38.0.966156212811.issue40679@roundup.psfhosted.org> Dennis Sweeney added the comment: I got this: >>> class A: ... def f(): ... pass ... >>> A.f(1) Traceback (most recent call last): File "", line 1, in TypeError: A.f() takes 0 positional arguments but 1 was given >>> A.f(**{1:2}) Traceback (most recent call last): File "", line 1, in TypeError: keywords must be strings I think this is coming from https://github.com/python/cpython/blob/cd8295ff758891f21084a6a5ad3403d35dda38f7/Python/getargs.c#L1636. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 03:42:49 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Wed, 20 May 2020 07:42:49 +0000 Subject: [issue40679] show class name in method invocation TypeError In-Reply-To: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> Message-ID: <1589960569.41.0.849755363453.issue40679@roundup.psfhosted.org> Dennis Sweeney added the comment: Never mind; I think you're right, and https://github.com/python/cpython/blob/master/Objects/call.c#L1009 is the line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 03:42:55 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 20 May 2020 07:42:55 +0000 Subject: [issue40679] show class name in method invocation TypeError In-Reply-To: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> Message-ID: <1589960575.39.0.420370297705.issue40679@roundup.psfhosted.org> Chris Jerdonek added the comment: Oh, that string is used in even more spots (sorry wasn't looking too closely the first time). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 03:46:23 2020 From: report at bugs.python.org (jpelizza) Date: Wed, 20 May 2020 07:46:23 +0000 Subject: [issue40642] Cpython "pystate.h" subdirectory wrong In-Reply-To: <1589614857.55.0.73631693439.issue40642@roundup.psfhosted.org> Message-ID: <1589960783.21.0.570172074014.issue40642@roundup.psfhosted.org> jpelizza added the comment: In hindsight I provided absolutely nothing, new to this, bound to make dumb mistakes. Compiler error: In file included from /usr/include/python3.8/pystate.h:129, from /usr/include/python3.8/genobject.h:11, from /usr/include/python3.8/Python.h:121, from cpppython.cpp:2: /usr/include/python3.8/cpython/pystate.h:9:10: fatal error: cpython/initconfig.h: No such file or directory 9 | #include "cpython/initconfig.h" | ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated. Compiler version: gcc version 9.3.0 (Arch Linux 9.3.0-1) About the change, yeah "initconfig.h" and the other one are the same, if it is a real problem then there is no need for "./" After changing it to just "initconfig.h" the code compiled normally. From my understanding since initconfig.h is already inside the folder cpython using "cpython/initconfig.h" will try to look for another cpython folder inside the cpython folder and then look for initconfig thus the error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 04:07:57 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 May 2020 08:07:57 +0000 Subject: [issue40695] hashlib: OpenSSL hash detection should obey security policy Message-ID: <1589962077.62.0.0858651561695.issue40695@roundup.psfhosted.org> New submission from Christian Heimes : The hashlib module prefers hash implementations from OpenSSL. In case OpenSSL is not available or OpenSSL does not provide a hash algorithm, hashlib falls back to builtin implementations for MD5, SHA1, SHA2 family, SHA3/SHAKE family, and Blake2. The __get_openssl_constructor [1] function checks OpenSSL by retrieving the constructor and calling it. The calls fails if OpenSSL doesn't implement the EVP digest. It also fails when the EVP digest is available but blocked by a security policy. In this case it falls back to the builtin implementation. If the builtin implementation has been removed by the package builder or --with-builtin-hashlib-hashes, then Python considers the hash algorithm as broken. I propose to change the detection code so that Python uses OpenSSL implementation although it's blocked by the current system policy. Current behavior: $ rpm -qa openssl openssl-1.1.1g-1.fc32.x86_64 $ /configure -C --with-builtin-hashlib-hashes=blake2 $ make -j4 $ ./python >>> import hashlib ERROR:root:code for hash md5 was not found. Traceback (most recent call last): File "/root/cpython/Lib/hashlib.py", line 131, in __get_openssl_constructor f() ValueError: [digital envelope routines: EVP_DigestInit_ex] disabled for FIPS During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/root/cpython/Lib/hashlib.py", line 251, in globals()[__func_name] = __get_hash(__func_name) File "/root/cpython/Lib/hashlib.py", line 135, in __get_openssl_constructor return __get_builtin_constructor(name) File "/root/cpython/Lib/hashlib.py", line 118, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type md5 >>> hashlib.md5() Traceback (most recent call last): File "", line 1, in AttributeError: module 'hashlib' has no attribute 'md5' Proposed behavior: $ ./python >>> import hashlib >>> hashlib.md5() Traceback (most recent call last): File "", line 1, in ValueError: [digital envelope routines: EVP_DigestInit_ex] disabled for FIPS >>> hashlib.md5(usedforsecurity=False) Related issue: bpo-9216 added the new hash constructor argument "usedforsecurity". bpo-40637 added a new configure option --with-builtin-hashlib-hashes [1] https://github.com/python/cpython/blob/97fe9cfd9f81fe96a70e1ce80fce04b0c937bfac/Lib/hashlib.py#L121-L135 ---------- assignee: christian.heimes components: Library (Lib) messages: 369428 nosy: christian.heimes, gregory.p.smith priority: normal severity: normal status: open title: hashlib: OpenSSL hash detection should obey security policy type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 04:08:03 2020 From: report at bugs.python.org (Mariusz Felisiak) Date: Wed, 20 May 2020 08:08:03 +0000 Subject: [issue40696] "await" hangs in Python3.9.0b1. Message-ID: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> New submission from Mariusz Felisiak : We noticed a behavior change in Python3.9.0b1 (it works properly in Python3.9.0a6). One of our tests `handlers.tests.AsyncHandlerRequestTests.test_suspiciousop_in_view_returns_400`[1] hangs on `await`. `/suspicious/`?is a view that raises a custom exception `SuspiciousOperation`. [1] https://github.com/django/django/blob/8328811f048fed0dd22573224def8c65410c9f2e/tests/handlers/tests.py#L258-L260 ---------- components: asyncio messages: 369429 nosy: asvetlov, carltongibson, felixxm, yselivanov priority: normal severity: normal status: open title: "await" hangs in Python3.9.0b1. versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 04:08:58 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 May 2020 08:08:58 +0000 Subject: [issue9216] FIPS support for hashlib In-Reply-To: <1278721335.16.0.522410247151.issue9216@psf.upfronthosting.co.za> Message-ID: <1589962138.84.0.584589304055.issue9216@roundup.psfhosted.org> Christian Heimes added the comment: Memo to me: Add whatsnew ---------- versions: +Python 3.10, Python 3.9 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 04:28:10 2020 From: report at bugs.python.org (Peixing Xin) Date: Wed, 20 May 2020 08:28:10 +0000 Subject: [issue31904] Python should support VxWorks RTOS In-Reply-To: <1509393393.78.0.213398074469.issue31904@psf.upfronthosting.co.za> Message-ID: <1589963290.22.0.14318325598.issue31904@roundup.psfhosted.org> Change by Peixing Xin : ---------- pull_requests: +19539 pull_request: https://github.com/python/cpython/pull/20254 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 04:42:33 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 20 May 2020 08:42:33 +0000 Subject: [issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched In-Reply-To: <1575141041.2.0.751349559914.issue38946@roundup.psfhosted.org> Message-ID: <1589964153.57.0.278858368594.issue38946@roundup.psfhosted.org> Ned Deily added the comment: Irv, I'm sorry you are having problems and I think it is very reasonable to bump the priority of the issue as you are not alone, even though, as Terry notes, a complete resolution may require changes elsewhere. I am looking more into this now. macOS 10.15 Catalina has introduced a number of changes in the interest of improving your security and some of these have had an impact on both Python and on Tcl/Tk which IDLE uses to power its GUI. While most of the 10.15-specific issues are addressed in the latest release of Python (3.8.3), the issue of double-clicking a file while IDLE is already open is not yet. However, I notice you mention that you are using IDLE from Python 3.7.3. If so, be aware that that is not the latest release of either Python 3 or Python 3.7 (3.7.3 predates Catalina.) 3.7.7 is the most recent for 3.7 but Python 3.8 is now current and its most recent release, 3.8.3, has the most up-to-date support for 10.15. If possible, you should update to 3.8.3 or at least to 3.7.7, which has some. That won't fix everyting but it may make some issues go away. You also mention the apparent closing of an IDLE edit window when you open another edit window. I have not seen nor am aware of reports of behavior exactly like that; however, I think you might be running into a similar situation to what Andrew reports in an earlier comment (msg366978) in this issue. What you may be going on is a case where trying to open another file to edit in IDLE unexpectedly causes a second instance of IDLE to open, with the original file still open in the original instance (but perhaps with its windows now obscured by other windows) and with the second file open in an edit window in the additional IDLE instance. That can be very confusing as having more than one instance of the same app running is normally not supposed to happen. One way to tell that this is happening is to check the macOS Dock and see if there is more than one IDLE icon present with the active indicator. If you switch to the other IDLE instance, your original edit window should still be present. (You could also use Mission Control features to see all open windows.) Let us know if you can determine that the closing window is the second IDLE case with 3.7.3; this problem may not occur with IDLE from 3.8.3 but let us know. By the way, I am assuming here that you are using Python 3.7.3 downloaded from the python.org website. Let us know if that is not the case. ---------- priority: normal -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 05:12:45 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 20 May 2020 09:12:45 +0000 Subject: [issue40696] "await" hangs in Python3.9.0b1. In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1589965965.42.0.0715186348928.issue40696@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 05:19:57 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 20 May 2020 09:19:57 +0000 Subject: [issue34956] _tkinter built on macOS 10.14 does not link to Tcl and Tk in /Library/Frameworks In-Reply-To: <1539228548.05.0.788709270274.issue34956@psf.upfronthosting.co.za> Message-ID: <1589966397.34.0.916116101295.issue34956@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +19540 pull_request: https://github.com/python/cpython/pull/20255 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 05:25:24 2020 From: report at bugs.python.org (AndrewGYork) Date: Wed, 20 May 2020 09:25:24 +0000 Subject: [issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched In-Reply-To: <1575141041.2.0.751349559914.issue38946@roundup.psfhosted.org> Message-ID: <1589966724.8.0.594086646652.issue38946@roundup.psfhosted.org> AndrewGYork added the comment: If it's helpful, I'd be happy to do a screenshare session (Google Meet, Zoom, etc), to demonstrate and explore the behavior. We have a 10.15.4 Mac with python 3.8.3 freshly installed from python.org, Tk version 8.6.8, IDLE version 3.8.3. IDLE file opening functions very differently on this machine then on any Linux or Windows machine I've used in the past decade. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 05:36:32 2020 From: report at bugs.python.org (Peixing Xin) Date: Wed, 20 May 2020 09:36:32 +0000 Subject: [issue31904] Python should support VxWorks RTOS In-Reply-To: <1509393393.78.0.213398074469.issue31904@psf.upfronthosting.co.za> Message-ID: <1589967392.27.0.0186507107099.issue31904@roundup.psfhosted.org> Change by Peixing Xin : ---------- pull_requests: +19541 pull_request: https://github.com/python/cpython/pull/20256 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 05:40:05 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 20 May 2020 09:40:05 +0000 Subject: [issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched In-Reply-To: <1575141041.2.0.751349559914.issue38946@roundup.psfhosted.org> Message-ID: <1589967605.21.0.737521827511.issue38946@roundup.psfhosted.org> Ned Deily added the comment: Thanks, Andrew, for the offer. I think we have enough to go on right now but we may want to touch base a bit later. >From your comment about how IDLE on macOS is different than it is on Windows or Linux, I assume that means you may be new to IDLE on macOS. Yes, there are a number of sometimes subtle differences. Most of these are differences in how Tk behaves (rather than IDLE itself) and usually with a very good reason: Tk tries very hard to be a "good" citizen in each of the three major windowing environments it is supported: Windows-native, macOS-native, and X11 (Linux and others). As such, Tk tries to look and behave as native applications in each are expected to behave, which leads to subtle but important programming issues, like the fact that macOS applications are expected to have one menu bar that appears at the top of the active display whereas on other platforms, each window may have its own menu bar. Or Tk uses the macOS-supplied file opening and closing sheets which differ from other platforms, etc etc. That can make using Tk-based apps, like IDLE, more familiar-looking to and easier to learn for macOS users but it can be disconcerting if you are using such an app on multiple platforms. Or perhaps you meant something else. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 05:41:40 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 20 May 2020 09:41:40 +0000 Subject: [issue34956] _tkinter built on macOS 10.14 does not link to Tcl and Tk in /Library/Frameworks In-Reply-To: <1539228548.05.0.788709270274.issue34956@psf.upfronthosting.co.za> Message-ID: <1589967700.55.0.602966177299.issue34956@roundup.psfhosted.org> Ned Deily added the comment: New changeset bac170cd93bbae939fcb29ccc6b5d423f7f4a089 by Ned Deily in branch 'master': bpo-34956: edit and format better NEWS item in 3.9.0b1 changelog (GH-20255) https://github.com/python/cpython/commit/bac170cd93bbae939fcb29ccc6b5d423f7f4a089 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 05:41:40 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 20 May 2020 09:41:40 +0000 Subject: [issue34956] _tkinter built on macOS 10.14 does not link to Tcl and Tk in /Library/Frameworks In-Reply-To: <1539228548.05.0.788709270274.issue34956@psf.upfronthosting.co.za> Message-ID: <1589967700.55.0.602966177299.issue34956@roundup.psfhosted.org> Ned Deily added the comment: New changeset bac170cd93bbae939fcb29ccc6b5d423f7f4a089 by Ned Deily in branch 'master': bpo-34956: edit and format better NEWS item in 3.9.0b1 changelog (GH-20255) https://github.com/python/cpython/commit/bac170cd93bbae939fcb29ccc6b5d423f7f4a089 ---------- message_count: 6.0 -> 7.0 nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +19542 pull_request: https://github.com/python/cpython/pull/20257 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 05:44:46 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 20 May 2020 09:44:46 +0000 Subject: [issue31904] Python should support VxWorks RTOS In-Reply-To: <1509393393.78.0.213398074469.issue31904@psf.upfronthosting.co.za> Message-ID: <1589967886.43.0.0718263292729.issue31904@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: -ned.deily versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 05:47:11 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 20 May 2020 09:47:11 +0000 Subject: [issue34956] _tkinter built on macOS 10.14 does not link to Tcl and Tk in /Library/Frameworks In-Reply-To: <1539228548.05.0.788709270274.issue34956@psf.upfronthosting.co.za> Message-ID: <1589968031.16.0.997781487652.issue34956@roundup.psfhosted.org> miss-islington added the comment: New changeset e7bf8684e2f9d5f7e92284a0ea085a791f5173df by Miss Islington (bot) in branch '3.9': bpo-34956: edit and format better NEWS item in 3.9.0b1 changelog (GH-20255) https://github.com/python/cpython/commit/e7bf8684e2f9d5f7e92284a0ea085a791f5173df ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 05:53:13 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 20 May 2020 09:53:13 +0000 Subject: [issue40448] ensurepip uses cache directory In-Reply-To: <1588239551.95.0.236818491517.issue40448@roundup.psfhosted.org> Message-ID: <1589968393.68.0.812555300806.issue40448@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the PR. We should get a review from at least one of the pip developers. @oradyunsg, @dstufft, @paul.moore, opinions? ---------- nosy: +Marcus.Smith, ned.deily, paul.moore versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 06:12:40 2020 From: report at bugs.python.org (Paul Moore) Date: Wed, 20 May 2020 10:12:40 +0000 Subject: [issue40448] ensurepip uses cache directory In-Reply-To: <1588239551.95.0.236818491517.issue40448@roundup.psfhosted.org> Message-ID: <1589969560.54.0.486709809192.issue40448@roundup.psfhosted.org> Paul Moore added the comment: PR looks good to me. There's a test failure that needs fixing and the PR needs a news entry, but otherwise looks fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 06:21:58 2020 From: report at bugs.python.org (Thomas Grainger) Date: Wed, 20 May 2020 10:21:58 +0000 Subject: [issue40697] add fissix as a lib2to3 alternative Message-ID: <1589970118.75.0.588225923307.issue40697@roundup.psfhosted.org> New submission from Thomas Grainger : now that lib2to3 is deprecated, the stdlib should point to alternatives currently the docs point to libcst or parso, however neither is a drop-in replacement for lib2to3 the docs should add fissix as a lib2to3 alternative, because it is a drop-in replacement ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 369438 nosy: graingert priority: normal pull_requests: 19543 severity: normal status: open title: add fissix as a lib2to3 alternative versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 06:39:18 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 20 May 2020 10:39:18 +0000 Subject: [issue40697] add fissix as a lib2to3 alternative In-Reply-To: <1589970118.75.0.588225923307.issue40697@roundup.psfhosted.org> Message-ID: <1589971158.45.0.292976293127.issue40697@roundup.psfhosted.org> Batuhan Taskaya added the comment: Does / Will this project actively maintained? From what I can tell from the numerical stats (such as commit dates and star counts), it is not very much used and I'm afraid it doesn't look very active. ---------- nosy: +BTaskaya, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 06:58:01 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 May 2020 10:58:01 +0000 Subject: [issue9216] FIPS support for hashlib In-Reply-To: <1278721335.16.0.522410247151.issue9216@psf.upfronthosting.co.za> Message-ID: <1589972281.56.0.516571205141.issue9216@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +19544 pull_request: https://github.com/python/cpython/pull/20258 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 07:11:16 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 May 2020 11:11:16 +0000 Subject: [issue40695] hashlib: OpenSSL hash detection should obey security policy In-Reply-To: <1589962077.62.0.0858651561695.issue40695@roundup.psfhosted.org> Message-ID: <1589973076.53.0.530505839085.issue40695@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +19545 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20259 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 07:15:40 2020 From: report at bugs.python.org (E. Paine) Date: Wed, 20 May 2020 11:15:40 +0000 Subject: [issue40452] Tkinter/IDLE: preserve clipboard on closure In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1589973340.14.0.665861593965.issue40452@roundup.psfhosted.org> E. Paine added the comment: Multiple Tk instances are already recommended against, but what would be the implications of preventing multiple roots? A simple check could be added to the Tk class init which ensures _default_root is None (if it is not None, an error is raised). In this case, I think it would be much easier for the proposed changes to _tkinter, but also make future maintenance of tkinter easier. I am currently investigating potential solutions based on what Tal has found, and will come back with details if I succeed (and thank you Tal for offering to review a PR). Separately, should we change the issue from IDLE to tkinter, as that the fix we are looking at applying? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 07:15:56 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 20 May 2020 11:15:56 +0000 Subject: [issue40696] "await" hangs in Python3.9.0b1. In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1589973356.38.0.301265658179.issue40696@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +aeros _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 07:29:47 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 20 May 2020 11:29:47 +0000 Subject: [issue40696] "await" hangs in Python3.9.0b1. In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1589974187.16.0.0669318011324.issue40696@roundup.psfhosted.org> Chris Jerdonek added the comment: I'm getting close to tracking this down. There is a certain point in the code path of the Django test where `exc is exc.__context__` becomes True. I'm guessing this is what's causing the hang. I'll try to get a simple reproducer (there is a lot of Django code to sort through). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 07:32:43 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 May 2020 11:32:43 +0000 Subject: [issue40698] distutils.command.upload md5_digest Message-ID: <1589974363.4.0.0200698249561.issue40698@roundup.psfhosted.org> New submission from Christian Heimes : The distutils upload command creates a MD5 digest of the file content. This is not compatible with systems with systems that run under a strict security policy that blocks MD5. Possible fixes are: * declare that the MD5 digest is not used for security. Security is provided by TLS/SSL and HTTPS. The digest is just a simple checksum to detect file corruption during upload. * Remove MD5 digest completely * Don't create a MD5 digest if ``hashlib.md5(content)`` fails * Skip the test case if MD5 is not available Does PyPI support other digests, e.g. SHA2-256 digest? ---------- components: Library (Lib) messages: 369442 nosy: christian.heimes priority: normal severity: normal status: open title: distutils.command.upload md5_digest type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 07:33:52 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 May 2020 11:33:52 +0000 Subject: [issue40698] distutils.command.upload md5_digest In-Reply-To: <1589974363.4.0.0200698249561.issue40698@roundup.psfhosted.org> Message-ID: <1589974432.18.0.152088370472.issue40698@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +dstufft, eric.araujo, gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 07:35:48 2020 From: report at bugs.python.org (Cristian Martinez de Morentin) Date: Wed, 20 May 2020 11:35:48 +0000 Subject: [issue40699] Memory leak in threading library with Python 3.6-3.8 Message-ID: <1589974548.09.0.894000250375.issue40699@roundup.psfhosted.org> New submission from Cristian Martinez de Morentin : Hi everyone, I have found a memory leak when using Queue and Condition from threading library. The issue can be reproduced with the following code: ======================================================== import queue import threading class MemoryTest(threading.Thread): def __init__(self): threading.Thread.__init__(self) self.queue = queue.Queue() self.cv = threading.Condition() def put(self, msg): self.queue.put(msg) with self.cv: self.cv.notify() def run(self): while True: while not self.queue.empty(): self.queue.get() self.queue.task_done() with self.cv: self.cv.wait_for(lambda: not self.queue.empty()) ================================================================ If you run a MemoryTest object in another thread, by calling its start() method, and you send it messages by using its put() method, you will see how RAM memory usage starts increasing. This behaviour has been observed in Windows (64 bits) with Python 3.6, 3.7 & 3.8, but not with Python 3.5. Thank you so much. ---------- components: Windows messages: 369443 nosy: Cristian Martinez de Morentin, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Memory leak in threading library with Python 3.6-3.8 type: resource usage versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 07:39:08 2020 From: report at bugs.python.org (Tal Einat) Date: Wed, 20 May 2020 11:39:08 +0000 Subject: [issue40452] Tkinter/IDLE: preserve clipboard on closure In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1589974748.17.0.0236807016141.issue40452@roundup.psfhosted.org> Tal Einat added the comment: Regarding multiple Tk instances, IMO we should try the straightforward solution first: Tcl/Tk has its own mechanisms for handling per-interpreter state, so we may not actually need to handle any of this ourselves. Regarding the title of this issue, it is indeed a bug in Tkinter rather than IDLE, but it does affect IDLE significantly, and someone searching for this might search for IDLE rather than Tkinter. I suggest leaving the title as it is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 07:49:15 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 20 May 2020 11:49:15 +0000 Subject: [issue40642] Cpython "pystate.h" subdirectory wrong In-Reply-To: <1589614857.55.0.73631693439.issue40642@roundup.psfhosted.org> Message-ID: <1589975355.29.0.58942880066.issue40642@roundup.psfhosted.org> Eric V. Smith added the comment: Thanks for the info. It's weird that this is just showing up for you, and I assume works everywhere else. How are you invoking the compiler, via make, or something else? And, what's the gcc command line look like when this specific file fails? I grepped the source code, and didn't see anywhere else where we import something this way, so maybe that's a reason to change it. As for the "./" think: maybe using it would be a better hint as to what's going on. But I'd like to hear from other core devs and get their opinion on any change, first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 07:50:21 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 May 2020 11:50:21 +0000 Subject: [issue40698] distutils.command.upload md5_digest In-Reply-To: <1589974363.4.0.0200698249561.issue40698@roundup.psfhosted.org> Message-ID: <1589975421.68.0.284662324627.issue40698@roundup.psfhosted.org> Christian Heimes added the comment: Charis pointed me to https://github.com/pypa/warehouse/issues/681 / https://github.com/pypa/warehouse/pull/891 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 07:55:02 2020 From: report at bugs.python.org (Donald Stufft) Date: Wed, 20 May 2020 11:55:02 +0000 Subject: [issue40698] distutils.command.upload md5_digest In-Reply-To: <1589974363.4.0.0200698249561.issue40698@roundup.psfhosted.org> Message-ID: <1589975702.26.0.845082974048.issue40698@roundup.psfhosted.org> Donald Stufft added the comment: > Does PyPI support other digests, e.g. SHA2-256 digest? There is a simple and a complicated answer to this. The simple answer is yes, PyPI supports uploads with any combination of MD5, SHA256, and blake2_256 (blake2b with a 256 digest, no personalization or key). It will also compute all 3 on an upload on it's own and verify that they match any provided hashes and to fill in any missing hashes. The more complicated answer is the upload API is an old API from long before we started documenting and standardizing them, so when you start talking about non PyPI implementations of that API, what they support is kind of a big who knows. More to the problem at hand: We don't rely on this hash for security (We couldn't, it comes in the exact same payload as the artifact itself from the exact same source, someone who can modify the artifact en route can modify the hash too). So the inclusion of MD5 is not a concern. Removing it *might* break non-PyPI servers that attempted to implement this API and assumed it was a mandatory field (though I do not have any a priori knowledge of this being the case). Adding additional hashes *might* break non-PyPI servers that assumed what distutils used to send was all it would ever send (this is unlikely though, most web tools ignore unknown form fields). I looked into what twine is doing here, and it appears it is sending md5, sha256, and blake2_256 hashes all along with every request. However if FIPS mode has disabled MD5 it just skips generating and sending MD5 (but still sends the other two) and it appears it's done this for 2+ years. It's probably safe to just mimc what twine is doing here, sending all 3 hashes, skip MD5 if it's unavailable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 07:55:11 2020 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 20 May 2020 11:55:11 +0000 Subject: [issue40698] distutils.command.upload md5_digest In-Reply-To: <1589974363.4.0.0200698249561.issue40698@roundup.psfhosted.org> Message-ID: <1589975711.01.0.770243697886.issue40698@roundup.psfhosted.org> Charalampos Stratakis added the comment: There is also https://github.com/pypa/warehouse/pull/888 So I would assume it's safe it change the digest to sha256. ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 07:55:49 2020 From: report at bugs.python.org (Emmanuel Arias) Date: Wed, 20 May 2020 11:55:49 +0000 Subject: [issue40696] "await" hangs in Python3.9.0b1. In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1589975749.35.0.0221924909797.issue40696@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 08:06:32 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 20 May 2020 12:06:32 +0000 Subject: [issue40696] "await" hangs in Python3.9.0b1. In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1589976392.14.0.213653681927.issue40696@roundup.psfhosted.org> Chris Jerdonek added the comment: FWIW, I found that the following hangs, but it also hangs on earlier versions of Python: import traceback try: raise RuntimeError except Exception as exc: print(f'handling: {exc!r}') exc.__context__ = exc print('printing traceback') print(traceback.format_exc()) # hangs Is this a separate bug? So maybe the issue is that the new code is letting things get into this state. Some of my changes added new chaining in various places, so that would fit (but still investigating). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 08:54:49 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 20 May 2020 12:54:49 +0000 Subject: [issue40696] "await" hangs in Python3.9.0b1. In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1589979289.04.0.382934728707.issue40696@roundup.psfhosted.org> Chris Jerdonek added the comment: To start out sharing what I found in the Django code: Here inside BaseHandler._get_response_async(): https://github.com/django/django/blob/3460ea49e839fd6bb924c48eaa1cd3d6dc888035/django/core/handlers/base.py#L226-L232 try: response = await wrapped_callback(request, *callback_args, **callback_kwargs) except Exception as e: response = await sync_to_async( # This line hangs. self.process_exception_by_middleware, thread_sensitive=True, )(e, request) you can see an exception being handled, which is then passed to process_exception_by_middleware(). Process_exception_by_middleware() can wind up re-raising that same exception, which causes __context__ to be set circularly inside the except block: https://github.com/django/django/blob/3460ea49e839fd6bb924c48eaa1cd3d6dc888035/django/core/handlers/base.py#L323-L332 If you boil this down, you get the following as a simple reproducer. This doesn't hang, but you can tell the difference by comparing exc2 to exc2.__context as indicated below: import asyncio async def process_exc(exc): raise exc async def run(): try: raise RuntimeError except Exception as exc: task = asyncio.create_task(process_exc(exc)) try: await task except BaseException as exc2: # Prints True in 3.9.0b1 and False in 3.9.0a6. print(exc2 is exc2.__context__) loop = asyncio.new_event_loop() try: loop.run_until_complete(run()) finally: loop.close() The cause is probably the following PR, which enabled exception chaining for gen.throw() in the yield from case: https://github.com/python/cpython/pull/19858 So the answer might be to do some cycle detection when chaining the exception, which apparently _PyErr_ChainExceptions() doesn't do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 09:08:01 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 20 May 2020 13:08:01 +0000 Subject: [issue40696] "await" hangs in Python3.9.0b1. In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1589980081.74.0.0887917604879.issue40696@roundup.psfhosted.org> Chris Jerdonek added the comment: The Django details might not matter so much at this point, but to add to something I said above: It might not only be process_exception_by_middleware() as I mentioned, but also asgiref's sync_to_async() function. In that function, you can see an already active exception being re-raised (here the exc_info comes from sys.exc_info()): # If we have an exception, run the function inside the except block # after raising it so exc_info is correctly populated. if exc_info[1]: try: raise exc_info[1] except: return func(*args, **kwargs) else: return func(*args, **kwargs) https://github.com/django/asgiref/blob/edd0570a4f6e46f0948afa5ef197a192bb95b7b7/asgiref/sync.py#L306-L314 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 09:22:34 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 May 2020 13:22:34 +0000 Subject: [issue40698] distutils.command.upload md5_digest In-Reply-To: <1589974363.4.0.0200698249561.issue40698@roundup.psfhosted.org> Message-ID: <1589980954.34.0.107586725563.issue40698@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +19546 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20260 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 09:40:17 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 May 2020 13:40:17 +0000 Subject: [issue40698] distutils.command.upload md5_digest In-Reply-To: <1589974363.4.0.0200698249561.issue40698@roundup.psfhosted.org> Message-ID: <1589982017.77.0.0767534711731.issue40698@roundup.psfhosted.org> Christian Heimes added the comment: Thanks for your elaborate explanation, Donald! I have implemented your proposal in PR 20260. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 09:51:12 2020 From: report at bugs.python.org (E. Paine) Date: Wed, 20 May 2020 13:51:12 +0000 Subject: [issue40452] Tkinter/IDLE: preserve clipboard on closure In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1589982672.26.0.147894485792.issue40452@roundup.psfhosted.org> E. Paine added the comment: After some initial testing, I have found that while calling Tcl_Finalize on window closure keeps the clipboard contents (as expected), it also finishes the Python interpreter. The solution was to instead use the Tcl_FinalizeThread method, "which you can call if you just want to clean up per-thread state" (https://www.tcl.tk/man/tcl8.4/TclLib/Exit.htm). Reading this, I was expecting it to stop further Tk instances from being created after the original one was closed, however some initial testing has found this to not be true. I feel it is too early to create a PR for this yet (I need to do more research and properly understand the calls), but it is quite possible calling this method on root "destroy" is the only thing required to fix this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 10:15:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 May 2020 14:15:17 +0000 Subject: [issue32604] [subinterpreters] PEP 554 implementation: add interpreters module In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1589984117.14.0.884993044245.issue32604@roundup.psfhosted.org> STINNER Victor added the comment: The new test leaks references: https://buildbot.python.org/all/#/builders/563/builds/105 test_interpreters leaked [216, 216, 216] references, sum=648 test_interpreters leaked [84, 84, 84] memory blocks, sum=252 Use "./python -m test.bisect_cmd -R 3:3 test_interpreters" to find tests which leak. Example: $ ./python -m test test_interpreters -R 3:3 -m test.test_interpreters.TestInterpreterDestroy.test_from_current 0:00:00 load avg: 0.82 Run tests sequentially 0:00:00 load avg: 0.82 [1/1] test_interpreters beginning 6 repetitions 123456 ...... test_interpreters leaked [36, 36, 36] references, sum=108 test_interpreters leaked [14, 14, 14] memory blocks, sum=42 test_interpreters failed == Tests result: FAILURE == 1 test failed: test_interpreters Total duration: 1.3 sec Tests result: FAILURE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 10:25:58 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Wed, 20 May 2020 14:25:58 +0000 Subject: [issue32604] [subinterpreters] PEP 554 implementation: add interpreters module In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1589984758.03.0.905949541658.issue32604@roundup.psfhosted.org> Joannah Nanjekye added the comment: I will look at this tommorrow. Am abit busy today. Thanks Victor ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 10:36:01 2020 From: report at bugs.python.org (Tal Einat) Date: Wed, 20 May 2020 14:36:01 +0000 Subject: [issue40452] Tkinter/IDLE: preserve clipboard on closure In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1589985361.83.0.450058855498.issue40452@roundup.psfhosted.org> Tal Einat added the comment: Attaching the changes I made while testing as a patch file. ---------- Added file: https://bugs.python.org/file49173/tkinter-clipboard-on-exit.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 10:37:33 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 20 May 2020 14:37:33 +0000 Subject: [issue40698] distutils.command.upload md5_digest In-Reply-To: <1589974363.4.0.0200698249561.issue40698@roundup.psfhosted.org> Message-ID: <1589985453.08.0.791539722105.issue40698@roundup.psfhosted.org> miss-islington added the comment: New changeset e572c7f6dbe5397153803eab256e4a4ca3384f80 by Christian Heimes in branch 'master': bpo-40698: Improve distutils upload hash digests (GH-20260) https://github.com/python/cpython/commit/e572c7f6dbe5397153803eab256e4a4ca3384f80 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 10:37:42 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 20 May 2020 14:37:42 +0000 Subject: [issue40698] distutils.command.upload md5_digest In-Reply-To: <1589974363.4.0.0200698249561.issue40698@roundup.psfhosted.org> Message-ID: <1589985462.44.0.31076979028.issue40698@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19547 pull_request: https://github.com/python/cpython/pull/20261 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 10:57:15 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 20 May 2020 14:57:15 +0000 Subject: [issue40698] distutils.command.upload md5_digest In-Reply-To: <1589974363.4.0.0200698249561.issue40698@roundup.psfhosted.org> Message-ID: <1589986635.5.0.385071829792.issue40698@roundup.psfhosted.org> miss-islington added the comment: New changeset f541a371a5e608517314a106012e0c19739d2d02 by Miss Islington (bot) in branch '3.9': bpo-40698: Improve distutils upload hash digests (GH-20260) https://github.com/python/cpython/commit/f541a371a5e608517314a106012e0c19739d2d02 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 10:59:09 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 May 2020 14:59:09 +0000 Subject: [issue40698] distutils.command.upload md5_digest In-Reply-To: <1589974363.4.0.0200698249561.issue40698@roundup.psfhosted.org> Message-ID: <1589986749.08.0.463906281573.issue40698@roundup.psfhosted.org> Christian Heimes added the comment: Thanks Charis and Donald! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 11:00:08 2020 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 20 May 2020 15:00:08 +0000 Subject: [issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type In-Reply-To: <1586276621.78.0.843757244355.issue40217@roundup.psfhosted.org> Message-ID: <1589986808.22.0.384917202947.issue40217@roundup.psfhosted.org> Petr Viktorin added the comment: It looks like the fix breaks types that override Py_tp_alloc but not Py_tp_traverse (as some types in PySide do.) I'll investigate more and work on fixing that if someone doesn't beat me to it. ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 11:06:56 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 20 May 2020 15:06:56 +0000 Subject: [issue40696] "await" hangs in Python3.9.0b1. In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1589987216.36.0.97335916354.issue40696@roundup.psfhosted.org> Batuhan Taskaya added the comment: > Is this a separate bug? So maybe the issue is that the new code is letting things get into this state. Some of my changes added new chaining in various places, so that would fit (but still investigating). Looks like there isn't a recursion guard on https://github.com/python/cpython/blob/e572c7f6dbe5397153803eab256e4a4ca3384f80/Python/errors.c#L143-L154 I'm not sure if this would be the real solution but, for this case, it works diff --git a/Python/errors.c b/Python/errors.c index 3b42c1120b..ba3df483e2 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -141,8 +141,8 @@ _PyErr_SetObject(PyThreadState *tstate, PyObject *exception, PyObject *value) usually very short. Sensitive readers may try to inline the call to PyException_GetContext. */ if (exc_value != value) { - PyObject *o = exc_value, *context; - while ((context = PyException_GetContext(o))) { + PyObject *o = exc_value, *context = NULL; + while (o != context && (context = PyException_GetContext(o))) { Py_DECREF(context); if (context == value) { PyException_SetContext(o, NULL); (END) ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 11:27:50 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 20 May 2020 15:27:50 +0000 Subject: [issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type In-Reply-To: <1586276621.78.0.843757244355.issue40217@roundup.psfhosted.org> Message-ID: <1589988470.03.0.775235232493.issue40217@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Re-opening the issue ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 11:32:04 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 20 May 2020 15:32:04 +0000 Subject: [issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type In-Reply-To: <1586276621.78.0.843757244355.issue40217@roundup.psfhosted.org> Message-ID: <1589988724.84.0.47039138275.issue40217@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Maybe we should revert ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 11:34:20 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 20 May 2020 15:34:20 +0000 Subject: [issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type In-Reply-To: <1586276621.78.0.843757244355.issue40217@roundup.psfhosted.org> Message-ID: <1589988860.01.0.168480984363.issue40217@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- Removed message: https://bugs.python.org/msg369463 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 11:35:56 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 20 May 2020 15:35:56 +0000 Subject: [issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type In-Reply-To: <1586276621.78.0.843757244355.issue40217@roundup.psfhosted.org> Message-ID: <1589988956.82.0.724078474993.issue40217@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Maybe we should revert this change and modify the "how to port to ..." section as we did in bpo-35810 to tell users that they need to manually visit the parent in classes created with PyType_FromSpec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 11:54:01 2020 From: report at bugs.python.org (Manjusaka) Date: Wed, 20 May 2020 15:54:01 +0000 Subject: [issue40700] Make WSGIRequestHandler easier to be customized by the user Message-ID: <1589990041.35.0.995968442309.issue40700@roundup.psfhosted.org> New submission from Manjusaka : Hello everyone I think we can make WSGIRequestHandler in wsgiref easier to be customized by the user Here's the detail the WSGIRequestHandler in wsgiref.simple_server has some code like this class WSGIRequestHandler(BaseHTTPRequestHandler): def handle(self): """Handle a single HTTP request""" self.raw_requestline = self.rfile.readline(65537) if len(self.raw_requestline) > 65536: self.requestline = '' self.request_version = '' self.command = '' self.send_error(414) return if not self.parse_request(): # An error code has been sent, just exit return handler = ServerHandler( self.rfile, self.wfile, self.get_stderr(), self.get_environ(), multithread=False, ) handler.request_handler = self # backpointer for logging handler.run(self.server.get_app()) If people want just to replace the ServerHandler, they need to override all the handle method, I don't think this is a good way to use. I prefer do something like this class WSGIRequestHandler(BaseHTTPRequestHandler): server_version = "WSGIServer/" + __version__ server_handler = ServerHandler def handle(self): """Handle a single HTTP request""" self.raw_requestline = self.rfile.readline(65537) if len(self.raw_requestline) > 65536: self.requestline = '' self.request_version = '' self.command = '' self.send_error(414) return if not self.parse_request(): # An error code has been sent, just exit return handler = self.server_handler( self.rfile, self.wfile, self.get_stderr(), self.get_environ(), multithread=False, ) handler.request_handler = self # backpointer for logging handler.run(self.server.get_app()) Now if people just need simple code to replace the ServerHandler, like this class CustomWSGIRequestHandler(WSGIRequestHandler): server_handler = CustomeServerHandler what do you think, I'm glad to make a PR for this ---------- components: Library (Lib) messages: 369465 nosy: Manjusaka priority: normal severity: normal status: open title: Make WSGIRequestHandler easier to be customized by the user type: enhancement versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 12:12:50 2020 From: report at bugs.python.org (Manjusaka) Date: Wed, 20 May 2020 16:12:50 +0000 Subject: [issue40700] Make WSGIRequestHandler easier to be customized by the user In-Reply-To: <1589990041.35.0.995968442309.issue40700@roundup.psfhosted.org> Message-ID: <1589991170.51.0.274173341582.issue40700@roundup.psfhosted.org> Change by Manjusaka : ---------- keywords: +patch pull_requests: +19548 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20262 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 12:25:05 2020 From: report at bugs.python.org (hai shi) Date: Wed, 20 May 2020 16:25:05 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1589991905.17.0.277984413748.issue40275@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +19549 pull_request: https://github.com/python/cpython/pull/20263 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 12:28:27 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 20 May 2020 16:28:27 +0000 Subject: [issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type In-Reply-To: <1586276621.78.0.843757244355.issue40217@roundup.psfhosted.org> Message-ID: <1589992107.6.0.174480375573.issue40217@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +19550 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/20264 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 12:37:05 2020 From: report at bugs.python.org (Edison Abahurire) Date: Wed, 20 May 2020 16:37:05 +0000 Subject: [issue40670] supplying an empty string to timeit causes an IndentationError In-Reply-To: <1589805861.06.0.616610250992.issue40670@roundup.psfhosted.org> Message-ID: <1589992625.85.0.660310339211.issue40670@roundup.psfhosted.org> Edison Abahurire added the comment: Yes, This is unexpected In the first case: Supplying an empty string can also mean no code has been supplied. So it could be better treated as 'pass'. In the second case: Error messages are meant to inform you of what you have done wrong so that you fix it. I think raising an Indentation error is far from what a user who is calling that method would be expecting, it does not help them at-all. In the third case: Supplying an empty string to timeit directly in bash ```python -m timeit '' ``` raises no such error. so we could say that fixing this will align the behavior in the two ways the function is run to be the same. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 12:44:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 May 2020 16:44:44 +0000 Subject: [issue1294959] Add sys.platlibdir and configure --with-platlibdir to use /usr/lib64 on Fedora and SuSE Message-ID: <1589993084.95.0.651183187612.issue1294959@roundup.psfhosted.org> STINNER Victor added the comment: Can you propose a PR with your doc enhancement? I suggest to start with updating https://docs.python.org/dev/library/sys.html#sys.platlibdir documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 15:14:33 2020 From: report at bugs.python.org (Irv Kalb) Date: Wed, 20 May 2020 19:14:33 +0000 Subject: [issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched In-Reply-To: <1575141041.2.0.751349559914.issue38946@roundup.psfhosted.org> Message-ID: <1590002073.82.0.289539753681.issue38946@roundup.psfhosted.org> Irv Kalb added the comment: Thanks for all the message about this issue. I have made a three-minute video that demonstrates what I am seeing. Here is a link (the video is marked as "unlisted" so only people with this link can see it): https://youtu.be/OIu-HCVVDn8 To answer your questions: - Using 3.7 because I'm a heavy user of Pygame, and my understanding is that 3.8 is not compatible with Pygame now - Yes, this is an absolutely standard installation from Python.org - In all my testing, I have never seen multiple instances of IDLE. There is only one. I understand from the comments that this may not fully be an IDLE issue, and may require changes from Apple. I appreciate anything you can do to help resolve this issue. I am willing to supply any more information and/or do any testing to help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 15:20:24 2020 From: report at bugs.python.org (Eric L.) Date: Wed, 20 May 2020 19:20:24 +0000 Subject: [issue40701] tempfile mixes str and bytes in an inconsistent manner Message-ID: <1590002424.23.0.821521735552.issue40701@roundup.psfhosted.org> New submission from Eric L. : tempfile fails on mixed str and bytes when setting tempfile.tempdir to a non-existent bytes path but succeeds when set to an existing bytes path. $ python3.9 Python 3.9.0a6 (default, Apr 28 2020, 00:00:00) [GCC 10.0.1 20200430 (Red Hat 10.0.1-0.14)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import tempfile >>> tempfile.tempdir = b'/doesntexist' >>> tempfile.TemporaryFile() Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.9/tempfile.py", line 615, in TemporaryFile (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type) File "/usr/lib64/python3.9/tempfile.py", line 248, in _mkstemp_inner file = _os.path.join(dir, pre + name + suf) File "/usr/lib64/python3.9/posixpath.py", line 90, in join genericpath._check_arg_types('join', a, *p) File "/usr/lib64/python3.9/genericpath.py", line 155, in _check_arg_types raise TypeError("Can't mix strings and bytes in path components") from None TypeError: Can't mix strings and bytes in path components >>> tempfile.tempdir = b'/tmp' >>> tempfile.TemporaryFile() <_io.BufferedRandom name=3> >>> tempfile.mktemp() Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.9/tempfile.py", line 400, in mktemp file = _os.path.join(dir, prefix + name + suffix) File "/usr/lib64/python3.9/posixpath.py", line 90, in join genericpath._check_arg_types('join', a, *p) File "/usr/lib64/python3.9/genericpath.py", line 155, in _check_arg_types raise TypeError("Can't mix strings and bytes in path components") from None TypeError: Can't mix strings and bytes in path components It seems to me that the case of `tempfile.tempdir` being of type bytes hasn't been completely considered and is handled inconsistently. My suggestion would be to manage the paths as bytes if there is no other indication like suffix or prefix. ---------- messages: 369469 nosy: ericzolf priority: normal severity: normal status: open title: tempfile mixes str and bytes in an inconsistent manner 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 Wed May 20 15:28:14 2020 From: report at bugs.python.org (Chris Cordero) Date: Wed, 20 May 2020 19:28:14 +0000 Subject: [issue40702] frozensets should not allow the |= operator Message-ID: <1590002894.78.0.324397414776.issue40702@roundup.psfhosted.org> New submission from Chris Cordero : Frozensets disallow the .update and the .__ior__ methods from being used, but allows the |= operator, which I think is inconsistent with the disallowed methods?. ``` foo = frozenset() print(foo) # frozenset() foo.update({"hello"}) # AttributeError, expected foo.__ior__({"hello"}) # AttributeError, expected foo |= {"hello"} # No error print(foo) # frozenset({"hello"}) ``` ---------- messages: 369470 nosy: cs-cordero priority: normal severity: normal status: open title: frozensets should not allow the |= operator type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 15:29:14 2020 From: report at bugs.python.org (Rick Heil) Date: Wed, 20 May 2020 19:29:14 +0000 Subject: [issue39580] Check for COMMAND_LINE_INSTALL variable in Python_Documentation.pkg In-Reply-To: <1581111850.29.0.0540786191291.issue39580@roundup.psfhosted.org> Message-ID: <1590002954.82.0.363948061984.issue39580@roundup.psfhosted.org> Change by Rick Heil : ---------- keywords: +patch nosy: +rickheil nosy_count: 3.0 -> 4.0 pull_requests: +19551 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20271 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 15:29:58 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Wed, 20 May 2020 19:29:58 +0000 Subject: [issue40563] Support pathlike objects on dbm/shelve In-Reply-To: <1588949755.54.0.0616905460961.issue40563@roundup.psfhosted.org> Message-ID: <1590002998.8.0.646866902099.issue40563@roundup.psfhosted.org> Florian Dahlitz added the comment: Are you still working on this @hakancelik? ---------- nosy: +DahlitzFlorian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 15:31:22 2020 From: report at bugs.python.org (Rick Heil) Date: Wed, 20 May 2020 19:31:22 +0000 Subject: [issue39580] Check for COMMAND_LINE_INSTALL variable in Python_Documentation.pkg In-Reply-To: <1581111850.29.0.0540786191291.issue39580@roundup.psfhosted.org> Message-ID: <1590003081.99.0.521292486121.issue39580@roundup.psfhosted.org> Rick Heil added the comment: In case folks reading this are not aware, installer(8) sets an environmental variable COMMAND_LINE_INSTALL when an installation is triggered on the command line versus when a user double-clicks a package in the GUI to kick off the install. I've filed the linked PR to add a test on the APPDIR open statement to avoid popping up the Finder when the package is installed on the command line. If there's a different method by which I should do this, please point me in the vague direction and I'm happy to update! (note - I just signed the CLA today so it should be registered soonish) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 15:34:22 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 20 May 2020 19:34:22 +0000 Subject: [issue40702] frozensets should not allow the |= operator In-Reply-To: <1590002894.78.0.324397414776.issue40702@roundup.psfhosted.org> Message-ID: <1590003262.86.0.63212023193.issue40702@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is okay. In this case `a |= b` is equivalent to `a = a | b`. The same behavior is for tuples, strings, and other non-mutable collections: t = (1, 2) t += (3, 4) s = 'ab' s += 'cd' And even for numbers! i = 5 i += 1 ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 15:43:55 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Wed, 20 May 2020 19:43:55 +0000 Subject: [issue40065] py39: remove deprecation note for xml.etree.cElementTree In-Reply-To: <1585163379.04.0.795433622529.issue40065@roundup.psfhosted.org> Message-ID: <1590003835.99.0.256202210413.issue40065@roundup.psfhosted.org> Florian Dahlitz added the comment: Are you still working on this @Manjusaka? If not, I would like to submit a patch for it. ---------- nosy: +DahlitzFlorian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 16:13:34 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Wed, 20 May 2020 20:13:34 +0000 Subject: [issue29981] Update Index for set, dict, and generator 'comprehensions' In-Reply-To: <1491328871.52.0.864348862414.issue29981@psf.upfronthosting.co.za> Message-ID: <1590005614.86.0.0958071911357.issue29981@roundup.psfhosted.org> Florian Dahlitz added the comment: I would like to work on this issue if it is still open. ---------- nosy: +DahlitzFlorian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 17:18:35 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Wed, 20 May 2020 21:18:35 +0000 Subject: [issue29981] Update Index for set, dict, and generator 'comprehensions' In-Reply-To: <1491328871.52.0.864348862414.issue29981@psf.upfronthosting.co.za> Message-ID: <1590009515.24.0.795708031588.issue29981@roundup.psfhosted.org> Change by Florian Dahlitz : ---------- keywords: +patch pull_requests: +19552 pull_request: https://github.com/python/cpython/pull/20272 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 17:24:32 2020 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 20 May 2020 21:24:32 +0000 Subject: [issue40703] PyType_FromSpec*() overwrites the type's "__module__" Message-ID: <1590009872.3.0.237127808252.issue40703@roundup.psfhosted.org> New submission from Stefan Behnel : The PyType_FromSpec() functions set the type's "__module__" attribute at the end: https://github.com/python/cpython/blob/0509c4547fc95cc32a91ac446a26192c3bfdf157/Objects/typeobject.c#L3154-L3172 There are only two possible cases, either it finds a module name in the spec name and sets "__module__" from that, or it outputs a deprecation warning. Both behaviours are annoying because they ignore anything that the type already has in its dict, e.g. a property entry from the "members" or "getset" structs. Since this code can't really be moved before the call to "PyType_Ready()" (which creates the type's dict and populates it), I think the best fix would be to first check if "__module__" is already in the dict and only otherwise take care of setting it. I noticed this when trying to make the "__module__" attribute of Cython's coroutine type work with type specs, which should actually return the instance specific module name, i.e. the module that defines the coroutine, not the module that defines the type. This would normally be solved with an entry in "members", but that is discarded by the code above. While this approach means that the type does not have its own "__module__" entry, I think the use cases of pickling and documentation support it, because they care about the module name of the instance, not of the type. I think working around this behaviour is somewhat easy by creating a new descriptor with PyDescr_NewMember() and re-adding it after calling PyType_FromSpec*(), so this is something that can just be fixed in Py3.9+. Relevant tickets: issue 15146 for setting "__module__" and issue 20204 for the deprecation warning. ---------- components: C API messages: 369476 nosy: ncoghlan, petr.viktorin, scoder, serhiy.storchaka priority: normal severity: normal status: open title: PyType_FromSpec*() overwrites the type's "__module__" type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 17:29:25 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Wed, 20 May 2020 21:29:25 +0000 Subject: [issue40679] show class name in method invocation TypeError In-Reply-To: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> Message-ID: <1590010165.96.0.874402403321.issue40679@roundup.psfhosted.org> Dennis Sweeney added the comment: I just ran the entire test suite with: --- a/Python/ceval.c +++ b/Python/ceval.c @@ -4179,6 +4179,7 @@ _PyEval_EvalCode(PyThreadState *tstate, Py_ssize_t j; if (keyword == NULL || !PyUnicode_Check(keyword)) { + printf("THIS CODE WAS RUN!\n"); _PyErr_Format(tstate, PyExc_TypeError, "%U() keywords must be strings", qualname); and the line was never printed. So maybe the test coverage (or removal?) should be a separate issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 17:37:44 2020 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 20 May 2020 21:37:44 +0000 Subject: [issue40703] PyType_FromSpec*() overwrites the type's "__module__" In-Reply-To: <1590009872.3.0.237127808252.issue40703@roundup.psfhosted.org> Message-ID: <1590010664.08.0.543036736236.issue40703@roundup.psfhosted.org> Change by Stefan Behnel : ---------- keywords: +patch pull_requests: +19553 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20273 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 17:41:52 2020 From: report at bugs.python.org (=?utf-8?q?Hakan_=C3=87elik?=) Date: Wed, 20 May 2020 21:41:52 +0000 Subject: [issue40563] Support pathlike objects on dbm/shelve In-Reply-To: <1588949755.54.0.0616905460961.issue40563@roundup.psfhosted.org> Message-ID: <1590010912.98.0.00105203330618.issue40563@roundup.psfhosted.org> Hakan ?elik added the comment: Yes I will send pr soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 18:09:55 2020 From: report at bugs.python.org (Maxwell Bernstein) Date: Wed, 20 May 2020 22:09:55 +0000 Subject: [issue40704] PyIter_Check fails when compiling in the Limited API Message-ID: <1590012595.85.0.72566867975.issue40704@roundup.psfhosted.org> New submission from Maxwell Bernstein : PyIter_Check is itself marked as available in the Limited API but: a) it's a macro, and b) it pokes directly at tp_iternext This means that it's functionally impossible to use PyIter_Check when working with the Limited API. ---------- components: C API messages: 369479 nosy: tekknolagi priority: normal severity: normal status: open title: PyIter_Check fails when compiling in the Limited API versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 18:10:47 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 May 2020 22:10:47 +0000 Subject: [issue40065] py39: remove deprecation note for xml.etree.cElementTree In-Reply-To: <1585163379.04.0.795433622529.issue40065@roundup.psfhosted.org> Message-ID: <1590012647.79.0.852248951378.issue40065@roundup.psfhosted.org> Christian Heimes added the comment: Although the modules has been deprecated for a long time, the removal came as surprise. We are currently debating to bring the module back and warn users that it will be removed in 3.10. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 18:13:33 2020 From: report at bugs.python.org (Maxwell Bernstein) Date: Wed, 20 May 2020 22:13:33 +0000 Subject: [issue40704] PyIter_Check fails when compiling in the Limited API In-Reply-To: <1590012595.85.0.72566867975.issue40704@roundup.psfhosted.org> Message-ID: <1590012813.24.0.664283108192.issue40704@roundup.psfhosted.org> Maxwell Bernstein added the comment: See for example the following C program: ``` #define Py_LIMITED_API #include "Python.h" int main() { Py_Initialize(); PyObject* foo; PyIter_Check(foo); } ``` when compiled (gcc test.c `pkg-config --cflags python3`) produces: ``` In file included from /usr/include/python3.6m/Python.h:135:0, from test.c:3: test.c: In function ?main?: /usr/include/python3.6m/abstract.h:712:20: error: dereferencing pointer to incomplete type ?struct _typeobject? ((obj)->ob_type->tp_iternext != NULL && \ ^ test.c:8:3: note: in expansion of macro ?PyIter_Check? PyIter_Check(foo); ^~~~~~~~~~~~ /usr/include/python3.6m/abstract.h:713:38: error: ?_PyObject_NextNotImplemented? undeclared (first use in this function); did you mean ?PyObject_HashNotImplemented?? (obj)->ob_type->tp_iternext != &_PyObject_NextNotImplemented) ^ test.c:8:3: note: in expansion of macro ?PyIter_Check? PyIter_Check(foo); ^~~~~~~~~~~~ /usr/include/python3.6m/abstract.h:713:38: note: each undeclared identifier is reported only once for each function it appears in (obj)->ob_type->tp_iternext != &_PyObject_NextNotImplemented) ^ test.c:8:3: note: in expansion of macro ?PyIter_Check? PyIter_Check(foo); ^~~~~~~~~~~~ ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 18:32:37 2020 From: report at bugs.python.org (Brett Cannon) Date: Wed, 20 May 2020 22:32:37 +0000 Subject: [issue38870] Expose ast.unparse in the ast module In-Reply-To: <1574289269.61.0.90605518345.issue38870@roundup.psfhosted.org> Message-ID: <1590013957.89.0.147773046425.issue38870@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 18:45:38 2020 From: report at bugs.python.org (=?utf-8?q?Hakan_=C3=87elik?=) Date: Wed, 20 May 2020 22:45:38 +0000 Subject: [issue40563] Support pathlike objects on dbm/shelve In-Reply-To: <1588949755.54.0.0616905460961.issue40563@roundup.psfhosted.org> Message-ID: <1590014738.39.0.79864500738.issue40563@roundup.psfhosted.org> Change by Hakan ?elik : ---------- keywords: +patch pull_requests: +19554 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20274 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 20:06:14 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 21 May 2020 00:06:14 +0000 Subject: [issue40696] "await" hangs in Python3.9.0b1. In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1590019574.47.0.315053171517.issue40696@roundup.psfhosted.org> Chris Jerdonek added the comment: I don't think that would be a real solution because it looks like that would cause the while loop always to loop at most once (which would defeat its purpose) -- because the loop ends with "o = context": while ((context = PyException_GetContext(o))) { Py_DECREF(context); if (context == value) { PyException_SetContext(o, NULL); break; } o = context; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 20:11:30 2020 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 21 May 2020 00:11:30 +0000 Subject: [issue40696] "await" hangs in Python3.9.0b1. In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1590019890.19.0.731143371768.issue40696@roundup.psfhosted.org> Yury Selivanov added the comment: Just a note, __context__ cycles can theoretically be longer than 2 nodes. I've encountered cycles like `exc.__context__.__context__.__context__ is exc` a few times in my life, typically resulting from some weird third-party libraries. The only solution is to use a `set()` collection to track already visited exceptions. To make it fast I propose to modify the code to: 1. Do a fast traverse with a regular while loop without tracking (no set()) 2. If the number of iterations is longer than 100 and there's still no top context found -- go to (3) 3. Do a slower implementation with set() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 20:35:38 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 21 May 2020 00:35:38 +0000 Subject: [issue40696] "await" hangs in Python3.9.0b1. In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1590021338.1.0.756613562148.issue40696@roundup.psfhosted.org> Chris Jerdonek added the comment: >From a process perspective, I think we should probably pursue two PR's for this: one for the general issue that affects all Python versions (what Yury is talking about), and something narrower that addresses the 3.9.0b1 case that came up here. I'd like to focus on the latter first. Someone else is welcome to work on the more general issue while I'm doing that. I'm not 100% sure if the more general issue should be a new bpo issue or not. I'm leaning towards separate because it is bigger and there are different decisions to be made around backporting, etc, but we should decide that now. If someone else agrees, I can create a new issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 20:37:32 2020 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 21 May 2020 00:37:32 +0000 Subject: [issue40696] "await" hangs in Python3.9.0b1. In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1590021452.17.0.429655106425.issue40696@roundup.psfhosted.org> Yury Selivanov added the comment: > If someone else agrees, I can create a new issue. I'd keep this one issue, but really up to you. I don't think I have time in the next few days to work on what I proposed but would be happy to brainstorm / review PRs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 20:50:42 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 21 May 2020 00:50:42 +0000 Subject: [issue40696] "await" hangs in Python3.9.0b1. In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1590022242.56.0.880798767981.issue40696@roundup.psfhosted.org> Chris Jerdonek added the comment: Okay, I'll keep it one issue then. Someone else is still welcome to work on the more general issue. Note that there is some chance the narrower fix should happen independent of the more general fix. This is because _PyErr_ChainExceptions() (which is the call I added for the gen.throw() case) doesn't call the code path that we're discussing. Thus, cycles could still wind up being introduced at that call site. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 21:10:42 2020 From: report at bugs.python.org (Manjusaka) Date: Thu, 21 May 2020 01:10:42 +0000 Subject: [issue40065] py39: remove deprecation note for xml.etree.cElementTree In-Reply-To: <1585163379.04.0.795433622529.issue40065@roundup.psfhosted.org> Message-ID: <1590023442.33.0.925730475466.issue40065@roundup.psfhosted.org> Manjusaka added the comment: I'm working on it. I will make a PR today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 22:11:38 2020 From: report at bugs.python.org (Zachary Ware) Date: Thu, 21 May 2020 02:11:38 +0000 Subject: [issue40425] Refleak in CDataObject In-Reply-To: <1588095498.31.0.363636876654.issue40425@roundup.psfhosted.org> Message-ID: <1590027098.85.0.36541143544.issue40425@roundup.psfhosted.org> Zachary Ware added the comment: Absent anyone showing me where a proper refleak is here, I'm closing the issue. ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 22:48:26 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 21 May 2020 02:48:26 +0000 Subject: [issue29981] Update Index for set, dict, and generator 'comprehensions' In-Reply-To: <1491328871.52.0.864348862414.issue29981@psf.upfronthosting.co.za> Message-ID: <1590029306.24.0.394981682614.issue29981@roundup.psfhosted.org> Terry J. Reedy added the comment: The issue is still open. The basic idea is to treat list, set, and dict in parallel fashions in the docs, mostly copying what is done with lists for the other two. In my original post, the title and items 1 to 3 are about index entries in Reference chapter 6, Expressions (reference/expressions.rst). I tacked on item 4 about adding entries to the Glossary (glossary.rst). These could easily be and for easier review should be separate PRs. The original PR, opened relatively soon after githup went public, was reviewed by 5 different committers, which is an unusually large number. It included both indexing and glossary changes, and added changes to the Library chapter on built-in types (stdtypes.rst). The last was the most controversial and definitely needed to be a followup PR. In June 2017, after much discussion and revision, Louie Lu switched his github account from 'louisom' to 'louielu' and ceased working on this. Some later, louisom/cpython was deleted and the PR closed for inactivity. > We don't *call* generator expressions 'generator comprehensions', A subsequent pydev discussion approved of 'generator comprehension' and I believe some doc changes followed*. So I expect that the previous PR is somewhat obsolete. Pick either indexing Expressions or new Glossary entries and see what change you think is still needed and consider any discussion of that change on PR 995. Note: I am not sure that I reviewed (and approved) the index part of the patch, as I likely focused on other parts. You can propose (and justify) changes here before making a PR. * Any changes may or may not have been backported to 3.7, so it may or may not be possible to easily backport any new changes (with the robot). ---------- keywords: -patch stage: patch review -> needs patch versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 22:55:15 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 21 May 2020 02:55:15 +0000 Subject: [issue29981] Update Index for set, dict, and generator 'comprehensions' In-Reply-To: <1491328871.52.0.864348862414.issue29981@psf.upfronthosting.co.za> Message-ID: <1590029715.57.0.196069570267.issue29981@roundup.psfhosted.org> Terry J. Reedy added the comment: I wrote the above before your PR was listed here. I will review it a piece at a time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 20 23:48:46 2020 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 21 May 2020 03:48:46 +0000 Subject: [issue32309] Implement asyncio.run_in_executor shortcut In-Reply-To: <1513194861.88.0.213398074469.issue32309@psf.upfronthosting.co.za> Message-ID: <1590032926.1.0.351187855018.issue32309@roundup.psfhosted.org> Change by Kyle Stanley : ---------- pull_requests: +19555 pull_request: https://github.com/python/cpython/pull/20278 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 00:21:09 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 21 May 2020 04:21:09 +0000 Subject: [issue40651] class:`OrderedDict` Examples: LRU implementation has a bug. In-Reply-To: <1589672007.55.0.638241402645.issue40651@roundup.psfhosted.org> Message-ID: <1590034869.28.0.989159425098.issue40651@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset d88f0aa8e24ea7562f2e04833f46d8526e846334 by Miss Islington (bot) in branch '3.8': bpo-40651: Improve LRU recipe in the OrderedDict documentation (GH-GH-20139) (GH-20167) https://github.com/python/cpython/commit/d88f0aa8e24ea7562f2e04833f46d8526e846334 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 01:03:18 2020 From: report at bugs.python.org (hai shi) Date: Thu, 21 May 2020 05:03:18 +0000 Subject: [issue40703] PyType_FromSpec*() overwrites the type's "__module__" In-Reply-To: <1590009872.3.0.237127808252.issue40703@roundup.psfhosted.org> Message-ID: <1590037398.19.0.0136422449457.issue40703@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 01:15:31 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 21 May 2020 05:15:31 +0000 Subject: [issue40679] show class name in method invocation TypeError In-Reply-To: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> Message-ID: <1590038131.95.0.0728049217668.issue40679@roundup.psfhosted.org> Chris Jerdonek added the comment: > So maybe the test coverage (or removal?) should be a separate issue. That sounds good. Want to file the issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 01:20:59 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 21 May 2020 05:20:59 +0000 Subject: [issue32309] Implement asyncio.run_in_executor shortcut In-Reply-To: <1513194861.88.0.213398074469.issue32309@psf.upfronthosting.co.za> Message-ID: <1590038459.16.0.864132186955.issue32309@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19556 pull_request: https://github.com/python/cpython/pull/20279 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 01:20:50 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 21 May 2020 05:20:50 +0000 Subject: [issue32309] Implement asyncio.run_in_executor shortcut In-Reply-To: <1513194861.88.0.213398074469.issue32309@psf.upfronthosting.co.za> Message-ID: <1590038450.03.0.787182069888.issue32309@roundup.psfhosted.org> miss-islington added the comment: New changeset 0f56263e62ba91d0baae40fb98947a3a98034a73 by Kyle Stanley in branch 'master': bpo-32309: Add support for contextvars in asyncio.to_thread() (GH-20278) https://github.com/python/cpython/commit/0f56263e62ba91d0baae40fb98947a3a98034a73 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 01:22:11 2020 From: report at bugs.python.org (Ammar Askar) Date: Thu, 21 May 2020 05:22:11 +0000 Subject: [issue40705] use-after-free in _zoneinfo.c's module_free function Message-ID: <1590038531.88.0.263330697524.issue40705@roundup.psfhosted.org> New submission from Ammar Askar : This was caught on oss-fuzz's ASAN builder: Step #4: ==7656==ERROR: AddressSanitizer: heap-use-after-free on address 0x604001568ea0 at pc 0x7f603e4b974b bp 0x7ffe4f7e8f90 sp 0x7ffe4f7e8f88 Step #4: READ of size 8 at 0x604001568ea0 thread T0 Step #4: #0 0x7f603e4b974a in module_free /src/cpython3/Modules/_zoneinfo.c:2610:10 Step #4: #1 0x570311 in module_dealloc /src/cpython3/Objects/moduleobject.c:675:9 Step #4: #2 0x57b7fc in _Py_Dealloc /src/cpython3/Objects/object.c:2209:5 Step #4: #3 0x54ce60 in _Py_DECREF /src/cpython3/./Include/object.h:430:9 Step #4: #4 0x551cdc in _Py_XDECREF /src/cpython3/./Include/object.h:497:9 Step #4: #5 0x54e1b2 in insertdict /src/cpython3/Objects/dictobject.c:1129:5 Step #4: #6 0x54d2fe in PyDict_SetItem /src/cpython3/Objects/dictobject.c:1579:12 Step #4: #7 0x55b5dc in dict_ass_sub /src/cpython3/Objects/dictobject.c:2179:16 Step #4: #8 0x87520f in PyObject_SetItem /src/cpython3/Objects/abstract.c:210:16 Step #4: #9 0x6c1e89 in _PyImport_Cleanup /src/cpython3/Python/import.c:523:13 Step #4: #10 0x6fc40a in Py_FinalizeEx /src/cpython3/Python/pylifecycle.c:1422:5 Step #4: #11 0x4dd17a in Py_RunMain /src/cpython3/Modules/main.c:634:9 Step #4: #12 0x4ddbea in pymain_main /src/cpython3/Modules/main.c:662:12 Step #4: #13 0x4dde34 in Py_BytesMain /src/cpython3/Modules/main.c:686:12 Step #4: #14 0x4dd030 in main /src/cpython3/./Programs/python.c:15:12 Step #4: #15 0x7f60440bc82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) Step #4: #16 0x434ce8 in _start (/src/cpython3/python+0x434ce8) Step #4: Step #4: 0x604001568ea0 is located 16 bytes inside of 48-byte region [0x604001568e90,0x604001568ec0) Step #4: freed by thread T0 here: Step #4: #0 0x4ad20d in free /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:123:3 Step #4: #1 0x57c493 in _PyMem_RawFree /src/cpython3/Objects/obmalloc.c:127:5 Step #4: #2 0x57dbc2 in PyObject_Free /src/cpython3/Objects/obmalloc.c:709:5 Step #4: #3 0x75e81a in PyObject_GC_Del /src/cpython3/Modules/gcmodule.c:2325:5 Step #4: #4 0x5a12cd in object_dealloc /src/cpython3/Objects/typeobject.c:4008:5 Step #4: #5 0x59abbb in subtype_dealloc /src/cpython3/Objects/typeobject.c:1371:5 Step #4: #6 0x57b7fc in _Py_Dealloc /src/cpython3/Objects/object.c:2209:5 Step #4: #7 0x7f603e4b0700 in _Py_DECREF /src/cpython3/./Include/object.h:430:9 Step #4: #8 0x7f603e4b05dc in _Py_XDECREF /src/cpython3/./Include/object.h:497:9 Step #4: #9 0x7f603e4b96de in module_free /src/cpython3/Modules/_zoneinfo.c:2609:5 Step #4: #10 0x570311 in module_dealloc /src/cpython3/Objects/moduleobject.c:675:9 Step #4: #11 0x57b7fc in _Py_Dealloc /src/cpython3/Objects/object.c:2209:5 Step #4: #12 0x54ce60 in _Py_DECREF /src/cpython3/./Include/object.h:430:9 Step #4: #13 0x551cdc in _Py_XDECREF /src/cpython3/./Include/object.h:497:9 Step #4: #14 0x54e1b2 in insertdict /src/cpython3/Objects/dictobject.c:1129:5 Step #4: #15 0x54d2fe in PyDict_SetItem /src/cpython3/Objects/dictobject.c:1579:12 Step #4: #16 0x55b5dc in dict_ass_sub /src/cpython3/Objects/dictobject.c:2179:16 Step #4: #17 0x87520f in PyObject_SetItem /src/cpython3/Objects/abstract.c:210:16 Step #4: #18 0x6c1e89 in _PyImport_Cleanup /src/cpython3/Python/import.c:523:13 Step #4: #19 0x6fc40a in Py_FinalizeEx /src/cpython3/Python/pylifecycle.c:1422:5 Step #4: #20 0x4dd17a in Py_RunMain /src/cpython3/Modules/main.c:634:9 Step #4: #21 0x4ddbea in pymain_main /src/cpython3/Modules/main.c:662:12 Step #4: #22 0x4dde34 in Py_BytesMain /src/cpython3/Modules/main.c:686:12 Step #4: #23 0x4dd030 in main /src/cpython3/./Programs/python.c:15:12 Step #4: #24 0x7f60440bc82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) Step #4: Step #4: previously allocated by thread T0 here: Step #4: #0 0x4ad48d in malloc /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3 Step #4: #1 0x57c37c in _PyMem_RawMalloc /src/cpython3/Objects/obmalloc.c:99:12 Step #4: #2 0x57da49 in PyObject_Malloc /src/cpython3/Objects/obmalloc.c:685:12 Step #4: #3 0x75e17c in _PyObject_GC_Alloc /src/cpython3/Modules/gcmodule.c:2233:26 Step #4: #4 0x75e0c5 in _PyObject_GC_Malloc /src/cpython3/Modules/gcmodule.c:2260:12 Step #4: #5 0x598619 in PyType_GenericAlloc /src/cpython3/Objects/typeobject.c:1086:15 Step #4: #6 0x5a1922 in object_new /src/cpython3/Objects/typeobject.c:4002:12 Step #4: #7 0x59d2c7 in type_call /src/cpython3/Objects/typeobject.c:1017:11 Step #4: #8 0x4fbb0b in _PyObject_MakeTpCall /src/cpython3/Objects/call.c:191:18 Step #4: #9 0x4feefa in _PyObject_VectorcallTstate /src/cpython3/./Include/cpython/abstract.h:116:16 Step #4: #10 0x4fb5e7 in _PyObject_CallNoArgTstate /src/cpython3/./Include/internal/pycore_call.h:33:12 Step #4: #11 0x4fdaa6 in _PyObject_CallFunctionVa /src/cpython3/Objects/call.c:515:16 Step #4: #12 0x4fe32a in callmethod /src/cpython3/Objects/call.c:614:12 Step #4: #13 0x4fe193 in PyObject_CallMethod /src/cpython3/Objects/call.c:634:24 Step #4: #14 0x7f603e4b91b1 in new_weak_cache /src/cpython3/Modules/_zoneinfo.c:2483:9 Step #4: #15 0x7f603e4b95ec in initialize_caches /src/cpython3/Modules/_zoneinfo.c:2503:31 Step #4: #16 0x7f603e4b0905 in zoneinfomodule_exec /src/cpython3/Modules/_zoneinfo.c:2669:9 Step #4: #17 0x56ea8a in PyModule_ExecDef /src/cpython3/Objects/moduleobject.c:399:23 Step #4: #18 0x6c8e0d in exec_builtin_or_dynamic /src/cpython3/Python/import.c:2242:12 Step #4: #19 0x6c8d30 in _imp_exec_dynamic_impl /src/cpython3/Python/import.c:2316:12 Step #4: #20 0x6c7c15 in _imp_exec_dynamic /src/cpython3/Python/clinic/import.c.h:358:21 Step #4: #21 0x8cca28 in cfunction_vectorcall_O /src/cpython3/Objects/methodobject.c:510:24 Step #4: #22 0x4fc8b4 in PyVectorcall_Call /src/cpython3/Objects/call.c:230:16 Step #4: #23 0x4fc9b3 in _PyObject_Call /src/cpython3/Objects/call.c:265:16 Step #4: #24 0x4fcb20 in PyObject_Call /src/cpython3/Objects/call.c:292:12 Step #4: #25 0x679ff0 in do_call_core /src/cpython3/Python/ceval.c Step #4: #26 0x66942a in _PyEval_EvalFrameDefault /src/cpython3/Python/ceval.c:3607:22 Step #4: #27 0x661fce in _PyEval_EvalFrame /src/cpython3/./Include/internal/pycore_ceval.h:40:12 Step #4: #28 0x67b5a7 in _PyEval_EvalCode /src/cpython3/Python/ceval.c:4354:14 Step #4: #29 0x4fce97 in _PyFunction_Vectorcall /src/cpython3/Objects/call.c:395:12 https://oss-fuzz-build-logs.storage.googleapis.com/log-42158c8c-476d-482a-ab04-75ea905e483c.txt Sending out a patch shortly. ---------- components: Library (Lib) messages: 369494 nosy: ammar2, p-ganssle priority: normal severity: normal status: open title: use-after-free in _zoneinfo.c's module_free function type: crash versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 01:37:08 2020 From: report at bugs.python.org (Ammar Askar) Date: Thu, 21 May 2020 05:37:08 +0000 Subject: [issue40705] use-after-free in _zoneinfo.c's module_free function In-Reply-To: <1590038531.88.0.263330697524.issue40705@roundup.psfhosted.org> Message-ID: <1590039428.17.0.88882127902.issue40705@roundup.psfhosted.org> Change by Ammar Askar : ---------- keywords: +patch pull_requests: +19557 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20280 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 01:38:24 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 21 May 2020 05:38:24 +0000 Subject: [issue32309] Implement asyncio.run_in_executor shortcut In-Reply-To: <1513194861.88.0.213398074469.issue32309@psf.upfronthosting.co.za> Message-ID: <1590039504.42.0.451585572627.issue32309@roundup.psfhosted.org> miss-islington added the comment: New changeset 3e650545bfe949fa435b0d41e54986f615891ec8 by Miss Islington (bot) in branch '3.9': bpo-32309: Add support for contextvars in asyncio.to_thread() (GH-20278) https://github.com/python/cpython/commit/3e650545bfe949fa435b0d41e54986f615891ec8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 01:39:26 2020 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 21 May 2020 05:39:26 +0000 Subject: [issue30612] Unusual Windows registry path syntax In-Reply-To: <1497000804.0.0.079840477122.issue30612@psf.upfronthosting.co.za> Message-ID: <1590039566.54.0.727337903014.issue30612@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 7.0 -> 8.0 pull_requests: +19558 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20281 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 01:45:42 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Thu, 21 May 2020 05:45:42 +0000 Subject: [issue40679] show class name in method invocation TypeError In-Reply-To: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> Message-ID: <1590039942.98.0.640262397746.issue40679@roundup.psfhosted.org> Dennis Sweeney added the comment: Sure -- I'll file the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 01:58:41 2020 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 21 May 2020 05:58:41 +0000 Subject: [issue32309] Implement asyncio.run_in_executor shortcut In-Reply-To: <1513194861.88.0.213398074469.issue32309@psf.upfronthosting.co.za> Message-ID: <1590040721.92.0.0378387330818.issue32309@roundup.psfhosted.org> Kyle Stanley added the comment: Now that the `versionadded` label has been added and the contextvar issue was addressed, this issue can be closed. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 02:08:42 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Thu, 21 May 2020 06:08:42 +0000 Subject: [issue40706] Unreachable code in _PyEval_EvalCode Message-ID: <1590041322.58.0.905354707279.issue40706@roundup.psfhosted.org> New submission from Dennis Sweeney : When I was looking into https://bugs.python.org/issue40679, I couldn't come up with a test case for the following block, so I added a print statement: --- a/Python/ceval.c +++ b/Python/ceval.c @@ -4179,6 +4179,7 @@ _PyEval_EvalCode(PyThreadState *tstate, Py_ssize_t j; if (keyword == NULL || !PyUnicode_Check(keyword)) { + printf("THIS CODE WAS RUN!\n"); _PyErr_Format(tstate, PyExc_TypeError, "%U() keywords must be strings", qualname); I ran the entire test suite and got no such "THIS CODE WAS RUN!". It looks like this is a double-check of the (worse -- no function name) error message produced by the changes at https://github.com/python/cpython/commit/0567786d26348aa7eaf0ab1b5d038fdabe409d92. For example: py -3.7 -c "f = lambda x: None; f(**{1:1})" ... TypeError: () keywords must be strings py -3.8 -c "f = lambda x: None; f(**{1:1})" ... TypeError: () keywords must be strings py -3.9 -c "f = lambda x: None; f(**{1:1})" ... TypeError: keywords must be strings So: * Can this check be eliminated since it's unreachable from Python? * Otherwise, is there some reason a C caller would need this check? And could it be replaced by and assert? * If it shouldn't change, then is there a good way to add test coverage? ---------- components: Interpreter Core messages: 369498 nosy: Dennis Sweeney priority: normal severity: normal status: open title: Unreachable code in _PyEval_EvalCode type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 02:10:32 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Thu, 21 May 2020 06:10:32 +0000 Subject: [issue40679] show class name in method invocation TypeError In-Reply-To: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> Message-ID: <1590041432.13.0.535057288009.issue40679@roundup.psfhosted.org> Dennis Sweeney added the comment: https://bugs.python.org/issue40706 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 02:19:36 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 21 May 2020 06:19:36 +0000 Subject: [issue40706] Unreachable code in _PyEval_EvalCode In-Reply-To: <1590041322.58.0.905354707279.issue40706@roundup.psfhosted.org> Message-ID: <1590041976.69.0.378966778908.issue40706@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 02:23:11 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 21 May 2020 06:23:11 +0000 Subject: [issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched In-Reply-To: <1575141041.2.0.751349559914.issue38946@roundup.psfhosted.org> Message-ID: <1590042191.09.0.510494719047.issue38946@roundup.psfhosted.org> Ned Deily added the comment: Thank you for going to the trouble to produce the movie, Irv! It was very helpful. It turns out the disappearing window issue is because you are using the macOS 10.6+ Python 3.7.3 installer variant rather than the macOS 10.9+ installer variant. For some reason, the Tk built for 10.6 has this problem but when built for 10.9 it does not. So this problem is, indeed, not the two instances of IDLE behavior I speculated. The fix is simple: don't use the 10.6 variant. In fact, as of the beginning of 2020, we no longer provide the 10.6 variant for any version. I don't have experience with pygame but I did a quick test on 10.15 following the directions on the Pygame Getting Started page and verified that the aliens example worked with the latest 3.7.7 10.9 installer. I also tried with 3.8.3 and saw that the problem there is that the project has not provided a pre-built wheel for Pygame 1.9.6 so the installation fails while trying to build everything from source. I did try their suggestion further down the page to use a pre-release of pygame 2. The latest prelease, 2.0.0.dev8, does have a prebuilt wheel for 3.8.x on macOS; it installed without issue and the aliens still worked. (Now back to the original issue!) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 03:08:33 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Thu, 21 May 2020 07:08:33 +0000 Subject: [issue40670] supplying an empty string to timeit causes an IndentationError In-Reply-To: <1589805861.06.0.616610250992.issue40670@roundup.psfhosted.org> Message-ID: <1590044913.8.0.9424424415.issue40670@roundup.psfhosted.org> Change by Florian Dahlitz : ---------- nosy: +DahlitzFlorian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 03:17:44 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Thu, 21 May 2020 07:17:44 +0000 Subject: [issue29981] Update Index for set, dict, and generator 'comprehensions' In-Reply-To: <1491328871.52.0.864348862414.issue29981@psf.upfronthosting.co.za> Message-ID: <1590045464.7.0.828698685046.issue29981@roundup.psfhosted.org> Florian Dahlitz added the comment: I guess it would have been good if I waited submitting a PR until you replied to my message. This way, I would have known that two separate PRs would be better suited here - sorry for that. Nevertheless, I read the discussions here and in PR #995 and I'm pretty sure that the proposed changes do fit into the documentation (pretty similar to those from PR #995). I'm eager to hear your or other people's feedback - thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 03:34:10 2020 From: report at bugs.python.org (Gareth Rees) Date: Thu, 21 May 2020 07:34:10 +0000 Subject: [issue40707] Popen.communicate documentation does not say how to get the return code Message-ID: <1590046450.27.0.873343730184.issue40707@roundup.psfhosted.org> New submission from Gareth Rees : When using subprocess.Popen.communicate(), it is natural to wonder how to get the exit code of the subprocess. However, the documentation [1] says: Interact with process: Send data to stdin. Read data from stdout and stderr, until end-of-file is reached. Wait for process to terminate. The optional input argument should be data to be sent to the child process, or None, if no data should be sent to the child. If streams were opened in text mode, input must be a string. Otherwise, it must be bytes. communicate() returns a tuple (stdout_data, stderr_data). The data will be strings if streams were opened in text mode; otherwise, bytes. If you can guess that communicate() might set returncode, then you can find what you need in the documentation for that attribute [2]: The child return code, set by poll() and wait() (and indirectly by communicate()). I suggest that the documentation for communicate() be updated to mention that it sets the returncode attribute. This would be consistent with poll() and wait(), which already mention this. [1]: https://docs.python.org/3/library/subprocess.html#subprocess.Popen.communicate [2]: https://docs.python.org/3/library/subprocess.html#subprocess.Popen.returncode ---------- assignee: docs at python components: Documentation messages: 369502 nosy: docs at python, gdr at garethrees.org priority: normal severity: normal status: open title: Popen.communicate documentation does not say how to get the return code type: enhancement versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 03:53:02 2020 From: report at bugs.python.org (Gareth Rees) Date: Thu, 21 May 2020 07:53:02 +0000 Subject: [issue40707] Popen.communicate documentation does not say how to get the return code In-Reply-To: <1590046450.27.0.873343730184.issue40707@roundup.psfhosted.org> Message-ID: <1590047582.7.0.956995066068.issue40707@roundup.psfhosted.org> Change by Gareth Rees : ---------- keywords: +patch pull_requests: +19559 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20283 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 04:02:50 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Thu, 21 May 2020 08:02:50 +0000 Subject: [issue40670] supplying an empty string to timeit causes an IndentationError In-Reply-To: <1589805861.06.0.616610250992.issue40670@roundup.psfhosted.org> Message-ID: <1590048170.5.0.775834574764.issue40670@roundup.psfhosted.org> Florian Dahlitz added the comment: Calling timeit from command-line with the empty string defaults to 'pass'. I suggest to adopt this behaviour for calling timeit.timeit in the REPL as @edison.abahurire already suggested. I would be happy to submit a PR for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 04:19:13 2020 From: report at bugs.python.org (Sanmitha) Date: Thu, 21 May 2020 08:19:13 +0000 Subject: [issue40708] Malfunctioning of '\r' Message-ID: <1590049153.19.0.498279112117.issue40708@roundup.psfhosted.org> New submission from Sanmitha : '\r' in python 3.7.2, 3.7.4, 3.8.2, 2.x versions doesn't give the desired output Eg: print("computer\rscience") The expected output of the above code is : sciencer But it displays : computerscience without functioning of \r ---------- assignee: terry.reedy components: IDLE messages: 369504 nosy: Sanmitha, terry.reedy priority: normal severity: normal status: open title: Malfunctioning of '\r' type: performance versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 04:24:33 2020 From: report at bugs.python.org (Sanmitha) Date: Thu, 21 May 2020 08:24:33 +0000 Subject: [issue40708] Clearing the screen of IDLE interactive mode in Windows In-Reply-To: <1590049153.19.0.498279112117.issue40708@roundup.psfhosted.org> Message-ID: <1590049473.67.0.399522303843.issue40708@roundup.psfhosted.org> Sanmitha added the comment: Clearing the screen of IDLE interactive mode using the following code: import os os.system("cls") It doesn't clear the screen in Windows ---------- title: Malfunctioning of '\r' -> Clearing the screen of IDLE interactive mode in Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 04:25:59 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Thu, 21 May 2020 08:25:59 +0000 Subject: [issue40670] supplying an empty string to timeit causes an IndentationError In-Reply-To: <1589805861.06.0.616610250992.issue40670@roundup.psfhosted.org> Message-ID: <1590049559.1.0.370043938387.issue40670@roundup.psfhosted.org> Change by Florian Dahlitz : ---------- keywords: +patch pull_requests: +19560 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20286 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 04:29:09 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 21 May 2020 08:29:09 +0000 Subject: [issue40670] supplying an empty string to timeit causes an IndentationError In-Reply-To: <1589805861.06.0.616610250992.issue40670@roundup.psfhosted.org> Message-ID: <1590049749.63.0.708245689482.issue40670@roundup.psfhosted.org> Serhiy Storchaka added the comment: Accepting an empty string in CLI is just an artifact of the implementation. There was no intention to support it. It will fail if pass a space: ./python -m timeit ' ' or two empty arguments: IndentationError: ./python -m timeit '' '' I do not see this is an issue. Garbage in -- garbage out. IndentationError is a subclass of SyntaxError, so if you handle it programmatically, it does not matter. Of course we try to catch some user errors and provide informative traceback. timeit now correctly handles most of code which interferes with the control flow in functions and loops: 'return', 'yield', 'break', 'await'. But it is still possible to bypass the validation. For example: ./python -m timeit -s 'while False:' -s ' pass' ' break' I think there is an infinite number of ways to fool timeit. And an empty string is just one of them, not special enough to add a special handling in the code. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 04:34:26 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Thu, 21 May 2020 08:34:26 +0000 Subject: [issue40701] tempfile mixes str and bytes in an inconsistent manner In-Reply-To: <1590002424.23.0.821521735552.issue40701@roundup.psfhosted.org> Message-ID: <1590050066.18.0.597936270629.issue40701@roundup.psfhosted.org> Change by Florian Dahlitz : ---------- nosy: +DahlitzFlorian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 04:34:07 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Thu, 21 May 2020 08:34:07 +0000 Subject: [issue40691] misleading output from difflib unified_diff In-Reply-To: <1589921866.61.0.952751122807.issue40691@roundup.psfhosted.org> Message-ID: <1590050047.25.0.566602908662.issue40691@roundup.psfhosted.org> Change by Florian Dahlitz : ---------- nosy: +DahlitzFlorian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 05:00:01 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 21 May 2020 09:00:01 +0000 Subject: [issue40696] "await" hangs in Python3.9.0b1. In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1590051601.21.0.716908344595.issue40696@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- keywords: +patch pull_requests: +19561 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20287 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 05:10:55 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Thu, 21 May 2020 09:10:55 +0000 Subject: [issue40670] supplying an empty string to timeit causes an IndentationError In-Reply-To: <1589805861.06.0.616610250992.issue40670@roundup.psfhosted.org> Message-ID: <1590052255.28.0.347421342058.issue40670@roundup.psfhosted.org> Florian Dahlitz added the comment: I see your point and agree with you. However, IMHO the CLI and the direct function call should behave the same way to not confuse users. The opened PR ensures that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 05:17:19 2020 From: report at bugs.python.org (Sanmitha) Date: Thu, 21 May 2020 09:17:19 +0000 Subject: [issue40709] Malfunctioning of '\r' Message-ID: <1590052639.86.0.84675192196.issue40709@roundup.psfhosted.org> New submission from Sanmitha : The escape sequence '\r' (carriage return) doesn't function in 3.x and 2.x versions. Eg: print("computer\rscience") Expected output : sciencer But, it displays computerscience without the functioning of'\r' ---------- assignee: terry.reedy components: IDLE files: error messages: 369508 nosy: Sanmitha, terry.reedy priority: normal severity: normal status: open title: Malfunctioning of '\r' type: performance versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file49174/error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 05:18:37 2020 From: report at bugs.python.org (Sanmitha) Date: Thu, 21 May 2020 09:18:37 +0000 Subject: [issue40709] Malfunctioning of '\r' In-Reply-To: <1590052639.86.0.84675192196.issue40709@roundup.psfhosted.org> Message-ID: <1590052717.84.0.957456940975.issue40709@roundup.psfhosted.org> Sanmitha added the comment: The escape sequence '\r' (carriage return) doesn't function in 3.x and 2.x versions. Eg: print("computer\rscience") Expected output : sciencer But, it displays computerscience without the functioning of'\r' ---------- Added file: https://bugs.python.org/file49175/error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 05:28:45 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 21 May 2020 09:28:45 +0000 Subject: [issue40696] "await" hangs in Python3.9.0b1. In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1590053325.89.0.988261239971.issue40696@roundup.psfhosted.org> Chris Jerdonek added the comment: I just posted a draft PR that implements the narrower fix: https://github.com/python/cpython/pull/20287 I confirmed that the Django test passes with it. I also included two regression tests: one using only generators, and one more like the Django test that awaits a task. My solution was to update the exception context in gen_send_ex() using _PyErr_SetObject() instead of _PyErr_ChainExceptions() -- because _PyErr_SetObject() does the cycle detection we've been discussing, and _PyErr_ChainExceptions() doesn't. While _PyErr_SetObject()'s cycle detection isn't complete in that it can't detect cycles that begin further down the chain, it's good enough for this case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 05:36:26 2020 From: report at bugs.python.org (Eric L.) Date: Thu, 21 May 2020 09:36:26 +0000 Subject: [issue40701] tempfile mixes str and bytes in an inconsistent manner In-Reply-To: <1590002424.23.0.821521735552.issue40701@roundup.psfhosted.org> Message-ID: <1590053786.2.0.0041092465711.issue40701@roundup.psfhosted.org> Eric L. added the comment: In the meantime, I noticed the following in addition: [ericl at tuxedo ~]$ python3.9 Python 3.9.0a6 (default, Apr 28 2020, 00:00:00) [GCC 10.0.1 20200430 (Red Hat 10.0.1-0.14)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import tempfile >>> tempfile.tempdir = b'/tmp' >>> tempfile.gettempdir() b'/tmp' >>> tempfile.tempdir = '/tmp' >>> tempfile.gettempdirb() b'/tmp' This actually explicitly hurts the interface description which states that tempfile.gettempdir() returns a string. "Encouraged" by this discovery, I've tried to write a patch of tempfile.py addressing the issues discovered. It's my first patch ever of Python so bare with me. The default remains string but if someone _explicitly_ sets tempdir to bytes, it'll become bytes. I've tried all the commands listed previously and it all looks consistent to me. ---------- keywords: +patch Added file: https://bugs.python.org/file49176/tempfile.py.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 05:41:08 2020 From: report at bugs.python.org (Sanmitha) Date: Thu, 21 May 2020 09:41:08 +0000 Subject: [issue40710] Malfunctioning of '\r' Message-ID: <1590054068.64.0.707147540706.issue40710@roundup.psfhosted.org> Change by Sanmitha : ---------- assignee: terry.reedy components: IDLE nosy: Sanmitha Sadhishkumar, terry.reedy priority: normal severity: normal status: open title: Malfunctioning of '\r' type: performance versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 05:45:01 2020 From: report at bugs.python.org (Sanmitha) Date: Thu, 21 May 2020 09:45:01 +0000 Subject: [issue40710] Malfunctioning of '\r' Message-ID: <1590054301.73.0.843640972851.issue40710@roundup.psfhosted.org> New submission from Sanmitha : The escape sequence '\r' (carriage return) doesn't function in 3.x and 2.x versions. Eg: print("computer\rscience") Expected output : sciencer But, it displays computerscience without the functioning of'\r' ---------- Added file: https://bugs.python.org/file49177/r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 05:45:36 2020 From: report at bugs.python.org (Sanmitha) Date: Thu, 21 May 2020 09:45:36 +0000 Subject: [issue40711] Clearing the screen of IDLE interactive mode in Windows Message-ID: <1590054336.96.0.00702534454231.issue40711@roundup.psfhosted.org> Change by Sanmitha : ---------- assignee: terry.reedy components: IDLE nosy: Sanmitha Sadhishkumar, terry.reedy priority: normal severity: normal status: open title: Clearing the screen of IDLE interactive mode in Windows type: performance versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 05:48:14 2020 From: report at bugs.python.org (Sanmitha) Date: Thu, 21 May 2020 09:48:14 +0000 Subject: [issue40711] Clearing the screen of IDLE interactive mode in Windows Message-ID: <1590054494.61.0.0457107186988.issue40711@roundup.psfhosted.org> New submission from Sanmitha : Clearing the screen of IDLE interactive mode using the following code: import os os.system("cls") It doesn't clear the screen in Windows. Actually these two statements have no effect at all. ---------- Added file: https://bugs.python.org/file49178/Error_clearing screen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 05:49:08 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 21 May 2020 09:49:08 +0000 Subject: [issue40696] "await" hangs in Python3.9.0b1. In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1590054548.72.0.882704540888.issue40696@roundup.psfhosted.org> Chris Jerdonek added the comment: Also, I just want to point out one thing about _PyErr_SetObject(). I believe it can detect cycles of arbitrary length (which is what the while loop is for). It's just that it can only detect cycles that involve the first node. So for things to fail with _PyErr_SetObject(), someone would need to mess with exceptions further down the chain. So I *think* hangs should be pretty unlikely with the narrower fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 05:50:54 2020 From: report at bugs.python.org (pmp-p) Date: Thu, 21 May 2020 09:50:54 +0000 Subject: [issue40710] Malfunctioning of '\r' In-Reply-To: <1590054301.73.0.843640972851.issue40710@roundup.psfhosted.org> Message-ID: <1590054654.75.0.0819770343378.issue40710@roundup.psfhosted.org> pmp-p added the comment: Hi, i can't reproduce on standard terminals, what is your OS version and terminal application ( also please state value of $TERM ) ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 05:52:16 2020 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 21 May 2020 09:52:16 +0000 Subject: [issue40709] Malfunctioning of '\r' In-Reply-To: <1590052639.86.0.84675192196.issue40709@roundup.psfhosted.org> Message-ID: <1590054736.13.0.303362663163.issue40709@roundup.psfhosted.org> Ezio Melotti added the comment: The behavior of \r depends on the operating system and terminal you are using, and not on Python itself. ---------- assignee: terry.reedy -> ezio.melotti nosy: +ezio.melotti resolution: -> not a bug stage: -> resolved status: open -> closed type: performance -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 05:53:15 2020 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 21 May 2020 09:53:15 +0000 Subject: [issue40710] Malfunctioning of '\r' In-Reply-To: <1590054301.73.0.843640972851.issue40710@roundup.psfhosted.org> Message-ID: <1590054795.26.0.528090065146.issue40710@roundup.psfhosted.org> Ezio Melotti added the comment: The behavior of \r depends on the operating system and terminal you are using, and not on Python itself. ---------- assignee: terry.reedy -> ezio.melotti nosy: +ezio.melotti resolution: -> not a bug stage: -> resolved status: open -> closed type: performance -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 06:25:19 2020 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 21 May 2020 10:25:19 +0000 Subject: [issue40708] Clearing the screen of IDLE interactive mode in Windows In-Reply-To: <1590049153.19.0.498279112117.issue40708@roundup.psfhosted.org> Message-ID: <1590056719.14.0.639537160315.issue40708@roundup.psfhosted.org> Change by Ezio Melotti : ---------- assignee: terry.reedy -> ezio.melotti nosy: +ezio.melotti resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Clearing the screen of IDLE interactive mode in Windows type: performance -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 06:33:37 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 21 May 2020 10:33:37 +0000 Subject: [issue40701] tempfile mixes str and bytes in an inconsistent manner In-Reply-To: <1590002424.23.0.821521735552.issue40701@roundup.psfhosted.org> Message-ID: <1590057217.42.0.399624686576.issue40701@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 07:02:49 2020 From: report at bugs.python.org (radkujawa) Date: Thu, 21 May 2020 11:02:49 +0000 Subject: [issue40712] fstrings are not docstrings Message-ID: <1590058968.97.0.0636260387213.issue40712@roundup.psfhosted.org> New submission from radkujawa : see example: >>> def f(): ... f"""asdf""" ... pass ... >>> f.__doc__ >>> def f(): ... """asdf""" ... pass ... >>> f.__doc__ 'asdf' >>> ---------- components: Tests messages: 369518 nosy: radkujawa priority: normal severity: normal status: open title: fstrings are not docstrings type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 07:15:03 2020 From: report at bugs.python.org (radkujawa) Date: Thu, 21 May 2020 11:15:03 +0000 Subject: [issue40712] fstrings are not docstrings In-Reply-To: <1590058968.97.0.0636260387213.issue40712@roundup.psfhosted.org> Message-ID: <1590059703.88.0.523779781779.issue40712@roundup.psfhosted.org> radkujawa added the comment: duplicate of https://bugs.python.org/issue28739 behaviour described in: https://docs.python.org/3/reference/lexical_analysis.html#formatted-string-literals ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 07:52:13 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 21 May 2020 11:52:13 +0000 Subject: [issue39782] local varible referenced a Exception won't be collected in function In-Reply-To: <1582888710.58.0.0521565801778.issue39782@roundup.psfhosted.org> Message-ID: <1590061933.08.0.294748544981.issue39782@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- nosy: +remi.lapeyre nosy_count: 2.0 -> 3.0 pull_requests: +19562 pull_request: https://github.com/python/cpython/pull/20288 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 07:56:21 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 21 May 2020 11:56:21 +0000 Subject: [issue29847] Path takes and ignores **kwargs In-Reply-To: <1489850567.46.0.646194395205.issue29847@psf.upfronthosting.co.za> Message-ID: <1590062181.92.0.250179600427.issue29847@roundup.psfhosted.org> R?mi Lapeyre added the comment: PurePath subclasses cannot support kwargs as __new__() does not accept **kwargs: >>> from pathlib import PurePath >>> class MyPurePath(PurePath): ... def __init__(self, *args, **kargs): pass ... >>> MyPurePath('foo', spam=True) Traceback (most recent call last): File "", line 1, in TypeError: __new__() got an unexpected keyword argument 'spam' The behaviour for this should probably be made the same for both Path and PurePath. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 07:56:52 2020 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 21 May 2020 11:56:52 +0000 Subject: [issue40705] use-after-free in _zoneinfo.c's module_free function In-Reply-To: <1590038531.88.0.263330697524.issue40705@roundup.psfhosted.org> Message-ID: <1590062212.58.0.590628691832.issue40705@roundup.psfhosted.org> Change by Paul Ganssle : ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 08:00:05 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 21 May 2020 12:00:05 +0000 Subject: [issue39783] Optimize construction of Path from other Paths by just returning the same object? In-Reply-To: <1582889797.54.0.821069987387.issue39783@roundup.psfhosted.org> Message-ID: <1590062405.05.0.700107320687.issue39783@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch pull_requests: +19563 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20288 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 08:01:18 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 21 May 2020 12:01:18 +0000 Subject: [issue39782] local varible referenced a Exception won't be collected in function In-Reply-To: <1582888710.58.0.0521565801778.issue39782@roundup.psfhosted.org> Message-ID: <1590062478.75.0.233062316103.issue39782@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- pull_requests: -19562 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 08:05:54 2020 From: report at bugs.python.org (Sanmitha) Date: Thu, 21 May 2020 12:05:54 +0000 Subject: [issue40710] Malfunctioning of '\r' (ii) In-Reply-To: <1590054301.73.0.843640972851.issue40710@roundup.psfhosted.org> Message-ID: <1590062754.06.0.030536481656.issue40710@roundup.psfhosted.org> Sanmitha added the comment: The escape sequence'\r' doesn't work in Windows operating system. All the versions including windows 10 doesn't support. ---------- resolution: not a bug -> status: closed -> open title: Malfunctioning of '\r' -> Malfunctioning of '\r' (ii) Added file: https://bugs.python.org/file49179/r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 08:18:46 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 21 May 2020 12:18:46 +0000 Subject: [issue40696] Exception handling with "await" can hang in Python3.9.0b1 In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1590063526.49.0.602565430144.issue40696@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- components: +Interpreter Core -asyncio title: "await" hangs in Python3.9.0b1. -> Exception handling with "await" can hang in Python3.9.0b1 type: -> behavior versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 08:22:17 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 21 May 2020 12:22:17 +0000 Subject: [issue40679] show class name in method invocation TypeError In-Reply-To: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> Message-ID: <1590063737.27.0.580165057158.issue40679@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- components: +Interpreter Core versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 09:32:41 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 21 May 2020 13:32:41 +0000 Subject: [issue40273] mappingproxy isn't reversible In-Reply-To: <1586786082.33.0.84219610791.issue40273@roundup.psfhosted.org> Message-ID: <1590067961.73.0.378728825544.issue40273@roundup.psfhosted.org> R?mi Lapeyre added the comment: I think this issue can be closed thanks to Zackery Spytz. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 09:47:59 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 21 May 2020 13:47:59 +0000 Subject: [issue40713] _zoneinfo.c can use dst_offset without initialization in parse_tz_str() Message-ID: <1590068879.49.0.231802096396.issue40713@roundup.psfhosted.org> New submission from R?mi Lapeyre : Here's the warning given by clang: /Users/remi/src/cpython/Modules/_zoneinfo.c:1487:9: warning: variable 'dst_offset' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (*p == '\0') { ^~~~~~~~~~ /Users/remi/src/cpython/Modules/_zoneinfo.c:1544:50: note: uninitialized use occurs here build_tzrule(std_abbr, dst_abbr, std_offset, dst_offset, start, end, out); ^~~~~~~~~~ /Users/remi/src/cpython/Modules/_zoneinfo.c:1487:5: note: remove the 'if' if its condition is always false if (*p == '\0') { ^~~~~~~~~~~~~~~~~ /Users/remi/src/cpython/Modules/_zoneinfo.c:1460:32: note: initialize the variable 'dst_offset' to silence this warning long std_offset, dst_offset; ^ = 0 /Users/remi/src/cpython/Modules/_zoneinfo.c:1910:19: warning: suggest braces around initialization of subobject [-Wmissing-braces] _tzrule rv = {0}; ^ {} Looking at the code path, the unitialized dst_offset may create a ZoneInfo with a garbage value in dstoff with some inputs so this should be backported to Python3.9 too. ---------- components: Library (Lib) messages: 369523 nosy: remi.lapeyre priority: normal severity: normal status: open title: _zoneinfo.c can use dst_offset without initialization in parse_tz_str() type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 09:49:57 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 21 May 2020 13:49:57 +0000 Subject: [issue40713] _zoneinfo.c can use dst_offset without initialization in parse_tz_str() In-Reply-To: <1590068879.49.0.231802096396.issue40713@roundup.psfhosted.org> Message-ID: <1590068997.47.0.472515161566.issue40713@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch pull_requests: +19564 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20289 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 09:54:27 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 21 May 2020 13:54:27 +0000 Subject: [issue40690] unittest: if FunctionTestCase is imported, the loader loads "tests" from it In-Reply-To: <1589919425.78.0.0609580372109.issue40690@roundup.psfhosted.org> Message-ID: <1590069267.31.0.659689039951.issue40690@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi Vitalii, can you give more context about why you are writing this code, what you expect it to do and why is there a bug? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 10:51:47 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 21 May 2020 14:51:47 +0000 Subject: [issue23188] Provide a C helper function to chain raised (but not yet caught) exceptions In-Reply-To: <1420687041.12.0.12728944273.issue23188@psf.upfronthosting.co.za> Message-ID: <1590072707.74.0.0477553549665.issue23188@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 11:20:07 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 21 May 2020 15:20:07 +0000 Subject: [issue40273] mappingproxy isn't reversible In-Reply-To: <1586786082.33.0.84219610791.issue40273@roundup.psfhosted.org> Message-ID: <1590074407.99.0.127807198069.issue40273@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 11:37:24 2020 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 21 May 2020 15:37:24 +0000 Subject: [issue39573] [C API] Make PyObject an opaque structure in the limited C API In-Reply-To: <1581030432.16.0.48160379721.issue39573@roundup.psfhosted.org> Message-ID: <1590075444.2.0.631668049826.issue39573@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +19565 pull_request: https://github.com/python/cpython/pull/20290 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 11:54:27 2020 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 21 May 2020 15:54:27 +0000 Subject: [issue40714] Remove compile warning from _zoneinfo.c Message-ID: <1590076467.03.0.601843943956.issue40714@roundup.psfhosted.org> New submission from Dong-hee Na : /Users/corona10/oss/cpython/Modules/_zoneinfo.c:1487:9: warning: variable 'dst_offset' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (*p == '\0') { ^~~~~~~~~~ /Users/corona10/oss/cpython/Modules/_zoneinfo.c:1544:50: note: uninitialized use occurs here build_tzrule(std_abbr, dst_abbr, std_offset, dst_offset, start, end, out); ^~~~~~~~~~ /Users/corona10/oss/cpython/Modules/_zoneinfo.c:1487:5: note: remove the 'if' if its condition is always false if (*p == '\0') { ^~~~~~~~~~~~~~~~~ /Users/corona10/oss/cpython/Modules/_zoneinfo.c:1460:32: note: initialize the variable 'dst_offset' to silence this warning long std_offset, dst_offset; ^ = 0 /Users/corona10/oss/cpython/Modules/_zoneinfo.c:1910:19: warning: suggest braces around initialization of subobject [-Wmissing-braces] _tzrule rv = {0}; ^ {} ---------- messages: 369525 nosy: corona10 priority: normal severity: normal status: open title: Remove compile warning from _zoneinfo.c type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 11:55:13 2020 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 21 May 2020 15:55:13 +0000 Subject: [issue40714] Remove compile warning from _zoneinfo.c In-Reply-To: <1590076467.03.0.601843943956.issue40714@roundup.psfhosted.org> Message-ID: <1590076513.98.0.718832300044.issue40714@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +19566 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20291 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 11:57:20 2020 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 21 May 2020 15:57:20 +0000 Subject: [issue40714] Remove compile warning from _zoneinfo.c In-Reply-To: <1590076467.03.0.601843943956.issue40714@roundup.psfhosted.org> Message-ID: <1590076640.93.0.348435991475.issue40714@roundup.psfhosted.org> Dong-hee Na added the comment: It happened from clang compiler of macOS. Clang 11.0.3 (clang-1103.0.32.29)] ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 12:08:26 2020 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 21 May 2020 16:08:26 +0000 Subject: [issue40714] Remove compile warning from _zoneinfo.c In-Reply-To: <1590076467.03.0.601843943956.issue40714@roundup.psfhosted.org> Message-ID: <1590077306.59.0.124219754611.issue40714@roundup.psfhosted.org> Change by Dong-hee Na : ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 12:37:08 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Thu, 21 May 2020 16:37:08 +0000 Subject: [issue40715] Pegen: dict unpacking inside dict comprehension Message-ID: <1590079028.52.0.440007809854.issue40715@roundup.psfhosted.org> New submission from Batuhan Taskaya : >>> {**{} for a in [1]} ValueError: field 'key' is required for DictComp should be >>> {**{} for a in [1]} File "", line 1 {**{} for a in [1]} ^ SyntaxError: dict unpacking cannot be used in dict comprehension ---------- messages: 369527 nosy: BTaskaya priority: normal severity: normal status: open title: Pegen: dict unpacking inside dict comprehension _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 12:38:53 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Thu, 21 May 2020 16:38:53 +0000 Subject: [issue40715] Pegen: dict unpacking inside dict comprehension In-Reply-To: <1590079028.52.0.440007809854.issue40715@roundup.psfhosted.org> Message-ID: <1590079133.03.0.393925368279.issue40715@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch pull_requests: +19567 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20292 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 12:56:21 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 21 May 2020 16:56:21 +0000 Subject: [issue40714] Remove compile warning from _zoneinfo.c In-Reply-To: <1590076467.03.0.601843943956.issue40714@roundup.psfhosted.org> Message-ID: <1590080181.52.0.326494742243.issue40714@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +19568 pull_request: https://github.com/python/cpython/pull/20293 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 12:56:19 2020 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 21 May 2020 16:56:19 +0000 Subject: [issue40714] Remove compile warning from _zoneinfo.c In-Reply-To: <1590076467.03.0.601843943956.issue40714@roundup.psfhosted.org> Message-ID: <1590080179.84.0.549109108484.issue40714@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset a487a39dca4c41305928c7dfdbcb0b3aa344683b by Dong-hee Na in branch 'master': bpo-40714: Remove compile warning from _zoneinfo.c (GH-20291) https://github.com/python/cpython/commit/a487a39dca4c41305928c7dfdbcb0b3aa344683b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 13:16:03 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 21 May 2020 17:16:03 +0000 Subject: [issue40714] Remove compile warning from _zoneinfo.c In-Reply-To: <1590076467.03.0.601843943956.issue40714@roundup.psfhosted.org> Message-ID: <1590081363.81.0.957140101712.issue40714@roundup.psfhosted.org> miss-islington added the comment: New changeset c817a1c4de1ff1f475776fd1fe8fe158695e53a5 by Miss Islington (bot) in branch '3.9': [3.9] bpo-40714: Remove compile warning from _zoneinfo.c (GH-20291) (GH-20293) https://github.com/python/cpython/commit/c817a1c4de1ff1f475776fd1fe8fe158695e53a5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 13:16:41 2020 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 21 May 2020 17:16:41 +0000 Subject: [issue40714] Remove compile warning from _zoneinfo.c In-Reply-To: <1590076467.03.0.601843943956.issue40714@roundup.psfhosted.org> Message-ID: <1590081401.47.0.876807831569.issue40714@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 May 21 13:44:28 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Thu, 21 May 2020 17:44:28 +0000 Subject: [issue40716] Pegen: improve error messages for unparenthesized from imports with trailing comma Message-ID: <1590083068.82.0.382306142044.issue40716@roundup.psfhosted.org> New submission from Batuhan Taskaya : $ python Python 3.10.0a0 (heads/bpo-xxxxx:f2947e354c, May 21 2020, 18:54:57) [GCC 9.2.1 20191008] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from x import y, File "", line 1 from x import y, ^ SyntaxError: invalid syntax >>> (.venv) (Python 3.10.0a0) [ 8:44?S ] [ isidentical at x200:~/cpython/cpython(bpo-xxxxx?) ] $ python -X oldparser Python 3.10.0a0 (heads/bpo-xxxxx:f2947e354c, May 21 2020, 18:54:57) [GCC 9.2.1 20191008] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from x import y, File "", line 1 SyntaxError: trailing comma not allowed without surrounding parentheses ---------- messages: 369530 nosy: BTaskaya priority: normal severity: normal status: open title: Pegen: improve error messages for unparenthesized from imports with trailing comma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 13:58:35 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 21 May 2020 17:58:35 +0000 Subject: [issue40715] Pegen: dict unpacking inside dict comprehension In-Reply-To: <1590079028.52.0.440007809854.issue40715@roundup.psfhosted.org> Message-ID: <1590083915.63.0.921420171251.issue40715@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +gvanrossum, lys.nikolaou, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 14:01:35 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Thu, 21 May 2020 18:01:35 +0000 Subject: [issue40176] unterminated string literal tokenization error messages could be better In-Reply-To: <1585936724.82.0.54480834244.issue40176@roundup.psfhosted.org> Message-ID: <1590084095.33.0.296971489051.issue40176@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- pull_requests: +19569 pull_request: https://github.com/python/cpython/pull/20294 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 14:17:10 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Thu, 21 May 2020 18:17:10 +0000 Subject: [issue40716] Pegen: improve error messages for unparenthesized from imports with trailing comma In-Reply-To: <1590083068.82.0.382306142044.issue40716@roundup.psfhosted.org> Message-ID: <1590085030.03.0.670908427733.issue40716@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch pull_requests: +19570 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20294 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 14:17:25 2020 From: report at bugs.python.org (Hanno Boeck) Date: Thu, 21 May 2020 18:17:25 +0000 Subject: [issue40717] pl.python.org has expired cert and links to nonexistent django.pl page Message-ID: <1590085045.87.0.531667812908.issue40717@roundup.psfhosted.org> New submission from Hanno Boeck : I'm not sure if this is a good place to report this, but I haven't found a separate bug tracker or feedback contact for the webpages. https://pl.python.org/ has an expired certificate and it contains a prominent link to django.pl, which itself returns a DNS SERVFAIL error. ---------- assignee: docs at python components: Documentation messages: 369531 nosy: docs at python, hanno priority: normal severity: normal status: open title: pl.python.org has expired cert and links to nonexistent django.pl page _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 14:17:44 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Thu, 21 May 2020 18:17:44 +0000 Subject: [issue40176] unterminated string literal tokenization error messages could be better In-Reply-To: <1585936724.82.0.54480834244.issue40176@roundup.psfhosted.org> Message-ID: <1590085064.32.0.93649177706.issue40176@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- pull_requests: -19569 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 14:51:19 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Thu, 21 May 2020 18:51:19 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1590087079.99.0.493921183254.issue40334@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- pull_requests: +19571 pull_request: https://github.com/python/cpython/pull/20296 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 14:51:31 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 21 May 2020 18:51:31 +0000 Subject: [issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type In-Reply-To: <1586276621.78.0.843757244355.issue40217@roundup.psfhosted.org> Message-ID: <1590087091.04.0.684959450036.issue40217@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Actually, I have been thinking about this more and I cannot really trace how the bug could happen. We control the type allocation, but Py_tp_alloc controls the instance allocation and that can be anything, the current patch should not interfere with that. Petr, do you have a reproducer? I tried to create a reproducer of a type that overrides Py_tp_alloc but not Py_tp_traverse (therefore it does not implement gc support) and I cannot make it crash. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 15:25:54 2020 From: report at bugs.python.org (jakirkham) Date: Thu, 21 May 2020 19:25:54 +0000 Subject: [issue40718] Support out-of-band pickling for builtin types Message-ID: <1590089154.09.0.42583865069.issue40718@roundup.psfhosted.org> New submission from jakirkham : It would be nice (where possible) to support out-of-band pickling of builtin `bytes`-like types. This would allow binary data from these objects to be shipped along separately zero-copy and later reconstructed during unpickling. It seems that `bytes`, `bytearray`, and `array` would be good candidates for this behavior. Not sure if `mmap` or `memoryview` would make sense as it might not be clear on how to reconstruct them during unpickling, but if someone sees a way those would be nice to support too. To illustrate this a bit, here is the behavior with a `bytes` object today: ``` In [1]: import pickle In [2]: b = b"abc" In [3]: l = [] In [4]: p = pickle.dumps(b, protocol=5, buffer_callback=l.append) In [5]: l Out[5]: [] ``` With this change, we would see this behavior instead: ``` In [1]: import pickle In [2]: b = b"abc" In [3]: l = [] In [4]: p = pickle.dumps(b, protocol=5, buffer_callback=l.append) In [5]: l Out[5]: [] ``` (This is my first Python bug submission. So apologies if I got turned around here. Please go easy on me :) ---------- messages: 369533 nosy: jakirkham priority: normal severity: normal status: open title: Support out-of-band pickling for builtin types type: performance versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 15:39:40 2020 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 21 May 2020 19:39:40 +0000 Subject: [issue40713] _zoneinfo.c can use dst_offset without initialization in parse_tz_str() In-Reply-To: <1590068879.49.0.231802096396.issue40713@roundup.psfhosted.org> Message-ID: <1590089980.24.0.945353090703.issue40713@roundup.psfhosted.org> Paul Ganssle added the comment: This is a duplicate of bpo-40714. It's a bit of an overzealous compiler warning (as far as I can tell it's not true that the uninitialized value would ever be used), but we fixed it anyway in GH-20291. Thanks for the report! ---------- nosy: +p-ganssle resolution: -> duplicate stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 15:52:19 2020 From: report at bugs.python.org (Ama Aje My Fren) Date: Thu, 21 May 2020 19:52:19 +0000 Subject: [issue40717] pl.python.org has expired cert and links to nonexistent django.pl page In-Reply-To: <1590085045.87.0.531667812908.issue40717@roundup.psfhosted.org> Message-ID: Ama Aje My Fren added the comment: Hello, I am not absolutely sure but I suspect this should be directed to the infrastructure team. There is an infrastructure email list. I am hoping one can write to them without being a member of the group as I have done. Thanks On Thu, May 21, 2020 at 9:20 PM Hanno Boeck wrote: > > New submission from Hanno Boeck : > > I'm not sure if this is a good place to report this, but I haven't found a > separate bug tracker or feedback contact for the webpages. > > https://pl.python.org/ > has an expired certificate and it contains a prominent link to django.pl, > which itself returns a DNS SERVFAIL error. > > ---------- > assignee: docs at python > components: Documentation > messages: 369531 > nosy: docs at python, hanno > priority: normal > severity: normal > status: open > title: pl.python.org has expired cert and links to nonexistent django.pl > page > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________________ > docs mailing list -- docs at python.org > To unsubscribe send an email to docs-leave at python.org > https://mail.python.org/mailman3/lists/docs.python.org/ > Member address: amaajemyfren at gmail.com > ---------- nosy: +amaajemyfren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 15:57:56 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 21 May 2020 19:57:56 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1590091076.79.0.266706489833.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset f50516e6a978ee694232512399dd1ab47aaebab1 by Batuhan Taskaya in branch 'master': bpo-40334: Correctly generate C parser when assigned var is None (GH-20296) https://github.com/python/cpython/commit/f50516e6a978ee694232512399dd1ab47aaebab1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 16:26:51 2020 From: report at bugs.python.org (Ernest W. Durbin III) Date: Thu, 21 May 2020 20:26:51 +0000 Subject: [issue40717] pl.python.org has expired cert and links to nonexistent django.pl page In-Reply-To: Message-ID: Ernest W. Durbin III added the comment: pl.python.org is a delegated domain. I?ve contacted them repeatedly as we monitor *.python.org public CT records for expiring certificates with no response. -Ernest On May 21, 2020 at 4:23:16 PM, Ama Aje My Fren (amaajemyfren at gmail.com) wrote: Hello, I am not absolutely sure but I suspect this should be directed to the infrastructure team. There is an infrastructure email list. I am hoping one can write to them without being a member of the group as I have done. Thanks On Thu, May 21, 2020 at 9:20 PM Hanno Boeck wrote: > > New submission from Hanno Boeck : > > I'm not sure if this is a good place to report this, but I haven't found a > separate bug tracker or feedback contact for the webpages. > > https://pl.python.org/ > has an expired certificate and it contains a prominent link to django.pl, > which itself returns a DNS SERVFAIL error. > > ---------- > assignee: docs at python > components: Documentation > messages: 369531 > nosy: docs at python, hanno > priority: normal > severity: normal > status: open > title: pl.python.org has expired cert and links to nonexistent django.pl > page > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________________ > docs mailing list -- docs at python.org > To unsubscribe send an email to docs-leave at python.org > https://mail.python.org/mailman3/lists/docs.python.org/ > Member address: amaajemyfren at gmail.com > ________________________________________________ Infrastructure mailing list Infrastructure at python.org https://mail.python.org/mailman/listinfo/infrastructure Unsubscribe: https://mail.python.org/mailman/options/infrastructure/ewdurbin%40gmail.com ---------- nosy: +EWDurbin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 16:27:24 2020 From: report at bugs.python.org (Ernest W. Durbin III) Date: Thu, 21 May 2020 20:27:24 +0000 Subject: [issue40717] pl.python.org has expired cert and links to nonexistent django.pl page In-Reply-To: Message-ID: Ernest W. Durbin III added the comment: Correction, pl.python.org is just a single record. -Ernest On May 21, 2020 at 4:26:48 PM, Ernest W. Durbin III (ewdurbin at gmail.com) wrote: pl.python.org is a delegated domain. I?ve contacted them repeatedly as we monitor *.python.org public CT records for expiring certificates with no response. -Ernest On May 21, 2020 at 4:23:16 PM, Ama Aje My Fren (amaajemyfren at gmail.com) wrote: Hello, I am not absolutely sure but I suspect this should be directed to the infrastructure team. There is an infrastructure email list. I am hoping one can write to them without being a member of the group as I have done. Thanks On Thu, May 21, 2020 at 9:20 PM Hanno Boeck wrote: > > New submission from Hanno Boeck : > > I'm not sure if this is a good place to report this, but I haven't found a > separate bug tracker or feedback contact for the webpages. > > https://pl.python.org/ > has an expired certificate and it contains a prominent link to django.pl, > which itself returns a DNS SERVFAIL error. > > ---------- > assignee: docs at python > components: Documentation > messages: 369531 > nosy: docs at python, hanno > priority: normal > severity: normal > status: open > title: pl.python.org has expired cert and links to nonexistent django.pl > page > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________________ > docs mailing list -- docs at python.org > To unsubscribe send an email to docs-leave at python.org > https://mail.python.org/mailman3/lists/docs.python.org/ > Member address: amaajemyfren at gmail.com > ________________________________________________ Infrastructure mailing list Infrastructure at python.org https://mail.python.org/mailman/listinfo/infrastructure Unsubscribe: https://mail.python.org/mailman/options/infrastructure/ewdurbin%40gmail.com ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 16:32:40 2020 From: report at bugs.python.org (Ernest W. Durbin III) Date: Thu, 21 May 2020 20:32:40 +0000 Subject: [issue40717] pl.python.org has expired cert and links to nonexistent django.pl page In-Reply-To: Message-ID: Ernest W. Durbin III added the comment: Apologies, the correction was? incorrect. pl.python.org is delegated in its entirety. I?ve contacted the admins and given them final notice to renew the certificate. This is a recurring issue that is seen in our CT log monitoring. If it continues they risk their subdomain delegation. -Ernest On May 21, 2020 at 4:27:20 PM, Ernest W. Durbin III (ewdurbin at gmail.com) wrote: Correction, pl.python.org is just a single record. -Ernest On May 21, 2020 at 4:26:48 PM, Ernest W. Durbin III (ewdurbin at gmail.com) wrote: pl.python.org is a delegated domain. I?ve contacted them repeatedly as we monitor *.python.org public CT records for expiring certificates with no response. -Ernest On May 21, 2020 at 4:23:16 PM, Ama Aje My Fren (amaajemyfren at gmail.com) wrote: Hello, I am not absolutely sure but I suspect this should be directed to the infrastructure team. There is an infrastructure email list. I am hoping one can write to them without being a member of the group as I have done. Thanks On Thu, May 21, 2020 at 9:20 PM Hanno Boeck wrote: > > New submission from Hanno Boeck : > > I'm not sure if this is a good place to report this, but I haven't found a > separate bug tracker or feedback contact for the webpages. > > https://pl.python.org/ > has an expired certificate and it contains a prominent link to django.pl, > which itself returns a DNS SERVFAIL error. > > ---------- > assignee: docs at python > components: Documentation > messages: 369531 > nosy: docs at python, hanno > priority: normal > severity: normal > status: open > title: pl.python.org has expired cert and links to nonexistent django.pl > page > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________________ > docs mailing list -- docs at python.org > To unsubscribe send an email to docs-leave at python.org > https://mail.python.org/mailman3/lists/docs.python.org/ > Member address: amaajemyfren at gmail.com > ________________________________________________ Infrastructure mailing list Infrastructure at python.org https://mail.python.org/mailman/listinfo/infrastructure Unsubscribe: https://mail.python.org/mailman/options/infrastructure/ewdurbin%40gmail.com ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 16:39:50 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 21 May 2020 20:39:50 +0000 Subject: [issue40716] Pegen: improve error messages for unparenthesized from imports with trailing comma In-Reply-To: <1590083068.82.0.382306142044.issue40716@roundup.psfhosted.org> Message-ID: <1590093590.9.0.885246705402.issue40716@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- nosy: +gvanrossum, lys.nikolaou, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 16:40:39 2020 From: report at bugs.python.org (Rafael Fontenelle) Date: Thu, 21 May 2020 20:40:39 +0000 Subject: [issue40719] Add pt-br to the language switcher at the Python 3.6 and 2.7 docs website Message-ID: <1590093639.24.0.0882809667446.issue40719@roundup.psfhosted.org> New submission from Rafael Fontenelle : Thanks to bpo-38592, pt-br is listed in 3.8 and 3.7 versions. Now, pt-br team's repository has 3.6 and 2.7 branches daily pomerged from 3.8 branch. So, I believe it would nice to have it in those older versions' language switcher. ---------- assignee: docs at python components: Documentation messages: 369540 nosy: docs at python, rffontenelle priority: normal severity: normal status: open title: Add pt-br to the language switcher at the Python 3.6 and 2.7 docs website type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 16:42:01 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 21 May 2020 20:42:01 +0000 Subject: [issue40176] unterminated string literal tokenization error messages could be better In-Reply-To: <1585936724.82.0.54480834244.issue40176@roundup.psfhosted.org> Message-ID: <1590093721.77.0.866494215587.issue40176@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 72e0aa2fd2b9c6da2caa5a9ef54f6495fc2890b0 by Batuhan Taskaya in branch 'master': bpo-40176: Improve error messages for trailing comma on from import (GH-20294) https://github.com/python/cpython/commit/72e0aa2fd2b9c6da2caa5a9ef54f6495fc2890b0 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 16:43:16 2020 From: report at bugs.python.org (Rafael Fontenelle) Date: Thu, 21 May 2020 20:43:16 +0000 Subject: [issue40719] Add pt-br to the language switcher at the Python 3.6 and 2.7 docs website In-Reply-To: <1590093639.24.0.0882809667446.issue40719@roundup.psfhosted.org> Message-ID: <1590093796.56.0.430955527729.issue40719@roundup.psfhosted.org> Change by Rafael Fontenelle : ---------- keywords: +patch pull_requests: +19572 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20301 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 16:43:30 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 21 May 2020 20:43:30 +0000 Subject: [issue40176] unterminated string literal tokenization error messages could be better In-Reply-To: <1585936724.82.0.54480834244.issue40176@roundup.psfhosted.org> Message-ID: <1590093810.59.0.878368620759.issue40176@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +19573 pull_request: https://github.com/python/cpython/pull/20302 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 16:58:02 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 21 May 2020 20:58:02 +0000 Subject: [issue40716] Pegen: improve error messages for unparenthesized from imports with trailing comma In-Reply-To: <1590083068.82.0.382306142044.issue40716@roundup.psfhosted.org> Message-ID: <1590094682.97.0.835521067061.issue40716@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +19575 pull_request: https://github.com/python/cpython/pull/20302 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 16:58:18 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 21 May 2020 20:58:18 +0000 Subject: [issue40176] unterminated string literal tokenization error messages could be better In-Reply-To: <1585936724.82.0.54480834244.issue40176@roundup.psfhosted.org> Message-ID: <1590094698.09.0.330173175474.issue40176@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: -19573 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 17:04:57 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 21 May 2020 21:04:57 +0000 Subject: [issue40176] unterminated string literal tokenization error messages could be better In-Reply-To: <1585936724.82.0.54480834244.issue40176@roundup.psfhosted.org> Message-ID: <1590095097.37.0.791926827594.issue40176@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +19576 pull_request: https://github.com/python/cpython/pull/20302 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 17:05:02 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 21 May 2020 21:05:02 +0000 Subject: [issue40176] unterminated string literal tokenization error messages could be better In-Reply-To: <1585936724.82.0.54480834244.issue40176@roundup.psfhosted.org> Message-ID: <1590095102.08.0.889564965308.issue40176@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 275d7e1080d0007a82965d1ac510abb0ae8d7821 by Pablo Galindo in branch '3.9': [3.9] bpo-40176: Improve error messages for trailing comma on from import (GH-20294) (GH-20302) https://github.com/python/cpython/commit/275d7e1080d0007a82965d1ac510abb0ae8d7821 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 17:17:38 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 21 May 2020 21:17:38 +0000 Subject: [issue40176] unterminated string literal tokenization error messages could be better In-Reply-To: <1585936724.82.0.54480834244.issue40176@roundup.psfhosted.org> Message-ID: <1590095858.59.0.257801918823.issue40176@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: -19576 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 17:32:53 2020 From: report at bugs.python.org (Marten H. van Kerkwijk) Date: Thu, 21 May 2020 21:32:53 +0000 Subject: [issue40720] accessing mmap of file that is overwritten causes bus error Message-ID: <1590096773.09.0.253309734553.issue40720@roundup.psfhosted.org> New submission from Marten H. van Kerkwijk : While debugging a strange failure with tests and np.memmap, I realized that the following direct use of mmap reliably leads to a bus error. Here, obviously mmap'ing a file, closing it, opening the file for writing but not writing anything, and then again accessing the mmap is not something one should do (but a test case did it anyway), but it would nevertheless be nice to avoid a crash! ``` import mmap with open('test.dat', 'wb') as fh: fh.write(b'abcdefghijklmnopqrstuvwxyz') with open('test.dat', 'rb') as fh: mm = mmap.mmap(fh.fileno(), 0, access=mmap.ACCESS_READ) with open('test.dat', 'wb') as fh: pass # Note: if something is written, then I get no bus error. mm[2] ``` ---------- components: Library (Lib) messages: 369543 nosy: mhvk priority: normal severity: normal status: open title: accessing mmap of file that is overwritten causes bus error type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 17:42:56 2020 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Thu, 21 May 2020 21:42:56 +0000 Subject: [issue40721] PEP0435 (enums) -- there is no standard on enum item letters case Message-ID: <1590097376.47.0.46238939319.issue40721@roundup.psfhosted.org> New submission from ???? ????????? : Example from PEP0435: (https://www.python.org/dev/peps/pep-0435) >>> from enum import Enum >>> class Color(Enum): ... red = 1 ... green = 2 ... blue = 3 Example from Python documentation: (https://docs.python.org/3/library/enum.html) >>> from enum import Enum >>> class Color(Enum): ... RED = 1 ... GREEN = 2 ... BLUE = 3 ... So, what are the rules for naming enum members? CamelCase ? snake_case ? ALL_CAPS ? Someone should explain how should we format sources. So various linters may check for that. ---------- assignee: docs at python components: Documentation messages: 369544 nosy: docs at python, socketpair priority: normal severity: normal status: open title: PEP0435 (enums) -- there is no standard on enum item letters case versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 17:44:35 2020 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Thu, 21 May 2020 21:44:35 +0000 Subject: [issue40721] PEP0435 (enums) -- there is no standard on enum item letters case In-Reply-To: <1590097376.47.0.46238939319.issue40721@roundup.psfhosted.org> Message-ID: <1590097475.93.0.855805706844.issue40721@roundup.psfhosted.org> ???? ????????? added the comment: FYI: PEP8 does not mention enums. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 17:50:03 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 21 May 2020 21:50:03 +0000 Subject: [issue40721] PEP0435 (enums) -- there is no standard on enum item letters case In-Reply-To: <1590097376.47.0.46238939319.issue40721@roundup.psfhosted.org> Message-ID: <1590097803.31.0.658958501555.issue40721@roundup.psfhosted.org> R?mi Lapeyre added the comment: There is no official way, you can find both in the Python tree: all caps at https://github.com/python/cpython/blob/master/Lib/ast.py#L615-L636 and snake case at https://github.com/python/cpython/blob/master/Lib/uuid.py#L76-L79. I think it's common to use all caps for those that are used as flags (i.e. where each value is a power of 2 and that may be combined using bigs operations) but there is no one true way that you can enforced, it depends on the context. Also, note that pep8 covers the code of Python, it's not a rule that must be blindly applied to all Python code and that you may ignore it for various reasons: https://www.python.org/dev/peps/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 18:34:31 2020 From: report at bugs.python.org (Vitalii) Date: Thu, 21 May 2020 22:34:31 +0000 Subject: [issue40690] unittest: if FunctionTestCase is imported, the loader loads "tests" from it In-Reply-To: <1589919425.78.0.0609580372109.issue40690@roundup.psfhosted.org> Message-ID: <1590100471.75.0.682733008591.issue40690@roundup.psfhosted.org> Vitalii added the comment: If you make an import in a module with your tests >From unittest import FunctionTestCase then you will have 1 extra test in that module (the imported one), moreover, that test will be broken. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 18:40:03 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 21 May 2020 22:40:03 +0000 Subject: [issue40715] Pegen: dict unpacking inside dict comprehension In-Reply-To: <1590079028.52.0.440007809854.issue40715@roundup.psfhosted.org> Message-ID: <1590100803.89.0.0571368310206.issue40715@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset b8a65ec1d3d4660d0ee38a9765d98f5cdcabdef5 by Batuhan Taskaya in branch 'master': bpo-40715: Reject dict unpacking on dict comprehensions (GH-20292) https://github.com/python/cpython/commit/b8a65ec1d3d4660d0ee38a9765d98f5cdcabdef5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 18:40:14 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 21 May 2020 22:40:14 +0000 Subject: [issue40715] Pegen: dict unpacking inside dict comprehension In-Reply-To: <1590079028.52.0.440007809854.issue40715@roundup.psfhosted.org> Message-ID: <1590100814.98.0.71050545544.issue40715@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +19577 pull_request: https://github.com/python/cpython/pull/20303 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 18:40:58 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 21 May 2020 22:40:58 +0000 Subject: [issue40716] Pegen: improve error messages for unparenthesized from imports with trailing comma In-Reply-To: <1590083068.82.0.382306142044.issue40716@roundup.psfhosted.org> Message-ID: <1590100858.28.0.237567626101.issue40716@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 Thu May 21 18:41:05 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 21 May 2020 22:41:05 +0000 Subject: [issue40715] Pegen: dict unpacking inside dict comprehension In-Reply-To: <1590079028.52.0.440007809854.issue40715@roundup.psfhosted.org> Message-ID: <1590100865.3.0.0139451113601.issue40715@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 Thu May 21 18:49:42 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Thu, 21 May 2020 22:49:42 +0000 Subject: [issue40722] test_ttk_guionly times out on Ubuntu CI Message-ID: <1590101382.1.0.392017281749.issue40722@roundup.psfhosted.org> New submission from Dennis Sweeney : One of the tests (test_ttk_guionly.test_variable_change) on the Ubuntu CI is intermittently hanging on this code: https://github.com/python/cpython/blob/e42b705188271da108de42b55d9344642170aa2b/Lib/tkinter/test/test_ttk/test_extensions.py#L147 def test_variable_change(self): x = ttk.LabeledScale(self.root) x.pack() x.wait_visibility() ^^^^^^^^^^^^^^^^^^^ The failure at https://github.com/python/cpython/runs/697113653 gave the logs: 0:28:29 load avg: 0.00 [425/425/1] test_ttk_guionly crashed (Exit code 1) Timeout (0:20:00)! Thread 0x00007fa268d0c080 (most recent call first): File "/home/runner/work/cpython/cpython/Lib/tkinter/__init__.py", line 697 in wait_visibility File "/home/runner/work/cpython/cpython/Lib/tkinter/test/test_ttk/test_extensions.py", line 147 in test_variable_change ... The same did not happen when I re-ran the CI checks. I thought I remembered a similar issue in the past, but I couldn't find an bpo issue about it. ---------- components: Tkinter messages: 369549 nosy: Dennis Sweeney priority: normal severity: normal status: open title: test_ttk_guionly times out on Ubuntu CI type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 18:58:23 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 21 May 2020 22:58:23 +0000 Subject: [issue40715] Pegen: dict unpacking inside dict comprehension In-Reply-To: <1590079028.52.0.440007809854.issue40715@roundup.psfhosted.org> Message-ID: <1590101903.54.0.464083523429.issue40715@roundup.psfhosted.org> miss-islington added the comment: New changeset d00aaf306aecf2d4bf9c9aebc9bc35ed03b1a7d0 by Miss Islington (bot) in branch '3.9': bpo-40715: Reject dict unpacking on dict comprehensions (GH-20292) https://github.com/python/cpython/commit/d00aaf306aecf2d4bf9c9aebc9bc35ed03b1a7d0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 19:20:06 2020 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 21 May 2020 23:20:06 +0000 Subject: [issue40711] Clearing the screen of IDLE interactive mode in Windows In-Reply-To: <1590054494.61.0.0457107186988.issue40711@roundup.psfhosted.org> Message-ID: <1590103206.25.0.36205291029.issue40711@roundup.psfhosted.org> Ezio Melotti added the comment: The cls command only works when Python is executed within a Windows terminal. In other contexts (such as IDLE), the command doesn't work. ---------- assignee: terry.reedy -> ezio.melotti nosy: +ezio.melotti resolution: -> not a bug stage: -> resolved status: open -> closed type: performance -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 19:21:02 2020 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 21 May 2020 23:21:02 +0000 Subject: [issue40710] Malfunctioning of '\r' (ii) In-Reply-To: <1590054301.73.0.843640972851.issue40710@roundup.psfhosted.org> Message-ID: <1590103262.03.0.260056992124.issue40710@roundup.psfhosted.org> Ezio Melotti added the comment: Correct. This is a Windows issue, not a Python one. ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 20:56:59 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 22 May 2020 00:56:59 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1590109019.46.0.819667328199.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset ae145833025b0156ee2a28219e3370f3b27b2a36 by Lysandros Nikolaou in branch 'master': bpo-40334: Produce better error messages for non-parenthesized genexps (GH-20153) https://github.com/python/cpython/commit/ae145833025b0156ee2a28219e3370f3b27b2a36 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 20:57:05 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 22 May 2020 00:57:05 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1590109025.86.0.363596397825.issue40334@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 10.0 -> 11.0 pull_requests: +19578 pull_request: https://github.com/python/cpython/pull/20307 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 21 21:15:02 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 22 May 2020 01:15:02 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1590110102.39.0.727665474239.issue40334@roundup.psfhosted.org> miss-islington added the comment: New changeset 55c89235247d9dbe8a4463c9c64edc7e48826a44 by Miss Islington (bot) in branch '3.9': bpo-40334: Produce better error messages for non-parenthesized genexps (GH-20153) https://github.com/python/cpython/commit/55c89235247d9dbe8a4463c9c64edc7e48826a44 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 00:07:15 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 22 May 2020 04:07:15 +0000 Subject: [issue40723] IDLE: make autocomplete test run without __main__.__file__ Message-ID: <1590120435.83.0.2126629623.issue40723@roundup.psfhosted.org> New submission from Terry J. Reedy : import test.test_idle as ti import unittest as u u.main(ti) has one failure: Traceback (most recent call last): File "C:\Programs\Python39\lib\idlelib\idle_test\test_autocomplete.py", line 230, in test_fetch_completions if __main__.__file__ != ac.__file__: AttributeError: module '__main__' has no attribute '__file__' ac = autocomplete. The condition is followed by self.assertNotIn('AutoComplete', small) # See issue 36405 which is false when ac is run as main to run the test. Adding "hasattr(__main__, '__file__') and " to the beginning of the condition should be sufficient. I should add a note to #36405 explaining this conditional assertion better. ---------- assignee: terry.reedy components: IDLE messages: 369555 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: make autocomplete test run without __main__.__file__ type: behavior versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 00:09:47 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 22 May 2020 04:09:47 +0000 Subject: [issue40723] IDLE: make autocomplete test run without __main__.__file__ In-Reply-To: <1590120435.83.0.2126629623.issue40723@roundup.psfhosted.org> Message-ID: <1590120587.19.0.947155732944.issue40723@roundup.psfhosted.org> Terry J. Reedy added the comment: This is currently the only occurrence of __main__.__file__ in idlelib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 00:14:19 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 22 May 2020 04:14:19 +0000 Subject: [issue40696] Exception handling with "await" can hang in Python3.9.0b1 In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1590120859.88.0.964760601618.issue40696@roundup.psfhosted.org> Chris Jerdonek added the comment: Mariusz, someone may also want to review Django's code there. Raising an exception that would otherwise create a cycle in the chain could be obscuring another issue, or there could be more straightforward alternatives. (The Python issue will still be fixed of course.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 00:23:49 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 22 May 2020 04:23:49 +0000 Subject: [issue40685] IDLE: Document info needed for 'not working' reports. In-Reply-To: <1589900689.83.0.325441243452.issue40685@roundup.psfhosted.org> Message-ID: <1590121429.54.0.902977127979.issue40685@roundup.psfhosted.org> Terry J. Reedy added the comment: 'Not working' reports lacking information needed to respond, whether to help the reporter of fix a bug, are a common beginner mistake. The problem is especially acute for IDLE since it is especially targeted at beginners, who may not know the difference between generic python problems and specific IDLE (or tkinter) problems (or even user code bugs). And beginners may not understand 'try running python (or IDLE) in a command line (or terminal or console)'. And beginning programmers who have never shared software with other may have no idea what (relatively) large volume of information the authors may to proceed. So I am making this issue about adding information to the IDLE doc about things a user should try and information to include when reporting. ---------- stage: -> needs patch status: pending -> open title: IDLE not working -> IDLE: Document info needed for 'not working' reports. versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 00:33:39 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 22 May 2020 04:33:39 +0000 Subject: [issue40718] Support out-of-band pickling for builtin types In-Reply-To: <1590089154.09.0.42583865069.issue40718@roundup.psfhosted.org> Message-ID: <1590122019.42.0.970456524868.issue40718@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 01:35:19 2020 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 22 May 2020 05:35:19 +0000 Subject: [issue40262] SSL recv_into requires the object to implement __len__ unlike socket one In-Reply-To: <1586712498.2.0.649122705148.issue40262@roundup.psfhosted.org> Message-ID: <1590125719.52.0.919904676425.issue40262@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 3.0 -> 4.0 pull_requests: +19579 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20310 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 03:27:01 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Fri, 22 May 2020 07:27:01 +0000 Subject: [issue38938] Possible performance improvement for heaqq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1590132421.88.0.743949451353.issue38938@roundup.psfhosted.org> Dennis Sweeney added the comment: key_and_reverse.py employs the same strategy as winners.py, but uses lists as the nodes of the tree rather than using Node instances. It also eliminates the recursion of treeify, and adds (with neither much of a performance hit nor much code duplication) support for ``key=some_func`` and/or ``reverse=True`` keyword arguments, so it now passes the test_heapq suite. ---------- Added file: https://bugs.python.org/file49180/key_and_reverse.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 03:44:17 2020 From: report at bugs.python.org (Rahul Kumaresan) Date: Fri, 22 May 2020 07:44:17 +0000 Subject: [issue40670] supplying an empty string to timeit causes an IndentationError In-Reply-To: <1589805861.06.0.616610250992.issue40670@roundup.psfhosted.org> Message-ID: <1590133457.94.0.112904029825.issue40670@roundup.psfhosted.org> Change by Rahul Kumaresan : ---------- nosy: -rahul-kumi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 03:47:15 2020 From: report at bugs.python.org (Karl Ding) Date: Fri, 22 May 2020 07:47:15 +0000 Subject: [issue40297] test_socket.CANTest is broken at HEAD on master In-Reply-To: <1587007502.68.0.180919322143.issue40297@roundup.psfhosted.org> Message-ID: <1590133635.13.0.054640547581.issue40297@roundup.psfhosted.org> Karl Ding added the comment: Related: I've started a thread on Discourse [0] looking into why the tests don't seem to be run on the Buildbot cluster (and what it would take to enable them). Hopefully it gains some traction. [0] https://discuss.python.org/t/what-would-it-take-to-run-socketcan-tests-on-a-buildbot/4137 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 03:51:02 2020 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 22 May 2020 07:51:02 +0000 Subject: [issue40724] Support buffer protocol with type specs Message-ID: <1590133862.04.0.206694262407.issue40724@roundup.psfhosted.org> New submission from Stefan Behnel : As far as I can see it in typeslots.h [1], the buffer protocol is still not supported when using type specs: /* Disabled, see #10181 */ #undef Py_bf_getbuffer #undef Py_bf_releasebuffer It seems that the discussion in issue 10181 did not lead anywhere at the time (2010-2012). I'm not talking about the limited API or the stable ABI here, I'm talking about using type specs to define an extension type. The work-around is to manually set "PyTypeObject->tp_as_buffer" after creating the type, but since PyType_Ready() then does not see that struct pointer, you also still have to make sure that the type correctly inherits the slots from the base type if you're not defining all of them yourself. Can we just add support for the above slots? [1] https://github.com/python/cpython/blob/ca829102213c466ffecb1e464be5c8cb3967d961/Include/typeslots.h#L2-L4 ---------- components: C API messages: 369561 nosy: ncoghlan, paul.moore, petr.viktorin, pitrou, scoder, skrah, vstinner priority: normal severity: normal status: open title: Support buffer protocol with type specs type: enhancement versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 03:58:14 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 22 May 2020 07:58:14 +0000 Subject: [issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched In-Reply-To: <1575141041.2.0.751349559914.issue38946@roundup.psfhosted.org> Message-ID: <1590134294.67.0.119234958849.issue38946@roundup.psfhosted.org> Terry J. Reedy added the comment: When I say that I am 99% sure that this is not an IDLE issue at all, I mean that I am 99% sure that a non-IDLE tkinter program registered as a working double-click handler in Mohave will not be properly invoked in Catalina. A counter-example might suggest a possible fix for IDLE. Likewise, doubt that this is a tkinter issue means that I suspect that a working .tcl Mohave double click handler would fail in Catalina. A counterexample would suggest looking at tkinter/__init__.py and _tkiter.py. For example, #40452 was opened as a Windows-specific IDLE failure, with a PR. However, Tal Einat discovered that a) the same problem existed on macOS, b) a 4-line tkinter program also failed, c) a 4-line .tcl program worked, and d) on exit, tcl calls code that is no longer called in _tkinter, during python exit (after python was partly torn down). We expect to fix the issue by calling a narrower acting tcl function before python exit. IDLE opens existing files with idlelib.filelist.FileList.open. It gets filenames from the os command line, the tk open file dialog, IDLE's Open Module dialog and Path Browser, and its Recent Files list. I don't know how an OS file manager passes a filename to this function in a particular process, but I imaging that the GUI framework, the IDLE icon, and the double-click registration information may all be involved. (On both Windows and macOS, double clicks to not open the file in an existing IDLE opened from a command line.) Anyway, here is an easy experiment with IDLE itself that someone should do on Catalina. Open x.y Shell an IDLE icon (not the command line). File => OpenModule idlelib.filelist At the top of the open() body, after 'def open(self, filename,...)' add tkMessageBox.showerror('', filename, master=self.root) Save and close the editor and shell (*required*). Open x.y Shell from the same IDLE icon. It will import the revised filelist module. Open a file from within IDLE. A message box appears with the full path and an [OK] button. Click the button and the new editor window appears. Double-click a file in Finder. For me, on Mohave, the same thing happens as above. I expect that on Catalina, there is no message box, indicating that IDLE's file open function is not called. If I am wrong, check the displayed path and move the debug line down to find where execution stops. ---------- priority: critical -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 03:59:27 2020 From: report at bugs.python.org (=?utf-8?q?Jakub_Ber=C3=A1nek?=) Date: Fri, 22 May 2020 07:59:27 +0000 Subject: [issue40725] Documentation: Benchmark table in "What's new in Python 3.9" has weird values Message-ID: <1590134367.99.0.352272483553.issue40725@roundup.psfhosted.org> New submission from Jakub Ber?nek : The "What's new in Python 3.9" page displays a table with microbenchmark results between different Python version (https://docs.python.org/3.9/whatsnew/3.9.html#optimizations). The values provided for Python 3.4 are suspicious, as they are several times smaller than all following Python versions. Therefore it looks like Python got much slower in the recent releases, although the opposite is probably true. ---------- assignee: docs at python components: Documentation messages: 369563 nosy: Jakub Ber?nek, docs at python priority: normal severity: normal status: open title: Documentation: Benchmark table in "What's new in Python 3.9" has weird values versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 04:04:28 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Fri, 22 May 2020 08:04:28 +0000 Subject: [issue40723] IDLE: make autocomplete test run without __main__.__file__ In-Reply-To: <1590120435.83.0.2126629623.issue40723@roundup.psfhosted.org> Message-ID: <1590134668.09.0.354250116423.issue40723@roundup.psfhosted.org> Florian Dahlitz added the comment: I was able to reproduce the reported issue and the suggested fix worked fine. Is there anything else missing like documentation note? I would like to submit a PR for this @terry.reedy ---------- nosy: +DahlitzFlorian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 04:10:06 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Fri, 22 May 2020 08:10:06 +0000 Subject: [issue40721] PEP0435 (enums) -- there is no standard on enum item letters case In-Reply-To: <1590097376.47.0.46238939319.issue40721@roundup.psfhosted.org> Message-ID: <1590135006.21.0.235454883243.issue40721@roundup.psfhosted.org> Florian Dahlitz added the comment: Should we add a note that there is no preferred way of naming enum members and provide a few examples or define some naming conventions? ---------- nosy: +DahlitzFlorian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 04:12:54 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 22 May 2020 08:12:54 +0000 Subject: [issue40721] PEP0435 (enums) -- there is no standard on enum item letters case In-Reply-To: <1590097376.47.0.46238939319.issue40721@roundup.psfhosted.org> Message-ID: <1590135174.06.0.491039706457.issue40721@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +barry, eli.bendersky, ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 04:16:16 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 22 May 2020 08:16:16 +0000 Subject: [issue40725] Documentation: Benchmark table in "What's new in Python 3.9" has weird values In-Reply-To: <1590134367.99.0.352272483553.issue40725@roundup.psfhosted.org> Message-ID: <1590135376.66.0.674743888631.issue40725@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 04:20:54 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 22 May 2020 08:20:54 +0000 Subject: [issue40711] Clearing the screen of IDLE interactive mode in Windows In-Reply-To: <1590054494.61.0.0457107186988.issue40711@roundup.psfhosted.org> Message-ID: <1590135654.01.0.985083672097.issue40711@roundup.psfhosted.org> Terry J. Reedy added the comment: 3.5 and 3.6 only get security fixes. #6143 proposes to add special mechanism to clear Shell. It is a low priority for me as I very seldom want to, or if a editor is open, one can close the shell and start over when running the editor file. Clear an editor with select-all (^A for me), backspace or del or control-X (to save to clipboard). ---------- versions: +Python 3.10 -Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 04:29:28 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Fri, 22 May 2020 08:29:28 +0000 Subject: [issue40723] IDLE: make autocomplete test run without __main__.__file__ In-Reply-To: <1590120435.83.0.2126629623.issue40723@roundup.psfhosted.org> Message-ID: <1590136168.37.0.233031402832.issue40723@roundup.psfhosted.org> Change by Florian Dahlitz : ---------- keywords: +patch pull_requests: +19580 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20311 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 04:34:59 2020 From: report at bugs.python.org (gaborbernat) Date: Fri, 22 May 2020 08:34:59 +0000 Subject: [issue40726] ast.Call end_lineno is defined and returns None Message-ID: <1590136499.66.0.128776260794.issue40726@roundup.psfhosted.org> New submission from gaborbernat : Reporting an issue from https://github.com/xonsh/xonsh/issues/3581; boils down to, ast.Call used to not define end_lineno in 3.8: py -3.8 -c 'import ast; type(ast.Call().end_lineno)' Traceback (most recent call last): File "", line 1, in AttributeError: 'Call' object has no attribute 'end_lineno' However in 3.9 is defined with None: py -3.9 -c 'import ast; type(ast.Call().end_lineno)' This messes with some other operations in ast, namely https://github.com/python/cpython/blob/master/Lib/ast.py#L233 ---------- messages: 369567 nosy: gaborbernat priority: normal severity: normal status: open title: ast.Call end_lineno is defined and returns None versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 04:38:40 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 22 May 2020 08:38:40 +0000 Subject: [issue40726] ast.Call end_lineno is defined and returns None In-Reply-To: <1590136499.66.0.128776260794.issue40726@roundup.psfhosted.org> Message-ID: <1590136720.73.0.837479245979.issue40726@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 04:40:35 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 22 May 2020 08:40:35 +0000 Subject: [issue40709] Malfunctioning of '\r' In-Reply-To: <1590052639.86.0.84675192196.issue40709@roundup.psfhosted.org> Message-ID: <1590136835.52.0.744136442382.issue40709@roundup.psfhosted.org> Terry J. Reedy added the comment: Discussed on #23220. Note that 'sciencecomputer' is a different possible result if \r does not switch the simulated terminal from the normal insert mode to overwrite mode. I am considering terminal simulation as an option, but there is not exactly a standard to emulate. ---------- resolution: not a bug -> duplicate superseder: -> IDLE: Document how Shell displays user code output _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 04:40:44 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 22 May 2020 08:40:44 +0000 Subject: [issue40709] Malfunctioning of '\r' In-Reply-To: <1590052639.86.0.84675192196.issue40709@roundup.psfhosted.org> Message-ID: <1590136844.99.0.425795320008.issue40709@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 04:41:48 2020 From: report at bugs.python.org (David Strobach) Date: Fri, 22 May 2020 08:41:48 +0000 Subject: [issue40726] ast.Call end_lineno is defined and returns None In-Reply-To: <1590136499.66.0.128776260794.issue40726@roundup.psfhosted.org> Message-ID: <1590136908.92.0.0919535768187.issue40726@roundup.psfhosted.org> Change by David Strobach : ---------- nosy: +laloch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 04:49:11 2020 From: report at bugs.python.org (David Strobach) Date: Fri, 22 May 2020 08:49:11 +0000 Subject: [issue40726] ast.Call end_lineno is defined and returns None In-Reply-To: <1590136499.66.0.128776260794.issue40726@roundup.psfhosted.org> Message-ID: <1590137351.36.0.943039021671.issue40726@roundup.psfhosted.org> David Strobach added the comment: The issue is not limited to ast.Call. Other AST nodes are also affected (e.g. ast.BinOp). It's also not limited to end_lineno attribute. The same applies to end_col_offset. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 04:49:36 2020 From: report at bugs.python.org (Rahul Kumaresan) Date: Fri, 22 May 2020 08:49:36 +0000 Subject: [issue40640] Tutorial for Continue missing ... line In-Reply-To: <1589608941.53.0.91951505263.issue40640@roundup.psfhosted.org> Message-ID: <1590137376.62.0.425743649173.issue40640@roundup.psfhosted.org> Rahul Kumaresan added the comment: I think the ommission of secondary prompt(...) at the end of the loop in the code snippet doesn't affect what the example wanted to demonstrate. Even so, if this has to be fixed, this correction is to be done in versions 3.5 through 3.10 ---------- versions: +Python 3.10, Python 3.5, Python 3.6, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 04:55:48 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 22 May 2020 08:55:48 +0000 Subject: [issue40690] unittest: if FunctionTestCase is imported, the loader loads "tests" from it In-Reply-To: <1589919425.78.0.0609580372109.issue40690@roundup.psfhosted.org> Message-ID: <1590137748.19.0.0302338405457.issue40690@roundup.psfhosted.org> Chris Jerdonek added the comment: > then you will have 1 extra test in that module (the imported one), moreover, that test will be broken. If this is true, then how is anyone able to be using FunctionTestCase in their tests today? Is the feature broken? ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 04:57:41 2020 From: report at bugs.python.org (Rahul Kumaresan) Date: Fri, 22 May 2020 08:57:41 +0000 Subject: [issue40725] Documentation: Benchmark table in "What's new in Python 3.9" has weird values In-Reply-To: <1590134367.99.0.352272483553.issue40725@roundup.psfhosted.org> Message-ID: <1590137861.75.0.265154399846.issue40725@roundup.psfhosted.org> Change by Rahul Kumaresan : ---------- nosy: +rahul-kumi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 05:15:20 2020 From: report at bugs.python.org (Rahul Kumaresan) Date: Fri, 22 May 2020 09:15:20 +0000 Subject: [issue40579] Second argument to iterator.next not described In-Reply-To: <1589036443.24.0.81733349638.issue40579@roundup.psfhosted.org> Message-ID: <1590138920.91.0.0184548796063.issue40579@roundup.psfhosted.org> Change by Rahul Kumaresan : ---------- nosy: +rahul-kumi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 05:22:56 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Fri, 22 May 2020 09:22:56 +0000 Subject: [issue40726] ast.Call end_lineno is defined and returns None In-Reply-To: <1590136499.66.0.128776260794.issue40726@roundup.psfhosted.org> Message-ID: <1590139376.45.0.685939525035.issue40726@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 05:28:27 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Fri, 22 May 2020 09:28:27 +0000 Subject: [issue40726] ast.Call end_lineno is defined and returns None In-Reply-To: <1590136499.66.0.128776260794.issue40726@roundup.psfhosted.org> Message-ID: <1590139707.13.0.0186940776058.issue40726@roundup.psfhosted.org> Batuhan Taskaya added the comment: This is because the 'end_lineno' and 'end_col_offset' are declared as optional attributes in the ASDL spec. The commit 'b7e9525f9c7ef02a1d2ad8253afdeb733b0951d4' made all optional fields and attributes auto initalized with None. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 05:29:10 2020 From: report at bugs.python.org (Recursing) Date: Fri, 22 May 2020 09:29:10 +0000 Subject: [issue40727] SSLContext.load_verify_locations leaks memory on Linux in async code Message-ID: <1590139750.66.0.29133421121.issue40727@roundup.psfhosted.org> New submission from Recursing : Minimal code to reproduce: ``` import ssl import certifi import gc import asyncio ca_path = certifi.where() async def make_async_context() -> None: context = ssl.SSLContext(ssl.PROTOCOL_TLS) context.load_verify_locations(ca_path) await asyncio.sleep(1) async def main(n: int) -> None: await asyncio.wait([make_async_context() for _ in range(n)]) gc.collect() asyncio.run(main(2000)) input("Finished run, still using lots of memory :(") gc.collect() input("gc.collect() does not help :(") ``` Running this code on several linux machines (with python from 3.6.9 to 3.9.0a5, and openSSL from 1.1.1 11 Sep 2018 to 1.1.1g 21 Apr 2020) causes a significant memory leak, while on windows memory usage peaks around 1 GB but gets freed ---------- assignee: christian.heimes components: Library (Lib), SSL, asyncio messages: 369573 nosy: Recursing, asvetlov, christian.heimes, yselivanov priority: normal severity: normal status: open title: SSLContext.load_verify_locations leaks memory on Linux in async code type: resource usage versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 05:29:45 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Fri, 22 May 2020 09:29:45 +0000 Subject: [issue40726] ast.Call end_lineno is defined and returns None In-Reply-To: <1590136499.66.0.128776260794.issue40726@roundup.psfhosted.org> Message-ID: <1590139785.25.0.799396091765.issue40726@roundup.psfhosted.org> Batuhan Taskaya added the comment: See here for the complete spec: https://docs.python.org/3.9/library/ast.html#abstract-grammar ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 05:30:56 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Fri, 22 May 2020 09:30:56 +0000 Subject: [issue40726] ast.Call end_lineno is defined and returns None In-Reply-To: <1590136499.66.0.128776260794.issue40726@roundup.psfhosted.org> Message-ID: <1590139856.06.0.193265871925.issue40726@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 05:31:55 2020 From: report at bugs.python.org (Vitalii) Date: Fri, 22 May 2020 09:31:55 +0000 Subject: [issue40690] unittest: if FunctionTestCase is imported, the loader loads "tests" from it In-Reply-To: <1589919425.78.0.0609580372109.issue40690@roundup.psfhosted.org> Message-ID: <1590139915.36.0.929442513186.issue40690@roundup.psfhosted.org> Vitalii added the comment: I don't think anyone is using FunctionTestCase ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 05:37:34 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 22 May 2020 09:37:34 +0000 Subject: [issue40723] IDLE: make autocomplete test run without __main__.__file__ In-Reply-To: <1590120435.83.0.2126629623.issue40723@roundup.psfhosted.org> Message-ID: <1590140254.96.0.243866312393.issue40723@roundup.psfhosted.org> Terry J. Reedy added the comment: Go ahead. Since the failure was user visible, there should be a note. For IDLE issues, idlelib/NEWS.txt also needs an addition, but not until ready to merge. So add a trial blurb or not as you wish. In any case, I need to fix the 3.8 version and perhaps the 3.7 version before another IDLE commit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 05:39:49 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Fri, 22 May 2020 09:39:49 +0000 Subject: [issue40726] ast.Call end_lineno is defined and returns None In-Reply-To: <1590136499.66.0.128776260794.issue40726@roundup.psfhosted.org> Message-ID: <1590140389.71.0.707098469654.issue40726@roundup.psfhosted.org> R?mi Lapeyre added the comment: This was done in b7e9525f9c7ef02a1d2ad8253afdeb733b0951d4 for issue 36287, all attribute should now be defined, even when they are not set. It looks like some parts of the ast module where not updated. If nobody works on this I will send a PR to update the rest of AST later today. ---------- components: +Library (Lib) nosy: +remi.lapeyre -BTaskaya, serhiy.storchaka type: -> behavior versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 05:40:48 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 22 May 2020 09:40:48 +0000 Subject: [issue40727] SSLContext.load_verify_locations leaks memory on Linux in async code In-Reply-To: <1590139750.66.0.29133421121.issue40727@roundup.psfhosted.org> Message-ID: <1590140448.42.0.845813206367.issue40727@roundup.psfhosted.org> Christian Heimes added the comment: Does it also leak without asyncio? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 05:41:59 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Fri, 22 May 2020 09:41:59 +0000 Subject: [issue40726] ast.Call end_lineno is defined and returns None In-Reply-To: <1590136499.66.0.128776260794.issue40726@roundup.psfhosted.org> Message-ID: <1590140519.31.0.410157365639.issue40726@roundup.psfhosted.org> Change by Florian Dahlitz : ---------- nosy: +DahlitzFlorian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 05:42:39 2020 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 22 May 2020 09:42:39 +0000 Subject: [issue40028] Math module method to find prime factors for non-negative int n In-Reply-To: <1584733974.83.0.0417466712916.issue40028@roundup.psfhosted.org> Message-ID: <1590140559.34.0.53844020535.issue40028@roundup.psfhosted.org> Mark Dickinson added the comment: It seems we don't have a champion (someone willing to write a PEP) for this issue. I'm going to close. And if or when we do have such a champion, it probably makes more sense to re-open #37132, which is specifically about adding `imath`, or make a new issue, rather than re-opening this one. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 05:47:55 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Fri, 22 May 2020 09:47:55 +0000 Subject: [issue40640] Tutorial for Continue missing ... line In-Reply-To: <1589608941.53.0.91951505263.issue40640@roundup.psfhosted.org> Message-ID: <1590140875.15.0.498802148788.issue40640@roundup.psfhosted.org> Florian Dahlitz added the comment: @docorbit at sonic.net are you going to submit a PR for it or am I free to do it? ---------- nosy: +DahlitzFlorian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 05:47:50 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Fri, 22 May 2020 09:47:50 +0000 Subject: [issue40726] ast.Call end_lineno is defined and returns None In-Reply-To: <1590136499.66.0.128776260794.issue40726@roundup.psfhosted.org> Message-ID: <1590140870.61.0.173043527161.issue40726@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch nosy: +BTaskaya nosy_count: 5.0 -> 6.0 pull_requests: +19581 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20312 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 05:49:10 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Fri, 22 May 2020 09:49:10 +0000 Subject: [issue40726] ast.Call end_lineno is defined and returns None In-Reply-To: <1590136499.66.0.128776260794.issue40726@roundup.psfhosted.org> Message-ID: <1590140950.11.0.234989070932.issue40726@roundup.psfhosted.org> Batuhan Taskaya added the comment: > If nobody works on this I will send a PR to update the rest of AST later today. :/ I'm terribly sorry for that, I just sent a PR without refreshing the tab. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 05:55:53 2020 From: report at bugs.python.org (Recursing) Date: Fri, 22 May 2020 09:55:53 +0000 Subject: [issue40727] SSLContext.load_verify_locations leaks memory on Linux in async code In-Reply-To: <1590139750.66.0.29133421121.issue40727@roundup.psfhosted.org> Message-ID: <1590141353.45.0.211540820311.issue40727@roundup.psfhosted.org> Recursing added the comment: Removing the `await asyncio.sleep(1)` removes the leak, while changing it to `await asyncio.sleep(0)` seems to keep it ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 06:00:56 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Fri, 22 May 2020 10:00:56 +0000 Subject: [issue40568] Modify -c command-line option to accept multiple inputs In-Reply-To: <1588964937.68.0.986339822686.issue40568@roundup.psfhosted.org> Message-ID: <1590141656.56.0.468863425307.issue40568@roundup.psfhosted.org> Change by Florian Dahlitz : ---------- nosy: +DahlitzFlorian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 06:09:47 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 22 May 2020 10:09:47 +0000 Subject: [issue40727] SSLContext.load_verify_locations leaks memory on Linux in async code In-Reply-To: <1590139750.66.0.29133421121.issue40727@roundup.psfhosted.org> Message-ID: <1590142187.66.0.445544111872.issue40727@roundup.psfhosted.org> Christian Heimes added the comment: Without asyncio memory consumption stays low and stable for me: $ ./python -m venv venv $ ./venv/bin/pip install psutil $ ./venv/bin/python >>> ssl.OPENSSL_VERSION 'OpenSSL 1.1.1g FIPS 21 Apr 2020' >>> import psutil, ssl, os >>> p = psutil.Process(os.getpid()) >>> cafile = ssl.get_default_verify_paths().cafile >>> p.memory_info() pmem(rss=14811136, vms=237223936, shared=8138752, text=2125824, lib=0, data=6701056, dirty=0) >>> for i in range(1000): ... ssl.SSLContext(ssl.PROTOCOL_TLS).load_verify_locations(cafile) ... >>> p.memory_info() pmem(rss=17489920, vms=238170112, shared=9863168, text=2125824, lib=0, data=7647232, dirty=0) >>> for i in range(1000): ... ssl.SSLContext(ssl.PROTOCOL_TLS).load_verify_locations(cafile) ... >>> p.memory_info() pmem(rss=17489920, vms=238170112, shared=9863168, text=2125824, lib=0, data=7647232, dirty=0) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 06:17:45 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 22 May 2020 10:17:45 +0000 Subject: [issue40727] SSLContext.load_verify_locations leaks memory on Linux in async code In-Reply-To: <1590139750.66.0.29133421121.issue40727@roundup.psfhosted.org> Message-ID: <1590142665.61.0.43576762896.issue40727@roundup.psfhosted.org> Christian Heimes added the comment: When I run your example, RSS jumps from 20 MB to about 1,600 MB. There is almost no increase when I run the look several more times. >>> p.memory_info() pmem(rss=19902464, vms=240513024, shared=10014720, text=2125824, lib=0, data=9887744, dirty=0) >>> asyncio.run(main(2000)) :2: DeprecationWarning: The explicit passing of coroutine objects to asyncio.wait() is deprecated since Python 3.8, and scheduled for removal in Python 3.11. >>> p.memory_info() pmem(rss=1608568832, vms=1829105664, shared=10014720, text=2125824, lib=0, data=1598480384, dirty=0) >>> asyncio.run(main(2000)) >>> p.memory_info() pmem(rss=1608835072, vms=1829367808, shared=10014720, text=2125824, lib=0, data=1598742528, dirty=0) >>> asyncio.run(main(2000)) >>> p.memory_info() pmem(rss=1608601600, vms=1829367808, shared=10014720, text=2125824, lib=0, data=1598742528, dirty=0) Why are you creating so many SSLContext objects any way? It's very inefficient and really not necessary. I recommend that you create one context in your application and reuse for all connection. You only ever need additional contexts for different configuration (protocol, verification, trust anchors, ...). ---------- assignee: christian.heimes -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 06:23:06 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Fri, 22 May 2020 10:23:06 +0000 Subject: [issue40028] Math module method to find prime factors for non-negative int n In-Reply-To: <1584733974.83.0.0417466712916.issue40028@roundup.psfhosted.org> Message-ID: <1590142986.26.0.398473123393.issue40028@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi Mark Dickinson, I was waiting for everyone to have a chance to comment on this issue and read their reply before answering. It seems to me that there some core developers are mildly in favor of a new imath module and it's has been proposed on the bug tracker and python-ideas while other would prefer it as an external package. I agree with the idea that that using gfactor is not the best, it may not be installed and has different names on different OS. The state of the art algorithms used by others languages and libraries for numbers up to 2**64 are not very complicated, as Steven D'Aprano said deterministic MR works incredibly well for numbers < 2**64 and that's what I implemented with a probabilistic test for larger number. It only misses a Lucas test to be a complete Baillie?PSW test. As you said the PEP would have to explain why not just use sympy and honestly I don't have a very good argument there for now. In the end, if some core devs think that putting together the various discussions for an imath module in a coherent PEP so it can be discussed and either: - accepted and merged, - refused with some functions merged in math, - definitely put to bed would be useful and prevent additional discussions around this idea, I'm willing to do the leg work (thought I may take me some time). If nobody thinks it would be really helpful, I may focus my time on other issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 06:32:24 2020 From: report at bugs.python.org (Recursing) Date: Fri, 22 May 2020 10:32:24 +0000 Subject: [issue40727] SSLContext.load_verify_locations leaks memory on Linux in async code In-Reply-To: <1590139750.66.0.29133421121.issue40727@roundup.psfhosted.org> Message-ID: <1590143544.25.0.930693911117.issue40727@roundup.psfhosted.org> Recursing added the comment: > Without asyncio memory consumption stays low and stable for me Same for me > RSS jumps from 20 MB to about 1,600 MB. That is the memory consumption I observe as well, the issue is that it doesn't get freed on Linux > There is almost no increase when I run the look several more times. Same for me, but of course only if I exit the "async" context between runs > Why are you creating so many SSLContext objects any way? It's very inefficient and really not necessary. The original issue was observed in a very long running process (months), that occasionally needed a context and it was convenient to just create one every time (actually it creates an AsyncClient context https://github.com/encode/httpx/issues/978) even if it is relatively inefficient, it didn't really matter, but memory usage unexpectedly slowly grew to 1 GB which was very unexpected ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 06:56:37 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Fri, 22 May 2020 10:56:37 +0000 Subject: [issue40723] IDLE: make autocomplete test run without __main__.__file__ In-Reply-To: <1590120435.83.0.2126629623.issue40723@roundup.psfhosted.org> Message-ID: <1590144997.53.0.0117099062905.issue40723@roundup.psfhosted.org> Florian Dahlitz added the comment: I added a news entry to idlelib/NEWS.txt but don't know, where to add an additional note. The documentation of IDLE doesn't seem to be the right place. Should a note be added to Misc/NEWS.d/next or would it be redundant, because it is already added to idlelib/NEWS.txt? Sorry, if I misunderstood you, but it is my first contribution to IDLE. Thanks for the guidance, I really appreciate it! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 06:59:11 2020 From: report at bugs.python.org (Oleksandr Suvorov) Date: Fri, 22 May 2020 10:59:11 +0000 Subject: [issue40728] UnboundLocalError as a result of except statement variable re-assignment Message-ID: <1590145151.0.0.634189101704.issue40728@roundup.psfhosted.org> New submission from Oleksandr Suvorov : def foo(exc): try: 1/0 except Exception as exc: ... finally: return exc foo(1) Executing the following code results in UnboundLocalError, while exc has been defined and passed to a function explicitly. I think this is something similar to python2 issue when list comprehensions where overwriting local variable values, expected behaviour in here is that foo(1) returns 1 ---------- components: Interpreter Core messages: 369588 nosy: oleksandr.suvorov priority: normal severity: normal status: open title: UnboundLocalError as a result of except statement variable re-assignment type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 07:04:31 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 22 May 2020 11:04:31 +0000 Subject: [issue40728] UnboundLocalError as a result of except statement variable re-assignment In-Reply-To: <1590145151.0.0.634189101704.issue40728@roundup.psfhosted.org> Message-ID: <1590145471.28.0.0343406253198.issue40728@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: This is expected behaviour and happens because we need to clean the exception variable outside the `except` block to avoid reference cycles. If you need the variable later, you need to do an assignment: try: 1/0 except Exception as exc: e = exc finally: return e ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 07:08:12 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 22 May 2020 11:08:12 +0000 Subject: [issue40728] UnboundLocalError as a result of except statement variable re-assignment In-Reply-To: <1590145151.0.0.634189101704.issue40728@roundup.psfhosted.org> Message-ID: <1590145692.23.0.826795189351.issue40728@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: This is the equivalent construct that we compile it to: https://github.com/python/cpython/blob/master/Python/compile.c#L3102-L3110 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 07:08:35 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 22 May 2020 11:08:35 +0000 Subject: [issue40728] UnboundLocalError as a result of except statement variable re-assignment In-Reply-To: <1590145151.0.0.634189101704.issue40728@roundup.psfhosted.org> Message-ID: <1590145715.13.0.971335581491.issue40728@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +Mark.Shannon resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 07:10:40 2020 From: report at bugs.python.org (Oleksandr Suvorov) Date: Fri, 22 May 2020 11:10:40 +0000 Subject: [issue40728] UnboundLocalError as a result of except statement variable re-assignment In-Reply-To: <1590145715.14.0.407414166001.issue40728@roundup.psfhosted.org> Message-ID: Oleksandr Suvorov added the comment: But then why I still can access this variable? Shouldn't it then be resulting in NameError as it's undefined variable at this point of time? I think UnboundError creates more confusing here, as it's either the variable should exist and have a value or it should be unknown and result in NameError at this point. On Fri, May 22, 2020 at 1:08 PM Pablo Galindo Salgado < report at bugs.python.org> wrote: > > Change by Pablo Galindo Salgado : > > > ---------- > nosy: +Mark.Shannon > resolution: -> not a bug > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 07:15:13 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 22 May 2020 11:15:13 +0000 Subject: [issue40728] UnboundLocalError as a result of except statement variable re-assignment In-Reply-To: <1590145151.0.0.634189101704.issue40728@roundup.psfhosted.org> Message-ID: <1590146113.54.0.656385533998.issue40728@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: >But then why I still can access this variable? Shouldn't it then be resulting in NameError as it's undefined variable at this point of time? I don't think so, this is the same as if you do: def f(exc): del exc return exc >>> f(3) Traceback (most recent call last): File "", line 1, in File "lel.py", line 3, in f return exc UnboundLocalError: local variable 'exc' referenced before assignment ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 07:15:35 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 22 May 2020 11:15:35 +0000 Subject: [issue40728] UnboundLocalError as a result of except statement variable re-assignment In-Reply-To: <1590145151.0.0.634189101704.issue40728@roundup.psfhosted.org> Message-ID: <1590146135.15.0.985354919317.issue40728@roundup.psfhosted.org> Christian Heimes added the comment: UnboundLocalError is a subclass of NameError. You are getting a more specific error here. >>> UnboundLocalError.__mro__ (, , , , ) ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 07:19:17 2020 From: report at bugs.python.org (Oleksandr Suvorov) Date: Fri, 22 May 2020 11:19:17 +0000 Subject: [issue40728] UnboundLocalError as a result of except statement variable re-assignment In-Reply-To: <1590146135.15.0.985354919317.issue40728@roundup.psfhosted.org> Message-ID: Oleksandr Suvorov added the comment: but if exc variable is only available in except block why then it shadows the function variable name? On Fri, May 22, 2020 at 1:15 PM Christian Heimes wrote: > > Christian Heimes added the comment: > > UnboundLocalError is a subclass of NameError. You are getting a more > specific error here. > > >>> UnboundLocalError.__mro__ > (, , , > , ) > > ---------- > nosy: +christian.heimes > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 07:19:51 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 22 May 2020 11:19:51 +0000 Subject: [issue40728] UnboundLocalError as a result of except statement variable re-assignment In-Reply-To: <1590145151.0.0.634189101704.issue40728@roundup.psfhosted.org> Message-ID: <1590146391.91.0.455497428218.issue40728@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > as it's either the variable should exist and have a value or it should be unknown and result in NameError at this point. One thing is the symbol and another thing is its value. The function is always aware of the existence of the symbol. For instance: def f(x): del x print(x) >>> print(f.__code__.co_varnames) ('x',) But when the function tries to use it, it has no value associated to it because del x removed it, so it emits an UnboundLocalError because there is no value. raceback (most recent call last): File "lel.py", line 7, in f(3) File "lel.py", line 3, in f print(x) UnboundLocalError: local variable 'x' referenced before assignment A NameError will occur if the symbol is unknown to the function. ---------- nosy: -christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 07:20:23 2020 From: report at bugs.python.org (Oleksandr Suvorov) Date: Fri, 22 May 2020 11:20:23 +0000 Subject: [issue40728] UnboundLocalError as a result of except statement variable re-assignment In-Reply-To: Message-ID: Oleksandr Suvorov added the comment: What I mean is why would it need to shadow function variable name if after except block it's always unbound, what is the reason and why this is expected? On Fri, May 22, 2020 at 1:19 PM Oleksandr Suvorov wrote: > > Oleksandr Suvorov added the comment: > > but if exc variable is only available in except block why then it shadows > the function variable name? > > On Fri, May 22, 2020 at 1:15 PM Christian Heimes > wrote: > > > > > Christian Heimes added the comment: > > > > UnboundLocalError is a subclass of NameError. You are getting a more > > specific error here. > > > > >>> UnboundLocalError.__mro__ > > (, , , > > , ) > > > > ---------- > > nosy: +christian.heimes > > > > _______________________________________ > > Python tracker > > > > _______________________________________ > > > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 07:21:09 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 22 May 2020 11:21:09 +0000 Subject: [issue40728] UnboundLocalError as a result of except statement variable re-assignment In-Reply-To: <1590145151.0.0.634189101704.issue40728@roundup.psfhosted.org> Message-ID: <1590146469.03.0.151737456525.issue40728@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > but if exc variable is only available in except block why then it shadows the function variable name? Because the except block does not create a new scope and therefore when you do 'except as x' it does an assignment to x in the same scope as the function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 07:21:24 2020 From: report at bugs.python.org (Beuc) Date: Fri, 22 May 2020 11:21:24 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1590146484.84.0.116061000075.issue40280@roundup.psfhosted.org> Beuc added the comment: I've been maintaining a Python Emscripten build for the Ren'Py (game engine) web port: https://github.com/python-emscripten/python https://renpy.beuc.net/ I recently tackled Python3 with a minimal/embeddable approach and checking the other ports already pointed in the discussion: https://github.com/python-emscripten/python/tree/trunk/3.8/ (2 patches, and a short pyconfig.h fix-up) There is also a Cython module to use the Emscripten C API. Here's a demo at: https://www.beuc.net/python-emscripten/demo/3/ (hello-world size: 3MB, with a few common modules: 4MB) I can provide a pull request with a first few core changes. Should this be done on github? - cross-compilation handling appears to follow an incorrect logic, in particular by querying 'dpkg' or parsing compiler output to detect include paths -- it is the (cross-)compiler's responsibility to provide the system paths, and detecting them manually causes conflicts. I had to patch setup.py. Let me know if I missed something. Usually cross-compiling is triggered by non-matching build-type/host-type. Here cross-compilation logic is apparently triggered when exporting _PYTHON_HOST_PLATFORM=xxx manually (it's in the Makefile but not exported, and breaks normal build when exported). Is this the way it's meant to be used? ---------- nosy: +Beuc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 07:25:41 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 22 May 2020 11:25:41 +0000 Subject: [issue40728] UnboundLocalError as a result of except statement variable re-assignment In-Reply-To: <1590145151.0.0.634189101704.issue40728@roundup.psfhosted.org> Message-ID: <1590146741.09.0.930299539276.issue40728@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 07:48:39 2020 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 22 May 2020 11:48:39 +0000 Subject: [issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type In-Reply-To: <1586276621.78.0.843757244355.issue40217@roundup.psfhosted.org> Message-ID: <1590148119.41.0.182779929518.issue40217@roundup.psfhosted.org> Petr Viktorin added the comment: Indeed, it seems my initial analysis was incorrect. I can't reproduce this outside of PySide. I'll close this bug and invesatigate more. Sorry for the noise. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 08:00:20 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 22 May 2020 12:00:20 +0000 Subject: [issue40028] Math module method to find prime factors for non-negative int n In-Reply-To: <1590142986.26.0.398473123393.issue40028@roundup.psfhosted.org> Message-ID: <20200522115435.GC15178@ando.pearwood.info> Steven D'Aprano added the comment: On Fri, May 22, 2020 at 10:23:06AM +0000, R?mi Lapeyre wrote: > As you said the PEP would have to explain why not just use sympy and > honestly I don't have a very good argument there for now. Because sympy is a beast. It's an excellent beast, but its an absolute monster. I stopped counting at 400 modules, not including tests. Having to install a mega-library like sympy to get two or three functions is overkill, like using a nuclear-powered bulldozer to crack a peanut. The sympy docs say: "SymPy does require mpmath Python library to be installed first. The recommended method of installation is through Anaconda, which includes mpmath, as well as several other useful libraries. Alternatively, some Linux distributions have SymPy packages available." which is great if you are using Anaconda, a little less great if you're using Linux, and not very good if you're not using either. And it's especially not very good if you are a student using a school laptop where Python is installed but you are not permitted to install other software. (Likewise for corporate users with locked down desktops, although they are less likely to care about prime numbers.) sympy also comes with it's own odd ways of doing things, such as having to care about the difference between Python numbers and sympy numbers. (Not for prime testing, admittedly. I'm just making a general observation.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 09:13:23 2020 From: report at bugs.python.org (E. Paine) Date: Fri, 22 May 2020 13:13:23 +0000 Subject: [issue40452] Tkinter/IDLE: preserve clipboard on closure In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1590153203.81.0.277267010875.issue40452@roundup.psfhosted.org> E. Paine added the comment: Unfortunately, after lots of testing/experimenting, I cannot find a way to make the correct call/s at the correct time. The methods that call the exit handlers directly or through InvokeExitHandlers are Tcl_Exit, Tcl_Finalize & FinalizeThread (Tcl_FinalizeThread) ? Tcl_ExitThread calls Tcl_FinalizeThread. We want to call the exit handlers (to access TkClipCleanup) with as little else as possible and both Tcl_Exit & Tcl_Finalize call FinalizeThread, so I concluded the method we should call is Tcl_FinalizeThread. Tcl_Finalize also stops the Python interpreter (not quite sure why), so this should only be called when the interpreter is stopping/stopped. The problem with Tcl_FinalizeThread, is that it also finalises some of the mutexs (most notably asyncMutex - part of the async system). Once the mutexs are finalised, I can't find a way of creating them again (I think they are a global variables created on load), meaning that a new tcl interpreter cannot be created in the same thread (and even if it can, any calls to it cause the Python interpreter to crash). This means we cannot call the Tcl_FinalizeThread method either when the root is destroyed or when the Tkapp object is deleted, as the user could still request a new tcl interpreter. This leaves us with only one option: call it when the Python interpreter is closing. For this, which call is made doesn?t really matter, and so to test, I commented out the "#if 0", to see if this call fixed the clipboard issue (if it had worked, we could have deleted all bindings before calling Tcl_Finalize). Unfortunately, this did not fix the clipboard issue and so I did not deem it worth developing an "unbinder" (possibly because the GC had already destroyed the interpreter?). I did not even get onto the issue of multiple, simultaneous interpreters but unless someone has an idea that could solve any of the issues above (or we ask the Tcl team to make TkClipCleanup a public method!), I can?t see how we can patch this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 09:14:50 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 22 May 2020 13:14:50 +0000 Subject: [issue40579] Second argument to iterator.next not described In-Reply-To: <1589036443.24.0.81733349638.issue40579@roundup.psfhosted.org> Message-ID: <1590153290.18.0.528997992807.issue40579@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 09:16:47 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 22 May 2020 13:16:47 +0000 Subject: [issue40725] Documentation: Benchmark table in "What's new in Python 3.9" has weird values In-Reply-To: <1590134367.99.0.352272483553.issue40725@roundup.psfhosted.org> Message-ID: <1590153407.53.0.570871964944.issue40725@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 09:32:40 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 22 May 2020 13:32:40 +0000 Subject: [issue40725] Documentation: Benchmark table in "What's new in Python 3.9" has weird values In-Reply-To: <1590134367.99.0.352272483553.issue40725@roundup.psfhosted.org> Message-ID: <1590154360.83.0.421705453301.issue40725@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +19582 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20313 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 09:37:06 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Fri, 22 May 2020 13:37:06 +0000 Subject: [issue40729] Update the list of auto-generated files in .gitattributes Message-ID: <1590154626.16.0.942670011687.issue40729@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- nosy: BTaskaya priority: normal severity: normal status: open title: Update the list of auto-generated files in .gitattributes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 09:39:41 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Fri, 22 May 2020 13:39:41 +0000 Subject: [issue40729] Update the list of auto-generated files in .gitattributes Message-ID: <1590154781.31.0.237227978811.issue40729@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch pull_requests: +19583 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20314 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 10:07:18 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 22 May 2020 14:07:18 +0000 Subject: [issue40725] Documentation: Benchmark table in "What's new in Python 3.9" has weird values In-Reply-To: <1590134367.99.0.352272483553.issue40725@roundup.psfhosted.org> Message-ID: <1590156438.72.0.858019146435.issue40725@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +19584 pull_request: https://github.com/python/cpython/pull/20315 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 10:18:08 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 22 May 2020 14:18:08 +0000 Subject: [issue40725] Documentation: Benchmark table in "What's new in Python 3.9" has weird values In-Reply-To: <1590134367.99.0.352272483553.issue40725@roundup.psfhosted.org> Message-ID: <1590157088.99.0.992298991568.issue40725@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 5c01ed6f9366bc6fd880c18e5a2929de72bc1be6 by Miss Islington (bot) in branch '3.9': bpo-40725: Restore missing column of digits (GH-20313) (GH-20315) https://github.com/python/cpython/commit/5c01ed6f9366bc6fd880c18e5a2929de72bc1be6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 10:18:17 2020 From: report at bugs.python.org (Leonardo Santagada) Date: Fri, 22 May 2020 14:18:17 +0000 Subject: [issue36395] Add deferred single-threaded/fake executor to concurrent.futures In-Reply-To: <1553218760.85.0.609828298764.issue36395@roundup.psfhosted.org> Message-ID: <1590157097.29.0.405001330646.issue36395@roundup.psfhosted.org> Leonardo Santagada added the comment: I have a single example: Profiling. As most python profilers don't support threads or processes, it would be very convenient to have a in process executor in those cases. ---------- nosy: +santagada _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 10:18:55 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 22 May 2020 14:18:55 +0000 Subject: [issue40630] tracemalloc: allow resetting peak memory metric without touching other traces In-Reply-To: <1589508756.01.0.239997467276.issue40630@roundup.psfhosted.org> Message-ID: <1590157135.32.0.746411425358.issue40630@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8b62644831443e400215eeb822c921f4f06c8977 by Huon Wilson in branch 'master': bpo-40630: Add tracemalloc.reset_peak (GH-20102) https://github.com/python/cpython/commit/8b62644831443e400215eeb822c921f4f06c8977 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 10:20:06 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 22 May 2020 14:20:06 +0000 Subject: [issue40630] tracemalloc: allow resetting peak memory metric without touching other traces In-Reply-To: <1589508756.01.0.239997467276.issue40630@roundup.psfhosted.org> Message-ID: <1590157206.11.0.798040791496.issue40630@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Huon Wilson! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 10:31:32 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 22 May 2020 14:31:32 +0000 Subject: [issue40725] Documentation: Benchmark table in "What's new in Python 3.9" has weird values In-Reply-To: <1590134367.99.0.352272483553.issue40725@roundup.psfhosted.org> Message-ID: <1590157892.43.0.181856884837.issue40725@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks for the report. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 10:39:35 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 22 May 2020 14:39:35 +0000 Subject: [issue40730] Odd sentence in 3.9 What's New Message-ID: <1590158375.86.0.395536416991.issue40730@roundup.psfhosted.org> New submission from Eric V. Smith : https://docs.python.org/3.9/whatsnew/3.9.html#optimizations has this sentence: "Unlike to the := operator this idiom does not leak a variable to the outer scope.". I'm not exactly sure what it should be. Probably the first "to" should be deleted? ---------- assignee: docs at python components: Documentation messages: 369607 nosy: docs at python, eric.smith priority: normal severity: normal status: open title: Odd sentence in 3.9 What's New versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 10:50:49 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Fri, 22 May 2020 14:50:49 +0000 Subject: [issue40730] Odd sentence in 3.9 What's New In-Reply-To: <1590158375.86.0.395536416991.issue40730@roundup.psfhosted.org> Message-ID: <1590159049.47.0.46651295671.issue40730@roundup.psfhosted.org> Florian Dahlitz added the comment: Hi @eric.smith. I'm sure the first "to" can be removed. It sounds better this way. Am I free to open a PR? ---------- nosy: +DahlitzFlorian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 10:52:14 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 22 May 2020 14:52:14 +0000 Subject: [issue40730] Odd sentence in 3.9 What's New In-Reply-To: <1590158375.86.0.395536416991.issue40730@roundup.psfhosted.org> Message-ID: <1590159134.96.0.108370992638.issue40730@roundup.psfhosted.org> Eric V. Smith added the comment: Yes, please go ahead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 11:01:16 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Fri, 22 May 2020 15:01:16 +0000 Subject: [issue40730] Odd sentence in 3.9 What's New In-Reply-To: <1590158375.86.0.395536416991.issue40730@roundup.psfhosted.org> Message-ID: <1590159676.31.0.659407649623.issue40730@roundup.psfhosted.org> Change by Florian Dahlitz : ---------- keywords: +patch pull_requests: +19585 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20316 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 11:12:00 2020 From: report at bugs.python.org (Vinicius Henrique Silva Bastos) Date: Fri, 22 May 2020 15:12:00 +0000 Subject: [issue40731] CWI url's protocol on LICENSE file from http to https Message-ID: <1590160320.55.0.258105896385.issue40731@roundup.psfhosted.org> New submission from Vinicius Henrique Silva Bastos : CWI url's protocol on LICENSE file from http to https from: http://www.cwi.nl to: https://www.cwi.nl Obs.: Learning about pull requests and how it works. ---------- assignee: docs at python components: Documentation files: LICENSE hgrepos: 388 messages: 369610 nosy: bastosvinicius, docs at python priority: normal severity: normal status: open title: CWI url's protocol on LICENSE file from http to https type: enhancement versions: Python 3.10 Added file: https://bugs.python.org/file49181/LICENSE _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 11:18:01 2020 From: report at bugs.python.org (Vinicius Henrique Silva Bastos) Date: Fri, 22 May 2020 15:18:01 +0000 Subject: [issue40731] CWI url's protocol on LICENSE file from http to https In-Reply-To: <1590160320.55.0.258105896385.issue40731@roundup.psfhosted.org> Message-ID: <1590160681.19.0.611956929131.issue40731@roundup.psfhosted.org> Change by Vinicius Henrique Silva Bastos : ---------- keywords: +patch pull_requests: +19586 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20317 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 11:19:21 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 22 May 2020 15:19:21 +0000 Subject: [issue40730] Odd sentence in 3.9 What's New In-Reply-To: <1590158375.86.0.395536416991.issue40730@roundup.psfhosted.org> Message-ID: <1590160761.62.0.440098917038.issue40730@roundup.psfhosted.org> miss-islington added the comment: New changeset 30d5a7364db9e65ccabbdce2c20b84fe2fb233fb by Florian Dahlitz in branch 'master': bpo-40730: Remove redundant 'to' (GH-20316) https://github.com/python/cpython/commit/30d5a7364db9e65ccabbdce2c20b84fe2fb233fb ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 11:19:32 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 22 May 2020 15:19:32 +0000 Subject: [issue40730] Odd sentence in 3.9 What's New In-Reply-To: <1590158375.86.0.395536416991.issue40730@roundup.psfhosted.org> Message-ID: <1590160772.54.0.489520825655.issue40730@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19587 pull_request: https://github.com/python/cpython/pull/20318 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 11:20:01 2020 From: report at bugs.python.org (Mark Shannon) Date: Fri, 22 May 2020 15:20:01 +0000 Subject: [issue40728] UnboundLocalError as a result of except statement variable re-assignment In-Reply-To: <1590145151.0.0.634189101704.issue40728@roundup.psfhosted.org> Message-ID: <1590160801.94.0.279259057502.issue40728@roundup.psfhosted.org> Mark Shannon added the comment: Oleksandr, Are you saying that the current behaviour is incorrect, in the sense that it disagrees with the documentation? Or are you saying that the current behaviour is undesirable? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 11:27:00 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 22 May 2020 15:27:00 +0000 Subject: [issue40730] Odd sentence in 3.9 What's New In-Reply-To: <1590158375.86.0.395536416991.issue40730@roundup.psfhosted.org> Message-ID: <1590161220.41.0.333151300241.issue40730@roundup.psfhosted.org> Eric V. Smith added the comment: New changeset 983b17ca1319adf9f06d5f2779a44450241eba54 by Miss Islington (bot) in branch '3.9': bpo-40730: Remove redundant 'to' (GH-20316) (GH-20318) https://github.com/python/cpython/commit/983b17ca1319adf9f06d5f2779a44450241eba54 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 12:07:14 2020 From: report at bugs.python.org (Anthony Sottile) Date: Fri, 22 May 2020 16:07:14 +0000 Subject: [issue40726] ast.Call end_lineno is defined and returns None In-Reply-To: <1590136499.66.0.128776260794.issue40726@roundup.psfhosted.org> Message-ID: <1590163634.41.0.21165737211.issue40726@roundup.psfhosted.org> Anthony Sottile added the comment: There's current expectation in a lot of linters / code formatters that the *lineno and *col_offset attributes will be missing if they are not attached to the node setting them to None is going to break a lot of those, if possible I'd suggest going back to when they were missing ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 12:11:14 2020 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 22 May 2020 16:11:14 +0000 Subject: [issue40705] use-after-free in _zoneinfo.c's module_free function In-Reply-To: <1590038531.88.0.263330697524.issue40705@roundup.psfhosted.org> Message-ID: <1590163874.09.0.815869781924.issue40705@roundup.psfhosted.org> Paul Ganssle added the comment: New changeset 06a1b8915d6674e40f0dccc422ca2c06212392d8 by Ammar Askar in branch 'master': bpo-40705: Fix use-after-free in _zoneinfo's module_free (GH-20280) https://github.com/python/cpython/commit/06a1b8915d6674e40f0dccc422ca2c06212392d8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 12:11:10 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 22 May 2020 16:11:10 +0000 Subject: [issue40705] use-after-free in _zoneinfo.c's module_free function In-Reply-To: <1590038531.88.0.263330697524.issue40705@roundup.psfhosted.org> Message-ID: <1590163870.77.0.215237798149.issue40705@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +19588 pull_request: https://github.com/python/cpython/pull/20319 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 12:14:39 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 22 May 2020 16:14:39 +0000 Subject: [issue40726] ast.Call end_lineno is defined and returns None In-Reply-To: <1590136499.66.0.128776260794.issue40726@roundup.psfhosted.org> Message-ID: <1590164079.33.0.259340706151.issue40726@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 12:51:04 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 22 May 2020 16:51:04 +0000 Subject: [issue40654] shutil.copyfile mutates symlink for absolute path In-Reply-To: <1589685995.41.0.350903765679.issue40654@roundup.psfhosted.org> Message-ID: <1590166264.94.0.986366099781.issue40654@roundup.psfhosted.org> Jason R. Coombs added the comment: > Changing readlink to always return the correct path was deliberate. Understood. However, this statement assumes the "correct path" is the most precise path to resolve the target. If you instead define "correct path" as the one that would be most friendly to the user who created the path, readlink no longer honors that expectation. With this change, the following invariant holds on every platform except Python 3.8 on Windows (at least in the general case): >>> os.symlink(x, y) >>> assert os.readlink(y) == x More importantly, AFAIK, Python provides no function to transform `x` into what one can expect as the result of `os.readlink(y)`. In other words, what value of `f` would make this invariant pass? >>> os.symlink(x, y) >>> assert os.readlink(y) == f(x) Or put another way, is "C:\Users\jaraco\temp" an "incorrect path"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 12:58:01 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 22 May 2020 16:58:01 +0000 Subject: [issue40654] shutil.copyfile mutates symlink for absolute path In-Reply-To: <1589685995.41.0.350903765679.issue40654@roundup.psfhosted.org> Message-ID: <1590166681.16.0.974869602936.issue40654@roundup.psfhosted.org> Jason R. Coombs added the comment: > Unless you're specifically testing single steps through symlink chains, you probably want to just use realpath anyway. I do see now the references to `realpath` in the docs... and I think that satisfies the need I described above. It doesn't supply the `f`, but it provides a mechanism to resolve the ultimate file. As you say, there's still no regular solution for resolving intermediate links in a chain of symlinks with user-friendly names, but it seems like a much less severe limitation (platform variation). I'll see if `realpath` satisfies the test suite needs for path pie. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 13:07:14 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 22 May 2020 17:07:14 +0000 Subject: [issue40731] CWI url's protocol on LICENSE file from http to https In-Reply-To: <1590160320.55.0.258105896385.issue40731@roundup.psfhosted.org> Message-ID: <1590167234.35.0.916096339768.issue40731@roundup.psfhosted.org> Serhiy Storchaka added the comment: The text of the license cannot be changed without consulting with lawyers. ---------- nosy: +gvanrossum, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 13:18:32 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Fri, 22 May 2020 17:18:32 +0000 Subject: [issue40726] ast.Call end_lineno is defined and returns None In-Reply-To: <1590136499.66.0.128776260794.issue40726@roundup.psfhosted.org> Message-ID: <1590167912.47.0.776741750303.issue40726@roundup.psfhosted.org> Batuhan Taskaya added the comment: > setting them to None is going to break a lot of those, if possible I'd suggest going back to when they were missing 'lineno' and 'col_offset' will never be none, since both are declared as normal integers. But on the other hand, 'end_lineno' and 'end_col_offset' are declared as optional integers which would make sense to auto initalize them with *None*, and I dont think it would ever break some code that complies with the ASDL declaration. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 13:19:27 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 22 May 2020 17:19:27 +0000 Subject: [issue40568] Modify -c command-line option to accept multiple inputs In-Reply-To: <1588964937.68.0.986339822686.issue40568@roundup.psfhosted.org> Message-ID: <1590167967.01.0.126567324259.issue40568@roundup.psfhosted.org> Serhiy Storchaka added the comment: It would be breaking change. In addition to multiline strings you can use \n with $' on Posix: python -c $'with open("somefile.txt") as f:\n s = f.read()\n print(len(s))' Maybe there is similar feature on Windows, but in any case the command line interface on Windows is far from user friendly. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 13:40:37 2020 From: report at bugs.python.org (David Strobach) Date: Fri, 22 May 2020 17:40:37 +0000 Subject: [issue40726] ast.Call end_lineno is defined and returns None In-Reply-To: <1590136499.66.0.128776260794.issue40726@roundup.psfhosted.org> Message-ID: <1590169237.09.0.203745422561.issue40726@roundup.psfhosted.org> David Strobach added the comment: Actually, Xonsh (http://github.com/xonsh/xonsh) tests show that keyword AST nodes are missing 'lineno' attribute, but that could be our fault. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 13:49:40 2020 From: report at bugs.python.org (=?utf-8?q?Burak_Yi=C4=9Fit_Kaya?=) Date: Fri, 22 May 2020 17:49:40 +0000 Subject: [issue39010] ProactorEventLoop raises unhandled ConnectionResetError In-Reply-To: <1575924458.67.0.403977169674.issue39010@roundup.psfhosted.org> Message-ID: <1590169780.57.0.356658260393.issue39010@roundup.psfhosted.org> Change by Burak Yi?it Kaya : ---------- nosy: +Burak Yi?it Kaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 14:04:47 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 22 May 2020 18:04:47 +0000 Subject: [issue9216] FIPS support for hashlib In-Reply-To: <1278721335.16.0.522410247151.issue9216@psf.upfronthosting.co.za> Message-ID: <1590170687.42.0.502342054408.issue9216@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19589 pull_request: https://github.com/python/cpython/pull/20320 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 14:04:53 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 22 May 2020 18:04:53 +0000 Subject: [issue9216] FIPS support for hashlib In-Reply-To: <1278721335.16.0.522410247151.issue9216@psf.upfronthosting.co.za> Message-ID: <1590170693.93.0.0183969728758.issue9216@roundup.psfhosted.org> miss-islington added the comment: New changeset 909b5714e1303357868bc5e281c1cf508d5d5a17 by Christian Heimes in branch 'master': bpo-9216: hashlib usedforsecurity fixes (GH-20258) https://github.com/python/cpython/commit/909b5714e1303357868bc5e281c1cf508d5d5a17 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 14:07:16 2020 From: report at bugs.python.org (David Strobach) Date: Fri, 22 May 2020 18:07:16 +0000 Subject: [issue40726] ast.Call end_lineno is defined and returns None In-Reply-To: <1590136499.66.0.128776260794.issue40726@roundup.psfhosted.org> Message-ID: <1590170836.56.0.564953491847.issue40726@roundup.psfhosted.org> David Strobach added the comment: > Actually, Xonsh tests show that keyword AST nodes are missing 'lineno' attribute, but that could be our fault. Yes, our fault. Sorry for the noise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 14:07:47 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 22 May 2020 18:07:47 +0000 Subject: [issue40654] shutil.copyfile mutates symlink for absolute path In-Reply-To: <1589685995.41.0.350903765679.issue40654@roundup.psfhosted.org> Message-ID: <1590170867.98.0.39005607546.issue40654@roundup.psfhosted.org> Jason R. Coombs added the comment: Perhaps related, I've encountered another apparent regression on Python 3.8 on Windows when the current working directory is in a symlink to another volume and one runs `setup.py develop` on a project using setuptools_scm (https://github.com/pypa/setuptools_scm/issues/436). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 14:22:30 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 May 2020 18:22:30 +0000 Subject: [issue23389] pkgutil.find_loader raises an ImportError on PEP 420 implicit namespace packages In-Reply-To: <1422986140.16.0.155842945597.issue23389@psf.upfronthosting.co.za> Message-ID: <1590171750.36.0.0408222351068.issue23389@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 14:22:39 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 22 May 2020 18:22:39 +0000 Subject: [issue9216] FIPS support for hashlib In-Reply-To: <1278721335.16.0.522410247151.issue9216@psf.upfronthosting.co.za> Message-ID: <1590171759.62.0.201980625097.issue9216@roundup.psfhosted.org> miss-islington added the comment: New changeset a08b7c3bb0ef9da32400d23b13f78245cd7a9541 by Miss Islington (bot) in branch '3.9': bpo-9216: hashlib usedforsecurity fixes (GH-20258) https://github.com/python/cpython/commit/a08b7c3bb0ef9da32400d23b13f78245cd7a9541 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 14:23:40 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 May 2020 18:23:40 +0000 Subject: [issue23721] Set up a daily test coverage run In-Reply-To: <1426858130.98.0.810512379451.issue23721@psf.upfronthosting.co.za> Message-ID: <1590171820.65.0.47878274407.issue23721@roundup.psfhosted.org> Brett Cannon added the comment: We have coverage after every push now at https://codecov.io/gh/python/cpython. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 14:24:08 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 May 2020 18:24:08 +0000 Subject: [issue23738] Clarify documentation of positional-only default values In-Reply-To: <1427020261.31.0.215855760889.issue23738@psf.upfronthosting.co.za> Message-ID: <1590171848.78.0.41702277607.issue23738@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 14:25:44 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 May 2020 18:25:44 +0000 Subject: [issue23794] http package should support HTTP/2 In-Reply-To: <1427479110.25.0.801999785412.issue23794@psf.upfronthosting.co.za> Message-ID: <1590171944.23.0.529578972453.issue23794@roundup.psfhosted.org> Brett Cannon added the comment: And now there's https://pypi.org/project/httpcore/ which wraps h2 and h11 into a single, low-level API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 14:26:18 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 May 2020 18:26:18 +0000 Subject: [issue23794] http package should support HTTP/2 In-Reply-To: <1427479110.25.0.801999785412.issue23794@psf.upfronthosting.co.za> Message-ID: <1590171978.34.0.636800518647.issue23794@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 14:26:51 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 22 May 2020 18:26:51 +0000 Subject: [issue40654] shutil.copyfile mutates symlink for absolute path In-Reply-To: <1589685995.41.0.350903765679.issue40654@roundup.psfhosted.org> Message-ID: <1590172011.8.0.504985560249.issue40654@roundup.psfhosted.org> Jason R. Coombs added the comment: > I'll see if `realpath` satisfies the test suite needs for path pie. I've tried replacing `readlink` with `realpath` and the tests still pass on Unix-like OSs, and also passes on Python 3.8 on Windows, but now fails on older Pythons on Windows. Is there a backport of the new realpath for older Pythons? I see there's [one here](https://github.com/jaraco/jaraco.windows/blob/1318d7afce2a9257f5bd7342783fdb796462d66b/jaraco/windows/filesystem/backports.py#L7). I wonder if that one can be used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 14:31:28 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 22 May 2020 18:31:28 +0000 Subject: [issue40732] New realpath breaks setuptools_scm Message-ID: <1590172288.82.0.9827381954.issue40732@roundup.psfhosted.org> New submission from Jason R. Coombs : I've encountered an apparent regression on Python 3.8 on Windows when the current working directory is in a symlink to another volume and one runs `setup.py develop` on a project using setuptools_scm (https://github.com/pypa/setuptools_scm/issues/436). I suspect the issue stems from changes in issue9949 and is likely a manifestation of the issues articulated by Eryk in issue9949#msg350138. ---------- components: Windows keywords: 3.8regression messages: 369629 nosy: jaraco, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: New realpath breaks setuptools_scm versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 14:32:08 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 22 May 2020 18:32:08 +0000 Subject: [issue40654] shutil.copyfile mutates symlink for absolute path In-Reply-To: <1589685995.41.0.350903765679.issue40654@roundup.psfhosted.org> Message-ID: <1590172327.99.0.768310567811.issue40654@roundup.psfhosted.org> Jason R. Coombs added the comment: > Perhaps related... Now I'm thinking the issue is different, so I've created issue40732 to track the realpath issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 14:41:03 2020 From: report at bugs.python.org (Oleksandr Suvorov) Date: Fri, 22 May 2020 18:41:03 +0000 Subject: [issue40728] UnboundLocalError as a result of except statement variable re-assignment In-Reply-To: <1590145151.0.0.634189101704.issue40728@roundup.psfhosted.org> Message-ID: <1590172863.07.0.273104753329.issue40728@roundup.psfhosted.org> Oleksandr Suvorov added the comment: Mark, I'm not sure if this is even documented, I find this a bit inconsistent when compared to the behavior of other statements, E.g.: * list expressions do have their scope and do not overwrite local variables * with statement does overwrite the variable value but makes it available even after with block * except overwrites variable value, but then the value gets cleaned and no longer accessible. I do understand why this happens, but I find this undesirable. At least some consistency will be nice to have, or this should be documented. Otherwise, it confuses. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 14:52:46 2020 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 22 May 2020 18:52:46 +0000 Subject: [issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type In-Reply-To: <1586276621.78.0.843757244355.issue40217@roundup.psfhosted.org> Message-ID: <1590173566.23.0.445343510921.issue40217@roundup.psfhosted.org> Petr Viktorin added the comment: Ha! I think I found the issue in PySide now. It's different, but it's still a CPython issue. It's actually a variant of the "defining class" problem from PEP 573. It's legal to get the value of a slot, using PyType_GetSlot. It's reasonable to assume that what you put in the tp_traverse slot is what you'll get out using PyType_GetSlot. If a type's tp_traverse tries to call its superclass's tp_traverse, you can get an infinite loop. See the situation below or run attached reproducer (build the module, import it and exit the interpreter). Getting one's superclass is a bit tricky when dealing entirely with FromSpec types, but it is definitely *possible*. There's a lot of assumptions the code can reasonably make. In my reproducer, I stored the superclass in a C static variable (which is perfectly valid if the module cleanly refuses to work with subinterpreters or interpreter reload). Base: - real tp_traverse is PyType_FromSpec_tp_traverse - user_provided_tp_traverse is the base's original Subclass: - real tp_traverse is PyType_FromSpec_tp_traverse - user_provided_tp_traverse is the subclass' original So when the subclass is traversed: - subclass real tp_traverse calls the subclass user_provided_tp_traverse - subclass user_provided_tp_traverse calls PyType_GetSlot(base, tp_traverse) - that is, the base's real tp_traverse - the base's real tp_traverse calls the **SUBCLASS** user_provided_tp_traverse, since that's what's recorded in type(self) Another issue is that `PyType_FromSpec_Alloc`ated types lie about their size: `tp->tp_basicsize + Py_SIZE(self) * tp->itemsize` is not the actual allocated amount. This could technically be solved by redefining `__sizeof__`, but I'm more worried that it's another edge case of a hack, and There will probably be other edge cases. Since this is API we want to build on, I'd sleep easier if it's kept clean. What would be the downsides of reverting and documenting that tp_traverse must visit Py_TYPE(self)? It seems that you visit Py_TYPE(self), it could just end up with unbreakable reference cycles. We're dealing with modules and classes, which are usually effectively immortal (and if not, the author probably knows what they're doing). I don't think it would hurt that much. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 14:53:15 2020 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 22 May 2020 18:53:15 +0000 Subject: [issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type In-Reply-To: <1586276621.78.0.843757244355.issue40217@roundup.psfhosted.org> Message-ID: <1590173595.73.0.739570626575.issue40217@roundup.psfhosted.org> Change by Petr Viktorin : Added file: https://bugs.python.org/file49182/reproducer.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 15:40:16 2020 From: report at bugs.python.org (Zachary Ware) Date: Fri, 22 May 2020 19:40:16 +0000 Subject: [issue40692] Adjust test_concurrent_futures to run more of its tests if multiprocessing.synchronize is missing In-Reply-To: <1589922464.68.0.792694033918.issue40692@roundup.psfhosted.org> Message-ID: <1590176416.25.0.338614175073.issue40692@roundup.psfhosted.org> Zachary Ware added the comment: Adding multiprocessing and concurrent.futures experts. ---------- components: -Tests nosy: +bquinlan, davin, pitrou versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 15:40:48 2020 From: report at bugs.python.org (Zachary Ware) Date: Fri, 22 May 2020 19:40:48 +0000 Subject: [issue40692] Adjust test_concurrent_futures to run more of its tests if multiprocessing.synchronize is missing In-Reply-To: <1589922464.68.0.792694033918.issue40692@roundup.psfhosted.org> Message-ID: <1590176448.37.0.932878351336.issue40692@roundup.psfhosted.org> Change by Zachary Ware : ---------- components: +Library (Lib), Tests -asyncio _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 15:45:27 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 22 May 2020 19:45:27 +0000 Subject: [issue40730] Odd sentence in 3.9 What's New In-Reply-To: <1590158375.86.0.395536416991.issue40730@roundup.psfhosted.org> Message-ID: <1590176727.87.0.826033992999.issue40730@roundup.psfhosted.org> Eric V. Smith added the comment: Thanks, @DahlitzFlorian! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 15:57:35 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 22 May 2020 19:57:35 +0000 Subject: [issue40732] New realpath breaks setuptools_scm In-Reply-To: <1590172288.82.0.9827381954.issue40732@roundup.psfhosted.org> Message-ID: <1590177455.01.0.187846654655.issue40732@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 16:08:56 2020 From: report at bugs.python.org (Marten H. van Kerkwijk) Date: Fri, 22 May 2020 20:08:56 +0000 Subject: [issue40720] accessing mmap of file that is overwritten causes bus error In-Reply-To: <1590096773.09.0.253309734553.issue40720@roundup.psfhosted.org> Message-ID: <1590178136.24.0.43805970894.issue40720@roundup.psfhosted.org> Marten H. van Kerkwijk added the comment: I should probably have added that the bus error happens on linux. On Windows, the opening of the file for writing leads to an error, as the file is still opened for reading inside the mmap. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 16:09:05 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 22 May 2020 20:09:05 +0000 Subject: [issue40506] add support for os.Pathlike filenames in zipfile.ZipFile.writestr In-Reply-To: <1588644723.41.0.516863649113.issue40506@roundup.psfhosted.org> Message-ID: <1590178145.7.0.792652483836.issue40506@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- nosy: +serhiy.storchaka, twouters versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 16:10:55 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 22 May 2020 20:10:55 +0000 Subject: [issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type In-Reply-To: <1586276621.78.0.843757244355.issue40217@roundup.psfhosted.org> Message-ID: <1590178255.93.0.869060078429.issue40217@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > What would be the downsides of reverting and documenting that tp_traverse must visit Py_TYPE(self)? Not much IMHO, I actually would prefer this solution over any automatic "hacks". The reason is that any hack will be technically violating the contract: if I read the tp_traverse of any of these classes I would say "wait a minute....this is wrong: the class owns a strong reference to its parent so...why is not visiting it?". But the answer would be that we are hacking because we didn't want to force users to migrate once we added the strong reference. Notice that the root of this problem was bpo-35810. In that issue we added a guide to the docs: https://docs.python.org/3/whatsnew/3.8.html#changes-in-the-c-api. In there it says that you should decref now the parent on tp_dealloc: static void foo_dealloc(foo_struct *instance) { PyObject *type = Py_TYPE(instance); PyObject_GC_Del(instance); #if PY_VERSION_HEX >= 0x03080000 // This was not needed before Python 3.8 (Python issue 35810) Py_DECREF(type); #endif } but it forgot about that you should also visit the parent in tp_traverse. So, I propose to do the following: * Revert the hack. * Fix the tp_traverse of all the relevant classes in the stdlib to correctly visit its parent. * Modify the documentation of master, 3.9 and 3.8 to add the missing information: You MUST visit the parent in tp_traverse: What do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 16:11:53 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 22 May 2020 20:11:53 +0000 Subject: [issue40732] New realpath breaks setuptools_scm In-Reply-To: <1590172288.82.0.9827381954.issue40732@roundup.psfhosted.org> Message-ID: <1590178313.17.0.643909984111.issue40732@roundup.psfhosted.org> Jason R. Coombs added the comment: It seems the underlying reason the behavior fails is the (intended) difference resolving the empty path to a realpath when a symlink points to another volume. The failing routine invokes realpath early (https://github.com/pypa/setuptools_scm/blob/d7c122e14c9eaca96574dec0ea530ad7204965a9/src/setuptools_scm/file_finder.py#L19). ``` path master # pwd C:\Users\jaraco\code\main\path path master # py -3.7 -c "import os; print(os.path.realpath(''))" C:\Users\jaraco\code\main\path path master # py -3.8 -c "import os; print(os.path.realpath(''))" \\vmware-host\Shared Folders\home\code\main\path ``` But that doesn't explain why this issue would not have been triggered on non-Windows systems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 16:13:10 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 22 May 2020 20:13:10 +0000 Subject: [issue40105] Updating zip comment doesn't truncate the zip file In-Reply-To: <1585514903.71.0.609611507951.issue40105@roundup.psfhosted.org> Message-ID: <1590178390.99.0.733279250991.issue40105@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- nosy: +serhiy.storchaka, twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 16:15:02 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 22 May 2020 20:15:02 +0000 Subject: [issue40103] ZipFile.extractall is not multiprocess safe with regard to directory creation. In-Reply-To: <1585499627.5.0.740021279333.issue40103@roundup.psfhosted.org> Message-ID: <1590178502.68.0.910205307342.issue40103@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- nosy: +serhiy.storchaka, twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 16:17:03 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 22 May 2020 20:17:03 +0000 Subject: [issue40728] UnboundLocalError as a result of except statement variable re-assignment In-Reply-To: <1590145151.0.0.634189101704.issue40728@roundup.psfhosted.org> Message-ID: <1590178623.97.0.109389852169.issue40728@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I don't think the examples you mention is proof of inconsistent behaviour: > * list expressions do have their scope and do not overwrite local variables comprehensions have their own scope in Python 3 and this is documented. General blocks (like normal loops, exceptions, with statements...etc don't have their own scope). * with statement does overwrite the variable value but makes it available even after with block Yeah, but with statements do not have the problem of needing to break reference cycles in the exception names, so this does not apply. The same for any other "target" variable such as loop assignment (for x in ...). * except overwrites variable value, but then the value gets cleaned and no longer accessible. This is a consequence of the fact that when you do 'as varname' you are voluntary overwriting the previous value, therefore loosing whatever was there before. The semantics here are that the variable is not accessible outside the except block, which is unique to except blocks but this is needed to avoid circular references. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 16:25:18 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 22 May 2020 20:25:18 +0000 Subject: [issue40732] New realpath breaks setuptools_scm In-Reply-To: <1590172288.82.0.9827381954.issue40732@roundup.psfhosted.org> Message-ID: <1590179118.36.0.283535542527.issue40732@roundup.psfhosted.org> Jason R. Coombs added the comment: It's because on Unix: ``` >>> os.path.relpath('/Users/jaraco/code/main/path/.flake8', '') '.flake8' ``` But on Windows, relpath raises an error for the comparable call: ``` >>> os.path.relpath('\\\\vmware-host\\shared folders\\home\\code\\main\\path\\.flake8', '') ValueError: path is on mount '\\\\vmware-host\\shared folders', start on mount 'C:' ``` So it seems it may not be a bug in Python, but merely a consequence of Python 3.8 honoring symlinks in realpath, and exposing the unfortunate weakness of resolving relative real paths when root volumes aren't in a shared namespace. Does Python have any advice for downstream users running into this or similar issues? If they want cross-platform compatibility, must they avoid use of realpath? Do you have any tips specific to what setuptools_scm is doing? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 16:27:42 2020 From: report at bugs.python.org (paul rubin) Date: Fri, 22 May 2020 20:27:42 +0000 Subject: [issue40733] mention IDLE in main python ocs page Message-ID: <1590179262.31.0.599943692588.issue40733@roundup.psfhosted.org> New submission from paul rubin : The IDLE documentation is in https://docs.python.org/3/library/idle.html which is not where I'd have thought to look for it, since I think of IDLE as an application rather than a library. So I looked for it on the main docs page, docs.python.org, and didn't find it there. I ended up finding it by web search. I guess its current location is reasonable, but maybe a link to it could be included in docs.python.org's main page left side navigation panel, or IDLE could simply be mentioned in the entry for library documentation. ---------- assignee: docs at python components: Documentation messages: 369640 nosy: docs at python, phr priority: normal severity: normal status: open title: mention IDLE in main python ocs page type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 16:28:38 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 22 May 2020 20:28:38 +0000 Subject: [issue40733] mention IDLE in main python ocs page In-Reply-To: <1590179262.31.0.599943692588.issue40733@roundup.psfhosted.org> Message-ID: <1590179318.22.0.162678196389.issue40733@roundup.psfhosted.org> Change by Ned Deily : ---------- components: +IDLE nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 16:30:09 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 22 May 2020 20:30:09 +0000 Subject: [issue40732] New realpath breaks setuptools_scm In-Reply-To: <1590172288.82.0.9827381954.issue40732@roundup.psfhosted.org> Message-ID: <1590179409.24.0.412669468626.issue40732@roundup.psfhosted.org> Jason R. Coombs added the comment: To make matters more complicated, `git rev-parse --show-toplevel` also returns the realpath: ``` # git rev-parse --show-toplevel //vmware-host/Shared Folders/home/code/main/path ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 16:33:41 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 22 May 2020 20:33:41 +0000 Subject: [issue40696] Exception handling with "await" can hang in Python3.9.0b1 In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1590179621.46.0.771533808248.issue40696@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 8.0 -> 9.0 pull_requests: +19590 pull_request: https://github.com/python/cpython/pull/20321 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 16:33:41 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 22 May 2020 20:33:41 +0000 Subject: [issue40696] Exception handling with "await" can hang in Python3.9.0b1 In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1590179621.11.0.104253967636.issue40696@roundup.psfhosted.org> Chris Jerdonek added the comment: New changeset 7c30d12bd5359b0f66c4fbc98aa055398bcc8a7e by Chris Jerdonek in branch 'master': bpo-40696: Fix a hang that can arise after gen.throw() (GH-20287) https://github.com/python/cpython/commit/7c30d12bd5359b0f66c4fbc98aa055398bcc8a7e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 16:35:21 2020 From: report at bugs.python.org (paul rubin) Date: Fri, 22 May 2020 20:35:21 +0000 Subject: [issue40734] /usr/bin surprisingly in sys.path under IDLE Message-ID: <1590179721.27.0.0407406629035.issue40734@roundup.psfhosted.org> New submission from paul rubin : This is in the standard python 3.7.3 install under Debian 10. It's possible that this is on purpose, and it's (separately) possible that the Debian packagers did this for some reason. I'm not sure it's a bug but am reporting it as it's an oddity that might warrant looking into. When I look at sys.path in the IDLE shell, the path includes /usr/bin, which is not there under the normal python prompt. Since /usr/bin is not a place where python modules usually live, it's a bit strange to find it on the path. It doesn't seem healthy since it could lead to surprises. But maybe I'm missing something. Feel free to close this if the inclusion is intentional. ---------- assignee: terry.reedy components: IDLE messages: 369643 nosy: phr, terry.reedy priority: normal severity: normal status: open title: /usr/bin surprisingly in sys.path under IDLE type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 16:36:13 2020 From: report at bugs.python.org (paul rubin) Date: Fri, 22 May 2020 20:36:13 +0000 Subject: [issue40733] mention IDLE in main python docs page In-Reply-To: <1590179262.31.0.599943692588.issue40733@roundup.psfhosted.org> Message-ID: <1590179773.67.0.291231909498.issue40733@roundup.psfhosted.org> Change by paul rubin : ---------- title: mention IDLE in main python ocs page -> mention IDLE in main python docs page _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 16:37:50 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 22 May 2020 20:37:50 +0000 Subject: [issue40732] New realpath breaks setuptools_scm In-Reply-To: <1590172288.82.0.9827381954.issue40732@roundup.psfhosted.org> Message-ID: <1590179870.09.0.97100448328.issue40732@roundup.psfhosted.org> Jason R. Coombs added the comment: Good news is it looks like the issue with setuptools_scm can be address in a relatively straightforward manner (https://github.com/pypa/setuptools_scm/issues/436#issuecomment-632899446). I think that means the answers to the above questions are: - Downstream users do not need to avoid the use of realpath. - When using realpath, make sure to do it consistently, especially before invoking relpath. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 16:39:02 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 22 May 2020 20:39:02 +0000 Subject: [issue40734] /usr/bin surprisingly in sys.path under IDLE In-Reply-To: <1590179721.27.0.0407406629035.issue40734@roundup.psfhosted.org> Message-ID: <1590179942.96.0.389961547899.issue40734@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 16:40:25 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 22 May 2020 20:40:25 +0000 Subject: [issue40679] show class name in method invocation TypeError In-Reply-To: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> Message-ID: <1590180025.59.0.52273798237.issue40679@roundup.psfhosted.org> Chris Jerdonek added the comment: New changeset b5cc2089cc354469f12eabc7ba54280e85fdd6dc by Dennis Sweeney in branch 'master': bpo-40679: Use the function's qualname in certain TypeErrors (GH-20236) https://github.com/python/cpython/commit/b5cc2089cc354469f12eabc7ba54280e85fdd6dc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 16:43:27 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 22 May 2020 20:43:27 +0000 Subject: [issue40679] show class name in method invocation TypeError In-Reply-To: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> Message-ID: <1590180207.69.0.143809432719.issue40679@roundup.psfhosted.org> Chris Jerdonek added the comment: Thanks again, Dennis! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 16:45:26 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 22 May 2020 20:45:26 +0000 Subject: [issue38490] statistics: add covariance, Pearson's correlation, and simple linear regression In-Reply-To: <1571175609.51.0.475949905245.issue38490@roundup.psfhosted.org> Message-ID: <1590180326.53.0.258219994102.issue38490@roundup.psfhosted.org> Cheryl Sabella added the comment: @steven.daprano and @tim.peters, please take a look at the PR as it is just waiting on your approval. Thanks! ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 17:07:46 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 22 May 2020 21:07:46 +0000 Subject: [issue40735] test_nntplib: sporadic failures, NetworkedNNTP_SSLTests.test_with_statement Message-ID: <1590181665.98.0.604811088124.issue40735@roundup.psfhosted.org> New submission from Chris Jerdonek : A sporadic failure of test_nntplib.NetworkedNNTP_SSLTests.test_with_statement on the CI for macOS: https://github.com/python/cpython/pull/20321/checks?check_run_id=700729471#step:6:612 See also: * https://bugs.python.org/issue19613 (test_article_head_body) * https://bugs.python.org/issue19756 (test_capabilities) ERROR: test_with_statement (test.test_nntplib.NetworkedNNTP_SSLTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/test/test_nntplib.py", line 277, in test_with_statement server = self.NNTP_CLASS(self.NNTP_HOST, File "/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/nntplib.py", line 1025, in __init__ super().__init__(host, port, user, password, readermode, File "/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/nntplib.py", line 334, in __init__ self.sock = self._create_socket(timeout) File "/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/nntplib.py", line 1031, in _create_socket sock = _encrypt_on(sock, self.ssl_context, self.host) File "/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/nntplib.py", line 292, in _encrypt_on return context.wrap_socket(sock, server_hostname=hostname) File "/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/ssl.py", line 1040, in _create self.do_handshake() File "/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1097) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/test/test_nntplib.py", line 250, in wrapped meth(self) File "/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/test/test_nntplib.py", line 293, in test_with_statement if re.search(r'(?i)KEY.TOO.SMALL', ssl_err.reason): File "/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/re.py", line 201, in search return _compile(pattern, flags).search(string) TypeError: expected string or bytes-like object ---------- components: Tests messages: 369648 nosy: chris.jerdonek priority: normal severity: normal status: open title: test_nntplib: sporadic failures, NetworkedNNTP_SSLTests.test_with_statement type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 17:08:45 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 22 May 2020 21:08:45 +0000 Subject: [issue19613] test_nntplib: sporadic failures, test_article_head_body() In-Reply-To: <1384536645.9.0.862907413915.issue19613@psf.upfronthosting.co.za> Message-ID: <1590181725.83.0.357784297729.issue19613@roundup.psfhosted.org> Chris Jerdonek added the comment: See also: https://bugs.python.org/issue40735 (test_with_statement) ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 17:09:08 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 22 May 2020 21:09:08 +0000 Subject: [issue19756] test_nntplib: sporadic failures, network isses? server down? In-Reply-To: <1385316451.32.0.948186129781.issue19756@psf.upfronthosting.co.za> Message-ID: <1590181748.21.0.706249073313.issue19756@roundup.psfhosted.org> Chris Jerdonek added the comment: See also: https://bugs.python.org/issue40735 (test_with_statement) ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 17:11:16 2020 From: report at bugs.python.org (Mariusz Felisiak) Date: Fri, 22 May 2020 21:11:16 +0000 Subject: [issue40696] Exception handling with "await" can hang in Python3.9.0b1 In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1590181876.55.0.55437182127.issue40696@roundup.psfhosted.org> Mariusz Felisiak added the comment: Chris, many thanks for detailed explanation, extensive investigation, and a fix! We'll also review Django's code in the next few days. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 17:12:55 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 22 May 2020 21:12:55 +0000 Subject: [issue40736] better message for re.search TypeError ("expected string or bytes-like object") Message-ID: <1590181975.57.0.833400253921.issue40736@roundup.psfhosted.org> New submission from Chris Jerdonek : This TypeError could be a bit better: "/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/test/test_nntplib.py", line 293, in test_with_statement if re.search(r'(?i)KEY.TOO.SMALL', ssl_err.reason): File "/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/re.py", line 201, in search return _compile(pattern, flags).search(string) TypeError: expected string or bytes-like object It just says "expected string or bytes-like object" but could include what type it found. ---------- components: Library (Lib) messages: 369652 nosy: chris.jerdonek priority: normal severity: normal status: open title: better message for re.search TypeError ("expected string or bytes-like object") type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 17:14:36 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 22 May 2020 21:14:36 +0000 Subject: [issue40696] Exception handling with "await" can hang in Python3.9.0b1 In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1590182076.76.0.559145718566.issue40696@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19591 pull_request: https://github.com/python/cpython/pull/20322 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 17:27:28 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 22 May 2020 21:27:28 +0000 Subject: [issue40679] show class name in method invocation TypeError In-Reply-To: <1589875049.34.0.573346435361.issue40679@roundup.psfhosted.org> Message-ID: <1590182848.96.0.96497238948.issue40679@roundup.psfhosted.org> Chris Jerdonek added the comment: > _PyObject_FunctionString as discussed here ( https://bugs.python.org/issue37645 ) returns a string that also includes the module name where applicable. By the way, Dennis, regarding the above, one thing I noticed is that Python doesn't currently expose a convenient way to get the fully qualified name of a class (the "full name" as opposed to the qualified name). It might be worth exploring what that would involve. I think it would be useful, personally. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 17:28:12 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 22 May 2020 21:28:12 +0000 Subject: [issue19756] test_nntplib: sporadic failures, network isses? server down? In-Reply-To: <1385316451.32.0.948186129781.issue19756@psf.upfronthosting.co.za> Message-ID: <1590182892.8.0.203272427454.issue19756@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- nosy: -chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 17:28:47 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 22 May 2020 21:28:47 +0000 Subject: [issue19613] test_nntplib: sporadic failures, test_article_head_body() In-Reply-To: <1384536645.9.0.862907413915.issue19613@psf.upfronthosting.co.za> Message-ID: <1590182927.63.0.52499962515.issue19613@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- nosy: -chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 17:35:26 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 22 May 2020 21:35:26 +0000 Subject: [issue40696] Exception handling with "await" can hang in Python3.9.0b1 In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1590183326.13.0.670204300133.issue40696@roundup.psfhosted.org> Chris Jerdonek added the comment: New changeset 7f77ac463cff219e0c8afef2611cad5080cc9df1 by Miss Islington (bot) in branch '3.9': bpo-40696: Fix a hang that can arise after gen.throw() (GH-20287) https://github.com/python/cpython/commit/7f77ac463cff219e0c8afef2611cad5080cc9df1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 17:45:19 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 22 May 2020 21:45:19 +0000 Subject: [issue40696] exception chain cycles cause hangs (was "Exception handling with "await" can hang in Python3.9.0b1") In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1590183919.06.0.80741791636.issue40696@roundup.psfhosted.org> Chris Jerdonek added the comment: Good to hear, Mariusz! And thanks for the report! Also, as discussed above, I'm leaving this issue open (and retitling) until the following more general issue is fixed: try: raise RuntimeError except Exception as exc: print(f'handling: {exc!r}') exc.__context__ = exc raise ValueError # hangs As I mentioned above, I believe this is because _PyErr_SetObject() only checks for cycles that involve the exception being raised. In this case, the cycle involves the exception one further down: ValueError -> RuntimeError -> RuntimeError -> RuntimeError -> ... ---------- title: Exception handling with "await" can hang in Python3.9.0b1 -> exception chain cycles cause hangs (was "Exception handling with "await" can hang in Python3.9.0b1") _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 17:47:00 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 22 May 2020 21:47:00 +0000 Subject: [issue40696] exception chain cycles cause hangs (was "Exception handling with "await" can hang in Python3.9.0b1") In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1590184020.15.0.489924805283.issue40696@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- stage: patch review -> needs patch versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 17:57:50 2020 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 22 May 2020 21:57:50 +0000 Subject: [issue40731] CWI url's protocol on LICENSE file from http to https In-Reply-To: <1590160320.55.0.258105896385.issue40731@roundup.psfhosted.org> Message-ID: <1590184670.31.0.445239452646.issue40731@roundup.psfhosted.org> Guido van Rossum added the comment: It works just fine with http:// (redirects to https). Thanks for testing our workflow. It works just fine. ---------- resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 18:04:09 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 22 May 2020 22:04:09 +0000 Subject: [issue23188] Provide a C helper function to chain raised (but not yet caught) exceptions In-Reply-To: <1420687041.12.0.12728944273.issue23188@psf.upfronthosting.co.za> Message-ID: <1590185049.83.0.934501782287.issue23188@roundup.psfhosted.org> Chris Jerdonek added the comment: I just want to point out one difference between _PyErr_ChainExceptions and PyErr_SetObject that I encountered while working on this issue: https://bugs.python.org/issue40696 While both functions set the context, only PyErr_SetObject does a check to prevent cycles from forming in the context chain (albeit an incomplete check, which can lead to hangs, which I mention in the issue linked above). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 18:16:00 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 22 May 2020 22:16:00 +0000 Subject: [issue40737] Handle PyModule_AddObject() error correctly in sqlite3 Message-ID: <1590185760.13.0.611798281854.issue40737@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : According to the documentation, PyModule_AddObject() only decrements the reference count of value on success. The calling code must PyDECREF() manually on error. Fixed by attached patch. ---------- components: Library (Lib) files: 0001-Use-PyModule_AddObject-correctly-in-sqlite3.patch keywords: patch messages: 369658 nosy: erlendaasland priority: normal severity: normal status: open title: Handle PyModule_AddObject() error correctly in sqlite3 versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file49183/0001-Use-PyModule_AddObject-correctly-in-sqlite3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 18:18:08 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 22 May 2020 22:18:08 +0000 Subject: [issue40737] Handle PyModule_AddObject() error correctly in sqlite3 In-Reply-To: <1590185760.13.0.611798281854.issue40737@roundup.psfhosted.org> Message-ID: <1590185888.81.0.284702759603.issue40737@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +19592 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20323 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 18:20:39 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 22 May 2020 22:20:39 +0000 Subject: [issue39073] email incorrect handling of crlf in Address objects. In-Reply-To: <1576586803.42.0.942657577592.issue39073@roundup.psfhosted.org> Message-ID: <1590186039.67.0.0326891095917.issue39073@roundup.psfhosted.org> Cheryl Sabella added the comment: There are 3 open PRs for the backport of this to 3.6, 3.7, and 3.8. It looks like they just need to be approved and miss-islington will take care of the rest. ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 18:22:54 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 22 May 2020 22:22:54 +0000 Subject: [issue40327] list(sys.modules.items()) can throw RuntimeError: dictionary changed size during iteration In-Reply-To: <1587284646.11.0.468516211586.issue40327@roundup.psfhosted.org> Message-ID: <1590186174.93.0.040229495017.issue40327@roundup.psfhosted.org> miss-islington added the comment: New changeset 16d07812dd3833295cc001d19eea42eecbdb6ea5 by Miss Islington (bot) in branch '3.8': bpo-40327: Improve atomicity, speed, and memory efficiency of the items() loop (GH-19628) https://github.com/python/cpython/commit/16d07812dd3833295cc001d19eea42eecbdb6ea5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 18:24:49 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 22 May 2020 22:24:49 +0000 Subject: [issue40214] test_ctypes.test_load_dll_with_flags Windows failure In-Reply-To: <1586230066.46.0.791582618244.issue40214@roundup.psfhosted.org> Message-ID: <1590186289.44.0.558516541418.issue40214@roundup.psfhosted.org> miss-islington added the comment: New changeset 0cc7becde0bfe896fd23b5cb14fedfb8f2066fca by Miss Islington (bot) in branch '3.8': bpo-40214: Fix ctypes WinDLL test with insecure flags (GH-19652) https://github.com/python/cpython/commit/0cc7becde0bfe896fd23b5cb14fedfb8f2066fca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 18:27:10 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Fri, 22 May 2020 22:27:10 +0000 Subject: [issue40696] exception chain cycles cause hangs (was "Exception handling with "await" can hang in Python3.9.0b1") In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1590186430.76.0.460016828027.issue40696@roundup.psfhosted.org> Dennis Sweeney added the comment: Wouldn't Floyd's or Brent's cycle detection algorithms be better here than the allocation of a new set? I believe they might also eliminate the need to fast-path the first 100 or however many. As in: https://en.wikipedia.org/wiki/Cycle_detection ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 18:29:17 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 22 May 2020 22:29:17 +0000 Subject: [issue39631] Fix file association MIME type on Windows In-Reply-To: <1581670182.52.0.370257427786.issue39631@roundup.psfhosted.org> Message-ID: <1590186557.4.0.13440368942.issue39631@roundup.psfhosted.org> miss-islington added the comment: New changeset 1e5cf949ce36b6fe45db0e5e4a26c856c3b44278 by Miss Islington (bot) in branch '3.9': [3.9] bpo-39631: Adds NEWS entry (GH-20227) (GH-20241) https://github.com/python/cpython/commit/1e5cf949ce36b6fe45db0e5e4a26c856c3b44278 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 18:32:03 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 22 May 2020 22:32:03 +0000 Subject: [issue40663] Wrong generated annotation on subscripting In-Reply-To: <1589736999.01.0.252396126207.issue40663@roundup.psfhosted.org> Message-ID: <1590186723.83.0.626556550479.issue40663@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +19593 pull_request: https://github.com/python/cpython/pull/20324 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 18:32:44 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 22 May 2020 22:32:44 +0000 Subject: [issue40663] Wrong generated annotation on subscripting In-Reply-To: <1589736999.01.0.252396126207.issue40663@roundup.psfhosted.org> Message-ID: <1590186764.18.0.830756918473.issue40663@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset a4d219b35e35f9efc406cd70f2812275bcd989fe by Batuhan Taskaya in branch '3.8': [3.8] bpo-40663: Correctly handle annotations with subscripts in ast_unparse.c (GH-20156). (GH-20191) https://github.com/python/cpython/commit/a4d219b35e35f9efc406cd70f2812275bcd989fe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 18:32:37 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 22 May 2020 22:32:37 +0000 Subject: [issue40663] Wrong generated annotation on subscripting In-Reply-To: <1589736999.01.0.252396126207.issue40663@roundup.psfhosted.org> Message-ID: <1590186757.97.0.960441044405.issue40663@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 43300148c5f30317ebf767aa8853a957ee5c87fb by Batuhan Taskaya in branch '3.7': [3.7] bpo-40663: Correctly handle annotations with subscripts in ast_unparse.c (GH-20156). (GH-20192) https://github.com/python/cpython/commit/43300148c5f30317ebf767aa8853a957ee5c87fb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 18:37:43 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 22 May 2020 22:37:43 +0000 Subject: [issue40663] Wrong generated annotation on subscripting In-Reply-To: <1589736999.01.0.252396126207.issue40663@roundup.psfhosted.org> Message-ID: <1590187063.08.0.656201216253.issue40663@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 Fri May 22 19:04:40 2020 From: report at bugs.python.org (William Pickard) Date: Fri, 22 May 2020 23:04:40 +0000 Subject: [issue25095] test_httpservers hangs since Python 3.5 In-Reply-To: <1442202993.28.0.395084299366.issue25095@psf.upfronthosting.co.za> Message-ID: <1590188680.35.0.921788877771.issue25095@roundup.psfhosted.org> William Pickard added the comment: I'll get to it Saturday. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 19:13:41 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 22 May 2020 23:13:41 +0000 Subject: [issue38938] Possible performance improvement for heaqq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1590189221.02.0.0696529799047.issue38938@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks. I'll look at this shortly. We're getting much closer. Just so that I don't lose other work I've done, am uploading new_merge2.py with in-line iterative tree construction of the initial tree. ---------- Added file: https://bugs.python.org/file49184/new_merge2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 19:15:10 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 22 May 2020 23:15:10 +0000 Subject: [issue40327] list(sys.modules.items()) can throw RuntimeError: dictionary changed size during iteration In-Reply-To: <1587284646.11.0.468516211586.issue40327@roundup.psfhosted.org> Message-ID: <1590189310.07.0.897238329331.issue40327@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 19:29:32 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 22 May 2020 23:29:32 +0000 Subject: [issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type In-Reply-To: <1586276621.78.0.843757244355.issue40217@roundup.psfhosted.org> Message-ID: <1590190172.51.0.171723564601.issue40217@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I have been playing with the reproducer and I am a bit confused: The reproducer crashes in the same way even after reverting PR 19414 so it does not seem related to it. This is what I get: >>> import reproducer >>> reproducer.Modules/gcmodule.c:114: gc_decref: Assertion "gc_get_refs(g) > 0" failed: refcount is too small Enable tracemalloc to get the memory block allocation traceback object address : 0x55cf429e4080 object refcount : 4 object type : 0x55cf418e9c60 object type name: type object repr : Fatal Python error: _PyObject_AssertFailed: _PyObject_AssertFailed Python runtime state: initialized Current thread 0x00007fc65d2f8740 (most recent call first): File "", line 917 in _find_spec File "", line 982 in _find_and_load_unlocked File "", line 1007 in _find_and_load File "/home/pablogsal/github/python/master/Lib/re.py", line 124 in File "", line 228 in _call_with_frames_removed File "", line 790 in exec_module File "", line 680 in _load_unlocked File "", line 986 in _find_and_load_unlocked File "", line 1007 in _find_and_load File "/home/pablogsal/github/python/master/Lib/rlcompleter.py", line 142 in attr_matches File "/home/pablogsal/github/python/master/Lib/rlcompleter.py", line 89 in complete [1] 162397 abort (core dumped) ./python This seems to indicate that that reproducer is already implementing incorrectly tp_traverse. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 19:57:26 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 22 May 2020 23:57:26 +0000 Subject: [issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type In-Reply-To: <1586276621.78.0.843757244355.issue40217@roundup.psfhosted.org> Message-ID: <1590191846.94.0.41720706871.issue40217@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Ok, I found the problem. The problem is that the reproduced does not correctly work the reference count of base_class because when construction get tuple of bases: PyObject *bases = PyTuple_New(1); result = PyTuple_SetItem(bases, 0, base_class); if (result) return -1; PyObject *subclass = PyType_FromModuleAndSpec(m, &subclass_spec, bases); "PyTuple_SetItem" steals a reference to base_class but "PyModule_AddObject" also does the same, and the refcount is incorrect. If you add a Py_INCREF before, the crash disappears. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 20:03:55 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 23 May 2020 00:03:55 +0000 Subject: [issue37129] Add os.RWF_APPEND flag for os.pwritev In-Reply-To: <1559933925.78.0.510794410466.issue37129@roundup.psfhosted.org> Message-ID: <1590192235.08.0.413489315599.issue37129@roundup.psfhosted.org> Cheryl Sabella added the comment: The PR for this issue has been closed, but the issue is now open for someone else to make a PR for it. Please credit the original author in the new PR. ---------- keywords: -patch nosy: +cheryl.sabella stage: patch review -> needs patch versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 20:13:06 2020 From: report at bugs.python.org (Irv Kalb) Date: Sat, 23 May 2020 00:13:06 +0000 Subject: [issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched In-Reply-To: <1575141041.2.0.751349559914.issue38946@roundup.psfhosted.org> Message-ID: <1590192786.17.0.718530682808.issue38946@roundup.psfhosted.org> Irv Kalb added the comment: Thanks Ned and Terry for your responses. Ned: I am currently teaching a course where my students and I are all using Python 3.7 and the current Pygame 1.9.6, so unfortunately, I cannot update to the newer development release of 2.0. I am also writing a book on OOP using Pygame, and that is currently dependent on the same Pygame release. Terry: I tried following your steps. I opened the appropriate file (idlelib.filelist), and added the line at the appropriate place. But when I go to save, I get a message: [Errno 13] Permission denied: 'Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/idlelib/filelist.py' So I cannot save the file. I tried opening the same file a simple text editor, BBEdit, and made the same change. When I went to save I got a message: Are you sure you want to unlock filelist.py? You aren't a member of the group 'wheel'. Cancel Unlock I chose Unlock, saved and quit. The Finder shows a new date for the file. But when I double clicked on my Python 3.7 icon, or if I double click on any Python file, IDLE no longer opens. I went back into BBEdit, removed the new line, saved again. Now I can open IDLE as before. I don't have a good feel for what files I am supposed to be "allowed" to edit, so I don't know what to try next. If you have any suggestions about how I can add your debugging line successfully, I'm happy to help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 20:14:27 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 23 May 2020 00:14:27 +0000 Subject: [issue35707] time.sleep() should support objects with __float__ In-Reply-To: <1547135919.8.0.0876776516097.issue35707@roundup.psfhosted.org> Message-ID: <1590192867.21.0.619155339253.issue35707@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- nosy: +belopolsky, p-ganssle versions: +Python 3.10 -Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 20:22:09 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 23 May 2020 00:22:09 +0000 Subject: [issue38693] Use f-strings instead of str.format within importlib In-Reply-To: <1572934817.34.0.695862725726.issue38693@roundup.psfhosted.org> Message-ID: <1590193329.47.0.386718565081.issue38693@roundup.psfhosted.org> Cheryl Sabella added the comment: Did you want this one to land in 3.9? ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 20:28:30 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 23 May 2020 00:28:30 +0000 Subject: [issue26415] Excessive peak memory consumption by the Python parser In-Reply-To: <1456182380.09.0.81920177296.issue26415@psf.upfronthosting.co.za> Message-ID: <1590193710.63.0.140726206369.issue26415@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Closing as we have a new parser in 3.9 and the current one will be removed in Python 3.10. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 20:29:41 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Sat, 23 May 2020 00:29:41 +0000 Subject: [issue40552] Enhance for loop and copy example in tutorial In-Reply-To: <1588884503.92.0.729674513869.issue40552@roundup.psfhosted.org> Message-ID: <1590193781.14.0.730948564162.issue40552@roundup.psfhosted.org> Joannah Nanjekye added the comment: New changeset 6fad3e6b49f6a9f8b8a6635c41371e4451479f86 by Antoine in branch 'master': bpo-40552 Add 'users' variable in code sample (tutorial 4.2). (GH-19992) https://github.com/python/cpython/commit/6fad3e6b49f6a9f8b8a6635c41371e4451479f86 ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 20:30:39 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 23 May 2020 00:30:39 +0000 Subject: [issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type In-Reply-To: <1586276621.78.0.843757244355.issue40217@roundup.psfhosted.org> Message-ID: <1590193839.6.0.0356390217678.issue40217@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > If you add a Py_INCREF before, the crash disappears. To be clear: the other crash is still in the reproduced: the one that Petr describes in his comment. In PR 20264 I have prepared the changes that I proposed previously (including the revert of the hack). Petr, do you mind reviewing it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 20:32:10 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 23 May 2020 00:32:10 +0000 Subject: [issue32398] OSX C++ linking workaround in distutils breaks other packages In-Reply-To: <1513876979.22.0.213398074469.issue32398@psf.upfronthosting.co.za> Message-ID: <1590193930.05.0.015909824593.issue32398@roundup.psfhosted.org> Cheryl Sabella added the comment: I'm going to close this as the OP hasn't responded in over 2 years and Ronald was -1 on the solution. If the OP or someone else experiences this same problem, either this issue or a new one can be opened to address it. Thank you! ---------- nosy: +cheryl.sabella resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 20:34:08 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Sat, 23 May 2020 00:34:08 +0000 Subject: [issue40552] Enhance for loop and copy example in tutorial In-Reply-To: <1588884503.92.0.729674513869.issue40552@roundup.psfhosted.org> Message-ID: <1590194048.96.0.730103045521.issue40552@roundup.psfhosted.org> Joannah Nanjekye added the comment: Thanks for the PR Antoine Wecxsteen. I will close this. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 20:43:35 2020 From: report at bugs.python.org (Ned Deily) Date: Sat, 23 May 2020 00:43:35 +0000 Subject: [issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched In-Reply-To: <1575141041.2.0.751349559914.issue38946@roundup.psfhosted.org> Message-ID: <1590194615.15.0.250776506413.issue38946@roundup.psfhosted.org> Ned Deily added the comment: Irv, thanks for the feedback and the attempt. I think we had a little bit of a misunderstanding on our end so I don't think we need you to try anything more for this problem. Terry, I apologize if I left the impression that there was some doubt about whether the double-clicking failure was due to a problem in IDLE. This is almost certainly a Tk issue but ultimately we need to be able to address the problem for python.org macOS installers. That's what I am working on right at the moment. I should have something for you and Tal to look at soon and we can proceed from there. Thanks! ---------- priority: normal -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 21:12:14 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 23 May 2020 01:12:14 +0000 Subject: [issue40439] Error in an external reference In-Reply-To: <1588175008.34.0.523121738721.issue40439@roundup.psfhosted.org> Message-ID: <1590196334.47.0.484338847249.issue40439@roundup.psfhosted.org> miss-islington added the comment: New changeset af23f0d3cf19343512e6ca1fe1d46a5dbe425719 by Matteo Bertucci in branch 'master': bpo-40439: Update broken link in lexical analysis docs (GH-20184) https://github.com/python/cpython/commit/af23f0d3cf19343512e6ca1fe1d46a5dbe425719 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 21:12:29 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 23 May 2020 01:12:29 +0000 Subject: [issue40439] Error in an external reference In-Reply-To: <1588175008.34.0.523121738721.issue40439@roundup.psfhosted.org> Message-ID: <1590196349.26.0.277982375957.issue40439@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19594 pull_request: https://github.com/python/cpython/pull/20326 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 21:12:46 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 23 May 2020 01:12:46 +0000 Subject: [issue40439] Error in an external reference In-Reply-To: <1588175008.34.0.523121738721.issue40439@roundup.psfhosted.org> Message-ID: <1590196366.22.0.773289844399.issue40439@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19596 pull_request: https://github.com/python/cpython/pull/20328 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 21:12:37 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 23 May 2020 01:12:37 +0000 Subject: [issue40439] Error in an external reference In-Reply-To: <1588175008.34.0.523121738721.issue40439@roundup.psfhosted.org> Message-ID: <1590196357.06.0.127907225692.issue40439@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19595 pull_request: https://github.com/python/cpython/pull/20327 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 21:14:20 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 May 2020 01:14:20 +0000 Subject: [issue40733] Make IDLE doc more visible, mention in main python docs page In-Reply-To: <1590179262.31.0.599943692588.issue40733@roundup.psfhosted.org> Message-ID: <1590196460.09.0.773484435359.issue40733@roundup.psfhosted.org> Terry J. Reedy added the comment: I agree that finding the online doc is slight pain. It is not listed in the Modules index because idlelib, not IDLE, is the stdlib module, and does not have a doc page. I may add one or, if possible, make the page serve as one, as part of this issue. 'IDLE' *is* in the Index, and the first link is the correct one. I don't control and would not unilaterally change the main page. I am hesitant because I expect that there are people who would think it unfair or deceptive to especially promote IDLE this way versus other stdlib packages and non-stdlib IDEs and editors. I might subscribe to and post on python-ideas to see what other users think. Help => IDLE Help displays an offline copy of idle.html as of the release date in a tktinker text window. Have you noticed that? Would "IDLE doc" be clearer? I could also add label with the online url and date above the text. [https://docs.python.org/3.x/library/idle.html as of ] ---------- nosy: +taleinat stage: -> needs patch title: mention IDLE in main python docs page -> Make IDLE doc more visible, mention in main python docs page versions: +Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 21:15:55 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 23 May 2020 01:15:55 +0000 Subject: [issue40439] Error in an external reference In-Reply-To: <1588175008.34.0.523121738721.issue40439@roundup.psfhosted.org> Message-ID: <1590196555.66.0.806499499147.issue40439@roundup.psfhosted.org> Cheryl Sabella added the comment: @audpa31, thank you for the report and @Akarys, thank you for the pull request. ---------- nosy: +cheryl.sabella resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 21:17:51 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 23 May 2020 01:17:51 +0000 Subject: [issue40439] Error in an external reference In-Reply-To: <1588175008.34.0.523121738721.issue40439@roundup.psfhosted.org> Message-ID: <1590196671.75.0.560450562458.issue40439@roundup.psfhosted.org> miss-islington added the comment: New changeset 0af9bef61afffbf128aba76a2e578059621b4f00 by Miss Islington (bot) in branch '3.7': bpo-40439: Update broken link in lexical analysis docs (GH-20184) https://github.com/python/cpython/commit/0af9bef61afffbf128aba76a2e578059621b4f00 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 21:19:16 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 23 May 2020 01:19:16 +0000 Subject: [issue40439] Error in an external reference In-Reply-To: <1588175008.34.0.523121738721.issue40439@roundup.psfhosted.org> Message-ID: <1590196756.55.0.387792255092.issue40439@roundup.psfhosted.org> miss-islington added the comment: New changeset 962c814ca77fb1873908f2daeda59c2637ad3bf1 by Miss Islington (bot) in branch '3.9': bpo-40439: Update broken link in lexical analysis docs (GH-20184) https://github.com/python/cpython/commit/962c814ca77fb1873908f2daeda59c2637ad3bf1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 21:20:05 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 23 May 2020 01:20:05 +0000 Subject: [issue40439] Error in an external reference In-Reply-To: <1588175008.34.0.523121738721.issue40439@roundup.psfhosted.org> Message-ID: <1590196805.33.0.122540243322.issue40439@roundup.psfhosted.org> miss-islington added the comment: New changeset dc3239177ff26cb6a12e437a1f507be730fe8ba7 by Miss Islington (bot) in branch '3.8': bpo-40439: Update broken link in lexical analysis docs (GH-20184) https://github.com/python/cpython/commit/dc3239177ff26cb6a12e437a1f507be730fe8ba7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 21:59:11 2020 From: report at bugs.python.org (Stan Hendryx) Date: Sat, 23 May 2020 01:59:11 +0000 Subject: [issue40738] backspace character \b not processed by IDLE Message-ID: <1590199151.54.0.454885247619.issue40738@roundup.psfhosted.org> New submission from Stan Hendryx : The backspace character \b is not processed correctly in IDLE 3.8.2: >>> print("deleted\b file") deleted file Running the interpreter from Terminal, it works: >>> print("deleted\b file") delete file Same result on two systems: MacBook Pro, one on OSX 10.14.6 and another on 10.13.6. ---------- assignee: terry.reedy components: IDLE messages: 369685 nosy: stanhx, terry.reedy priority: normal severity: normal status: open title: backspace character \b not processed by IDLE type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 22:17:51 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 May 2020 02:17:51 +0000 Subject: [issue40708] Clearing the screen of IDLE interactive mode in Windows In-Reply-To: <1590049153.19.0.498279112117.issue40708@roundup.psfhosted.org> Message-ID: <1590200271.91.0.724349896038.issue40708@roundup.psfhosted.org> Terry J. Reedy added the comment: See #23220 for backspace and return behavior. ---------- versions: +Python 3.10 -Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 22:18:35 2020 From: report at bugs.python.org (Chas Belov) Date: Sat, 23 May 2020 02:18:35 +0000 Subject: [issue40640] Tutorial for Continue missing ... line In-Reply-To: <1589608941.53.0.91951505263.issue40640@roundup.psfhosted.org> Message-ID: <1590200315.1.0.436302139745.issue40640@roundup.psfhosted.org> Chas Belov added the comment: Um, Python newcomer here. What's a PR? Pull request? I'm happy to do it if you can point me to the how-to. I know my way around git, and not around Python community standards. You are also welcome to go ahead and make the change; thank you for asking. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 22:22:08 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 May 2020 02:22:08 +0000 Subject: [issue40710] IDLE: Malfunctioning of '\r' In-Reply-To: <1590054301.73.0.843640972851.issue40710@roundup.psfhosted.org> Message-ID: <1590200528.93.0.743895338222.issue40710@roundup.psfhosted.org> Terry J. Reedy added the comment: Note that 'sciencecomputer' is a different possible result if \r does not switch the simulated terminal from the normal insert mode to overwrite mode. I am considering terminal simulation as an option in IDLE, but there is not exactly a standard to emulate. ---------- resolution: not a bug -> duplicate superseder: -> IDLE: Document how Shell displays user code output title: Malfunctioning of '\r' (ii) -> IDLE: Malfunctioning of '\r' versions: +Python 3.10 -Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 22:29:24 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 May 2020 02:29:24 +0000 Subject: [issue40738] backspace character \b not processed by IDLE In-Reply-To: <1590199151.54.0.454885247619.issue40738@roundup.psfhosted.org> Message-ID: <1590200964.68.0.124795258512.issue40738@roundup.psfhosted.org> Terry J. Reedy added the comment: I am considering terminal simulation as an option, but there is not exactly a standard to emulate. \b originally meant the same as the typewrite backspace and modern US computer keyboard left arrow key <- (move cursor left without erasing), which would result in 'delete filed' in insert mode, but sometimes now is interpreted the same as modern US computer keyboard backspace (erase and move left), as you expect. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> IDLE: Document how Shell displays user code output _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 22:53:03 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 May 2020 02:53:03 +0000 Subject: [issue37129] Add os.RWF_APPEND flag for os.pwritev In-Reply-To: <1559933925.78.0.510794410466.issue37129@roundup.psfhosted.org> Message-ID: <1590202383.62.0.44248963892.issue37129@roundup.psfhosted.org> Terry J. Reedy added the comment: YoSTEALTH, are you both allowed and willing to do so? The patch is not completely trivial and you seem to have the needed knowledge. (I don't.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 22 22:53:14 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 May 2020 02:53:14 +0000 Subject: [issue37129] Add os.RWF_APPEND flag for os.pwritev In-Reply-To: <1559933925.78.0.510794410466.issue37129@roundup.psfhosted.org> Message-ID: <1590202394.36.0.25960733782.issue37129@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 00:06:44 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 23 May 2020 04:06:44 +0000 Subject: [issue23188] Provide a C helper function to chain raised (but not yet caught) exceptions In-Reply-To: <1420687041.12.0.12728944273.issue23188@psf.upfronthosting.co.za> Message-ID: <1590206804.33.0.708229677352.issue23188@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- keywords: +patch pull_requests: +19597 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20329 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 00:08:02 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 23 May 2020 04:08:02 +0000 Subject: [issue23188] Provide a C helper function to chain raised (but not yet caught) exceptions In-Reply-To: <1420687041.12.0.12728944273.issue23188@psf.upfronthosting.co.za> Message-ID: <1590206882.8.0.345268420512.issue23188@roundup.psfhosted.org> Chris Jerdonek added the comment: > The documentation of PyErr_SetObject, PyErr_SetString et al should also be updated to mention exception chaining. I just posted a PR to do the above: https://github.com/python/cpython/pull/20329 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 00:11:14 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 May 2020 04:11:14 +0000 Subject: [issue40648] File mode is not tested on Windows In-Reply-To: <1589644046.09.0.00935722474106.issue40648@roundup.psfhosted.org> Message-ID: <1590207074.45.0.345029026185.issue40648@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 00:11:36 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 May 2020 04:11:36 +0000 Subject: [issue40648] Test file mode on Windows In-Reply-To: <1589644046.09.0.00935722474106.issue40648@roundup.psfhosted.org> Message-ID: <1590207096.85.0.0471802102253.issue40648@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- title: File mode is not tested on Windows -> Test file mode on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 01:50:36 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Sat, 23 May 2020 05:50:36 +0000 Subject: [issue40640] Tutorial for Continue missing ... line In-Reply-To: <1589608941.53.0.91951505263.issue40640@roundup.psfhosted.org> Message-ID: <1590213036.63.0.757076359756.issue40640@roundup.psfhosted.org> Florian Dahlitz added the comment: Please go head @docorbit at sonic.net! It's a good one to get familiar with the process of contributing. Yes, PR stands for Pull Request. There is the devguide (https://devguide.python.org/), which documents how to contribute. In fact, the quick guide may be sufficient. Feel free to ask any further questions, I'm eager to help! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 02:02:33 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 May 2020 06:02:33 +0000 Subject: [issue40670] supplying an empty string to timeit causes an IndentationError In-Reply-To: <1589805861.06.0.616610250992.issue40670@roundup.psfhosted.org> Message-ID: <1590213753.11.0.599312054362.issue40670@roundup.psfhosted.org> Terry J. Reedy added the comment: Let a wcs be a string consisting of only whitespace and comments. compile(wcs, '', 'exec') treats wcs the same as 'pass'. Hence, a file with only whitespace and comments is the same as 'pass'. compile(wcs, '', 'single'), for whatever reason, raises SyntaxError: unexpected EOF while parsing To get around this, a wcs input into IDLE's Shell, compiles with 'single', is replaced with 'pass' in codeop._maybe_compile, line 76. I presume the REPL does the same. If one thinks of parameter stmt as a top-level statement (or statements), it is reasonable to expect '' to be the same as 'pass'. If one knows that stmt will be embedded into a compound statement (whether 'while', 'for' or 'def' does not matter here) for repeated execution, then 'pass' is more obviously the minimal statement. It would have been better if the parameter name were 'suite', as suites can never be only whitespace. We cannot change this, but I suggest replacing The constructor takes a statement to be timed, an additional statement used for setup, and a timer function. Both statements default to 'pass'; the timer function is platform-dependent (see the module doc string). stmt and setup may also contain multiple statements separated by ; or newlines, as long as they don?t contain multi-line string literals. with the shorter, clearer, and updated The constructor takes suite of statement to be timed, an additional suite used for setup, and a timer function (default time.perf_counter). Both suites default to 'pass' and may not contain multi-line string literals. Since 3.3, the default timer is platform-independent, at least from a user viewpoint, and not mentioned in timeit.__doc__. Suites can always have multiple statments separated by ; and \n. The only needed qualification is the default and the restriction. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 02:19:47 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 23 May 2020 06:19:47 +0000 Subject: [issue39343] Travis CI: documentation job fails in library/nntplib.rst with random network issue on news.gmane.io In-Reply-To: <1579083774.85.0.947952738007.issue39343@roundup.psfhosted.org> Message-ID: <1590214787.91.0.954275158342.issue39343@roundup.psfhosted.org> Chris Jerdonek added the comment: Reopening as this is happening again -- twice for me: https://github.com/python/cpython/pull/20329/checks?check_run_id=701405252#step:7:117 ---------- nosy: +chris.jerdonek resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 03:18:33 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 May 2020 07:18:33 +0000 Subject: [issue40646] Builtins in doc show signature in documentation In-Reply-To: <1589642800.95.0.83659669973.issue40646@roundup.psfhosted.org> Message-ID: <1590218313.55.0.283526273826.issue40646@roundup.psfhosted.org> Terry J. Reedy added the comment: I would probably prefer the table without the '()'s. (I would have to see to be sure.) However, the entries in the source .rst are all tagged with ':func:', as in ":func:`abs`", and that tag both adds "()" and makes the entries click-linked to the entries (which are tagged "function:: abs(x)", etc). This is the standard used in the doc and whatever I might prefer, I will not propose adding a variant tag just for the table. ---------- nosy: +terry.reedy resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 03:19:59 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 May 2020 07:19:59 +0000 Subject: [issue40678] Full list of Python lexical rules In-Reply-To: <1589868354.8.0.399926907796.issue40678@roundup.psfhosted.org> Message-ID: <1590218399.33.0.591431325033.issue40678@roundup.psfhosted.org> Terry J. Reedy added the comment: First note that 3.8.3 grammar.html is stated to be the actual grammar used by the old parser, and is a bit different from the more human readable grammar given in the reference manual. It is a bit different in 3.9 and I expect will be much more different in 3.10 with the new PEG parser. In the grammar, the CAPITALIZED_NAMES are token names returned by the tokenizer/lexer. This is a standard convention. I am pretty sure that the human readable lexing rules in lexical_analysis are not what the lexer uses. I presume the latter uses barely readable RE expressions, as does the tokenize module. Compare the float grammar in https://docs.python.org/3/reference/lexical_analysis.html#floating-point-literals to the float REs in tokenize.py. def group(*choices): return '(' + '|'.join(choices) + ')' def maybe(*choices): return group(*choices) + '?' # The above are reused for multiple REs. Exponent = r'[eE][-+]?[0-9](?:_?[0-9])*' Pointfloat = group(r'[0-9](?:_?[0-9])*\.(?:[0-9](?:_?[0-9])*)?', r'\.[0-9](?:_?[0-9])*') + maybe(Exponent) Expfloat = r'[0-9](?:_?[0-9])*' + Exponent Floatnumber = group(Pointfloat, Expfloat) Note that this is (python) code, not a text specification. You or someone else can look at what the C lexer does. But I think that the proposal should be rejected. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 03:27:48 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 May 2020 07:27:48 +0000 Subject: [issue40678] Full list of Python lexical rules In-Reply-To: <1589868354.8.0.399926907796.issue40678@roundup.psfhosted.org> Message-ID: <1590218868.38.0.148940166163.issue40678@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 03:28:07 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 May 2020 07:28:07 +0000 Subject: [issue40670] supplying an empty string to timeit causes an IndentationError In-Reply-To: <1589805861.06.0.616610250992.issue40670@roundup.psfhosted.org> Message-ID: <1590218887.54.0.943331220154.issue40670@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 03:29:16 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 May 2020 07:29:16 +0000 Subject: [issue40701] tempfile mixes str and bytes in an inconsistent manner In-Reply-To: <1590002424.23.0.821521735552.issue40701@roundup.psfhosted.org> Message-ID: <1590218956.05.0.995252071635.issue40701@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 03:30:59 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 May 2020 07:30:59 +0000 Subject: [issue40707] Popen.communicate documentation does not say how to get the return code In-Reply-To: <1590046450.27.0.873343730184.issue40707@roundup.psfhosted.org> Message-ID: <1590219059.29.0.185020082962.issue40707@roundup.psfhosted.org> Terry J. Reedy added the comment: This is not a security issue. ---------- nosy: +terry.reedy versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 03:38:11 2020 From: report at bugs.python.org (Eric L.) Date: Sat, 23 May 2020 07:38:11 +0000 Subject: [issue40701] tempfile mixes str and bytes in an inconsistent manner In-Reply-To: <1590002424.23.0.821521735552.issue40701@roundup.psfhosted.org> Message-ID: <1590219491.07.0.288583047971.issue40701@roundup.psfhosted.org> Eric L. added the comment: Sorry, I uploaded by mistake an early version of the patch. The new one is the one I had actually tested (the old one would fail with mixing bytes and string under certain circumstances, I can't remember any more). ---------- Added file: https://bugs.python.org/file49185/tempfile_py_2020-05-23.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 03:41:27 2020 From: report at bugs.python.org (Frederik Rietdijk) Date: Sat, 23 May 2020 07:41:27 +0000 Subject: [issue40739] find_library broken for binutils >= 2.32 / 2.34 Message-ID: <1590219687.71.0.404083343675.issue40739@roundup.psfhosted.org> New submission from Frederik Rietdijk : With binutils 2.34 Python 3 (any version) the following returns None python3 -c 'import ctypes.util; print((ctypes.util.find_library("c")))' instead of the requested library which we think may be caused by https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=727a29badd95a68d08b86fec0b98702ce756c660 which is included in binutils 2.32 and up. With binutils at 2.31 we got # recent unstable $ nix-shell --pure -p hello --run 'ld -t -o /dev/null -lc' /nix/store/a57856fs4m8ir6vlv14h3gq3sv9aq2lb-binutils-2.31.1/bin/ld: mode elf_x86_64 /nix/store/nwsn18fysga1n5s0bj4jp4wfwvlbx8b1-glibc-2.30/lib/libc.so.6 /nix/store/nwsn18fysga1n5s0bj4jp4wfwvlbx8b1-glibc-2.30/lib/ld-linux-x86-64.so.2 /nix/store/nwsn18fysga1n5s0bj4jp4wfwvlbx8b1-glibc-2.30/lib/ld-linux-x86-64.so.2 /nix/store/a57856fs4m8ir6vlv14h3gq3sv9aq2lb-binutils-2.31.1/bin/ld: warning: cannot find entry symbol _start; not setting start address however with 2.34 we get # current staging $ nix-shell --pure -p hello --run 'ld -t -o /dev/null -lc' /nix/store/j1l6ds4mhm97nqw965w9sg07i9fric4d-glibc-2.30/lib/libc.so /nix/store/j1l6ds4mhm97nqw965w9sg07i9fric4d-glibc-2.30/lib/libc.so.6 /nix/store/j1l6ds4mhm97nqw965w9sg07i9fric4d-glibc-2.30/lib/libc_nonshared.a /nix/store/j1l6ds4mhm97nqw965w9sg07i9fric4d-glibc-2.30/lib/ld-linux-x86-64.so.2 /nix/store/j1l6ds4mhm97nqw965w9sg07i9fric4d-glibc-2.30/lib/libc_nonshared.a /nix/store/j1l6ds4mhm97nqw965w9sg07i9fric4d-glibc-2.30/lib/ld-linux-x86-64.so.2 /nix/store/j284mk8hdv9ccxfdlhcdk1lg2jml4fhk-binutils-2.34/bin/ld: warning: cannot find entry symbol _start; not setting start address The text-file libc.so is present which find_library cannot handle. I suppose the regex needs to be fixed to exclude these references or otherwise handle them. It may be a bit late for binutils to revert their change. Note this issue was discovered with the CFFI test suite https://foss.heptapod.net/pypy/cffi/blob/2aa5775ffdd6a911e9f40e3c2f5ba766155349c5/c/test_c.py#L60 Nixpkgs issue: https://github.com/NixOS/nixpkgs/pull/86954#issuecomment-632985576 ---------- components: ctypes messages: 369699 nosy: Frederik Rietdijk priority: normal severity: normal status: open title: find_library broken for binutils >= 2.32 / 2.34 type: behavior versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 03:45:08 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 May 2020 07:45:08 +0000 Subject: [issue40707] Popen.communicate documentation does not say how to get the return code In-Reply-To: <1590046450.27.0.873343730184.issue40707@roundup.psfhosted.org> Message-ID: <1590219908.95.0.647186640655.issue40707@roundup.psfhosted.org> Terry J. Reedy added the comment: Can you attach a script or post an interactive session, with both success and failure, showing that returncode is set appropriately after reading output? Possible calls: '''python -c "print('Success')"''', "raise Exception('Failure')". Or point to a test in test_subprocess. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 03:48:22 2020 From: report at bugs.python.org (Frederik Rietdijk) Date: Sat, 23 May 2020 07:48:22 +0000 Subject: [issue40739] find_library broken for binutils >= 2.32 / 2.34 In-Reply-To: <1590219687.71.0.404083343675.issue40739@roundup.psfhosted.org> Message-ID: <1590220102.19.0.197505067156.issue40739@roundup.psfhosted.org> Frederik Rietdijk added the comment: I suppose this issue was not found yet because a) regression testing is done with ubuntu 18.04 LTS which uses binutils 2.30 and b) it, along with most distro's, will use ldconfig, which we in Nixpkgs have patched out. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 04:23:19 2020 From: report at bugs.python.org (Gareth Rees) Date: Sat, 23 May 2020 08:23:19 +0000 Subject: [issue40707] Popen.communicate documentation does not say how to get the return code In-Reply-To: <1590046450.27.0.873343730184.issue40707@roundup.psfhosted.org> Message-ID: <1590222199.75.0.871505352125.issue40707@roundup.psfhosted.org> Gareth Rees added the comment: The following test cases in test_subprocess.py call the communicate() method and then immediately assert that returncode attribute has the expected value: * test_stdout_none * test_stderr_redirect_with_no_stdout_redirect * test_stdout_filedes_of_stdout * test_communicate_stdin * test_universal_newlines_communicate_stdin * test_universal_newlines_communicate_input_none * test_universal_newlines_communicate_stdin_stdout_stderr * test_nonexisting_with_pipes * test_wait_when_sigchild_ignored * test_startupinfo_copy * test_close_fds_with_stdio * test_communicate_stdin You'll see that some of these test for success (returncode == 0) and some for failure (returncode == 1). This seems like adequate test coverage to me, but if something is missing, let me know. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 04:31:44 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 May 2020 08:31:44 +0000 Subject: [issue40722] test_ttk_guionly times out on Ubuntu CI In-Reply-To: <1590101382.1.0.392017281749.issue40722@roundup.psfhosted.org> Message-ID: <1590222704.81.0.605931934101.issue40722@roundup.psfhosted.org> Terry J. Reedy added the comment: By 'intermittantly', do you mean the one time on PR-20236 (and then not on your retest) or multiple times on various PRs and buildbots? Serhiy, could the issue be that tk is waiting for an event that has already happened? ---------- nosy: +serhiy.storchaka, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 04:33:11 2020 From: report at bugs.python.org (Chas Belov) Date: Sat, 23 May 2020 08:33:11 +0000 Subject: [issue40640] Tutorial for Continue missing ... line In-Reply-To: <1589608941.53.0.91951505263.issue40640@roundup.psfhosted.org> Message-ID: <1590222791.53.0.90352222737.issue40640@roundup.psfhosted.org> Chas Belov added the comment: @DahlitzFlorian: I'm happy do to the PR provided I don't actually have to build Python to work on a documentation change. If it does require building Python then please go ahead. That said, I've looked at the Doc/tutorial/controlflow.rst and it appears to be a plain text file. I believe that I would have a PR up by May 26, 2020. Is the best practice to check out the 3.10 branch then add backport tags for the other versions to the PR? That wasn't clear to me from the docs you referred me to. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 04:47:31 2020 From: report at bugs.python.org (Ram Rachum) Date: Sat, 23 May 2020 08:47:31 +0000 Subject: [issue40678] Full list of Python lexical rules In-Reply-To: <1589868354.8.0.399926907796.issue40678@roundup.psfhosted.org> Message-ID: <1590223650.99.0.484400630643.issue40678@roundup.psfhosted.org> Ram Rachum added the comment: Hmm, I feel this isn't right, because I still feel like there should be one place where one can see the full Python syntax specification, lexing and parsing and all. But I'm underqualified to argue because I don't understand the details. Is someone more knowledgeable interested in arguing this point? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 05:02:57 2020 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 23 May 2020 09:02:57 +0000 Subject: [issue40722] test_ttk_guionly times out on Ubuntu CI In-Reply-To: <1590101382.1.0.392017281749.issue40722@roundup.psfhosted.org> Message-ID: <1590224577.07.0.425568995666.issue40722@roundup.psfhosted.org> Zackery Spytz added the comment: See also bpo-30756. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 05:11:53 2020 From: report at bugs.python.org (honglei jiang) Date: Sat, 23 May 2020 09:11:53 +0000 Subject: [issue40740] Missing api-ms-win-core-path-l1-1.0.dll for python-3.9.0b1-amd64.exe Under Win7 Message-ID: <1590225113.89.0.949676590632.issue40740@roundup.psfhosted.org> New submission from honglei jiang : Python.exe cannot run for missing api-ms-win-core-path-l1-1.0.dll , api-ms-win-core-path-l1-1-0.dll is for only Windows 8? https://github.com/microsoft/CNTK/issues/224 ---------- components: Windows messages: 369707 nosy: honglei.jiang, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Missing api-ms-win-core-path-l1-1.0.dll for python-3.9.0b1-amd64.exe Under Win7 type: crash versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 05:59:14 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 23 May 2020 09:59:14 +0000 Subject: [issue34556] Add --upgrade-deps to venv module In-Reply-To: <1535729151.14.0.56676864532.issue34556@psf.upfronthosting.co.za> Message-ID: <1590227954.54.0.0672463700421.issue34556@roundup.psfhosted.org> miss-islington added the comment: New changeset 1cba1c9abadf76f458ecf883a48515aa3b534dbd by Shantanu in branch 'master': bpo-34556: Document addition of upgrade_deps to venv.create (GH-20135) https://github.com/python/cpython/commit/1cba1c9abadf76f458ecf883a48515aa3b534dbd ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 06:00:52 2020 From: report at bugs.python.org (Ama Aje My Fren) Date: Sat, 23 May 2020 10:00:52 +0000 Subject: [issue40733] Make IDLE doc more visible, mention in main python docs page In-Reply-To: <1590196460.09.0.773484435359.issue40733@roundup.psfhosted.org> Message-ID: Ama Aje My Fren added the comment: > > I could also add label with the online url and date above the text. > [https://docs.python.org/3.x/library/idle.html as of ] > > Maybe this is a bit messy? I may be wrong but I suspect that most people on docs.python.org use none dev versions. For us, most likely, we keep to the releases (maybe behind the very current version, but unlikely that we are compiling in the latest bug fixes, or (and here I could be absolutely wrong) pulling from a distribution that is). (If they are compiling their own Python with bug fixes, is it fair to assume they are also preparing their own documentation? Not sure.) Say I am using Python 3.7.5, the documentation, being for Python 3.7.7, is (hopefully?) sufficient for me to know it is not the same as the IDLE I am using - the addition of the date may help emphasize the point, but chances are I don't track the release schedule/know when my IDLE was packaged for me and so it may only further confuse me. I suggest that if the page has the release version don't also provide the "as of " . Now if Documentation for all patchlevels were available ... but I suspect that may not be possible. Thinking about it though Paul said: So I looked for it on the main docs page, docs.python.org, and didn't find it there. I ended up finding it by web search. > > From 3.5 there is a search on the top right of docs.python.org: @phr is that what you meant by web search or did you use google/bing/etc? Most likely many people use the search to find what they want from docs.python.org ... or it is hardly used. On Sat, May 23, 2020 at 4:14 AM Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > I agree that finding the online doc is slight pain. It is not listed in > the Modules index because idlelib, not IDLE, is the stdlib module, and does > not have a doc page. I may add one or, if possible, make the page serve as > one, as part of this issue. 'IDLE' *is* in the Index, and the first link > is the correct one. > > I don't control and would not unilaterally change the main page. I am > hesitant because I expect that there are people who would think it unfair > or deceptive to especially promote IDLE this way versus other stdlib > packages and non-stdlib IDEs and editors. I might subscribe to and post on > python-ideas to see what other users think. > > Help => IDLE Help displays an offline copy of idle.html as of the release > date in a tktinker text window. Have you noticed that? Would "IDLE doc" > be clearer? > > I could also add label with the online url and date above the text. > [https://docs.python.org/3.x/library/idle.html as of ] > > ---------- > nosy: +taleinat > stage: -> needs patch > title: mention IDLE in main python docs page -> Make IDLE doc more > visible, mention in main python docs page > versions: +Python 3.10, Python 3.7, Python 3.8, Python 3.9 > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________________ > docs mailing list -- docs at python.org > To unsubscribe send an email to docs-leave at python.org > https://mail.python.org/mailman3/lists/docs.python.org/ > Member address: amaajemyfren at gmail.com > ---------- nosy: +amaajemyfren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 06:05:27 2020 From: report at bugs.python.org (paul rubin) Date: Sat, 23 May 2020 10:05:27 +0000 Subject: [issue40733] Make IDLE doc more visible, mention in main python docs page In-Reply-To: <1590179262.31.0.599943692588.issue40733@roundup.psfhosted.org> Message-ID: <1590228327.93.0.0652328009123.issue40733@roundup.psfhosted.org> paul rubin added the comment: I think I used duckduckgo to find the docs. They don't change much between versions and I was trying to find how to do a specific thing. My installation has the docs included but it didn't explain how to do what I wanted, so I had hoped there was a more complete doc on docs.python.org. Unfortunately it turned out to be the same doc. The functionality I wanted (to put a startup script in .idlerc) seems to not exist though. I'll research workarounds a bit further and possibly open an RFE if people think that sounds right. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 06:32:38 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sat, 23 May 2020 10:32:38 +0000 Subject: [issue40741] Upgrade to SQLite v3.32.0 in Windows and macOS builds Message-ID: <1590229958.06.0.659446886323.issue40741@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : SQLite 3.32.0 is out: https://www.sqlite.org/releaselog/3_32_0.html I'll preparing a PR for cpython-source-deps and cpython. ---------- components: Windows, macOS messages: 369711 nosy: erlendaasland, ned.deily, paul.moore, ronaldoussoren, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Upgrade to SQLite v3.32.0 in Windows and macOS builds versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 06:56:47 2020 From: report at bugs.python.org (Julien Palard) Date: Sat, 23 May 2020 10:56:47 +0000 Subject: [issue40742] Doc: Parallel build break audit table Message-ID: <1590231407.13.0.794441624197.issue40742@roundup.psfhosted.org> New submission from Julien Palard : Currently we can't build the doc using sphinx parallel builds, like: `sphinx-build -j auto`, because the audit-events table [1] is not generated in this case. [1]: https://docs.python.org/3/library/audit_events.html To reproduce: make -C Doc SPHINXOPTS='-j auto' autobuild-dev-html see build/html/library/audit_events.html see also: https://mail.python.org/archives/list/python-dev at python.org/thread/POWT35ULU2CPELWQ6BRTLTU5H3YKHQZW/ ---------- assignee: docs at python components: Documentation messages: 369712 nosy: docs at python, mdk, xtreak priority: normal severity: normal status: open title: Doc: Parallel build break audit table versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 06:56:50 2020 From: report at bugs.python.org (Petr Viktorin) Date: Sat, 23 May 2020 10:56:50 +0000 Subject: [issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type In-Reply-To: <1586276621.78.0.843757244355.issue40217@roundup.psfhosted.org> Message-ID: <1590231410.08.0.518660240018.issue40217@roundup.psfhosted.org> Petr Viktorin added the comment: Thank you for responding so quickly! > Petr, do you mind reviewing it? Yes, but I'll only get to it next week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 07:13:47 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sat, 23 May 2020 11:13:47 +0000 Subject: [issue40737] Handle PyModule_AddObject() error correctly in sqlite3 In-Reply-To: <1590185760.13.0.611798281854.issue40737@roundup.psfhosted.org> Message-ID: <1590232427.57.0.647689954422.issue40737@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: This issue could probably be expanded to the whole Modules directory. A lot of the modules fail to clean up properly on PyModule_AddObject() error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 07:21:50 2020 From: report at bugs.python.org (Christian Heimes) Date: Sat, 23 May 2020 11:21:50 +0000 Subject: [issue37630] Investigate replacing SHA3 code with OpenSSL In-Reply-To: <1563535856.49.0.726904541971.issue37630@roundup.psfhosted.org> Message-ID: <1590232910.15.0.540748532931.issue37630@roundup.psfhosted.org> Christian Heimes added the comment: OpenSSL's SHA-3 implementation is a tiny bit faster than our builtin copy of SHA-3. builtin SHA-3 with PGO $ python3 -m timeit -s "from _sha3 import sha3_256; d = b'12345678' * 1000" "sha3_256(d)" 10000 loops, best of 5: 20.3 usec per loop builtin SHA-3 without PGO $ ./python -m timeit -s "from _sha3 import sha3_256; d = b'12345678' * 1000" "sha3_256(d)" 10000 loops, best of 5: 21.1 usec per loop OpenSSL SHA-3 $ ./python -m timeit -s "from _hashlib import openssl_sha3_256 as sha3_256; d = b'12345678' * 1000" "sha3_256(d)" 20000 loops, best of 5: 19.1 usec per loop OpenSSL's Blake2 implementation is also a tiny bit faster. (b.copy().update() because the _hashlib module doesn't have fast constructor yet) $ python3 -m timeit -s "from _blake2 import blake2b; b = blake2b(); d = b'12345678' * 1000" "b.copy().update(d)" 50000 loops, best of 5: 9.67 usec per loop $ python3 -m timeit -s "from _hashlib import new; b = new('blake2b512'); d = b'12345678' * 1000" "b.copy().update(d)" 50000 loops, best of 5: 8.87 usec per loop ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 10:05:17 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 May 2020 14:05:17 +0000 Subject: [issue40678] Full list of Python lexical rules In-Reply-To: <1589868354.8.0.399926907796.issue40678@roundup.psfhosted.org> Message-ID: <1590242717.43.0.591366862423.issue40678@roundup.psfhosted.org> Terry J. Reedy added the comment: What you literally seem to ask for does not exist. If you want to pursue this, I suggest posting to python-ideas and you might get support for an acceptable alternative. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 10:09:00 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 May 2020 14:09:00 +0000 Subject: [issue30756] ttk: GUI tests fail on Ubuntu In-Reply-To: <1498417340.5.0.500567108578.issue30756@psf.upfronthosting.co.za> Message-ID: <1590242940.88.0.70133098172.issue30756@roundup.psfhosted.org> Terry J. Reedy added the comment: #40722 is about a hang, at least once, on line 147 def test_variable_change(self): x = ttk.LabeledScale(self.root) x.pack() x.wait_visibility() # Here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 10:09:56 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 May 2020 14:09:56 +0000 Subject: [issue40722] test_ttk_guionly times out on Ubuntu CI In-Reply-To: <1590101382.1.0.392017281749.issue40722@roundup.psfhosted.org> Message-ID: <1590242996.16.0.0260431040236.issue40722@roundup.psfhosted.org> Terry J. Reedy added the comment: I listed this failure on the original test_ttk_guionly failure issue. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 10:14:13 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 May 2020 14:14:13 +0000 Subject: [issue40733] Make IDLE doc more visible, mention in main python docs page In-Reply-To: <1590179262.31.0.599943692588.issue40733@roundup.psfhosted.org> Message-ID: <1590243253.64.0.268437267295.issue40733@roundup.psfhosted.org> Terry J. Reedy added the comment: Ama, when responding by email, please leave out the full quote of the message you are responding to. (A snippet of at most a few lines is ok.) Once posted, it becomes redundant noise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 10:17:00 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Sat, 23 May 2020 14:17:00 +0000 Subject: [issue40640] Tutorial for Continue missing ... line In-Reply-To: <1589608941.53.0.91951505263.issue40640@roundup.psfhosted.org> Message-ID: <1590243420.72.0.636687020806.issue40640@roundup.psfhosted.org> Florian Dahlitz added the comment: I pointed you to the quick guide. In fact, you fork the cpython repository, create a new branch called fix-issue-40640, change the file Doc/tutorial/controlflow.rst and submit a PR agains the cpython master branch. As Rahul as already added all the versions to the issue that need a backport, the cpython bot will handle it for you. So you only need to submit a PR to the master branch. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 10:19:44 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 May 2020 14:19:44 +0000 Subject: [issue40733] Make IDLE doc more visible, mention in main python docs page In-Reply-To: <1590179262.31.0.599943692588.issue40733@roundup.psfhosted.org> Message-ID: <1590243584.16.0.574093645354.issue40733@roundup.psfhosted.org> Terry J. Reedy added the comment: Paul, the doc has the following line -s run $IDLESTARTUP or $PYTHONSTARTUP before anything else ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 10:22:52 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Sat, 23 May 2020 14:22:52 +0000 Subject: [issue30756] ttk: GUI tests fail on Ubuntu In-Reply-To: <1498417340.5.0.500567108578.issue30756@psf.upfronthosting.co.za> Message-ID: <1590243772.59.0.56597035706.issue30756@roundup.psfhosted.org> Florian Dahlitz added the comment: I'm on Ubuntu 20.04 64-bit, ran the command provided and got Ran 303 tests in 18.900s OK I was running against the master branch. ---------- nosy: +DahlitzFlorian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 10:25:19 2020 From: report at bugs.python.org (Ram Rachum) Date: Sat, 23 May 2020 14:25:19 +0000 Subject: [issue40678] Full list of Python lexical rules In-Reply-To: <1589868354.8.0.399926907796.issue40678@roundup.psfhosted.org> Message-ID: <1590243919.8.0.309573875929.issue40678@roundup.psfhosted.org> Ram Rachum added the comment: I understand, thank you. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 10:56:08 2020 From: report at bugs.python.org (TheUltimatePineapple) Date: Sat, 23 May 2020 14:56:08 +0000 Subject: [issue40743] [CMake] It's 2020, where is CMake? Message-ID: <1590245768.91.0.904361700086.issue40743@roundup.psfhosted.org> New submission from TheUltimatePineapple : The current CPython build system is antiquated and makes cross-platform builds difficult (in my experience). There have been unofficial CMake implementations but they are either outdated, abandoned or just unusable. Adopting CMake has many benefits, here are few: 1. Simplifies cross-platform builds and inclusion of CPython in other projects as subdirectory/subproject. 2. Automatically generated builds for any CMake supported OS'es, no need to maintain an unique build system for each OS, only the CMake script. 3. Faster. Just the configuration process in current build system for Unix is super slow, making testing changes slow and painful. ---------- components: Build messages: 369724 nosy: TheUltimatePineapple priority: normal severity: normal status: open title: [CMake] It's 2020, where is CMake? type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 11:10:01 2020 From: report at bugs.python.org (pmp-p) Date: Sat, 23 May 2020 15:10:01 +0000 Subject: [issue40743] [CMake] It's 2020, where is CMake? In-Reply-To: <1590245768.91.0.904361700086.issue40743@roundup.psfhosted.org> Message-ID: <1590246601.01.0.787122187806.issue40743@roundup.psfhosted.org> pmp-p added the comment: Hi, I'm always curious about others experiences : why would you need cross-platform building for any of the officially supported platforms ? Also on some random unsupported platforms that require cross-compilation like maybe android, wasm or other uncommon posix, cmake is maybe not yet fully ready. So it may be easier to hack the old system if not alternative is present. ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 11:47:49 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 23 May 2020 15:47:49 +0000 Subject: [issue32782] memoryview & ctypes: incorrect itemsize for empty array In-Reply-To: <1517943201.04.0.467229070634.issue32782@psf.upfronthosting.co.za> Message-ID: <1590248869.47.0.266044166322.issue32782@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 12:24:14 2020 From: report at bugs.python.org (Stan Hendryx) Date: Sat, 23 May 2020 16:24:14 +0000 Subject: [issue40738] backspace character \b not processed by IDLE In-Reply-To: <1590200964.68.0.124795258512.issue40738@roundup.psfhosted.org> Message-ID: <831B667D-CC31-4939-A95D-96C1F1816465@hendryxassoc.com> Stan Hendryx added the comment: Hello Terry, Thank you for your reply. I understand there are different interpretations of \b. IMHO, since IDLE is part of a python distribution, IDLE needs to be consistent with the native python interpreter on each platform. On Mac, IDLE gives >>> print("deleted\b file") deleted file whereas on mac Terminal we get >>> print("deleted\b file") delete file JetBrains gives another vote for the native interpretation. I?ve been tutoring my grandson on python using JetBrains Academy?s python tutorials. They teach >>> print("deleted\b file") delete file That?s how I discovered the inconsistency. Thank you, Stan Hendryx > On May 22, 2020, at 7:29 PM, Terry J. Reedy wrote: > > > Terry J. Reedy added the comment: > > I am considering terminal simulation as an option, but there is not exactly a standard to emulate. \b originally meant the same as the typewrite backspace and modern US computer keyboard left arrow key <- (move cursor left without erasing), which would result in 'delete filed' in insert mode, but sometimes now is interpreted the same as modern US computer keyboard backspace (erase and move left), as you expect. > > ---------- > resolution: -> duplicate > stage: -> resolved > status: open -> closed > superseder: -> IDLE: Document how Shell displays user code output > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 12:26:56 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Sat, 23 May 2020 16:26:56 +0000 Subject: [issue40701] tempfile mixes str and bytes in an inconsistent manner In-Reply-To: <1590002424.23.0.821521735552.issue40701@roundup.psfhosted.org> Message-ID: <1590251216.73.0.458797721062.issue40701@roundup.psfhosted.org> Change by Florian Dahlitz : ---------- nosy: -DahlitzFlorian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 12:30:57 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Sat, 23 May 2020 16:30:57 +0000 Subject: [issue40568] Modify -c command-line option to accept multiple inputs In-Reply-To: <1588964937.68.0.986339822686.issue40568@roundup.psfhosted.org> Message-ID: <1590251457.9.0.161453518127.issue40568@roundup.psfhosted.org> Change by Florian Dahlitz : ---------- nosy: -DahlitzFlorian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 12:31:15 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Sat, 23 May 2020 16:31:15 +0000 Subject: [issue40726] ast.Call end_lineno is defined and returns None In-Reply-To: <1590136499.66.0.128776260794.issue40726@roundup.psfhosted.org> Message-ID: <1590251475.42.0.912817871866.issue40726@roundup.psfhosted.org> Change by Florian Dahlitz : ---------- nosy: -DahlitzFlorian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 12:32:53 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Sat, 23 May 2020 16:32:53 +0000 Subject: [issue40670] supplying an empty string to timeit causes an IndentationError In-Reply-To: <1589805861.06.0.616610250992.issue40670@roundup.psfhosted.org> Message-ID: <1590251573.04.0.756853864694.issue40670@roundup.psfhosted.org> Florian Dahlitz added the comment: @terry.reedy sorry if I misunderstood you, but it seems to me that you agree with the proposed changes? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 12:40:54 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sat, 23 May 2020 16:40:54 +0000 Subject: [issue40744] Explicitly drop support for SQLite version < 3.7.3 Message-ID: <1590252054.91.0.549618457347.issue40744@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : Currently, we use sqlite3_create_function_v2() without wrapping it in any #ifdefs, so in practise the sqlite3 module will not build against sqlite3 pre 3.7.3. Despite this, we still wrap parts of the code in #ifdefs for versions 3.6.x and older. Added patch drops support for sqlite3 pre 3.7.3. ---------- components: Library (Lib) files: 0001-Drop-support-for-sqlite3-3.7.3.patch keywords: patch messages: 369729 nosy: erlendaasland priority: normal severity: normal status: open title: Explicitly drop support for SQLite version < 3.7.3 versions: Python 3.10, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file49187/0001-Drop-support-for-sqlite3-3.7.3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 12:43:22 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sat, 23 May 2020 16:43:22 +0000 Subject: [issue40744] Explicitly drop support for SQLite version < 3.7.3 In-Reply-To: <1590252054.91.0.549618457347.issue40744@roundup.psfhosted.org> Message-ID: <1590252202.54.0.384774501477.issue40744@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +19598 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20330 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 12:55:52 2020 From: report at bugs.python.org (=?utf-8?q?H=C3=A9ctor_Canto?=) Date: Sat, 23 May 2020 16:55:52 +0000 Subject: [issue40745] Typo in library/typing Message-ID: <1590252952.01.0.421861710026.issue40745@roundup.psfhosted.org> New submission from H?ctor Canto : I found a small typo here: https://docs.python.org/3.8/library/typing.html?highlight=typing#typing.NewType I checked also in other 3.x versions and it is there too. Original: A helper function to indicate a distinct types to a typechecker, see NewType Possible solution (remove the "s" in types): A helper function to indicate a distinct type to a typechecker, see NewType ---------- assignee: docs at python components: Documentation messages: 369730 nosy: docs at python, hectorcanto priority: normal severity: normal status: open title: Typo in library/typing type: enhancement versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 11:58:43 2020 From: report at bugs.python.org (Ama Aje My Fren) Date: Sat, 23 May 2020 15:58:43 +0000 Subject: [issue40733] Make IDLE doc more visible, mention in main python docs page In-Reply-To: <1590228327.93.0.0652328009123.issue40733@roundup.psfhosted.org> Message-ID: Ama Aje My Fren added the comment: > I think I used duckduckgo to find the docs. Ok, I just checked and when one has scrolled down the search is not seen. In most browsers web search is easier than searching on the docs site. ---------- Added file: https://bugs.python.org/file49186/docs.python.org.png _______________________________________ Python tracker _______________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: docs.python.org.png Type: image/png Size: 63523 bytes Desc: not available URL: From report at bugs.python.org Sat May 23 13:32:56 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sat, 23 May 2020 17:32:56 +0000 Subject: [issue40745] Typo in library/typing In-Reply-To: <1590252952.01.0.421861710026.issue40745@roundup.psfhosted.org> Message-ID: <1590255176.31.0.485205338321.issue40745@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi H?ctor, can you open a new PR with those changes? ---------- nosy: +remi.lapeyre versions: -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 13:36:06 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 23 May 2020 17:36:06 +0000 Subject: [issue31956] Add start and stop parameters to the array.index() In-Reply-To: <1509966827.68.0.213398074469.issue31956@psf.upfronthosting.co.za> Message-ID: <1590255366.36.0.601484755157.issue31956@roundup.psfhosted.org> Cheryl Sabella added the comment: I found this SO about reclaiming an orphaned pull request: https://stackoverflow.com/a/53383772 But you may still need to open a new PR for it. ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 13:44:42 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 23 May 2020 17:44:42 +0000 Subject: [issue33294] Support complex expressions for py-print command. In-Reply-To: <1523948532.18.0.682650639539.issue33294@psf.upfronthosting.co.za> Message-ID: <1590255882.91.0.818216283275.issue33294@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- assignee: -> dmalcolm nosy: +dmalcolm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 13:51:31 2020 From: report at bugs.python.org (Matthias Bussonnier) Date: Sat, 23 May 2020 17:51:31 +0000 Subject: [issue38632] setup.py sdist should honor SOURCE_DATE_EPOCH In-Reply-To: <1572354197.87.0.67466678891.issue38632@roundup.psfhosted.org> Message-ID: <1590256291.3.0.940582088873.issue38632@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 13:54:45 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sat, 23 May 2020 17:54:45 +0000 Subject: [issue40743] [CMake] It's 2020, where is CMake? In-Reply-To: <1590245768.91.0.904361700086.issue40743@roundup.psfhosted.org> Message-ID: <1590256485.87.0.326395181326.issue40743@roundup.psfhosted.org> R?mi Lapeyre added the comment: Can you point to specific issues with the current build system? It seems to me that for 1. it will only make it easier for projects that use CMake, 2. the build system is not the only part needed to support a new OS and for 3. I've not found Python to be particularly slow to build for such a large program. You may want to look at ccache if you want to speed you build process (I'm not using it on this computer and it's still quite fast, Make will only rebuild the appropriate object files already unless you explicitly clean them). Before making large changes to the build system, you should open a thread on the python-ideas mailing list, there was some discussion about this a few years back but maybe now that Python2 is gone it would be easier to make this change? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 14:22:44 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 23 May 2020 18:22:44 +0000 Subject: [issue40133] Provide additional matchers for unittest.mock In-Reply-To: <1585735205.76.0.306632606173.issue40133@roundup.psfhosted.org> Message-ID: <1590258164.84.0.126329371262.issue40133@roundup.psfhosted.org> Cheryl Sabella added the comment: @Flameeyes, thank you for the suggestion. As per the other comments, I'm going to close this as it would be more suitable to have it on PyPI. Feel free to have more discussion here or on python-ideas if you want to get more feedback. ---------- nosy: +cheryl.sabella resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 14:25:00 2020 From: report at bugs.python.org (=?utf-8?q?H=C3=A9ctor_Canto?=) Date: Sat, 23 May 2020 18:25:00 +0000 Subject: [issue40745] Typo in library/typing In-Reply-To: <1590255176.31.0.485205338321.issue40745@roundup.psfhosted.org> Message-ID: H?ctor Canto added the comment: I'll try ASAP. H?ctor Canto On Sat, 23 May 2020 at 19:33, R?mi Lapeyre wrote: > > R?mi Lapeyre added the comment: > > Hi H?ctor, can you open a new PR with those changes? > > ---------- > nosy: +remi.lapeyre > versions: -Python 3.5, Python 3.6, Python 3.7 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 14:30:25 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 23 May 2020 18:30:25 +0000 Subject: [issue40746] test_gdb failing on Raspbian on 3.9, regression from 3.8 Message-ID: <1590258625.25.0.246740749681.issue40746@roundup.psfhosted.org> New submission from Gregory P. Smith : https://buildbot.python.org/all/#/builders/727 test_tuples (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of tuples ... ok test_bt (test.test_gdb.PyBtTests) Verify that the "py-bt" command works ... FAIL Stderr: Python Exception Cannot access memory at address 0xfffffedc: Error occurred in Python command: Cannot access memory at address 0xfffffedc and a pile of similar errors after test_bt Marking release blocker as this isn't present in 3.8 or earlier, we've got a regression here. i haven't tried to debug yet, but that pointer value smells like something did a negative offset from NULL... ---------- components: Tests messages: 369736 nosy: gregory.p.smith priority: release blocker severity: normal status: open title: test_gdb failing on Raspbian on 3.9, regression from 3.8 versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 14:33:45 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 23 May 2020 18:33:45 +0000 Subject: [issue38741] Definition of multiple ']' in header configparser In-Reply-To: <1573193272.74.0.118296138456.issue38741@roundup.psfhosted.org> Message-ID: <1590258825.17.0.255290168776.issue38741@roundup.psfhosted.org> Cheryl Sabella added the comment: @lukasz.langa, please take a look at the PR for a review. Thank you! ---------- nosy: +cheryl.sabella, lukasz.langa versions: +Python 3.10, Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 14:36:51 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 23 May 2020 18:36:51 +0000 Subject: [issue39686] add dump_json to ast module In-Reply-To: <1582093402.26.0.349380477656.issue39686@roundup.psfhosted.org> Message-ID: <1590259011.07.0.921632153131.issue39686@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 15:21:10 2020 From: report at bugs.python.org (Christian Heimes) Date: Sat, 23 May 2020 19:21:10 +0000 Subject: [issue40743] [CMake] It's 2020, where is CMake? In-Reply-To: <1590245768.91.0.904361700086.issue40743@roundup.psfhosted.org> Message-ID: <1590261670.13.0.80547991988.issue40743@roundup.psfhosted.org> Christian Heimes added the comment: How about you start with a PEP that compares our current build system with CMake and explores if CMake is a viable option? Is CMake supported on platforms like Solaris, HP-UX, VxWorks? Or are there better options for a new build system for CPython, for example Meson? After all Meson is written in Python and used by large projects like X.org, Wayland, major parts of Gnome, systemd, and more. PS: I find your phrasing and choice of words aggressive, condescending, patronizing. Please turn it down a nudge. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 15:31:12 2020 From: report at bugs.python.org (Matthias Bussonnier) Date: Sat, 23 May 2020 19:31:12 +0000 Subject: [issue38632] setup.py sdist should honor SOURCE_DATE_EPOCH In-Reply-To: <1572354197.87.0.67466678891.issue38632@roundup.psfhosted.org> Message-ID: <1590262272.21.0.127300364885.issue38632@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- keywords: +patch pull_requests: +19599 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20331 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 15:34:54 2020 From: report at bugs.python.org (Matthias Bussonnier) Date: Sat, 23 May 2020 19:34:54 +0000 Subject: [issue38632] setup.py sdist should honor SOURCE_DATE_EPOCH In-Reply-To: <1572354197.87.0.67466678891.issue38632@roundup.psfhosted.org> Message-ID: <1590262494.42.0.866547504665.issue38632@roundup.psfhosted.org> Matthias Bussonnier added the comment: https://github.com/python/cpython/pull/20331 is a first step toward this. See comments in there, I would love some reviews. If that gets im I'll be happy to send further refactor to make the compression step also respect SOURCE_DATE_EPOCH. For projects building with older python you should be able to unpack/repack with your custom scripts that should allow you have bytes identical tar in many cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 15:36:53 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 23 May 2020 19:36:53 +0000 Subject: [issue40743] [CMake] It's 2020, where is CMake? In-Reply-To: <1590245768.91.0.904361700086.issue40743@roundup.psfhosted.org> Message-ID: <1590262613.74.0.30455320304.issue40743@roundup.psfhosted.org> Chris Jerdonek added the comment: This was discussed a bit last December 2019 here ("Is there prior discussion around the build system of CPython itself?"): https://discuss.python.org/t/is-there-prior-discussion-around-the-build-system-of-cpython-itself/2813 ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 15:39:24 2020 From: report at bugs.python.org (Christian Heimes) Date: Sat, 23 May 2020 19:39:24 +0000 Subject: [issue37630] Investigate replacing SHA3 code with OpenSSL In-Reply-To: <1563535856.49.0.726904541971.issue37630@roundup.psfhosted.org> Message-ID: <1590262764.6.0.259178431519.issue37630@roundup.psfhosted.org> Christian Heimes added the comment: LibreSSL does neither include SHA3/SHAKE family nor Blake2. Feature requests have been open for 1.5 to almost four years. The first reply on each feature request don't come as a surprise to me... https://github.com/libressl-portable/portable/issues/199 https://github.com/libressl-portable/portable/issues/455 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 15:41:55 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 23 May 2020 19:41:55 +0000 Subject: [issue40701] tempfile mixes str and bytes in an inconsistent manner In-Reply-To: <1590002424.23.0.821521735552.issue40701@roundup.psfhosted.org> Message-ID: <1590262915.46.0.359888924501.issue40701@roundup.psfhosted.org> Gregory P. Smith added the comment: Could you please turn that into a Github PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 15:43:08 2020 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 23 May 2020 19:43:08 +0000 Subject: [issue33388] Support PEP 566 metadata in distutils In-Reply-To: <1525027919.12.0.682650639539.issue33388@psf.upfronthosting.co.za> Message-ID: <1590262988.64.0.00537737870297.issue33388@roundup.psfhosted.org> ?ric Araujo added the comment: Closing as per previous messages. ---------- resolution: -> wont fix stage: patch review -> resolved status: open -> closed title: Support PEP 566 metadata in dist.py -> Support PEP 566 metadata in distutils _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 15:44:41 2020 From: report at bugs.python.org (=?utf-8?b?TWljaGHFgiBHw7Nybnk=?=) Date: Sat, 23 May 2020 19:44:41 +0000 Subject: [issue1294959] Add sys.platlibdir and configure --with-platlibdir to use /usr/lib64 on Fedora and SuSE Message-ID: <1590263081.42.0.963904543606.issue1294959@roundup.psfhosted.org> Change by Micha? G?rny : ---------- pull_requests: +19600 pull_request: https://github.com/python/cpython/pull/20332 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 15:47:25 2020 From: report at bugs.python.org (=?utf-8?b?TWljaGHFgiBHw7Nybnk=?=) Date: Sat, 23 May 2020 19:47:25 +0000 Subject: [issue1294959] Add sys.platlibdir and configure --with-platlibdir to use /usr/lib64 on Fedora and SuSE Message-ID: <1590263245.87.0.675872877681.issue1294959@roundup.psfhosted.org> Micha? G?rny added the comment: Ok, it seems that I misunderstood it at first. Judging by the code, it also affects extensions installed into site-packages, so I've tried to make that clear and add one more example to the bullet list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 15:55:42 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 23 May 2020 19:55:42 +0000 Subject: [issue40133] Provide additional matchers for unittest.mock In-Reply-To: <1585735205.76.0.306632606173.issue40133@roundup.psfhosted.org> Message-ID: <1590263742.67.0.0499659265034.issue40133@roundup.psfhosted.org> Gregory P. Smith added the comment: I disagree. Many of these do belong in the stdlib and we don't need a python-ideas bike shedding 300 message thread about something so trivial. We've been using these internally at Google for years. Its on my plate to identify which ones to accept and get the most used useful ones in. With an additional eye to which ones we'd likely use when testing the stdlib itself. They fit right in with https://docs.python.org/3/library/unittest.mock.html#helpers ---------- assignee: -> gregory.p.smith resolution: rejected -> status: closed -> open versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 16:03:39 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 23 May 2020 20:03:39 +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: <1590264219.83.0.628005862466.issue34938@roundup.psfhosted.org> Cheryl Sabella added the comment: @steve.dower, Mariatta had a question for you on the PR. ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 16:05:59 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 23 May 2020 20:05:59 +0000 Subject: [issue28859] os.path.ismount sometimes raises FileNotFoundError on Windows In-Reply-To: <1480689560.28.0.129916928722.issue28859@psf.upfronthosting.co.za> Message-ID: <1590264359.92.0.538286642739.issue28859@roundup.psfhosted.org> Cheryl Sabella added the comment: @steve.dower, please review the changes when you get a chance. Thanks! ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 16:07:46 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 23 May 2020 20:07:46 +0000 Subject: [issue37973] improve docstrings of sys.float_info In-Reply-To: <1567048617.81.0.748558704563.issue37973@roundup.psfhosted.org> Message-ID: <1590264466.52.0.941102852665.issue37973@roundup.psfhosted.org> Cheryl Sabella added the comment: @mark.dickinson, please take a look at the PR when you get a chance. Thanks! ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 16:09:52 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 23 May 2020 20:09:52 +0000 Subject: [issue40057] Missing mention of some class attributes in socketserver documentation In-Reply-To: <1585083844.09.0.775894389563.issue40057@roundup.psfhosted.org> Message-ID: <1590264592.8.0.168987766252.issue40057@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- nosy: +martin.panter versions: +Python 3.10 -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 16:10:55 2020 From: report at bugs.python.org (YoSTEALTH) Date: Sat, 23 May 2020 20:10:55 +0000 Subject: [issue40367] ImportError: libffi.so.6 In-Reply-To: <1587589423.16.0.82755935318.issue40367@roundup.psfhosted.org> Message-ID: <1590264655.19.0.650011516684.issue40367@roundup.psfhosted.org> YoSTEALTH added the comment: How did you get the Python installed in /opt/python/3.8.1? - I custom installed python. Maybe it was compiled against libffi 6, then you updated the system to libffi 7, so that Python would need a rebuild. - Yes, you are right about this. So i did rebuild and no problems, Thanks :) ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 16:47:46 2020 From: report at bugs.python.org (mattip) Date: Sat, 23 May 2020 20:47:46 +0000 Subject: [issue40747] sysconfig.get_config_var("py_version_nodot") should return 3_10 Message-ID: <1590266866.08.0.16909581495.issue40747@roundup.psfhosted.org> New submission from mattip : Over in packaging, that code expects `sysconfig.get_config_var("py_version_nodot")` to be consistent with `tags._version_nodot`, which expects 3_10 for python 3.10. See https://github.com/pypa/packaging/issues/308. The current value of `sysconfig.get_config_var("py_version_nodot")` (which comes from https://github.com/python/cpython/blob/master/Lib/sysconfig.py#L89) is `310` which is ambiguous. ---------- components: Installation messages: 369750 nosy: mattip priority: normal severity: normal status: open title: sysconfig.get_config_var("py_version_nodot") should return 3_10 type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 16:56:52 2020 From: report at bugs.python.org (mattip) Date: Sat, 23 May 2020 20:56:52 +0000 Subject: [issue40747] sysconfig.get_config_var("py_version_nodot") should return 3_10 In-Reply-To: <1590266866.08.0.16909581495.issue40747@roundup.psfhosted.org> Message-ID: <1590267412.53.0.219987820268.issue40747@roundup.psfhosted.org> Change by mattip : ---------- keywords: +patch pull_requests: +19601 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20333 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 18:05:28 2020 From: report at bugs.python.org (William Pickard) Date: Sat, 23 May 2020 22:05:28 +0000 Subject: [issue25095] test_httpservers hangs since Python 3.5 In-Reply-To: <1442202993.28.0.395084299366.issue25095@psf.upfronthosting.co.za> Message-ID: <1590271528.65.0.110965799844.issue25095@roundup.psfhosted.org> William Pickard added the comment: I've made the changes you've requested. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 18:06:27 2020 From: report at bugs.python.org (Chas Belov) Date: Sat, 23 May 2020 22:06:27 +0000 Subject: [issue40640] Tutorial for Continue missing ... line In-Reply-To: <1589608941.53.0.91951505263.issue40640@roundup.psfhosted.org> Message-ID: <1590271587.6.0.125698072978.issue40640@roundup.psfhosted.org> Change by Chas Belov : ---------- keywords: +patch pull_requests: +19602 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20334 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 18:06:33 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 23 May 2020 22:06:33 +0000 Subject: [issue34852] Counter-intuitive behavior of Server.close() / wait_closed() In-Reply-To: <1538316994.45.0.545547206417.issue34852@psf.upfronthosting.co.za> Message-ID: <1590271593.65.0.890892358515.issue34852@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 18:10:56 2020 From: report at bugs.python.org (Chas Belov) Date: Sat, 23 May 2020 22:10:56 +0000 Subject: [issue40640] Tutorial for Continue missing ... line In-Reply-To: <1589608941.53.0.91951505263.issue40640@roundup.psfhosted.org> Message-ID: <1590271856.53.0.780805648105.issue40640@roundup.psfhosted.org> Chas Belov added the comment: @Florian Dahlitz, thank you for your help. I have created a PR at https://github.com/python/cpython/pull/20334 and it is awaiting approval of my CLA and of the change itself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 18:14:44 2020 From: report at bugs.python.org (YoSTEALTH) Date: Sat, 23 May 2020 22:14:44 +0000 Subject: [issue37129] Add os.RWF_APPEND flag for os.pwritev In-Reply-To: <1559933925.78.0.510794410466.issue37129@roundup.psfhosted.org> Message-ID: <1590272084.37.0.953930712921.issue37129@roundup.psfhosted.org> Change by YoSTEALTH : ---------- keywords: +patch pull_requests: +19603 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20335 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 18:27:11 2020 From: report at bugs.python.org (Chas Belov) Date: Sat, 23 May 2020 22:27:11 +0000 Subject: [issue40748] Tutorial 4.7 More on Defining Functions missing screen prompts Message-ID: <1590272831.41.0.177431778032.issue40748@roundup.psfhosted.org> New submission from Chas Belov : The tutorial on More on Defining Functions at https://docs.python.org/3.7/tutorial/controlflow.html#more-on-defining-functions is missing most of the >>> and ... screen prompts that show elsewhere in the tutorial. This is potentially confusing to readers. I am going to attempt a PR by May 26, 2020. ---------- assignee: docs at python components: Documentation messages: 369753 nosy: Chas Belov, docs at python priority: normal severity: normal status: open title: Tutorial 4.7 More on Defining Functions missing screen prompts versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 18:35:16 2020 From: report at bugs.python.org (YoSTEALTH) Date: Sat, 23 May 2020 22:35:16 +0000 Subject: [issue37129] Add os.RWF_APPEND flag for os.pwritev In-Reply-To: <1559933925.78.0.510794410466.issue37129@roundup.psfhosted.org> Message-ID: <1590273316.18.0.710970404655.issue37129@roundup.psfhosted.org> Change by YoSTEALTH : ---------- pull_requests: +19604 pull_request: https://github.com/python/cpython/pull/20336 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 18:41:35 2020 From: report at bugs.python.org (YoSTEALTH) Date: Sat, 23 May 2020 22:41:35 +0000 Subject: [issue37129] Add os.RWF_APPEND flag for os.pwritev In-Reply-To: <1559933925.78.0.510794410466.issue37129@roundup.psfhosted.org> Message-ID: <1590273695.35.0.990862195334.issue37129@roundup.psfhosted.org> YoSTEALTH added the comment: terry.reedy ok, recreated the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 18:57:42 2020 From: report at bugs.python.org (Chas Belov) Date: Sat, 23 May 2020 22:57:42 +0000 Subject: [issue40748] Tutorial 4 More Control Flow Tools missing screen prompts in some code blocks In-Reply-To: <1590272831.41.0.177431778032.issue40748@roundup.psfhosted.org> Message-ID: <1590274662.39.0.0213172498238.issue40748@roundup.psfhosted.org> Chas Belov added the comment: Also in For statements https://docs.python.org/3.10/tutorial/controlflow.html#for-statements (same issue) ---------- title: Tutorial 4.7 More on Defining Functions missing screen prompts -> Tutorial 4 More Control Flow Tools missing screen prompts in some code blocks _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 19:07:34 2020 From: report at bugs.python.org (Elijah Rippeth) Date: Sat, 23 May 2020 23:07:34 +0000 Subject: [issue40749] Consider adding decorator for required inner class Message-ID: <1590275254.34.0.427157211052.issue40749@roundup.psfhosted.org> New submission from Elijah Rippeth : Sometimes it's desirable to couple classes together by nesting. Currently there's no way to signal to an interface implementer that an inner class is a required attribute to be implemented. I propose a decorator for `abstractnestedclass` to fill this gap. A simple example use-case is outlined below: ``` from abc import ABCMeta, abstractnestedclass class BaseComponent(metaclass=ABCMeta): @abstractnestedclass class Config: pass class MissingNestedComponent(BaseComponent): # This will raise when constructed because # BaseComponent.Config is not implemented pass class NonraisingComponent(BaseComponent): # This will be constructable class NonraisingComponentConfig(BaseComponent.Config): pass pass ``` ---------- components: Library (Lib) messages: 369756 nosy: Elijah Rippeth priority: normal severity: normal status: open title: Consider adding decorator for required inner class type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 19:14:38 2020 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 23 May 2020 23:14:38 +0000 Subject: [issue40405] asyncio.as_completed documentation misleading In-Reply-To: <1587986090.72.0.850288416668.issue40405@roundup.psfhosted.org> Message-ID: <1590275678.33.0.464296608912.issue40405@roundup.psfhosted.org> Kyle Stanley added the comment: New changeset 13206b52d16c2489f4c7dd2dce2a7f48a554b5ed by Bar Harel in branch 'master': bpo-40405: Fix asyncio.as_completed docs (GH-19753) https://github.com/python/cpython/commit/13206b52d16c2489f4c7dd2dce2a7f48a554b5ed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 19:16:59 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 23 May 2020 23:16:59 +0000 Subject: [issue40405] asyncio.as_completed documentation misleading In-Reply-To: <1587986090.72.0.850288416668.issue40405@roundup.psfhosted.org> Message-ID: <1590275819.1.0.0111272540954.issue40405@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 9.0 -> 10.0 pull_requests: +19605 pull_request: https://github.com/python/cpython/pull/20337 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 19:17:07 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 23 May 2020 23:17:07 +0000 Subject: [issue40405] asyncio.as_completed documentation misleading In-Reply-To: <1587986090.72.0.850288416668.issue40405@roundup.psfhosted.org> Message-ID: <1590275827.14.0.482567715963.issue40405@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19606 pull_request: https://github.com/python/cpython/pull/20338 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 19:24:06 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 23 May 2020 23:24:06 +0000 Subject: [issue40405] asyncio.as_completed documentation misleading In-Reply-To: <1587986090.72.0.850288416668.issue40405@roundup.psfhosted.org> Message-ID: <1590276246.77.0.853805175575.issue40405@roundup.psfhosted.org> miss-islington added the comment: New changeset 2fecb48a1d84190c37214eb4b0c8d5460300a78b by Miss Islington (bot) in branch '3.8': bpo-40405: Fix asyncio.as_completed docs (GH-19753) https://github.com/python/cpython/commit/2fecb48a1d84190c37214eb4b0c8d5460300a78b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 19:23:59 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 23 May 2020 23:23:59 +0000 Subject: [issue40405] asyncio.as_completed documentation misleading In-Reply-To: <1587986090.72.0.850288416668.issue40405@roundup.psfhosted.org> Message-ID: <1590276239.36.0.0968070805787.issue40405@roundup.psfhosted.org> miss-islington added the comment: New changeset 9181e2e2f3ade85f65bf2521a5deb898434dfd64 by Miss Islington (bot) in branch '3.9': bpo-40405: Fix asyncio.as_completed docs (GH-19753) https://github.com/python/cpython/commit/9181e2e2f3ade85f65bf2521a5deb898434dfd64 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 19:25:56 2020 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 23 May 2020 23:25:56 +0000 Subject: [issue40405] asyncio.as_completed documentation misleading In-Reply-To: <1587986090.72.0.850288416668.issue40405@roundup.psfhosted.org> Message-ID: <1590276356.63.0.44125066206.issue40405@roundup.psfhosted.org> Kyle Stanley added the comment: Thanks for bring this to our attention and working on this Bar Harel, and thanks to Yury for the suggestions. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 19:54:21 2020 From: report at bugs.python.org (Chas Belov) Date: Sat, 23 May 2020 23:54:21 +0000 Subject: [issue40748] Tutorial 4 More Control Flow Tools missing screen prompts in some code blocks In-Reply-To: <1590272831.41.0.177431778032.issue40748@roundup.psfhosted.org> Message-ID: <1590278061.1.0.686702454601.issue40748@roundup.psfhosted.org> Chas Belov added the comment: Also in For statements https://docs.python.org/3.10/tutorial/controlflow.html#for-statements (same issue) However, a few of the code blocks having this issue don't exist in the documentation of earlier versions. Do I need a separate issue for each code block that is not common across 3.5 through 3.10? Or would this be handled during the back-porting process? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 20:44:58 2020 From: report at bugs.python.org (Ned Deily) Date: Sun, 24 May 2020 00:44:58 +0000 Subject: [issue40747] sysconfig.get_config_var("py_version_nodot") should return 3_10 In-Reply-To: <1590266866.08.0.16909581495.issue40747@roundup.psfhosted.org> Message-ID: <1590281098.14.0.0570958534152.issue40747@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +lukasz.langa, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 21:01:25 2020 From: report at bugs.python.org (Martin Panter) Date: Sun, 24 May 2020 01:01:25 +0000 Subject: [issue40657] Resource leaks with threading.Thread In-Reply-To: <1589702871.42.0.415645279958.issue40657@roundup.psfhosted.org> Message-ID: <1590282085.84.0.596388320025.issue40657@roundup.psfhosted.org> Martin Panter added the comment: Perhaps this is the same as Issue 37788, introduced in 3.7. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 21:13:50 2020 From: report at bugs.python.org (Ned Deily) Date: Sun, 24 May 2020 01:13:50 +0000 Subject: [issue40657] Resource leaks with threading.Thread In-Reply-To: <1589702871.42.0.415645279958.issue40657@roundup.psfhosted.org> Message-ID: <1590282830.53.0.479771735394.issue40657@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 21:22:03 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 24 May 2020 01:22:03 +0000 Subject: [issue22533] Counter with no keys does not compare equal to Counter with keys which zero value In-Reply-To: <1412192943.35.0.438260267398.issue22533@psf.upfronthosting.co.za> Message-ID: <1590283323.86.0.309210020837.issue22533@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +19607 pull_request: https://github.com/python/cpython/pull/20339 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 21:41:37 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 24 May 2020 01:41:37 +0000 Subject: [issue40750] Support -d flag in the new parser Message-ID: <1590284497.38.0.369695690738.issue40750@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : Python has a (mostly unknown) -d flag that can only be used in debug builds that emit some debug output for the old parser. The new parser does not support such flag. This is very useful when playing with the grammar as it helps enormously to inspect how the parser has behaved and what rules have accepted/rejected in its path. ---------- components: Interpreter Core messages: 369763 nosy: pablogsal priority: normal severity: normal status: open title: Support -d flag in the new parser type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 21:43:13 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 24 May 2020 01:43:13 +0000 Subject: [issue40750] Support -d flag in the new parser In-Reply-To: <1590284497.38.0.369695690738.issue40750@roundup.psfhosted.org> Message-ID: <1590284593.93.0.660095886131.issue40750@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +19608 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20340 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 21:44:41 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 24 May 2020 01:44:41 +0000 Subject: [issue40750] Support -d flag in the new parser In-Reply-To: <1590284497.38.0.369695690738.issue40750@roundup.psfhosted.org> Message-ID: <1590284681.8.0.107384180278.issue40750@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: A piece of the output for the string "1 + 1" with PR 20340: > star_expressions[0-0]: star_expression ',' ? star_expressions[0-0]: star_expression ',' failed! > star_expressions[0-0]: star_expression ? star_expressions[0-3]: star_expression > augassign[3-3]: '+=' ? augassign[3-3]: '+=' failed! > augassign[3-3]: '-=' ? augassign[3-3]: '-=' failed! > augassign[3-3]: '*=' ? augassign[3-3]: '*=' failed! > augassign[3-3]: '@=' ? augassign[3-3]: '@=' failed! > augassign[3-3]: '/=' ? augassign[3-3]: '/=' failed! > augassign[3-3]: '%=' ? augassign[3-3]: '%=' failed! > augassign[3-3]: '&=' ? augassign[3-3]: '&=' failed! > augassign[3-3]: '|=' ? augassign[3-3]: '|=' failed! > augassign[3-3]: '^=' ? augassign[3-3]: '^=' failed! > augassign[3-3]: '<<=' ? augassign[3-3]: '<<=' failed! > augassign[3-3]: '>>=' ? augassign[3-3]: '>>=' failed! > augassign[3-3]: '**=' ? augassign[3-3]: '**=' failed! > augassign[3-3]: '//=' ? augassign[3-3]: '//=' failed! ? invalid_assignment[0-0]: star_expressions augassign (yield_expr | star_expressions) failed! ? assignment[0-0]: invalid_assignment failed! ? small_stmt[0-0]: assignment failed! > small_stmt[0-0]: star_expressions > star_expressions[0-0]: star_expression ((',' star_expression))+ ','? > _loop1_71[3-3]: (',' star_expression) > _tmp_139[3-3]: ',' star_expression ? _tmp_139[3-3]: ',' star_expression failed! ? _loop1_71[3-3]: (',' star_expression) failed! ? star_expressions[0-0]: star_expression ((',' star_expression))+ ','? failed! > star_expressions[0-0]: star_expression ',' ? star_expressions[0-0]: star_expression ',' failed! > star_expressions[0-0]: star_expression ? star_expressions[0-3]: star_expression ? small_stmt[0-3]: star_expressions ? simple_stmt[0-4]: small_stmt !';' NEWLINE ? statement_newline[0-4]: simple_stmt ? interactive[0-4]: statement_newline 2 > interactive[0-0]: statement_newline ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 21:45:02 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 24 May 2020 01:45:02 +0000 Subject: [issue40750] Support -d flag in the new parser In-Reply-To: <1590284497.38.0.369695690738.issue40750@roundup.psfhosted.org> Message-ID: <1590284702.64.0.469837506859.issue40750@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +gvanrossum, lys.nikolaou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 22:26:37 2020 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 24 May 2020 02:26:37 +0000 Subject: [issue40160] documentation example of os.walk should be less destructive In-Reply-To: <1585859689.83.0.950657489634.issue40160@roundup.psfhosted.org> Message-ID: <1590287197.3.0.240155364836.issue40160@roundup.psfhosted.org> Kyle Stanley added the comment: > I made the suggested change to just print the os.remove() statements (instead of executing them) and also removed the 'skip news'. I think you may have misunderstood the suggestion. Specifically, the key part was "I would suggest adding succinct comments or a note that very briefly explains how one could see a visual demonstration...". This would mean the actual code in the example would be *unchanged*, but with a new code comment or separate note after the example that explains how one could replace ``os.remove(os.path.join(root, name))`` with ``print(f"os.remove({os.path.join(root, name)})")`` for a purely visual demonstration that doesn't affect any local files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 22:57:34 2020 From: report at bugs.python.org (Jonny Li) Date: Sun, 24 May 2020 02:57:34 +0000 Subject: [issue40751] command 'elif' does not work Message-ID: <1590289054.9.0.380521539599.issue40751@roundup.psfhosted.org> Change by Jonny Li : ---------- assignee: terry.reedy components: IDLE files: Screen Shot 2020-05-24 at 10.56.55.png nosy: Jonny Li, terry.reedy priority: normal severity: normal status: open title: command 'elif' does not work type: compile error versions: Python 3.8 Added file: https://bugs.python.org/file49188/Screen Shot 2020-05-24 at 10.56.55.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 23:00:42 2020 From: report at bugs.python.org (Jonny Li) Date: Sun, 24 May 2020 03:00:42 +0000 Subject: [issue40751] command 'elif' does not work Message-ID: <1590289242.09.0.510876442937.issue40751@roundup.psfhosted.org> Change by Jonny Li : Added file: https://bugs.python.org/file49189/Screen Shot 2020-05-24 at 10.56.10.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 23:14:54 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 24 May 2020 03:14:54 +0000 Subject: [issue40751] command 'elif' does not work Message-ID: <1590290094.63.0.814670134677.issue40751@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : You're indenting elif inside if clause. The elif should be of same indentation length like if condition. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 23 23:56:42 2020 From: report at bugs.python.org (hai shi) Date: Sun, 24 May 2020 03:56:42 +0000 Subject: [issue38787] PEP 573: Module State Access from C Extension Methods In-Reply-To: <1573655440.57.0.563143759574.issue38787@roundup.psfhosted.org> Message-ID: <1590292602.76.0.169129320774.issue38787@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +19609 pull_request: https://github.com/python/cpython/pull/20344 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 01:54:08 2020 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 24 May 2020 05:54:08 +0000 Subject: [issue39301] Specification of bitshift on integers should clearly state floor division used In-Reply-To: <1578725984.98.0.631488660974.issue39301@roundup.psfhosted.org> Message-ID: <1590299648.49.0.715393750145.issue39301@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 3.0 -> 4.0 pull_requests: +19610 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20347 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 02:22:47 2020 From: report at bugs.python.org (Roman Evstifeev) Date: Sun, 24 May 2020 06:22:47 +0000 Subject: [issue35409] Async generator might re-throw GeneratorExit on aclose() In-Reply-To: <1543929680.9.0.788709270274.issue35409@psf.upfronthosting.co.za> Message-ID: <1590301367.83.0.372239678978.issue35409@roundup.psfhosted.org> Change by Roman Evstifeev : ---------- nosy: +Roman.Evstifeev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 04:04:44 2020 From: report at bugs.python.org (Ram Rachum) Date: Sun, 24 May 2020 08:04:44 +0000 Subject: [issue40752] Implement PurePath.__len__ Message-ID: <1590307484.83.0.323009178084.issue40752@roundup.psfhosted.org> New submission from Ram Rachum : I'm writing the patch now. ---------- components: Library (Lib) messages: 369767 nosy: cool-RR priority: normal severity: normal status: open title: Implement PurePath.__len__ type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 04:11:33 2020 From: report at bugs.python.org (SilentGhost) Date: Sun, 24 May 2020 08:11:33 +0000 Subject: [issue40752] Implement PurePath.__len__ In-Reply-To: <1590307484.83.0.323009178084.issue40752@roundup.psfhosted.org> Message-ID: <1590307893.07.0.845471925577.issue40752@roundup.psfhosted.org> SilentGhost added the comment: What would it do? ---------- nosy: +SilentGhost, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 04:12:10 2020 From: report at bugs.python.org (Ram Rachum) Date: Sun, 24 May 2020 08:12:10 +0000 Subject: [issue40752] Implement PurePath.__len__ In-Reply-To: <1590307484.83.0.323009178084.issue40752@roundup.psfhosted.org> Message-ID: <1590307930.86.0.122962882445.issue40752@roundup.psfhosted.org> Change by Ram Rachum : ---------- keywords: +patch pull_requests: +19611 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20348 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 04:12:57 2020 From: report at bugs.python.org (Ram Rachum) Date: Sun, 24 May 2020 08:12:57 +0000 Subject: [issue40752] Implement PurePath.__len__ In-Reply-To: <1590307484.83.0.323009178084.issue40752@roundup.psfhosted.org> Message-ID: <1590307977.61.0.773431160475.issue40752@roundup.psfhosted.org> Ram Rachum added the comment: Just return len(str(path)). I put the use case on the PR on GitHub. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 04:50:11 2020 From: report at bugs.python.org (SilentGhost) Date: Sun, 24 May 2020 08:50:11 +0000 Subject: [issue40739] find_library broken for binutils >= 2.32 / 2.34 In-Reply-To: <1590219687.71.0.404083343675.issue40739@roundup.psfhosted.org> Message-ID: <1590310211.63.0.676658059687.issue40739@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +amaury.forgeotdarc, belopolsky, meador.inge, vinay.sajip versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 04:51:45 2020 From: report at bugs.python.org (Ram Rachum) Date: Sun, 24 May 2020 08:51:45 +0000 Subject: [issue40753] Remove Python 2 compatibility code from pathlib Message-ID: <1590310305.67.0.10587858574.issue40753@roundup.psfhosted.org> New submission from Ram Rachum : No need to inherit from object. I'm writing the patch now. ---------- components: Library (Lib) messages: 369770 nosy: cool-RR priority: normal severity: normal status: open title: Remove Python 2 compatibility code from pathlib type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 04:54:06 2020 From: report at bugs.python.org (Ram Rachum) Date: Sun, 24 May 2020 08:54:06 +0000 Subject: [issue40753] Remove Python 2 compatibility code from pathlib In-Reply-To: <1590310305.67.0.10587858574.issue40753@roundup.psfhosted.org> Message-ID: <1590310446.62.0.0683699413359.issue40753@roundup.psfhosted.org> Change by Ram Rachum : ---------- keywords: +patch pull_requests: +19612 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20349 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 05:35:48 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 24 May 2020 09:35:48 +0000 Subject: [issue40752] Implement PurePath.__len__ In-Reply-To: <1590307484.83.0.323009178084.issue40752@roundup.psfhosted.org> Message-ID: <1590312948.31.0.657888038856.issue40752@roundup.psfhosted.org> Serhiy Storchaka added the comment: The length of the object is the number of some items in the object. It is usually tied with iteration: len(obj) == len(list(obj)). Is this true for PurePath? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 05:37:14 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 24 May 2020 09:37:14 +0000 Subject: [issue40753] Remove Python 2 compatibility code from pathlib In-Reply-To: <1590310305.67.0.10587858574.issue40753@roundup.psfhosted.org> Message-ID: <1590313034.76.0.374699999231.issue40753@roundup.psfhosted.org> Serhiy Storchaka added the comment: This code is valid in Python 3. We usually do not accept such pure cosmetic changes. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 05:40:27 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 24 May 2020 09:40:27 +0000 Subject: [issue40752] Implement PurePath.__len__ In-Reply-To: <1590307484.83.0.323009178084.issue40752@roundup.psfhosted.org> Message-ID: <1590313227.69.0.00328619733685.issue40752@roundup.psfhosted.org> R?mi Lapeyre added the comment: PurePath is not iterable but I would expect len(Path('/home/remi/src/cpython')) == 4 The fact the the path is stored as a string is an implementation detail, it seems leaky to get the length of the string here. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 05:49:38 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 24 May 2020 09:49:38 +0000 Subject: [issue40752] Implement PurePath.__len__ In-Reply-To: <1590307484.83.0.323009178084.issue40752@roundup.psfhosted.org> Message-ID: <1590313778.41.0.658501608614.issue40752@roundup.psfhosted.org> Serhiy Storchaka added the comment: If it is not iterable, the length does not make sense. Do you expect also len(-123) == 4? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 06:03:56 2020 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 24 May 2020 10:03:56 +0000 Subject: [issue37973] improve docstrings of sys.float_info In-Reply-To: <1567048617.81.0.748558704563.issue37973@roundup.psfhosted.org> Message-ID: <1590314636.45.0.284134288096.issue37973@roundup.psfhosted.org> Mark Dickinson added the comment: New changeset fdc5a94279736a7715dd35c5354a3c27098d0897 by Zackery Spytz in branch 'master': bpo-37973: Improve the docstrings of sys.float_info (GH-19218) https://github.com/python/cpython/commit/fdc5a94279736a7715dd35c5354a3c27098d0897 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 06:15:12 2020 From: report at bugs.python.org (Ram Rachum) Date: Sun, 24 May 2020 10:15:12 +0000 Subject: [issue40753] Remove Python 2 compatibility code from pathlib In-Reply-To: <1590310305.67.0.10587858574.issue40753@roundup.psfhosted.org> Message-ID: <1590315312.68.0.691708882468.issue40753@roundup.psfhosted.org> Ram Rachum added the comment: "We usually do not accept such pure cosmetic changes." Is this an axiom or is the reasoning written down somewhere? I'd think we all like to remove cruft that's no longer necessary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 06:17:45 2020 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 24 May 2020 10:17:45 +0000 Subject: [issue39301] Specification of bitshift on integers should clearly state floor division used In-Reply-To: <1578725984.98.0.631488660974.issue39301@roundup.psfhosted.org> Message-ID: <1590315465.14.0.766487349262.issue39301@roundup.psfhosted.org> Mark Dickinson added the comment: > I confess that I've no idea what the "without overflow check" bit means After some digging, it is indeed to do with the int/long unification: - In Python 2.1, arithmetic operations on ints would raise OverflowError on overflow. - Except that left shift did not raise: shifted out bits were simply lost. This is described in PEP 237. In Python 2.2, arithmetic operations (including left shift) were changed to produce a long instead of overflowing. The "without overflow check" part of the doc almost certainly refers to the Python 2.1 behaviour (at least for left shift; I'm guessing that for right shift, where overflow isn't possible, this was just a redundant copy-paste), and was never updated. It should be removed for both left shift and right shift. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 06:22:12 2020 From: report at bugs.python.org (Ram Rachum) Date: Sun, 24 May 2020 10:22:12 +0000 Subject: [issue40752] Implement PurePath.__len__ In-Reply-To: <1590307484.83.0.323009178084.issue40752@roundup.psfhosted.org> Message-ID: <1590315732.65.0.757682493178.issue40752@roundup.psfhosted.org> Ram Rachum added the comment: Remi: Your use case is taken care of by `len(path.parts)`. Serhiy: "If it is not iterable, the length does not make sense." I'm not sure this is a rule. I do see that the `collections.abc.Sized` class does not require an `__iter__` method to be defined. ---------- nosy: +brandtbucher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 06:22:33 2020 From: report at bugs.python.org (Ram Rachum) Date: Sun, 24 May 2020 10:22:33 +0000 Subject: [issue40753] Remove Python 2 compatibility code from pathlib In-Reply-To: <1590310305.67.0.10587858574.issue40753@roundup.psfhosted.org> Message-ID: <1590315753.16.0.973152502563.issue40753@roundup.psfhosted.org> Change by Ram Rachum : ---------- nosy: +brandtbucher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 06:33:28 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 24 May 2020 10:33:28 +0000 Subject: [issue40752] Implement PurePath.__len__ In-Reply-To: <1590307484.83.0.323009178084.issue40752@roundup.psfhosted.org> Message-ID: <1590316408.31.0.016205018964.issue40752@roundup.psfhosted.org> R?mi Lapeyre added the comment: > Remi: Your use case is taken care of by `len(path.parts)`. Yes, and your use case is taken care of by `len(str(path))` which works as well. The reason in the PR is to simplify: sorted(paths, key=lambda path: len(str(path)), reverse=True) to sorted(paths, key=len, reverse=True) but why avoiding a few characters? My remark is not that it __len__ should be len(path.parts) but that the semantics are unclear (I should have wrote "**if __len__ is defined** I would expect...") Since the semantics are unclear I would except it not to be defined. Also, it's common to use a lambda or an helper function in sorted(), map(), filter(), etc. Most use case can't be covered using existing methods and shouldn't necessarely be. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 06:43:34 2020 From: report at bugs.python.org (Ram Rachum) Date: Sun, 24 May 2020 10:43:34 +0000 Subject: [issue40752] Implement PurePath.__len__ In-Reply-To: <1590307484.83.0.323009178084.issue40752@roundup.psfhosted.org> Message-ID: <1590317014.55.0.530149841295.issue40752@roundup.psfhosted.org> Ram Rachum added the comment: I understand your argument. I think it relies on your earlier statement: "The fact the the path is stored as a string is an implementation detail." This statement reminds me of the term "architecture astronaut". Pathlib builds a cool architecture over the concept of paths. But landing back in reality, all paths are strings, aren't they? On any OS, even looking at esoteric things such as UNC paths on Windows, they're all eventually strings and are treated by most tools as just strings. If I'm missing any edge cases, let me know. But otherwise I think it's okay to look at `Path` as a string with bells and whistles. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 06:53:59 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 24 May 2020 10:53:59 +0000 Subject: [issue40723] IDLE: make autocomplete test run without __main__.__file__ In-Reply-To: <1590120435.83.0.2126629623.issue40723@roundup.psfhosted.org> Message-ID: <1590317639.86.0.0203405451733.issue40723@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 905b3cd05f8d2c29e1605d109900e3e9d07af4d3 by Florian Dahlitz in branch 'master': bpo-40723: Make IDLE autocomplete test run without __main__.__file__ (GH-20311) https://github.com/python/cpython/commit/905b3cd05f8d2c29e1605d109900e3e9d07af4d3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 06:54:07 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 24 May 2020 10:54:07 +0000 Subject: [issue40723] IDLE: make autocomplete test run without __main__.__file__ In-Reply-To: <1590120435.83.0.2126629623.issue40723@roundup.psfhosted.org> Message-ID: <1590317647.17.0.949716803637.issue40723@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19614 pull_request: https://github.com/python/cpython/pull/20351 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 06:53:58 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 24 May 2020 10:53:58 +0000 Subject: [issue40723] IDLE: make autocomplete test run without __main__.__file__ In-Reply-To: <1590120435.83.0.2126629623.issue40723@roundup.psfhosted.org> Message-ID: <1590317638.28.0.801486385925.issue40723@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +19613 pull_request: https://github.com/python/cpython/pull/20350 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 06:54:14 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 24 May 2020 10:54:14 +0000 Subject: [issue40723] IDLE: make autocomplete test run without __main__.__file__ In-Reply-To: <1590120435.83.0.2126629623.issue40723@roundup.psfhosted.org> Message-ID: <1590317654.95.0.0404082216166.issue40723@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19615 pull_request: https://github.com/python/cpython/pull/20352 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 07:05:49 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 24 May 2020 11:05:49 +0000 Subject: [issue40670] supplying an empty string to timeit causes an IndentationError In-Reply-To: <1589805861.06.0.616610250992.issue40670@roundup.psfhosted.org> Message-ID: <1590318349.5.0.919860987153.issue40670@roundup.psfhosted.org> Terry J. Reedy added the comment: I intended to say that the current behavior would be less puzzling if the doc were changed as I suggest. I think that a doc change would be sufficient. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 07:08:07 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 24 May 2020 11:08:07 +0000 Subject: [issue40723] IDLE: make autocomplete test run without __main__.__file__ In-Reply-To: <1590120435.83.0.2126629623.issue40723@roundup.psfhosted.org> Message-ID: <1590318487.59.0.123108792007.issue40723@roundup.psfhosted.org> miss-islington added the comment: New changeset a64df485a4c3ebb0caa1d62c02246cd43d0e976e by Miss Islington (bot) in branch '3.8': bpo-40723: Make IDLE autocomplete test run without __main__.__file__ (GH-20311) https://github.com/python/cpython/commit/a64df485a4c3ebb0caa1d62c02246cd43d0e976e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 07:09:49 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 24 May 2020 11:09:49 +0000 Subject: [issue40752] Implement PurePath.__len__ In-Reply-To: <1590307484.83.0.323009178084.issue40752@roundup.psfhosted.org> Message-ID: <1590318589.52.0.85502761271.issue40752@roundup.psfhosted.org> Serhiy Storchaka added the comment: Path is not a string with bells and whistles. It was intentionally made not a string subclass because some string operations (including len()) just do not make sense for path or are ambiguous. I am closing this as it goes against the initial design of pathlib. If you disagree, discuss this idea on Python-ideas first and get the support of other core developers. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 07:10:39 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 24 May 2020 11:10:39 +0000 Subject: [issue40753] Remove Python 2 compatibility code from pathlib In-Reply-To: <1590310305.67.0.10587858574.issue40753@roundup.psfhosted.org> Message-ID: <1590318639.69.0.1140248479.issue40753@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 07:12:15 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 24 May 2020 11:12:15 +0000 Subject: [issue40723] IDLE: make autocomplete test run without __main__.__file__ In-Reply-To: <1590120435.83.0.2126629623.issue40723@roundup.psfhosted.org> Message-ID: <1590318735.43.0.368854267911.issue40723@roundup.psfhosted.org> miss-islington added the comment: New changeset 82397e2d97f89fdf36cb8eaf3b2d7c407456ec78 by Miss Islington (bot) in branch '3.7': bpo-40723: Make IDLE autocomplete test run without __main__.__file__ (GH-20311) https://github.com/python/cpython/commit/82397e2d97f89fdf36cb8eaf3b2d7c407456ec78 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 07:14:20 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 24 May 2020 11:14:20 +0000 Subject: [issue40723] IDLE: make autocomplete test run without __main__.__file__ In-Reply-To: <1590120435.83.0.2126629623.issue40723@roundup.psfhosted.org> Message-ID: <1590318860.82.0.632206856013.issue40723@roundup.psfhosted.org> miss-islington added the comment: New changeset 874506cff9aff2cb5eb0192c878e08ded18326a9 by Miss Islington (bot) in branch '3.9': bpo-40723: Make IDLE autocomplete test run without __main__.__file__ (GH-20311) https://github.com/python/cpython/commit/874506cff9aff2cb5eb0192c878e08ded18326a9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 07:15:58 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 24 May 2020 11:15:58 +0000 Subject: [issue40751] command 'elif' does not work In-Reply-To: <1590290094.63.0.814670134677.issue40751@roundup.psfhosted.org> Message-ID: <1590318958.44.0.372553178888.issue40751@roundup.psfhosted.org> Terry J. Reedy added the comment: Beginners should ask on python-list or elsewhere whether something is a bug before posting here. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 07:18:59 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 24 May 2020 11:18:59 +0000 Subject: [issue40753] Remove Python 2 compatibility code from pathlib In-Reply-To: <1590310305.67.0.10587858574.issue40753@roundup.psfhosted.org> Message-ID: <1590319139.15.0.593706543709.issue40753@roundup.psfhosted.org> Serhiy Storchaka added the comment: Similar cleanup (and many many others) was proposed when pathlib was initially added to the stdlib. They were rejected, so now we need a new discussion to revise the old decision. See issue20002. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 07:29:06 2020 From: report at bugs.python.org (Ram Rachum) Date: Sun, 24 May 2020 11:29:06 +0000 Subject: [issue20002] Cleanup and microoptimize pathlib In-Reply-To: <1387223389.48.0.793135130447.issue20002@psf.upfronthosting.co.za> Message-ID: <1590319746.17.0.305069957579.issue20002@roundup.psfhosted.org> Ram Rachum added the comment: Antoine: Serhiy linked me to this issue when I opened #40753 . Do you think that this patch by Serhiy could now be merged? ---------- nosy: +cool-RR _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 07:32:06 2020 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 24 May 2020 11:32:06 +0000 Subject: [issue37973] improve docstrings of sys.float_info In-Reply-To: <1567048617.81.0.748558704563.issue37973@roundup.psfhosted.org> Message-ID: <1590319926.3.0.0460048343771.issue37973@roundup.psfhosted.org> Mark Dickinson added the comment: PR applied. Thank you! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 07:33:10 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 24 May 2020 11:33:10 +0000 Subject: [issue40160] documentation example of os.walk should be less destructive In-Reply-To: <1585859689.83.0.950657489634.issue40160@roundup.psfhosted.org> Message-ID: <1590319990.03.0.668035258568.issue40160@roundup.psfhosted.org> Serhiy Storchaka added the comment: 1. There is already a warning before example. 2. Even if you blindly copy-paste the example it will not work. You have to set the top variable. So I don't see any problem here. You always can shoot yourself in the foot if try enough. ---------- resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 07:37:19 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 24 May 2020 11:37:19 +0000 Subject: [issue40056] more user-friendly turtledemo In-Reply-To: <1585080915.97.0.255153547178.issue40056@roundup.psfhosted.org> Message-ID: <1590320239.42.0.562374597887.issue40056@roundup.psfhosted.org> Terry J. Reedy added the comment: I will look at the two changes separately. Spaces could be backported, but since they are not really typos, there is no real need to. I will compare td for master and 3.9 to compare appearance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 07:41:51 2020 From: report at bugs.python.org (Ama Aje My Fren) Date: Sun, 24 May 2020 11:41:51 +0000 Subject: [issue40748] Tutorial 4 More Control Flow Tools missing screen prompts in some code blocks In-Reply-To: <1590278061.1.0.686702454601.issue40748@roundup.psfhosted.org> Message-ID: Ama Aje My Fren added the comment: On Sun, May 24, 2020 at 2:54 AM Chas Belov wrote: > Do I need a separate issue for each code block that is not common across 3.5 through 3.10? Or would this be handled during the back-porting process? Unless there is an issue, automatic back-porting should handle it. PR against master(dev/3.10) should be enough. ---------- nosy: +amaajemyfren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 07:48:12 2020 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 24 May 2020 11:48:12 +0000 Subject: [issue40028] Math module method to find prime factors for non-negative int n In-Reply-To: <1584733974.83.0.0417466712916.issue40028@roundup.psfhosted.org> Message-ID: <1590320892.97.0.572021499686.issue40028@roundup.psfhosted.org> Mark Dickinson added the comment: [R?mi Lapeyre] > In the end, if some core devs think that putting together the various discussions for an imath module in a coherent PEP [...] I can't answer for other core devs. My *guess* is that there's a reasonable chance that a well-written PEP for this would be accepted, but that's just a guess. For myself, I'm not opposed to the addition, but neither am I yet convinced it's a good idea; call me +0. The number of bad prime-checking and factorisation algorithms that turn up on Stack Overflow (and not just in the questions, either) is enough to convince me that it's worth having _something_ basic and non-terrible for people to use. I *am* strongly opposed to adding an imath module without first having a PEP - many aspects are unclear and in need of wider discussion. I unfortunately don't personally have sufficient time and energy available to push a PEP discussion through myself. If you want to take this further, restarting a discussion on the python-ideas mailing list may be the way to go. It may still be worth drafting a PEP first, though: a draft PEP would likely help guide that discussion, and perhaps avoid it going totally off-topic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 08:15:25 2020 From: report at bugs.python.org (SilentGhost) Date: Sun, 24 May 2020 12:15:25 +0000 Subject: [issue27495] Pretty printing sorting for set and frozenset instances In-Reply-To: <1468323029.69.0.352634397545.issue27495@psf.upfronthosting.co.za> Message-ID: <1590322525.15.0.779693041378.issue27495@roundup.psfhosted.org> SilentGhost added the comment: Serhiy, would you be interested in converting your patch to a PR? ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 08:17:41 2020 From: report at bugs.python.org (Ama Aje My Fren) Date: Sun, 24 May 2020 12:17:41 +0000 Subject: [issue40748] Tutorial 4.7 More on Defining Functions missing screen prompts In-Reply-To: <1590272831.41.0.177431778032.issue40748@roundup.psfhosted.org> Message-ID: Ama Aje My Fren added the comment: Hi @Chas Belov, On Sun, May 24, 2020 at 1:27 AM Chas Belov wrote: > The tutorial on More on Defining Functions at https://docs.python.org/3.7/tutorial/controlflow.html#more-on-defining-functions is missing most of the >>> and ... screen prompts that show elsewhere in the tutorial. This is potentially confusing to readers. > > I am going to attempt a PR by May 26, 2020. Are those sections really to be entered in the REPL or could they be seen as independent code blocks in a file e.g.? >From the dev guide https://devguide.python.org/documenting/#code-examples > The ellipsis for the sys.ps2 secondary interpreter prompt should only be used sparingly, > where it is necessary to clearly differentiate between input lines and output lines. > Besides contributing visual clutter, it makes it difficult for readers to cut-and-paste > examples so they can experiment with variations. None of those sections has output ... so maybe not put the ellipsis? ---------- title: Tutorial 4 More Control Flow Tools missing screen prompts in some code blocks -> Tutorial 4.7 More on Defining Functions missing screen prompts _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 08:25:35 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 24 May 2020 12:25:35 +0000 Subject: [issue40372] doctest example programs should exit 1 if any test fails In-Reply-To: <1587629772.69.0.383881965755.issue40372@roundup.psfhosted.org> Message-ID: <1590323135.69.0.00820442351804.issue40372@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: docs at python -> tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 08:38:02 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 24 May 2020 12:38:02 +0000 Subject: [issue39050] The "Help" button in IDLE's config dialog does not work In-Reply-To: <1576360901.2.0.273955220755.issue39050@roundup.psfhosted.org> Message-ID: <1590323882.13.0.795783857102.issue39050@roundup.psfhosted.org> Terry J. Reedy added the comment: closed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 08:47:10 2020 From: report at bugs.python.org (honglei jiang) Date: Sun, 24 May 2020 12:47:10 +0000 Subject: [issue40754] ModuleNotFoundError: No module named '_testinternalcapi' under Win10 Message-ID: <1590324430.61.0.117510991737.issue40754@roundup.psfhosted.org> New submission from honglei jiang : https://www.python.org/ftp/python/3.9.0/python-3.9.0b1-amd64.exe C:\Python39>python.exe -m test test_deque -v == CPython 3.9.0b1 (tags/v3.9.0b1:97fe9cf, May 19 2020, 09:02:07) [MSC v.1924 64 bit (AMD64)] == Windows-10-10.0.18362-SP0 little-endian == cwd: C:\Users\jhong\AppData\Local\Temp\test_python_3376 == CPU count: 4 == encodings: locale=cp936, FS=utf-8 0:00:00 Run tests sequentially 0:00:00 [1/1] test_deque test_add (test.test_deque.TestBasic) ... ok test_basics (test.test_deque.TestBasic) ... ok test_big_queue_popleft (test.test_deque.TestBasic) ... ok test_big_queue_popright (test.test_deque.TestBasic) ... ok test_big_stack_left (test.test_deque.TestBasic) ... ok test_big_stack_right (test.test_deque.TestBasic) ... ok test_clear (test.test_deque.TestBasic) ... ok test_comparisons (test.test_deque.TestBasic) ... ok test_container_iterator (test.test_deque.TestBasic) ... ok test_contains (test.test_deque.TestBasic) ... ok test_contains_count_stop_crashes (test.test_deque.TestBasic) ... ok test_copy (test.test_deque.TestBasic) ... ok test_copy_method (test.test_deque.TestBasic) ... ok test_count (test.test_deque.TestBasic) ... ok test_deepcopy (test.test_deque.TestBasic) ... ok test_delitem (test.test_deque.TestBasic) ... ok test_extend (test.test_deque.TestBasic) ... ok test_extendleft (test.test_deque.TestBasic) ... ok test_gc_doesnt_blowup (test.test_deque.TestBasic) ... ok test_getitem (test.test_deque.TestBasic) ... ok test_hash (test.test_deque.TestBasic) ... ok test_iadd (test.test_deque.TestBasic) ... ok test_imul (test.test_deque.TestBasic) ... ok test_index (test.test_deque.TestBasic) ... ok test_index_bug_24913 (test.test_deque.TestBasic) ... ok test_init (test.test_deque.TestBasic) ... ok test_insert (test.test_deque.TestBasic) ... ok test_insert_bug_26194 (test.test_deque.TestBasic) ... ok test_iterator_pickle (test.test_deque.TestBasic) ... ok test_len (test.test_deque.TestBasic) ... ok test_long_steadystate_queue_popleft (test.test_deque.TestBasic) ... ok test_long_steadystate_queue_popright (test.test_deque.TestBasic) ... ok test_maxlen (test.test_deque.TestBasic) ... ok test_maxlen_attribute (test.test_deque.TestBasic) ... ok test_maxlen_zero (test.test_deque.TestBasic) ... ok test_mul (test.test_deque.TestBasic) ... ok test_pickle (test.test_deque.TestBasic) ... ok test_pickle_recursive (test.test_deque.TestBasic) ... ok test_print (test.test_deque.TestBasic) ... ok test_remove (test.test_deque.TestBasic) ... ok test_repr (test.test_deque.TestBasic) ... ok test_reverse (test.test_deque.TestBasic) ... ok test_reversed (test.test_deque.TestBasic) ... ok test_reversed_new (test.test_deque.TestBasic) ... ok test_rotate (test.test_deque.TestBasic) ... ok test_roundtrip_iter_init (test.test_deque.TestBasic) ... ok test_setitem (test.test_deque.TestBasic) ... ok test_sizeof (test.test_deque.TestBasic) ... ERROR test_underflow (test.test_deque.TestBasic) ... ok test_constructor (test.test_deque.TestVariousIteratorArgs) ... ok test_iter_with_altered_data (test.test_deque.TestVariousIteratorArgs) ... ok test_runtime_error_on_empty_deque (test.test_deque.TestVariousIteratorArgs) ... ok test_basics (test.test_deque.TestSubclass) ... ok test_bug_31608 (test.test_deque.TestSubclass) ... ok test_copy_pickle (test.test_deque.TestSubclass) ... ok test_pickle_recursive (test.test_deque.TestSubclass) ... ok test_strange_subclass (test.test_deque.TestSubclass) ... ok test_weakref (test.test_deque.TestSubclass) ... ok test_subclass_with_kwargs (test.test_deque.TestSubclassWithKwargs) ... ok test_addmul (test.test_deque.TestSequence) ... ok test_bigrepeat (test.test_deque.TestSequence) ... ok test_constructors (test.test_deque.TestSequence) ... ok test_contains (test.test_deque.TestSequence) ... ok test_contains_fake (test.test_deque.TestSequence) ... ok test_contains_order (test.test_deque.TestSequence) ... ok test_count (test.test_deque.TestSequence) ... ok test_free_after_iterating (test.test_deque.TestSequence) ... skipped "Exhausted deque iterator doesn't free a deque" test_getitem (test.test_deque.TestSequence) ... ok test_getitemoverwriteiter (test.test_deque.TestSequence) ... ok test_getslice (test.test_deque.TestSequence) ... ok test_iadd (test.test_deque.TestSequence) ... ok test_imul (test.test_deque.TestSequence) ... ok test_index (test.test_deque.TestSequence) ... ok test_len (test.test_deque.TestSequence) ... ok test_minmax (test.test_deque.TestSequence) ... ok test_pickle (test.test_deque.TestSequence) ... ok test_repeat (test.test_deque.TestSequence) ... ok test_subscript (test.test_deque.TestSequence) ... ok test_truth (test.test_deque.TestSequence) ... ok ====================================================================== ERROR: test_sizeof (test.test_deque.TestBasic) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python39\lib\test\test_deque.py", line 781, in test_sizeof check(deque(), basesize + blocksize) File "C:\Python39\lib\test\support\__init__.py", line 1483, in check_sizeof import _testinternalcapi ModuleNotFoundError: No module named '_testinternalcapi' ---------------------------------------------------------------------- Ran 79 tests in 0.696s FAILED (errors=1, skipped=1) test test_deque failed test_deque failed == Tests result: FAILURE == 1 test failed: test_deque Total duration: 906 ms Tests result: FAILURE C:\Python39> ---------- components: Tests messages: 369798 nosy: honglei.jiang priority: normal severity: normal status: open title: ModuleNotFoundError: No module named '_testinternalcapi' under Win10 type: crash versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 09:21:40 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 24 May 2020 13:21:40 +0000 Subject: [issue37309] idlelib/NEWS.txt for 3.9.0 and backports In-Reply-To: <1560723721.58.0.865881864361.issue37309@roundup.psfhosted.org> Message-ID: <1590326500.81.0.142652911424.issue37309@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +19616 pull_request: https://github.com/python/cpython/pull/20353 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 09:23:29 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 24 May 2020 13:23:29 +0000 Subject: [issue40443] Remove unused imports in the stdlib (April 2020 edition) In-Reply-To: <1588200148.3.0.742578477052.issue40443@roundup.psfhosted.org> Message-ID: <1590326609.83.0.572068770435.issue40443@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 nosy_count: 3.0 -> 4.0 pull_requests: +19617 pull_request: https://github.com/python/cpython/pull/20354 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 09:25:49 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 24 May 2020 13:25:49 +0000 Subject: [issue37309] idlelib/NEWS.txt for 3.9.0 and backports In-Reply-To: <1560723721.58.0.865881864361.issue37309@roundup.psfhosted.org> Message-ID: <1590326749.62.0.782016900895.issue37309@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +19618 pull_request: https://github.com/python/cpython/pull/20355 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 09:32:13 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 24 May 2020 13:32:13 +0000 Subject: [issue37309] idlelib/NEWS.txt for 3.9.0 and backports In-Reply-To: <1560723721.58.0.865881864361.issue37309@roundup.psfhosted.org> Message-ID: <1590327133.87.0.0111554593915.issue37309@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +19619 pull_request: https://github.com/python/cpython/pull/20356 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 09:40:26 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 24 May 2020 13:40:26 +0000 Subject: [issue37309] idlelib/NEWS.txt for 3.9.0 and backports In-Reply-To: <1560723721.58.0.865881864361.issue37309@roundup.psfhosted.org> Message-ID: <1590327626.98.0.929830737806.issue37309@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 3269a0e56b02da61d8f6e7a5e2cca9f83d50694b by Terry Jan Reedy in branch '3.7': bpo-37309: Update NEWS.txt for 3.7.8 (GH-20353) https://github.com/python/cpython/commit/3269a0e56b02da61d8f6e7a5e2cca9f83d50694b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 09:56:43 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Sun, 24 May 2020 13:56:43 +0000 Subject: [issue40283] Documentation of turtle.circle() In-Reply-To: <1586883280.42.0.803600338852.issue40283@roundup.psfhosted.org> Message-ID: <1590328603.78.0.0683759172712.issue40283@roundup.psfhosted.org> Florian Dahlitz added the comment: I tested it and can confirm the findings from @cajetan.rodrigues. However, this does not seem to be _not_ documented. The documentation clearly states that using a positive value for radius results in a counter-clockwise direction, whereas a negative number results in a clockwise direction. This is true. Now, let's have a look at using radius _together_ with extent, which is not (clearly) documented as this point. Using a positive value results in the same direction, but in a not full drawn circle. This seems intuitive and is documented: If extent is not given, draw the entire circle. If extent is not a full circle, one endpoint of the arc is the current pen position. Using a negative value changes the direction of radius, which does also seem reasonable and intuitive. My suggestion is not to replace "radius" by "extent" as suggested by @guchao as it is IMHO wrong. But I agree that it would be good to leave a note there or to add examples demonstrating the behaviour of different (signed) values of radius and extent, so the intent and behaviour is clearly documented. ---------- nosy: +DahlitzFlorian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 09:57:32 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 24 May 2020 13:57:32 +0000 Subject: [issue37309] idlelib/NEWS.txt for 3.9.0 and backports In-Reply-To: <1560723721.58.0.865881864361.issue37309@roundup.psfhosted.org> Message-ID: <1590328652.92.0.685003399331.issue37309@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 1ae0fd87a072426e35ff84dc6d1b2759d9ebee70 by Terry Jan Reedy in branch '3.8': [3.8] bpo-37309: Update IDLE NEWS.txt for 3.8.4 (GH-20355) https://github.com/python/cpython/commit/1ae0fd87a072426e35ff84dc6d1b2759d9ebee70 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 09:57:58 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 24 May 2020 13:57:58 +0000 Subject: [issue37309] idlelib/NEWS.txt for 3.9.0 and backports In-Reply-To: <1560723721.58.0.865881864361.issue37309@roundup.psfhosted.org> Message-ID: <1590328678.44.0.754669648074.issue37309@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 16ef3241939a3a64a447e5d7aabaf2e29deca621 by Terry Jan Reedy in branch 'master': bpo-37309: Update IDLE NEWS.txt (GH-20356) https://github.com/python/cpython/commit/16ef3241939a3a64a447e5d7aabaf2e29deca621 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 09:58:09 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 24 May 2020 13:58:09 +0000 Subject: [issue37309] idlelib/NEWS.txt for 3.9.0 and backports In-Reply-To: <1560723721.58.0.865881864361.issue37309@roundup.psfhosted.org> Message-ID: <1590328689.66.0.203157977502.issue37309@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19620 pull_request: https://github.com/python/cpython/pull/20357 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 10:16:14 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 24 May 2020 14:16:14 +0000 Subject: [issue37309] idlelib/NEWS.txt for 3.9.0 and backports In-Reply-To: <1560723721.58.0.865881864361.issue37309@roundup.psfhosted.org> Message-ID: <1590329774.35.0.83164041907.issue37309@roundup.psfhosted.org> miss-islington added the comment: New changeset 21a9af193c35394f560d9517e7a4b579f40b8ef7 by Miss Islington (bot) in branch '3.9': bpo-37309: Update IDLE NEWS.txt (GH-20356) https://github.com/python/cpython/commit/21a9af193c35394f560d9517e7a4b579f40b8ef7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 10:27:47 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 24 May 2020 14:27:47 +0000 Subject: [issue37309] idlelib/NEWS.txt for 3.9.0 and backports In-Reply-To: <1560723721.58.0.865881864361.issue37309@roundup.psfhosted.org> Message-ID: <1590330467.58.0.0288221836775.issue37309@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +19621 pull_request: https://github.com/python/cpython/pull/20358 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 10:31:35 2020 From: report at bugs.python.org (Albert Christianto) Date: Sun, 24 May 2020 14:31:35 +0000 Subject: [issue31963] AMD64 Debian PGO 3.x buildbot: compilation failed with an internal compiler error in create_edge In-Reply-To: <1510005461.16.0.213398074469.issue31963@psf.upfronthosting.co.za> Message-ID: <1590330695.82.0.120498594183.issue31963@roundup.psfhosted.org> Albert Christianto added the comment: Sorry for my late response. Well, thank you very much for your fast response to help me. Actually, I have solved the problem in 3 hours after I posted my question. hehehe. I found this tip about uncleaned files after executing "make clean" (https://bugs.python.org/msg346553). So, I decided to wipe out all python3.7 files from my computer and repeat the installation process. It worked!! Anyway, thank you again for your response and your tip. It really made my day like I am not alone while doing some python program debugging. (^v^) best regards, Albert Christianto ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 10:37:21 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 24 May 2020 14:37:21 +0000 Subject: [issue40443] Remove unused imports in the stdlib (April 2020 edition) In-Reply-To: <1588200148.3.0.742578477052.issue40443@roundup.psfhosted.org> Message-ID: <1590331041.2.0.23469850938.issue40443@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19622 pull_request: https://github.com/python/cpython/pull/20359 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 10:37:15 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 24 May 2020 14:37:15 +0000 Subject: [issue40443] Remove unused imports in the stdlib (April 2020 edition) In-Reply-To: <1588200148.3.0.742578477052.issue40443@roundup.psfhosted.org> Message-ID: <1590331034.99.0.948106131133.issue40443@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 3436f5f899f272d7164add072beb18eebd46d777 by Dong-hee Na in branch 'master': bpo-40443: Remove unused imports in the zoneinfo (GH-20354) https://github.com/python/cpython/commit/3436f5f899f272d7164add072beb18eebd46d777 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 10:43:09 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 24 May 2020 14:43:09 +0000 Subject: [issue40705] use-after-free in _zoneinfo.c's module_free function In-Reply-To: <1590038531.88.0.263330697524.issue40705@roundup.psfhosted.org> Message-ID: <1590331389.6.0.676246757675.issue40705@roundup.psfhosted.org> miss-islington added the comment: New changeset ebf650532b41f5e64a5620b8e47acc3a99555e14 by Miss Islington (bot) in branch '3.9': bpo-40705: Fix use-after-free in _zoneinfo's module_free (GH-20280) https://github.com/python/cpython/commit/ebf650532b41f5e64a5620b8e47acc3a99555e14 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 10:58:31 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 24 May 2020 14:58:31 +0000 Subject: [issue40443] Remove unused imports in the stdlib (April 2020 edition) In-Reply-To: <1588200148.3.0.742578477052.issue40443@roundup.psfhosted.org> Message-ID: <1590332311.49.0.822452643138.issue40443@roundup.psfhosted.org> miss-islington added the comment: New changeset 4bb4cde1777267c92c1bfc0f537cee08102d66a4 by Miss Islington (bot) in branch '3.9': bpo-40443: Remove unused imports in the zoneinfo (GH-20354) https://github.com/python/cpython/commit/4bb4cde1777267c92c1bfc0f537cee08102d66a4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 11:11:00 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 24 May 2020 15:11:00 +0000 Subject: [issue40755] Add missing multiset predicates to collections.Counter Message-ID: <1590333060.51.0.256014570882.issue40755@roundup.psfhosted.org> New submission from Raymond Hettinger : These missing predicates have been requested a number of times: isequal() issubset() issuperset() isdisjoint() ---------- assignee: rhettinger components: Library (Lib) messages: 369808 nosy: rhettinger priority: normal severity: normal status: open title: Add missing multiset predicates to collections.Counter type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 11:11:35 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 24 May 2020 15:11:35 +0000 Subject: [issue40755] Add missing multiset predicates to collections.Counter In-Reply-To: <1590333060.51.0.256014570882.issue40755@roundup.psfhosted.org> Message-ID: <1590333095.98.0.0422356682962.issue40755@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +19623 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20339 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 12:09:56 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sun, 24 May 2020 16:09:56 +0000 Subject: [issue40344] Programming FAQ about "What is the most efficient way to concatenate many strings together?" -- Improving the example In-Reply-To: <1587418050.72.0.944089786988.issue40344@roundup.psfhosted.org> Message-ID: <1590336596.36.0.639320978834.issue40344@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch pull_requests: +19624 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20360 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 12:30:12 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sun, 24 May 2020 16:30:12 +0000 Subject: [issue40344] Programming FAQ about "What is the most efficient way to concatenate many strings together?" -- Improving the example In-Reply-To: <1587418050.72.0.944089786988.issue40344@roundup.psfhosted.org> Message-ID: <1590337812.66.0.704055326899.issue40344@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- pull_requests: -19624 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 12:30:27 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sun, 24 May 2020 16:30:27 +0000 Subject: [issue40344] Programming FAQ about "What is the most efficient way to concatenate many strings together?" -- Improving the example In-Reply-To: <1587418050.72.0.944089786988.issue40344@roundup.psfhosted.org> Message-ID: <1590337827.59.0.818079340914.issue40344@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- pull_requests: +19625 pull_request: https://github.com/python/cpython/pull/20360 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 12:34:53 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sun, 24 May 2020 16:34:53 +0000 Subject: [issue40344] Programming FAQ about "What is the most efficient way to concatenate many strings together?" -- Improving the example In-Reply-To: <1587418050.72.0.944089786988.issue40344@roundup.psfhosted.org> Message-ID: <1590338093.77.0.690936503253.issue40344@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- pull_requests: -19625 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 12:40:34 2020 From: report at bugs.python.org (Julian Berman) Date: Sun, 24 May 2020 16:40:34 +0000 Subject: [issue21724] resetwarnings doesn't reset warnings registry In-Reply-To: <1402503104.19.0.836333157517.issue21724@psf.upfronthosting.co.za> Message-ID: <1590338434.97.0.65941020515.issue21724@roundup.psfhosted.org> Julian Berman added the comment: Just ran into this myself -- not sure what the intended fix is (hopefully it's "add a function that restores the warnings configuration to its defaults?" Changing resetwarnings seems likely to be not doable I assume.) But in the meanwhile, is a doc patch acceptable? The current documentation for resetwarnings is really deceptive, and makes it look like it does what @pitrou (and I) thought it did: > Reset the warnings filter. This discards the effect of all previous calls to filterwarnings(), including that of the -W command line options and calls to simplefilter(). Compare to the docstring of the function (and to what it actually does): > """Clear the list of warning filters, so that no filters are active.""" But there are still too many implementation details of the warnings module leaking through here -- for end users it's just "restore the warnings configuration to its defaults" (what it looks like resetwarnings should do) or "unfilter all warnings, even beyond the filters configured by default" (what it actually does). Is at least making the docs reflect the latter a reasonable patch to submit, to start, while what to do about the former is thought about? ---------- assignee: -> docs at python components: +Documentation nosy: +Julian, docs at python versions: +Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 13:15:19 2020 From: report at bugs.python.org (Eric L.) Date: Sun, 24 May 2020 17:15:19 +0000 Subject: [issue40701] tempfile mixes str and bytes in an inconsistent manner In-Reply-To: <1590262915.46.0.359888924501.issue40701@roundup.psfhosted.org> Message-ID: <7cd3f484-f8f1-b022-694b-98a2823ea40c@Lavar.de> Eric L. added the comment: On 23/05/2020 21:41, Gregory P. Smith wrote: > Could you please turn that into a Github PR? I can, if you don't tell me that I need to setup a full-blown Python development environment to do this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 13:26:36 2020 From: report at bugs.python.org (Johannes Berg) Date: Sun, 24 May 2020 17:26:36 +0000 Subject: [issue35883] Change invalid unicode characters to replacement characters in argv In-Reply-To: <1549040138.25.0.646545491344.issue35883@roundup.psfhosted.org> Message-ID: <1590341196.17.0.756431238441.issue35883@roundup.psfhosted.org> Johannes Berg added the comment: Pretty sure this is an issue still, I see it on current git master. This seems to work around it? https://p.sipsolutions.net/603927f1537226b3.txt Basically, it seems that mbstowcs() and mbrtowc() on glibc with utf-8 just blindly decode even invalid UTF-8 to a too large wchar_t, rather than failing. ---------- nosy: +jberg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 13:37:55 2020 From: report at bugs.python.org (Johannes Berg) Date: Sun, 24 May 2020 17:37:55 +0000 Subject: [issue35883] Change invalid unicode characters to replacement characters in argv In-Reply-To: <1549040138.25.0.646545491344.issue35883@roundup.psfhosted.org> Message-ID: <1590341875.51.0.0380755743045.issue35883@roundup.psfhosted.org> Johannes Berg added the comment: A simple test case is something like ./python -c 'import sys; print(sys.argv[1].encode(sys.getfilesystemencoding(), "surrogateescape"))' "$(echo -ne '\xfa\xbd\x83\x96\x80')" Which you'd probably expect to print b'\xfa\xbd\x83\x96\x80' i.e. the same bytes that were passed in, but currently that fails. ---------- versions: +Python 3.10, Python 3.5, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 13:40:20 2020 From: report at bugs.python.org (Johannes Berg) Date: Sun, 24 May 2020 17:40:20 +0000 Subject: [issue35883] Change invalid unicode characters to replacement characters in argv In-Reply-To: <1549040138.25.0.646545491344.issue35883@roundup.psfhosted.org> Message-ID: <1590342020.19.0.285394291128.issue35883@roundup.psfhosted.org> Johannes Berg added the comment: In fact that python one-liner works with just about everything else that you can throw at it, just not something that "looks like utf-8 but isn't". And of course adding LC_CTYPE=ascii or something like that fixes it, as you'd expect. Then the "surrogateescape" works fine, since mbstowcs() won't try to decode it as utf-8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 13:44:03 2020 From: report at bugs.python.org (Johannes Berg) Date: Sun, 24 May 2020 17:44:03 +0000 Subject: [issue35883] Change invalid unicode characters to replacement characters in argv In-Reply-To: <1549040138.25.0.646545491344.issue35883@roundup.psfhosted.org> Message-ID: <1590342243.81.0.540278532052.issue35883@roundup.psfhosted.org> Johannes Berg added the comment: And wrt. _Py_DecodeUTF8Ex() - it doesn't seem to help. But that's probably because I'm not __ANDROID__, nor __APPLE__, and then regardless of current_locale being non-zero or not, we end up in decode_current_locale() where the impedance mismatch happens. Setting PYTHONUTF8=1 in the environment works too, in that case we do get into _Py_DecodeUTF8Ex(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 14:02:38 2020 From: report at bugs.python.org (Arturo Escaip) Date: Sun, 24 May 2020 18:02:38 +0000 Subject: [issue40756] Second argument of LoggerAdapter.__init__ should default to None Message-ID: <1590343358.29.0.207811312221.issue40756@roundup.psfhosted.org> New submission from Arturo Escaip : The 'extra' argument is not always used by custom logger adapters. There example: class IndentAdapter(logging.LoggerAdapter): def process(self, msg, kwargs): indent = kwargs.pop(indent, 1) return ' ' * indent + msg, kwargs It is cleaner and friendlier to default the 'extra' argument to None instead of either forcing the subclasses of LoggerAdapter to pass a None value directly or to override the constructor. ---------- components: Library (Lib) messages: 369815 nosy: arturoescaip priority: normal severity: normal status: open title: Second argument of LoggerAdapter.__init__ should default to None type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 14:10:44 2020 From: report at bugs.python.org (mxmlnkn) Date: Sun, 24 May 2020 18:10:44 +0000 Subject: [issue40757] tarfile: ignore_zeros = True won't raise exception even on invalid (non-zero) TARs Message-ID: <1590343844.38.0.257135087645.issue40757@roundup.psfhosted.org> New submission from mxmlnkn : Normally, when opening an existing non-TAR file, e.g., a file with random data, an exception is raised: tarfile.open( "foo.txt" ) --------------------------------------------------------------------------- ReadError Traceback (most recent call last) in () ----> 1 f = tarfile.open( "notes.txt", ignore_zeros = False ) /usr/lib/python3.7/tarfile.py in open(cls, name, mode, fileobj, bufsize, **kwargs) 1576 fileobj.seek(saved_pos) 1577 continue -> 1578 raise ReadError("file could not be opened successfully") 1579 1580 elif ":" in mode: ReadError: file could not be opened successfully However, when specifying ignore_zeros = True, this check against invalid data seems to be turned off. Note that it is >invalid< data not >zero< data and therefore should still raise an exception! tarfile.open( "foo.txt", ignore_zeros = True ) Iterating over that opened tarfile also works without exception however nothing will be iterated over, i.e., it behaves like an empty TAR instead of like an invalid TAR. ---------- components: Library (Lib) messages: 369816 nosy: mxmlnkn priority: normal severity: normal status: open title: tarfile: ignore_zeros = True won't raise exception even on invalid (non-zero) TARs type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 14:10:57 2020 From: report at bugs.python.org (Arturo Escaip) Date: Sun, 24 May 2020 18:10:57 +0000 Subject: [issue40756] Second argument of LoggerAdapter.__init__ should default to None In-Reply-To: <1590343358.29.0.207811312221.issue40756@roundup.psfhosted.org> Message-ID: <1590343857.7.0.744579870835.issue40756@roundup.psfhosted.org> Change by Arturo Escaip : ---------- keywords: +patch pull_requests: +19626 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20362 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 14:30:40 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 24 May 2020 18:30:40 +0000 Subject: [issue40701] tempfile mixes str and bytes in an inconsistent manner In-Reply-To: <1590002424.23.0.821521735552.issue40701@roundup.psfhosted.org> Message-ID: <1590345040.74.0.964679779395.issue40701@roundup.psfhosted.org> Serhiy Storchaka added the comment: Maybe just document that tempdir should be a string? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 14:57:46 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 24 May 2020 18:57:46 +0000 Subject: [issue17050] argparse.REMAINDER doesn't work as first argument In-Reply-To: <1359276661.57.0.274871702559.issue17050@psf.upfronthosting.co.za> Message-ID: <1590346666.42.0.20170058367.issue17050@roundup.psfhosted.org> miss-islington added the comment: New changeset 59f5022b5d3e5fcc60ac61cc256b627decf8ee68 by Albert in branch 'master': bpo-17050: Remove documentation on argparse.REMAINDER (GH-18661) https://github.com/python/cpython/commit/59f5022b5d3e5fcc60ac61cc256b627decf8ee68 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 14:58:00 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 24 May 2020 18:58:00 +0000 Subject: [issue17050] argparse.REMAINDER doesn't work as first argument In-Reply-To: <1359276661.57.0.274871702559.issue17050@psf.upfronthosting.co.za> Message-ID: <1590346680.82.0.285202306527.issue17050@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19627 pull_request: https://github.com/python/cpython/pull/20363 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 15:28:05 2020 From: report at bugs.python.org (Johannes Berg) Date: Sun, 24 May 2020 19:28:05 +0000 Subject: [issue35883] Change invalid unicode characters to replacement characters in argv In-Reply-To: <1549040138.25.0.646545491344.issue35883@roundup.psfhosted.org> Message-ID: <1590348485.34.0.0647952861096.issue35883@roundup.psfhosted.org> Johannes Berg added the comment: Like I said above, it could be argued that the bug is in glibc, and then https://p.sipsolutions.net/6a4e9fce82dbbfa0.txt could be used as a simple LD_PRELOAD wrapper to work around this, just to illustrate the problem from that side. Arguably, that makes glibc in violation of RFC 3629, since it says: 3. UTF-8 definition [...] In UTF-8, characters from the U+0000..U+10FFFF range (the UTF-16 accessible range) are encoded using sequences of 1 to 4 octets. [...] (hexadecimal) | (binary) --------------------+--------------------------------------------- 0000 0000-0000 007F | 0xxxxxxx 0000 0080-0000 07FF | 110xxxxx 10xxxxxx 0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx 0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx [...] Implementations of the decoding algorithm above MUST protect against decoding invalid sequences. [...] Here's a simple test program: https://p.sipsolutions.net/ac091b4ea4b7f742.txt ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 15:34:28 2020 From: report at bugs.python.org (Johannes Berg) Date: Sun, 24 May 2020 19:34:28 +0000 Subject: [issue35883] Change invalid unicode characters to replacement characters in argv In-Reply-To: <1549040138.25.0.646545491344.issue35883@roundup.psfhosted.org> Message-ID: <1590348868.42.0.371813111167.issue35883@roundup.psfhosted.org> Johannes Berg added the comment: I've also filed https://sourceware.org/bugzilla/show_bug.cgi?id=26034 for glibc, because that's where really the issues seems to be? But perhaps python should be forgiving of glibc errors here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 15:39:14 2020 From: report at bugs.python.org (Andy Lester) Date: Sun, 24 May 2020 19:39:14 +0000 Subject: [issue40344] Programming FAQ about "What is the most efficient way to concatenate many strings together?" -- Improving the example In-Reply-To: <1587418050.72.0.944089786988.issue40344@roundup.psfhosted.org> Message-ID: <1590349154.87.0.116418762181.issue40344@roundup.psfhosted.org> Andy Lester added the comment: I'd also like to suggest that the question not be "most efficient" but "fastest". I don't think it should treat "efficient" and "fast" as synonyms. "Efficient" can mean things other than execution speed, such as memory usage, or programmer time. Are there space/time considerations besides execution time? What if the user has a huge list and wants to use as little new allocated RAM as possible? I understand that it's immediately after the "How do I speed up my program?" question, and I think it's worth considering making the question more explicit what kind of efficiency we're talking about. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 16:24:17 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 24 May 2020 20:24:17 +0000 Subject: [issue40617] sqlite3: expose sqlite3_create_window_function In-Reply-To: <1589395971.17.0.715578976108.issue40617@roundup.psfhosted.org> Message-ID: <1590351857.12.0.399306740255.issue40617@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: This is a good idea, but I think the Python interface should stay the same. >From the user perspective, you'd only need to implement the 'value' and 'inverse' callbacks to transform your aggregate class into an aggregate window class. >From the CPython perspective, we'd only need to use sqlite3_create_window_function() instead of sqlite3_create_function_v2(), if we are compiling against SQLite 3.25.3 or newer. I guess it would be nice to output a warning if the user aggregate class contains 'value' and 'inverse' callbacks, but sqlite3 _doesn't_ support aggregate window functions. ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 16:34:17 2020 From: report at bugs.python.org (Chas Belov) Date: Sun, 24 May 2020 20:34:17 +0000 Subject: [issue40748] Tutorial 4.7 More on Defining Functions missing screen prompts In-Reply-To: <1590272831.41.0.177431778032.issue40748@roundup.psfhosted.org> Message-ID: <1590352457.14.0.0722275473169.issue40748@roundup.psfhosted.org> Chas Belov added the comment: @Ama Aje My Fren, thank you for the advice re backporting. As to your points on ..., both good points, and thank you for introducing me to the Documenting Python document, which I will review. While technically the Tutorial is indeed part of Python's documentation, I would argue that the Tutorial is not a place for shorthand. Learning a new language is hard enough without having to also struggle with inconsistencies in the tutorial interface. My intent with this issue and my (upcoming) pull request is to make the mentioned code blocks consistent with the rest of the page and, indeed, with most of the rest of the tutorial. Most of the tutorial does show >>> and ... at the beginning of each line where the learner would see a prompt. If we are to avoid ... so that learners can copy and paste multiple lines, then why would we not do that through the entire tutorial? I'm guessing your point is that we only need to show >>> and ... when there will be print output so that we need to distinguish between what is input and what is output. As someone who is currently learning Python, however, consistency in presentation is important to me and reduces cognitive load. There are other places in the tutorial where code blocks were used for things which are not typed in, or are not typed without other text. Showing >>> and ... for all verbatim input makes it unambiguous as to whether something is to be typed in. I'll leave it to psychologists as to whether having to type or copy and paste one line at a time leads to better learning. By REPL, do you mean Read-Eval-Print Loop? I'm not familiar with the acronym and that's what Google is telling me it means. But a Read-Eval-Print Loop would have output, and my understanding is that you are arguing against use of ... when there is no output. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 16:39:50 2020 From: report at bugs.python.org (Chas Belov) Date: Sun, 24 May 2020 20:39:50 +0000 Subject: [issue40748] Tutorial 4.7 More on Defining Functions missing screen prompts In-Reply-To: <1590272831.41.0.177431778032.issue40748@roundup.psfhosted.org> Message-ID: <1590352790.56.0.557834346948.issue40748@roundup.psfhosted.org> Chas Belov added the comment: Actually, after reviewing the documentation standards, I will hold off my pull request on this issue and raise the cited section of documentation as a separate issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 16:49:25 2020 From: report at bugs.python.org (Chas Belov) Date: Sun, 24 May 2020 20:49:25 +0000 Subject: [issue40758] For 7.2.7. Code Examples, distinguish between the Tutorial and other documentation Message-ID: <1590353365.14.0.907078183909.issue40758@roundup.psfhosted.org> New submission from Chas Belov : 7.2.7. Code Examples https://devguide.python.org/documenting/#code-examples states: Short code examples can be a useful adjunct to understanding. Readers can often grasp a simple example more quickly than they can digest a formal description in prose. [snip] The ellipsis for the sys.ps2 secondary interpreter prompt should only be used sparingly, where it is necessary to clearly differentiate between input lines and output lines. Besides contributing visual clutter, it makes it difficult for readers to cut-and-paste examples so they can experiment with variations. ----- I am requesting, as a newcomer to Python who is attempting to navigate the Tutorials and encountering challenges, that this be reworded to something like: Short code examples can be a useful adjunct to understanding. Readers can often grasp a simple example more quickly than they can digest a formal description in prose. [snip] Outside of the Tutorial, the ellipsis for the sys.ps2 secondary interpreter prompt should only be used sparingly, where it is necessary to clearly differentiate between input lines and output lines. Besides contributing visual clutter, it makes it difficult for readers to cut-and-paste examples so they can experiment with variations. Within the Tutorial, however, make the appearance of code blocks as consistent with what the student will be experiencing as feasible, to reduce cognitive load and allow them to focus on the content. ----- While I can in fact suss out whether a particular unmarked code block is meant to be input or output, it is a distraction that uses up some of my attention that I would prefer to spend on learning the language. ---------- messages: 369825 nosy: Chas Belov priority: normal severity: normal status: open title: For 7.2.7. Code Examples, distinguish between the Tutorial and other documentation versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 16:49:57 2020 From: report at bugs.python.org (Chas Belov) Date: Sun, 24 May 2020 20:49:57 +0000 Subject: [issue40758] For 7.2.7. Code Examples, distinguish between the Tutorial and other documentation In-Reply-To: <1590353365.14.0.907078183909.issue40758@roundup.psfhosted.org> Message-ID: <1590353397.75.0.509092438661.issue40758@roundup.psfhosted.org> Change by Chas Belov : ---------- 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 May 24 16:51:46 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sun, 24 May 2020 20:51:46 +0000 Subject: [issue40759] Deprecate the symbol module Message-ID: <1590353506.35.0.123027767636.issue40759@roundup.psfhosted.org> New submission from Batuhan Taskaya : Parser is deprecated so there is no need for the 'symbol' module. I think this should be backported to 3.9, so I'm CC-ing @?ukasz. ---------- components: Library (Lib) messages: 369826 nosy: BTaskaya, lukasz.langa priority: normal severity: normal status: open title: Deprecate the symbol module versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 16:52:30 2020 From: report at bugs.python.org (Chas Belov) Date: Sun, 24 May 2020 20:52:30 +0000 Subject: [issue40748] Tutorial 4.7 More on Defining Functions missing screen prompts In-Reply-To: <1590272831.41.0.177431778032.issue40748@roundup.psfhosted.org> Message-ID: <1590353550.68.0.846147870446.issue40748@roundup.psfhosted.org> Chas Belov added the comment: I created new issue For 7.2.7. Code Examples, distinguish between the Tutorial and other documentation https://bugs.python.org/issue40758 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 16:54:06 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sun, 24 May 2020 20:54:06 +0000 Subject: [issue40759] Deprecate the symbol module In-Reply-To: <1590353506.35.0.123027767636.issue40759@roundup.psfhosted.org> Message-ID: <1590353646.23.0.80812323823.issue40759@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch pull_requests: +19628 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20364 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 17:08:07 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 24 May 2020 21:08:07 +0000 Subject: [issue40617] sqlite3: expose sqlite3_create_window_function In-Reply-To: <1589395971.17.0.715578976108.issue40617@roundup.psfhosted.org> Message-ID: <1590354487.23.0.410210398555.issue40617@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: On a second thought and with regards to error reporting, it _would_ make sense to expose this as a function instead of embedding it into sqlite3.create_aggregate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 17:13:00 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 24 May 2020 21:13:00 +0000 Subject: [issue36290] _ast.ast_type_init does not handle args and kwargs correctly. In-Reply-To: <1552574839.1.0.4927355759.issue36290@roundup.psfhosted.org> Message-ID: <1590354780.92.0.892872962181.issue36290@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset c73914a562580ae72048876cb42ed8e76e2c83f9 by R?mi Lapeyre in branch 'master': bpo-36290: Fix keytword collision handling in AST node constructors (GH-12382) https://github.com/python/cpython/commit/c73914a562580ae72048876cb42ed8e76e2c83f9 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 17:13:13 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 24 May 2020 21:13:13 +0000 Subject: [issue36290] _ast.ast_type_init does not handle args and kwargs correctly. In-Reply-To: <1552574839.1.0.4927355759.issue36290@roundup.psfhosted.org> Message-ID: <1590354793.74.0.926447558575.issue36290@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +19629 pull_request: https://github.com/python/cpython/pull/20365 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 17:13:21 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 24 May 2020 21:13:21 +0000 Subject: [issue36290] _ast.ast_type_init does not handle args and kwargs correctly. In-Reply-To: <1552574839.1.0.4927355759.issue36290@roundup.psfhosted.org> Message-ID: <1590354801.43.0.537441746161.issue36290@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19630 pull_request: https://github.com/python/cpython/pull/20366 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 17:16:59 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 24 May 2020 21:16:59 +0000 Subject: [issue36290] _ast.ast_type_init does not handle args and kwargs correctly. In-Reply-To: <1552574839.1.0.4927355759.issue36290@roundup.psfhosted.org> Message-ID: <1590355019.16.0.770738121072.issue36290@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 Sun May 24 17:31:23 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 24 May 2020 21:31:23 +0000 Subject: [issue17050] argparse.REMAINDER doesn't work as first argument In-Reply-To: <1359276661.57.0.274871702559.issue17050@psf.upfronthosting.co.za> Message-ID: <1590355883.88.0.992626509357.issue17050@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 46c1b9c7b595cd9244020ff74ff9cb11bec9870c by Miss Islington (bot) in branch '3.9': bpo-17050: Remove documentation on argparse.REMAINDER (GH-18661) (GH-20363) https://github.com/python/cpython/commit/46c1b9c7b595cd9244020ff74ff9cb11bec9870c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 17:31:38 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 24 May 2020 21:31:38 +0000 Subject: [issue17050] argparse.REMAINDER doesn't work as first argument In-Reply-To: <1359276661.57.0.274871702559.issue17050@psf.upfronthosting.co.za> Message-ID: <1590355898.78.0.857413992316.issue17050@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 May 24 17:31:51 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 24 May 2020 21:31:51 +0000 Subject: [issue36290] _ast.ast_type_init does not handle args and kwargs correctly. In-Reply-To: <1552574839.1.0.4927355759.issue36290@roundup.psfhosted.org> Message-ID: <1590355911.39.0.230297179305.issue36290@roundup.psfhosted.org> miss-islington added the comment: New changeset 907ee1f14aaf587683ced44818c5a1d1cabf4174 by Miss Islington (bot) in branch '3.8': bpo-36290: Fix keytword collision handling in AST node constructors (GH-12382) https://github.com/python/cpython/commit/907ee1f14aaf587683ced44818c5a1d1cabf4174 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 17:32:36 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 24 May 2020 21:32:36 +0000 Subject: [issue36290] _ast.ast_type_init does not handle args and kwargs correctly. In-Reply-To: <1552574839.1.0.4927355759.issue36290@roundup.psfhosted.org> Message-ID: <1590355956.01.0.0951074982207.issue36290@roundup.psfhosted.org> miss-islington added the comment: New changeset 1a4e9e6f35dad26b37639198f1444591d04399e0 by Miss Islington (bot) in branch '3.9': bpo-36290: Fix keytword collision handling in AST node constructors (GH-12382) https://github.com/python/cpython/commit/1a4e9e6f35dad26b37639198f1444591d04399e0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 17:36:37 2020 From: report at bugs.python.org (Amol Sharma) Date: Sun, 24 May 2020 21:36:37 +0000 Subject: [issue40760] Dictionary comprehension using older division behavior Message-ID: <1590356197.08.0.726126426417.issue40760@roundup.psfhosted.org> New submission from Amol Sharma : Using comprehension to divide all the values in a dictionary like in the following results in integer division in 3.8. some_dict = {k: v/5 for k, v in some_dict.items()} This was solved by changing 5 to 5.0, reflecting behavior from python2. I would have expected to have the use the // operator for integer division. Please correct me if this is expected behavior! ---------- messages: 369833 nosy: Amol Sharma priority: normal severity: normal status: open title: Dictionary comprehension using older division behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 17:50:27 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 24 May 2020 21:50:27 +0000 Subject: [issue40617] sqlite3: expose sqlite3_create_window_function In-Reply-To: <1589395971.17.0.715578976108.issue40617@roundup.psfhosted.org> Message-ID: <1590357027.34.0.222543164454.issue40617@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Please see attached patch, @iljau. ---------- keywords: +patch Added file: https://bugs.python.org/file49190/0001-Add-support-for-sqlite3-aggregate-window-functions.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 17:50:42 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 24 May 2020 21:50:42 +0000 Subject: [issue40617] sqlite3: expose sqlite3_create_window_function In-Reply-To: <1589395971.17.0.715578976108.issue40617@roundup.psfhosted.org> Message-ID: <1590357042.29.0.620138159049.issue40617@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 17:53:59 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sun, 24 May 2020 21:53:59 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1590357239.65.0.795622521132.issue40334@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- pull_requests: +19631 pull_request: https://github.com/python/cpython/pull/20367 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 17:58:28 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 24 May 2020 21:58:28 +0000 Subject: [issue39170] Sqlite3 row_factory for attribute access: NamedRow In-Reply-To: <1577775474.34.0.0934062423159.issue39170@roundup.psfhosted.org> Message-ID: <1590357508.31.0.792526927846.issue39170@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 18:01:04 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 24 May 2020 22:01:04 +0000 Subject: [issue16379] SQLite error code not exposed to python In-Reply-To: <1351764878.68.0.13361347428.issue16379@psf.upfronthosting.co.za> Message-ID: <1590357664.16.0.468641802968.issue16379@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 18:04:59 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 24 May 2020 22:04:59 +0000 Subject: [issue24464] "sqlite3_enable_shared_cache" deprecation warning when compiling with macOS system SQLite3 In-Reply-To: <1434627103.24.0.34027869681.issue24464@psf.upfronthosting.co.za> Message-ID: <1590357899.32.0.461239146756.issue24464@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 18:05:29 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 24 May 2020 22:05:29 +0000 Subject: [issue40760] Dictionary comprehension using older division behavior In-Reply-To: <1590356197.08.0.726126426417.issue40760@roundup.psfhosted.org> Message-ID: <1590357929.07.0.667893261789.issue40760@roundup.psfhosted.org> Eric V. Smith added the comment: That's not what I see: $ python3.8 Python 3.8.0b4 (default, Sep 15 2019, 15:56:44) [GCC 7.4.0] on cygwin Type "help", "copyright", "credits" or "license" for more information. >>> some_dict = {3:4} >>> {k: v/5 for k, v in some_dict.items()} {3: 0.8} >>> Granted, this is a beta of 3.8 on cygwin, so maybe it's an outlier. Can you show us a similar interactive session so we can see exactly what platform you're on, and what results you're seeing? ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 18:08:37 2020 From: report at bugs.python.org (Amol Sharma) Date: Sun, 24 May 2020 22:08:37 +0000 Subject: [issue40760] Dictionary comprehension using older division behavior In-Reply-To: <1590356197.08.0.726126426417.issue40760@roundup.psfhosted.org> Message-ID: <1590358117.05.0.538011764738.issue40760@roundup.psfhosted.org> Amol Sharma added the comment: My apologies! I didn't realize I was in a different environment which was actually 2.7. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 18:20:21 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 24 May 2020 22:20:21 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1590358821.6.0.59042021969.issue40334@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset cba503151056b448b7a3730dc36ef6655550ade5 by Batuhan Taskaya in branch 'master': bpo-40334: Support suppressing of multiple optional variables in Pegen (GH-20367) https://github.com/python/cpython/commit/cba503151056b448b7a3730dc36ef6655550ade5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 18:20:31 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 24 May 2020 22:20:31 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1590358831.53.0.0170309297388.issue40334@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19632 pull_request: https://github.com/python/cpython/pull/20368 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 18:24:12 2020 From: report at bugs.python.org (Ido Michael) Date: Sun, 24 May 2020 22:24:12 +0000 Subject: [issue23082] pathlib relative_to() can give confusing error message In-Reply-To: <1418909839.25.0.648032443428.issue23082@psf.upfronthosting.co.za> Message-ID: <1590359052.78.0.956898929433.issue23082@roundup.psfhosted.org> Ido Michael added the comment: Hey looks like this PR is good to go? ---------- nosy: +Ido Michael _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 18:26:52 2020 From: report at bugs.python.org (Ido Michael) Date: Sun, 24 May 2020 22:26:52 +0000 Subject: [issue39244] multiprocessing.get_all_start_methods() wrong default on macOS In-Reply-To: <1578398087.26.0.562792969059.issue39244@roundup.psfhosted.org> Message-ID: <1590359212.45.0.0258497471463.issue39244@roundup.psfhosted.org> Ido Michael added the comment: Fixed Tal's comments, I took the darwin if check out of the reduction.HAVE_SEND_HANDLE, also fixed the test ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 18:38:51 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 24 May 2020 22:38:51 +0000 Subject: [issue40334] PEP 617: new PEG-based parser In-Reply-To: <1587327377.33.0.614039250584.issue40334@roundup.psfhosted.org> Message-ID: <1590359931.29.0.907369333094.issue40334@roundup.psfhosted.org> miss-islington added the comment: New changeset 82c274e3ba7d011e93805f1552e90baea1752cf1 by Miss Islington (bot) in branch '3.9': bpo-40334: Support suppressing of multiple optional variables in Pegen (GH-20367) https://github.com/python/cpython/commit/82c274e3ba7d011e93805f1552e90baea1752cf1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 18:48:57 2020 From: report at bugs.python.org (Ido Michael) Date: Sun, 24 May 2020 22:48:57 +0000 Subject: [issue38580] select()'s documentation claims only sequences are accepted, but it allows all iterables In-Reply-To: <1571915326.93.0.150606644361.issue38580@roundup.psfhosted.org> Message-ID: <1590360537.79.0.0980251046205.issue38580@roundup.psfhosted.org> Ido Michael added the comment: Hey Tal, I see this issue is pending and pretty much done, what else there's to fix here? ---------- nosy: +Ido Michael _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 18:58:32 2020 From: report at bugs.python.org (Fantix King) Date: Sun, 24 May 2020 22:58:32 +0000 Subject: [issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled In-Reply-To: <1492073709.93.0.33740565749.issue30064@psf.upfronthosting.co.za> Message-ID: <1590361112.41.0.281567309806.issue30064@roundup.psfhosted.org> Change by Fantix King : ---------- pull_requests: +19633 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20369 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 19:02:01 2020 From: report at bugs.python.org (Ido Michael) Date: Sun, 24 May 2020 23:02:01 +0000 Subject: [issue40373] urlunparse does not escape slash (/) for http+unix:// in netloc field In-Reply-To: <1587640374.39.0.0313864696391.issue40373@roundup.psfhosted.org> Message-ID: <1590361321.53.0.551762508644.issue40373@roundup.psfhosted.org> Ido Michael added the comment: Did you try using the urllib.urlencode() function? Also it's not clear to me what happens if you give the expected string to urlunsplit() ? I believe it will keep the format as is, str or URL encoded. Tal what do you think? ---------- nosy: +Ido Michael _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 19:03:45 2020 From: report at bugs.python.org (Ido Michael) Date: Sun, 24 May 2020 23:03:45 +0000 Subject: [issue40373] urlunparse does not escape slash (/) for http+unix:// in netloc field In-Reply-To: <1587640374.39.0.0313864696391.issue40373@roundup.psfhosted.org> Message-ID: <1590361425.25.0.0109416709379.issue40373@roundup.psfhosted.org> Change by Ido Michael : ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 23:02:45 2020 From: report at bugs.python.org (lee yummy) Date: Mon, 25 May 2020 03:02:45 +0000 Subject: [issue40761] unittest.TestCase.asserTrue return True even if the expr is False Message-ID: <1590375765.94.0.197466932598.issue40761@roundup.psfhosted.org> New submission from lee yummy : self.assertTrue(np.array_equal(x, y), "") # x.shape is [58, 139] np.array_equal(x, y) is False, but `self.assertTrue(np.array_equal(x, y), "")` doesn't raise error. ---------- components: Tests messages: 369843 nosy: lee yummy priority: normal severity: normal status: open title: unittest.TestCase.asserTrue return True even if the expr is False type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 24 23:49:41 2020 From: report at bugs.python.org (Inada Naoki) Date: Mon, 25 May 2020 03:49:41 +0000 Subject: [issue40328] Add tools for generating mappings_XX.h In-Reply-To: <1587302039.42.0.928310034054.issue40328@roundup.psfhosted.org> Message-ID: <1590378581.78.0.137745003653.issue40328@roundup.psfhosted.org> Inada Naoki added the comment: Would you close this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 00:14:49 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 25 May 2020 04:14:49 +0000 Subject: [issue40328] Add tools for generating mappings_XX.h In-Reply-To: <1587302039.42.0.928310034054.issue40328@roundup.psfhosted.org> Message-ID: <1590380089.54.0.278788451552.issue40328@roundup.psfhosted.org> Dong-hee Na added the comment: > Would you close this issue? mappings_hk.h mappings_tw.h are still left :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 00:44:38 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 25 May 2020 04:44:38 +0000 Subject: [issue40761] unittest.TestCase.asserTrue return True even if the expr is False In-Reply-To: <1590375765.94.0.197466932598.issue40761@roundup.psfhosted.org> Message-ID: <1590381878.97.0.0590184925637.issue40761@roundup.psfhosted.org> Steven D'Aprano added the comment: Works for me in Python 3.7. See attached file. Given that Python 3.5 is only longer accepting security fixes, and that numpy is a third-party library, unless you can reproduce this in a more recent version I think we should close this. ---------- nosy: +steven.daprano Added file: https://bugs.python.org/file49191/test_asserttrue.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 00:46:07 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 25 May 2020 04:46:07 +0000 Subject: [issue40761] unittest.TestCase.asserTrue return True even if the expr is False In-Reply-To: <1590375765.94.0.197466932598.issue40761@roundup.psfhosted.org> Message-ID: <1590381967.23.0.45376436968.issue40761@roundup.psfhosted.org> Change by Steven D'Aprano : ---------- Removed message: https://bugs.python.org/msg369846 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 00:46:28 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 25 May 2020 04:46:28 +0000 Subject: [issue40761] unittest.TestCase.asserTrue return True even if the expr is False In-Reply-To: <1590375765.94.0.197466932598.issue40761@roundup.psfhosted.org> Message-ID: <1590381988.97.0.659761751584.issue40761@roundup.psfhosted.org> Change by Steven D'Aprano : Removed file: https://bugs.python.org/file49191/test_asserttrue.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 00:52:57 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 25 May 2020 04:52:57 +0000 Subject: [issue40761] unittest.TestCase.asserTrue return True even if the expr is False In-Reply-To: <1590375765.94.0.197466932598.issue40761@roundup.psfhosted.org> Message-ID: <1590382377.43.0.850804927546.issue40761@roundup.psfhosted.org> Steven D'Aprano added the comment: Works for me in 3.7. See attached file. Can you provide a minimal piece of code that demonstrates the bug? Since Python 3.5 is now only accepting security fixes, and numpy is a third-party library, unless you can demonstrate this in a more recent version I think we should close this as "Works For Me". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 00:53:16 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 25 May 2020 04:53:16 +0000 Subject: [issue40761] unittest.TestCase.asserTrue return True even if the expr is False In-Reply-To: <1590375765.94.0.197466932598.issue40761@roundup.psfhosted.org> Message-ID: <1590382396.64.0.588069008981.issue40761@roundup.psfhosted.org> Change by Steven D'Aprano : Added file: https://bugs.python.org/file49192/test_asserttrue.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 01:49:18 2020 From: report at bugs.python.org (Sidhant Bansal) Date: Mon, 25 May 2020 05:49:18 +0000 Subject: [issue40762] Writing bytes using CSV module results in b prefixed strings Message-ID: <1590385758.36.0.528402625132.issue40762@roundup.psfhosted.org> New submission from Sidhant Bansal : The following code ``` import csv with open("abc.csv", "w") as f: data = [b'\xc2a9', b'\xc2a9'] w = csv.writer(f) w.writerow(data) ``` writes "b'\xc2a9',b'\xc2a9'" in "abc.csv", i.e the b-prefixed byte string instead of the actual bytes. Although one can argue that the write is done in text mode and not binary mode, however I believe the more natural expectation by the user will be to have the bytes written actually in the "abc.csv". Can refer to this https://github.com/pandas-dev/pandas/issues/9712 to see one of the issues this brings in Pandas. From the discussion on this issue, the main reasons of changing this behaviour in Python would be to avoid leaking python's encoding system syntax into a generic data exchange format, i.e CSV. ---------- components: Library (Lib) messages: 369848 nosy: sidhant priority: normal severity: normal status: open title: Writing bytes using CSV module results in b prefixed strings type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 01:52:45 2020 From: report at bugs.python.org (Sidhant Bansal) Date: Mon, 25 May 2020 05:52:45 +0000 Subject: [issue40762] Writing bytes using CSV module results in b prefixed strings In-Reply-To: <1590385758.36.0.528402625132.issue40762@roundup.psfhosted.org> Message-ID: <1590385965.26.0.776007831403.issue40762@roundup.psfhosted.org> Sidhant Bansal added the comment: The following code ``` import csv with open("abc.csv", "w") as f: data = [b'\xc2a9', b'\xc2a9'] w = csv.writer(f) w.writerow(data) ``` writes "b'\xc2a9',b'\xc2a9'" in "abc.csv", i.e the b-prefixed byte string instead of the actual bytes. Although one can argue that the write is done in text mode and not binary mode, however I believe the more natural expectation by the user will be to have the bytes written actually in the "abc.csv". Also take note that writing in binary mode is not supported by csv, so the only method to write bytes is this. Can refer to this https://github.com/pandas-dev/pandas/issues/9712 to see one of the issues this brings in Pandas. From the discussion on this issue, the main reasons of changing this behaviour in Python would be to avoid leaking python's encoding system syntax into a generic data exchange format, i.e CSV. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 01:57:46 2020 From: report at bugs.python.org (Eric L.) Date: Mon, 25 May 2020 05:57:46 +0000 Subject: [issue40701] tempfile mixes str and bytes in an inconsistent manner In-Reply-To: <1590345040.74.0.964679779395.issue40701@roundup.psfhosted.org> Message-ID: <06ac8cdc-7804-a8a4-3c4a-a973399de683@lavar.de> Eric L. added the comment: On 24/05/2020 20:30, Serhiy Storchaka wrote: > Maybe just document that tempdir should be a string? I would definitely prefer to have bytes paths considered as 1st class citizen. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 01:58:58 2020 From: report at bugs.python.org (Sidhant Bansal) Date: Mon, 25 May 2020 05:58:58 +0000 Subject: [issue40762] Writing bytes using CSV module results in b prefixed strings In-Reply-To: <1590385758.36.0.528402625132.issue40762@roundup.psfhosted.org> Message-ID: <1590386338.33.0.00653303428213.issue40762@roundup.psfhosted.org> Change by Sidhant Bansal : ---------- keywords: +patch pull_requests: +19634 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20371 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 02:44:46 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 25 May 2020 06:44:46 +0000 Subject: [issue40617] sqlite3: expose sqlite3_create_window_function In-Reply-To: <1589395971.17.0.715578976108.issue40617@roundup.psfhosted.org> Message-ID: <1590389086.23.0.624878075914.issue40617@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Another possibility (instead of adding `sqlite3.create_window_function`) is to add a "windowed" parameter to `sqlite3.create_aggregate()`: `sqlite3.create_aggregate(name, narg, aggregate, windowed=True` Maybe that's a little bit cleaner regarding the Python interface. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 03:03:55 2020 From: report at bugs.python.org (Tal Einat) Date: Mon, 25 May 2020 07:03:55 +0000 Subject: [issue38580] select()'s documentation claims only sequences are accepted, but it allows all iterables In-Reply-To: <1571915326.93.0.150606644361.issue38580@roundup.psfhosted.org> Message-ID: <1590390235.03.0.201019582729.issue38580@roundup.psfhosted.org> Tal Einat added the comment: New changeset 372ee27d4958302dac7ad6a8711f6fd04771b2e6 by Jakub Stasiak in branch 'master': bpo-38580: Document that select() accepts iterables, not just sequences (GH-16832) https://github.com/python/cpython/commit/372ee27d4958302dac7ad6a8711f6fd04771b2e6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 03:04:10 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 07:04:10 +0000 Subject: [issue38580] select()'s documentation claims only sequences are accepted, but it allows all iterables In-Reply-To: <1571915326.93.0.150606644361.issue38580@roundup.psfhosted.org> Message-ID: <1590390250.26.0.997432048073.issue38580@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch nosy: +miss-islington nosy_count: 8.0 -> 9.0 pull_requests: +19635 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20372 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 03:04:58 2020 From: report at bugs.python.org (Tal Einat) Date: Mon, 25 May 2020 07:04:58 +0000 Subject: [issue38580] select()'s documentation claims only sequences are accepted, but it allows all iterables In-Reply-To: <1571915326.93.0.150606644361.issue38580@roundup.psfhosted.org> Message-ID: <1590390298.37.0.0148398904477.issue38580@roundup.psfhosted.org> Tal Einat added the comment: Nothing further is required; I've merged the PR. Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 03:18:15 2020 From: report at bugs.python.org (Va) Date: Mon, 25 May 2020 07:18:15 +0000 Subject: [issue40763] zipfile.extractall is safe by now Message-ID: <1590391095.61.0.387813168658.issue40763@roundup.psfhosted.org> New submission from Va : In documentation of all Python 3 versions, [ZipFile.extractall](https://docs.python.org/3/library/zipfile.html#zipfile.ZipFile.extractall) states with a big red warning: > Warning > Never extract archives from untrusted sources without prior inspection. It is possible that files are created outside of path, e.g. members that have absolute filenames starting with "/" or filenames with two dots "..". This module attempts to prevent that. See extract() note. However, when looking at the implementation, it calls _extract_member() which seems to sanitize filenames. So the warning might not be relevant anymore. Furthermore, when looking at [Python 2](https://docs.python.org/2/library/zipfile.html#zipfile.ZipFile.extractall) documentation, we can see the same warning, along with a change note: > Changed in version 2.7.4: The zipfile module attempts to prevent that. See extract() note. So, the big red warning in Python 3 documentation might be relevant only for Python < 2.7.4, not for any Python 3 version. ---------- assignee: docs at python components: Documentation messages: 369854 nosy: VA, docs at python priority: normal severity: normal status: open title: zipfile.extractall is safe by now type: behavior versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 03:35:41 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 25 May 2020 07:35:41 +0000 Subject: [issue40701] tempfile mixes str and bytes in an inconsistent manner In-Reply-To: <1590002424.23.0.821521735552.issue40701@roundup.psfhosted.org> Message-ID: <1590392141.9.0.996154243141.issue40701@roundup.psfhosted.org> Serhiy Storchaka added the comment: In any case this is a new feature, so it can be added only in 3.10, and we need the documentation patch for 3.9 and older. As a workaround you can use os.fsdecode(): tempfile.tempdir = os.fsdecode(b'/doesntexist') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 03:39:29 2020 From: report at bugs.python.org (Tal Einat) Date: Mon, 25 May 2020 07:39:29 +0000 Subject: [issue40373] urlunparse does not escape slash (/) for http+unix:// in netloc field In-Reply-To: <1587640374.39.0.0313864696391.issue40373@roundup.psfhosted.org> Message-ID: <1590392369.04.0.780218694187.issue40373@roundup.psfhosted.org> Tal Einat added the comment: This seems to simply be a misunderstanding: urlunparse() and urlunsplit() intentionally do not do any encoding of their components. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 03:43:57 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 25 May 2020 07:43:57 +0000 Subject: [issue40762] Writing bytes using CSV module results in b prefixed strings In-Reply-To: <1590385758.36.0.528402625132.issue40762@roundup.psfhosted.org> Message-ID: <1590392637.94.0.37238962715.issue40762@roundup.psfhosted.org> Serhiy Storchaka added the comment: According to the documentation (https://docs.python.org/3/library/csv.html#writer-objects): """ A row must be an iterable of strings or numbers for Writer objects and a dictionary mapping fieldnames to strings or numbers (by passing them through str() first) for DictWriter objects. """ Byte object is neither string nor number. Passing it through str() gives your what you get. Run Python with option -b or -bb to catch such kind of errors. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 03:48:57 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 25 May 2020 07:48:57 +0000 Subject: [issue40761] unittest.TestCase.asserTrue return True even if the expr is False In-Reply-To: <1590375765.94.0.197466932598.issue40761@roundup.psfhosted.org> Message-ID: <1590392937.48.0.869238048635.issue40761@roundup.psfhosted.org> Serhiy Storchaka added the comment: assertTrue() always returns None, but its returned value is irrelevant, because it is only used for its side effect. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 03:55:13 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 25 May 2020 07:55:13 +0000 Subject: [issue35714] Document that the null character '\0' terminates a struct format spec In-Reply-To: <1547160130.27.0.885629506261.issue35714@roundup.psfhosted.org> Message-ID: <1590393313.16.0.315637933426.issue35714@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 3f59b55316f4c6ab451997902579aa69020b537c by Zackery Spytz in branch 'master': bpo-35714: Reject null characters in struct format strings (GH-16928) https://github.com/python/cpython/commit/3f59b55316f4c6ab451997902579aa69020b537c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 03:55:25 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 07:55:25 +0000 Subject: [issue35714] Document that the null character '\0' terminates a struct format spec In-Reply-To: <1547160130.27.0.885629506261.issue35714@roundup.psfhosted.org> Message-ID: <1590393325.36.0.664798795009.issue35714@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +19636 pull_request: https://github.com/python/cpython/pull/20373 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 03:55:35 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 07:55:35 +0000 Subject: [issue35714] Document that the null character '\0' terminates a struct format spec In-Reply-To: <1547160130.27.0.885629506261.issue35714@roundup.psfhosted.org> Message-ID: <1590393335.79.0.871242976401.issue35714@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19637 pull_request: https://github.com/python/cpython/pull/20374 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 03:55:43 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 07:55:43 +0000 Subject: [issue35714] Document that the null character '\0' terminates a struct format spec In-Reply-To: <1547160130.27.0.885629506261.issue35714@roundup.psfhosted.org> Message-ID: <1590393343.68.0.614270786617.issue35714@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19638 pull_request: https://github.com/python/cpython/pull/20375 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 03:55:52 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 07:55:52 +0000 Subject: [issue35714] Document that the null character '\0' terminates a struct format spec In-Reply-To: <1547160130.27.0.885629506261.issue35714@roundup.psfhosted.org> Message-ID: <1590393352.89.0.0892348890982.issue35714@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19639 pull_request: https://github.com/python/cpython/pull/20376 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 04:18:12 2020 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 25 May 2020 08:18:12 +0000 Subject: [issue39301] Specification of bitshift on integers should clearly state floor division used In-Reply-To: <1578725984.98.0.631488660974.issue39301@roundup.psfhosted.org> Message-ID: <1590394692.92.0.765247111882.issue39301@roundup.psfhosted.org> Change by Mark Dickinson : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 04:24:05 2020 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 25 May 2020 08:24:05 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1590395045.15.0.540393217774.issue29882@roundup.psfhosted.org> Mark Dickinson added the comment: I'm re-reviewing this discussion three years on. I'd be happy for this to go into 3.10. Are there other strong opinions? It would be good to either update and merge the PR, or close as rejected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 04:43:14 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 08:43:14 +0000 Subject: [issue40695] hashlib: OpenSSL hash detection should obey security policy In-Reply-To: <1589962077.62.0.0858651561695.issue40695@roundup.psfhosted.org> Message-ID: <1590396194.1.0.99777588917.issue40695@roundup.psfhosted.org> miss-islington added the comment: New changeset 4cc2f9348c6e899b76af811fa3bb6c60de642a28 by Christian Heimes in branch 'master': bpo-40695: Limit hashlib builtin hash fallback (GH-20259) https://github.com/python/cpython/commit/4cc2f9348c6e899b76af811fa3bb6c60de642a28 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 04:43:24 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 08:43:24 +0000 Subject: [issue40695] hashlib: OpenSSL hash detection should obey security policy In-Reply-To: <1589962077.62.0.0858651561695.issue40695@roundup.psfhosted.org> Message-ID: <1590396204.44.0.760471666349.issue40695@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19640 pull_request: https://github.com/python/cpython/pull/20377 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 04:44:55 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 25 May 2020 08:44:55 +0000 Subject: [issue40671] Convert _hashlib to PEP 489 multiphase initialization In-Reply-To: <1589807240.02.0.725265164424.issue40671@roundup.psfhosted.org> Message-ID: <1590396295.64.0.0166664069301.issue40671@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 20c22db602bf2a51f5231433b9054290f8069b90 by Christian Heimes in branch 'master': bpo-40671: Prepare _hashlib for PEP 489 (GH-20180) https://github.com/python/cpython/commit/20c22db602bf2a51f5231433b9054290f8069b90 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 04:45:05 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 08:45:05 +0000 Subject: [issue40671] Convert _hashlib to PEP 489 multiphase initialization In-Reply-To: <1589807240.02.0.725265164424.issue40671@roundup.psfhosted.org> Message-ID: <1590396305.05.0.837285499465.issue40671@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +19641 pull_request: https://github.com/python/cpython/pull/20378 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 05:07:39 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 09:07:39 +0000 Subject: [issue40695] hashlib: OpenSSL hash detection should obey security policy In-Reply-To: <1589962077.62.0.0858651561695.issue40695@roundup.psfhosted.org> Message-ID: <1590397659.34.0.769714584094.issue40695@roundup.psfhosted.org> miss-islington added the comment: New changeset 7015823971e7c0cf41cd7d9d9991ed0abdc2f1f4 by Miss Islington (bot) in branch '3.9': bpo-40695: Limit hashlib builtin hash fallback (GH-20259) https://github.com/python/cpython/commit/7015823971e7c0cf41cd7d9d9991ed0abdc2f1f4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 05:13:04 2020 From: report at bugs.python.org (Matthias Klose) Date: Mon, 25 May 2020 09:13:04 +0000 Subject: [issue40734] /usr/bin surprisingly in sys.path under IDLE In-Reply-To: <1590179721.27.0.0407406629035.issue40734@roundup.psfhosted.org> Message-ID: <1590397984.56.0.817747397485.issue40734@roundup.psfhosted.org> Matthias Klose added the comment: I can't reproduce that: $ python3.7 -c 'import sys; print (sys.path)' ['', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/dist-packages', '/usr/lib/python3/dist-packages'] ---------- resolution: -> works for me _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 05:15:37 2020 From: report at bugs.python.org (Sidhant Bansal) Date: Mon, 25 May 2020 09:15:37 +0000 Subject: [issue40762] Writing bytes using CSV module results in b prefixed strings In-Reply-To: <1590385758.36.0.528402625132.issue40762@roundup.psfhosted.org> Message-ID: <1590398137.56.0.450644457861.issue40762@roundup.psfhosted.org> Sidhant Bansal added the comment: Yes, I do recognise that the current doc states that csv only supports strings and numbers. However the use case here is motivated when the user wants to write bytes and numbers/strings mixed to a CSV file. Currently providing bytes to write to a CSV passes it through str() as you stated, however this results it into being being prefixed with a b. Ex. "b'A'" is written instead of "A". This kind of output is in most real-life cases not useful for any other program (be it python or non-python) that ends up reading this csv file, since this CSV file consists of a Python-specific syntax. As an example, if I write character "A" as a byte, i.e b'A' in a csv file, it will end up writing "b'A'", which is not what the user would have wanted in majority of the use-cases. Another way to change this behaviour could be to redefine how str() method works on bytes in python so that python doesn't leak out this b-prefix notation in generic file systems (ex. CSV), however that is too fundamental of a change and will affect the entire codebase in large. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 05:28:30 2020 From: report at bugs.python.org (Paul) Date: Mon, 25 May 2020 09:28:30 +0000 Subject: [issue40764] Conflation of Counter with Multiset Message-ID: <1590398910.64.0.370990898211.issue40764@roundup.psfhosted.org> New submission from Paul : The collections docs state: "Several mathematical operations are provided for combining Counter objects to produce multisets (counters that have counts greater than zero)." I am surprised at the clear level of decision into conflating counters with multisets. Why break all functionality for negative counts in favour of multisets? Why not create a Multiset object for multisets? One example use of negative counts is in factorisation (https://bugs.python.org/msg368298 will be surprised counters don't count) 18 = 2**1 * 3**2 --> x18 = Counter({2: 1, 3: 2}) 4 = 2**2 --> x4 = Counter({2: 2}) To compute 18/4 in this representation (which I believe is exactly precisely a count), one would expect 18/4 = 2**-1 * 3**2 --> x4_5 = x18 - x4 = Counter({2: -1, 3: 2}) But instead, x18 - x4 = Counter({3: 2}) = 9 ??? This is just an example. The use case for negative counts is plain and obvious. The question is: why does collections break counter behaviour in favour of conflation with multisets? Why not have two objects: Counter for counters and Multiset for multisets? ---------- components: Library (Lib) messages: 369867 nosy: wpk- priority: normal severity: normal status: open title: Conflation of Counter with Multiset type: behavior versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 05:42:11 2020 From: report at bugs.python.org (paul rubin) Date: Mon, 25 May 2020 09:42:11 +0000 Subject: [issue40734] /usr/bin surprisingly in sys.path under IDLE In-Reply-To: <1590179721.27.0.0407406629035.issue40734@roundup.psfhosted.org> Message-ID: <1590399731.8.0.637956772528.issue40734@roundup.psfhosted.org> paul rubin added the comment: Matthias, I get the same result you do when I run python from the shell command line. I see /usr/bin in the path when I import sys and print sys.path from inside IDLE. In other words this is an IDLE configuration oddity. Again I don't know if it's a bug. It's perplexing though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 05:46:23 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 25 May 2020 09:46:23 +0000 Subject: [issue40762] Writing bytes using CSV module results in b prefixed strings In-Reply-To: <1590385758.36.0.528402625132.issue40762@roundup.psfhosted.org> Message-ID: <1590399983.6.0.367390116823.issue40762@roundup.psfhosted.org> R?mi Lapeyre added the comment: > As an example, if I write character "A" as a byte, i.e b'A' in a csv file But you can't write b'A' in a csv file, what you can't do is write `b'a'.decode()` or `b'a'.decode('latin1')` or `b'a'.decode('whatever')` but the string representation of a byte string is dependant on the character encoding and it's not possible to guess it, which is why bytes and string were separated in Python3 in the first place. Since csv can't write bytes, it gets a string representation of the by calling str(), as it would with any other objects. > which is not what the user would have wanted in majority of the use-cases If you try to guess the encoding, you will obligatory fail in some case and the resulting file will be corrupted. The only way here is for your users to fix their program and decode thee byte string using the correct encoding before giving them to csv. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 06:37:27 2020 From: report at bugs.python.org (zihengCat) Date: Mon, 25 May 2020 10:37:27 +0000 Subject: [issue40745] Typo in library/typing In-Reply-To: <1590252952.01.0.421861710026.issue40745@roundup.psfhosted.org> Message-ID: <1590403047.46.0.942137443723.issue40745@roundup.psfhosted.org> Change by zihengCat : ---------- keywords: +patch nosy: +zihengcat nosy_count: 3.0 -> 4.0 pull_requests: +19643 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20379 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 06:43:49 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 25 May 2020 10:43:49 +0000 Subject: [issue17258] multiprocessing.connection challenge implicitly uses MD5 In-Reply-To: <1361391096.59.0.84157337171.issue17258@psf.upfronthosting.co.za> Message-ID: <1590403429.19.0.210706402485.issue17258@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +19644 pull_request: https://github.com/python/cpython/pull/20380 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 06:48:38 2020 From: report at bugs.python.org (sagar) Date: Mon, 25 May 2020 10:48:38 +0000 Subject: [issue40765] clear screen in idle Message-ID: <1590403718.48.0.166169360249.issue40765@roundup.psfhosted.org> New submission from sagar : please provide clear screen option in windows idle. clear screen means moving command line to start of the page. ---------- assignee: terry.reedy components: IDLE messages: 369870 nosy: sagarkancharlas, terry.reedy priority: normal severity: normal status: open title: clear screen in idle type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 07:13:46 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 25 May 2020 11:13:46 +0000 Subject: [issue40766] Add support for SQLITE_DIRECTONLY and SQLITE_INNOCUOUS for user-defined functions Message-ID: <1590405226.61.0.516885064285.issue40766@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : Add support for SQLITE_DIRECTONLY and SQLITE_INNOCUOUS in `sqlite3.create_function()` and `sqlite3.create_aggregate()`. >From the SQLite 3.31.0 changelog: - Provide the ability to tag application-defined SQL functions with new properties SQLITE_INNOCUOUS or SQLITE_DIRECTONLY. https://www.sqlite.org/c3ref/c_deterministic.html#sqlitedirectonly https://www.sqlite.org/changes.html ---------- components: Library (Lib) messages: 369871 nosy: erlendaasland priority: normal severity: normal status: open title: Add support for SQLITE_DIRECTONLY and SQLITE_INNOCUOUS for user-defined functions versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 07:31:08 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 25 May 2020 11:31:08 +0000 Subject: [issue10572] Move test sub-packages to Lib/test In-Reply-To: <1290991979.58.0.262973706564.issue10572@psf.upfronthosting.co.za> Message-ID: <1590406268.34.0.916880209869.issue10572@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 07:38:08 2020 From: report at bugs.python.org (Jeremy Attali) Date: Mon, 25 May 2020 11:38:08 +0000 Subject: [issue40767] Allow pure Wayland to get default XDG webbrowser Message-ID: <1590406688.74.0.158171351248.issue40767@roundup.psfhosted.org> New submission from Jeremy Attali : In a pure Wayland environment (without xwayland), the DISPLAY environment variable is not present. Therefore the call to `xdg-settings get default-browser` is not made. So the webbrowser behaviour is different between X11 and Wayland environment. I'm working on a fix, should submit a GitHub PR soon. ``` ? export | grep DISPLAY WAYLAND_DISPLAY=wayland-0 ? python -c "import webbrowser; print(webbrowser.get())" ``` ---------- components: Library (Lib) messages: 369872 nosy: Jeremy Attali priority: normal severity: normal status: open title: Allow pure Wayland to get default XDG webbrowser type: behavior versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 07:57:29 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 11:57:29 +0000 Subject: [issue40671] Convert _hashlib to PEP 489 multiphase initialization In-Reply-To: <1589807240.02.0.725265164424.issue40671@roundup.psfhosted.org> Message-ID: <1590407849.72.0.049026358657.issue40671@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19645 pull_request: https://github.com/python/cpython/pull/20381 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 07:57:30 2020 From: report at bugs.python.org (Sidhant Bansal) Date: Mon, 25 May 2020 11:57:30 +0000 Subject: [issue40762] Writing bytes using CSV module results in b prefixed strings In-Reply-To: <1590385758.36.0.528402625132.issue40762@roundup.psfhosted.org> Message-ID: <1590407850.23.0.373517096169.issue40762@roundup.psfhosted.org> Sidhant Bansal added the comment: Hi Remi, Currently a code like this: ``` with open("abc.csv", "w", encoding='utf-8') as f: data = [b'\x41'] w = csv.writer(f) w.writerow(data) with open("abc.csv", "r") as f: rows = csv.reader(f) for row in rows: print(row[0]) # prints b'A' ``` Is able to write the string "b'A'" in a CSV file. You are correct that the ideal way should indeed be to decode the byte first. However if a user does not decode the byte then the CSV module calls the str() method on the byte object as you said, but in real-life that b-prefixed string is just not readable by another program in an easy way (they will need to first chop off the b-prefix and single quotes around the string) and has turned out to be a pain point in one of the pandas issue I referred to in my first message. Also I am not sure if you have taken a look at my PR, but my approach to fix this problem does NOT involve guessing the encoding scheme used, instead we simply use the encoding scheme that the user provided when they open the file object. So if you open it with `open("abc.csv", "w", encoding="latin1")` then it will try to decode the byte using "latin1". Incase it fails to decode using that, then it will throw a UnicodeDecodeError (So there is no unknowing file corruption, a UnicodeDecode error is thrown when this happens). You can refer to the tests + NEWS.d in the PR to confirm the same. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 08:10:33 2020 From: report at bugs.python.org (Roundup Robot) Date: Mon, 25 May 2020 12:10:33 +0000 Subject: [issue40767] Allow pure Wayland to get default XDG webbrowser In-Reply-To: <1590406688.74.0.158171351248.issue40767@roundup.psfhosted.org> Message-ID: <1590408632.98.0.62210225683.issue40767@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +19646 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20382 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 08:16:32 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 25 May 2020 12:16:32 +0000 Subject: [issue36073] sqlite crashes with converters mutating cursor In-Reply-To: <1550821487.87.0.741979609564.issue36073@roundup.psfhosted.org> Message-ID: <1590408992.54.0.834386763942.issue36073@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 08:19:08 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 12:19:08 +0000 Subject: [issue40671] Convert _hashlib to PEP 489 multiphase initialization In-Reply-To: <1589807240.02.0.725265164424.issue40671@roundup.psfhosted.org> Message-ID: <1590409148.32.0.598585325502.issue40671@roundup.psfhosted.org> miss-islington added the comment: New changeset 1fe1a14703001ec8076412ca28a3fbdf1f5c0735 by Miss Islington (bot) in branch '3.9': bpo-40671: Prepare _hashlib for PEP 489 (GH-20180) https://github.com/python/cpython/commit/1fe1a14703001ec8076412ca28a3fbdf1f5c0735 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 08:20:47 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 25 May 2020 12:20:47 +0000 Subject: [issue13299] namedtuple row factory for sqlite3 In-Reply-To: <1320021145.59.0.53370875256.issue13299@psf.upfronthosting.co.za> Message-ID: <1590409247.73.0.254036489571.issue13299@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 08:21:00 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 25 May 2020 12:21:00 +0000 Subject: [issue40764] Conflation of Counter with Multiset In-Reply-To: <1590398910.64.0.370990898211.issue40764@roundup.psfhosted.org> Message-ID: <1590409260.12.0.965553059773.issue40764@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 09:19:55 2020 From: report at bugs.python.org (Mansi) Date: Mon, 25 May 2020 13:19:55 +0000 Subject: [issue40768] pyaudio Message-ID: <1590412794.98.0.497515762092.issue40768@roundup.psfhosted.org> Change by Mansi : ---------- files: Screenshot (22).png nosy: mansi priority: normal severity: normal status: open title: pyaudio type: compile error versions: Python 3.8 Added file: https://bugs.python.org/file49193/Screenshot (22).png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 09:26:34 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 25 May 2020 13:26:34 +0000 Subject: [issue40768] pyaudio Message-ID: <1590413194.23.0.388195454914.issue40768@roundup.psfhosted.org> New submission from R?mi Lapeyre : Hi Mansi, this is not an issue in the Python interpreter but with a third party module. This bug tracker is only for reporting issues with the CPython interpreter. If you read the error message you attached, there is some steps given to fix your issue, you can also ask for help on StackOverflow or the python-list mailing list. ---------- nosy: +remi.lapeyre type: compile error -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 09:51:18 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 25 May 2020 13:51:18 +0000 Subject: [issue40734] /usr/bin surprisingly in sys.path under IDLE In-Reply-To: <1590179721.27.0.0407406629035.issue40734@roundup.psfhosted.org> Message-ID: <1590414678.76.0.786921068899.issue40734@roundup.psfhosted.org> Terry J. Reedy added the comment: *Exactly* how are you starting IDLE? This should only happen if you start IDLE in /usr/bin or edit a file in /usr/bin. Is there any such thing on Linux/Debian as 'start IDLE from an icon', as on Windows? If so, is the starting directory part of the icon configuration, as on Windows? ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 09:53:13 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 25 May 2020 13:53:13 +0000 Subject: [issue40765] clear screen in idle In-Reply-To: <1590403718.48.0.166169360249.issue40765@roundup.psfhosted.org> Message-ID: <1590414793.75.0.729472592422.issue40765@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> IDLE - clear and restart the shell window type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 10:05:32 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 25 May 2020 14:05:32 +0000 Subject: [issue40762] Writing bytes using CSV module results in b prefixed strings In-Reply-To: <1590385758.36.0.528402625132.issue40762@roundup.psfhosted.org> Message-ID: <1590415532.57.0.540581335385.issue40762@roundup.psfhosted.org> R?mi Lapeyre added the comment: > in real-life that b-prefixed string is just not readable by another program in an easy way If another program opens this CSV file, it will read the string "b'A'" which is what this field actually contains. Everything that is not a number or a string gets converted to a string: In [1]: import collections, dataclasses, random, secrets, io, csv ...: ...: Point = collections.namedtuple('Point', 'x y') ...: ...: @dataclasses.dataclass ...: class Valar: ...: name: str ...: age: int ...: ...: a = Point(1, 2) ...: b = Valar('Melkor', 2900) ...: c = secrets.token_bytes(4) ...: ...: out = io.StringIO() ...: f = csv.writer(out) ...: f.writerow((a, b, c)) ...: ...: out.seek(0) ...: print(out.read()) ...: "Point(x=1, y=2)","Valar(name='Melkor', age=2900)",b'\x95g6\xa2' Here another would find three fields, all strings: "Point(x=1, y=2)", "Valar(name='Melkor', age=2900)" and "b'\x95g6\xa2'". Would you expect to get actual objects instead of strings when reading the two first fields? > Incase it fails to decode using that, then it will throw a UnicodeDecodeError I read your PR, but succeeding to decode it does not mean it's correct: In [4]: b'r\xc3\xa9sum\xc3\xa9'.decode('latin') Out[4]: 'r??sum??' It worked, but is it the appropriate encoding? Probably not In [5]: b'r\xc3\xa9sum\xc3\xa9'.decode('utf8') Out[5]: 'r?sum?' If you want to be able to save bytes, the best way is to use a format that can roundtrip bytes like parquet: In [18]: df = pd.DataFrame.from_dict({'a': [b'a']}) In [19]: df.to_parquet('foo.parquet') In [20]: type(pd.read_parquet('foo.parquet')['a'][0]) Out[20]: bytes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 10:16:31 2020 From: report at bugs.python.org (Tim Peters) Date: Mon, 25 May 2020 14:16:31 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1590416191.36.0.827051215096.issue29882@roundup.psfhosted.org> Tim Peters added the comment: I see I never explicitly said +1, so I will now: +1 on merging this :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 10:25:44 2020 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 25 May 2020 14:25:44 +0000 Subject: [issue38972] [venv] Link to instructions to change PowerShell execution policy for venv activation In-Reply-To: <1575483846.28.0.24893284684.issue38972@roundup.psfhosted.org> Message-ID: <1590416744.68.0.674738064732.issue38972@roundup.psfhosted.org> Change by Miro Hron?ok : ---------- nosy: +hroncok nosy_count: 7.0 -> 8.0 pull_requests: +19647 pull_request: https://github.com/python/cpython/pull/20383 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 10:46:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 May 2020 14:46:52 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1590418012.44.0.222776211352.issue29882@roundup.psfhosted.org> STINNER Victor added the comment: Adding a function to a new hypothetical imath module sounds reasonable. I'm less comfortable with adding a new method to int type: it would mean that any int subtype "should" implement it. For example, should numpy.int64 get this method as well? What is the effect on https://docs.python.org/3.9/library/numbers.html? Does it make sense to call (True).popcount()? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 10:49:46 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 25 May 2020 14:49:46 +0000 Subject: [issue32280] Expose `_PyRuntime` through a section name In-Reply-To: <1513034681.19.0.213398074469.issue32280@psf.upfronthosting.co.za> Message-ID: <1590418186.87.0.633590974357.issue32280@roundup.psfhosted.org> Cheryl Sabella added the comment: @steve.dower, please take a look at this PR when you have a chance. Thanks! ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 10:53:08 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 May 2020 14:53:08 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1590418388.48.0.880766696723.issue29882@roundup.psfhosted.org> STINNER Victor added the comment: > In CPython itself: See count_set_bits in Modules/mathmodule.c Python/hamt.c contains an optimized function: static inline uint32_t hamt_bitcount(uint32_t i) { /* We could use native popcount instruction but that would require to either add configure flags to enable SSE4.2 support or to detect it dynamically. Otherwise, we have a risk of CPython not working properly on older hardware. In practice, there's no observable difference in performance between using a popcount instruction or the following fallback code. The algorithm is copied from: https://graphics.stanford.edu/~seander/bithacks.html */ i = i - ((i >> 1) & 0x55555555); i = (i & 0x33333333) + ((i >> 2) & 0x33333333); return (((i + (i >> 4)) & 0xF0F0F0F) * 0x1010101) >> 24; } Python/pymath.c provides a "unsigned int _Py_bit_length(unsigned long d)" function used by math.factorial, _PyLong_NumBits(), int.__format__(), long / long, _PyLong_Frexp() and PyLong_AsDouble(), etc. Maybe we could add a _Py_bit_count(). See also bpo-29782: "Use __builtin_clzl for bits_in_digit if available" which proposes to micro-optimize _Py_bit_length(). -- In the meanwhile, I also added pycore_byteswap.h *internal* header which provides static inline function which *do* use builtin functions like __builtin_bswap32(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 10:54:21 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 May 2020 14:54:21 +0000 Subject: [issue38972] [venv] Link to instructions to change PowerShell execution policy for venv activation In-Reply-To: <1575483846.28.0.24893284684.issue38972@roundup.psfhosted.org> Message-ID: <1590418461.12.0.67895959989.issue38972@roundup.psfhosted.org> STINNER Victor added the comment: New changeset ef16958d17e83723334a51428f410f726d6492a7 by Miro Hron?ok in branch 'master': bpo-38972: Fix typos in PowerShell Execution Policies links (GH-20383) https://github.com/python/cpython/commit/ef16958d17e83723334a51428f410f726d6492a7 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 10:54:30 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 14:54:30 +0000 Subject: [issue38972] [venv] Link to instructions to change PowerShell execution policy for venv activation In-Reply-To: <1575483846.28.0.24893284684.issue38972@roundup.psfhosted.org> Message-ID: <1590418470.49.0.567915343274.issue38972@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19648 pull_request: https://github.com/python/cpython/pull/20384 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 10:54:39 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 14:54:39 +0000 Subject: [issue38972] [venv] Link to instructions to change PowerShell execution policy for venv activation In-Reply-To: <1575483846.28.0.24893284684.issue38972@roundup.psfhosted.org> Message-ID: <1590418479.11.0.775508089091.issue38972@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19649 pull_request: https://github.com/python/cpython/pull/20385 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 10:54:44 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 14:54:44 +0000 Subject: [issue34397] remove redundant overflow checks in tuple and list implementations In-Reply-To: <1534189134.26.0.56676864532.issue34397@psf.upfronthosting.co.za> Message-ID: <1590418484.82.0.647365158226.issue34397@roundup.psfhosted.org> miss-islington added the comment: New changeset e682b26a6bc6d3db1a44d82db09d26224e82ccb5 by Sergey Fedoseev in branch 'master': bpo-34397: Remove redundant overflow checks in list and tuple implementation. (GH-8757) https://github.com/python/cpython/commit/e682b26a6bc6d3db1a44d82db09d26224e82ccb5 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 10:55:19 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 25 May 2020 14:55:19 +0000 Subject: [issue34397] remove redundant overflow checks in tuple and list implementations In-Reply-To: <1534189134.26.0.56676864532.issue34397@psf.upfronthosting.co.za> Message-ID: <1590418519.79.0.586322788248.issue34397@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 10:55:41 2020 From: report at bugs.python.org (Ido Michael) Date: Mon, 25 May 2020 14:55:41 +0000 Subject: [issue10572] Move test sub-packages to Lib/test In-Reply-To: <1290991979.58.0.262973706564.issue10572@psf.upfronthosting.co.za> Message-ID: <1590418541.48.0.491196040605.issue10572@roundup.psfhosted.org> Change by Ido Michael : ---------- nosy: -Ido Michael _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 10:58:04 2020 From: report at bugs.python.org (Ido Michael) Date: Mon, 25 May 2020 14:58:04 +0000 Subject: [issue40736] better message for re.search TypeError ("expected string or bytes-like object") In-Reply-To: <1590181975.57.0.833400253921.issue40736@roundup.psfhosted.org> Message-ID: <1590418684.39.0.696321790076.issue40736@roundup.psfhosted.org> Ido Michael added the comment: I agree it should be more informative and have the same standard as the rest of the Errors messages. Can I start a PR? ---------- nosy: +Ido Michael _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 11:03:06 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Mon, 25 May 2020 15:03:06 +0000 Subject: [issue40769] Pegen: cover extra surrounding parentheses for invalid annotated assignment In-Reply-To: <1590418980.01.0.581408233442.issue40769@roundup.psfhosted.org> Message-ID: <1590418986.4.0.403251756064.issue40769@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 11:03:00 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Mon, 25 May 2020 15:03:00 +0000 Subject: [issue40769] Pegen: cover extra surrounding parentheses for invalid annotated assignment Message-ID: <1590418980.01.0.581408233442.issue40769@roundup.psfhosted.org> New submission from Batuhan Taskaya : $ python -X oldparser Python 3.10.0a0 (heads/bpo-xxxxx:f2947e354c, May 21 2020, 18:54:57) [GCC 9.2.1 20191008] on linux Type "help", "copyright", "credits" or "license" for more information. >>> (()): int File "", line 1 SyntaxError: only single target (not tuple) can be annotated >>> ((())): int File "", line 1 SyntaxError: only single target (not tuple) can be annotated >>> (((()))): int File "", line 1 SyntaxError: only single target (not tuple) can be annotated >>> ([]): int File "", line 1 SyntaxError: only single target (not list) can be annotated >>> (([])): int File "", line 1 SyntaxError: only single target (not list) can be annotated ---- current ---- >>> (()): int File "", line 1 (()): int ^ SyntaxError: illegal target for annotation >>> (((()))): int File "", line 1 (((()))): int ^ SyntaxError: illegal target for annotation >>> ([]): int File "", line 1 ([]): int ^ SyntaxError: illegal target for annotation >>> (([])): int File "", line 1 (([])): int ^ SyntaxError: illegal target for annotation ---------- messages: 369885 nosy: BTaskaya priority: normal severity: normal status: open title: Pegen: cover extra surrounding parentheses for invalid annotated assignment _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 11:04:23 2020 From: report at bugs.python.org (Ido Michael) Date: Mon, 25 May 2020 15:04:23 +0000 Subject: [issue40673] urllib.request.URLopener raises different exceptions based on implementation detail In-Reply-To: <1589837413.34.0.736050920356.issue40673@roundup.psfhosted.org> Message-ID: <1590419063.59.0.0617935877041.issue40673@roundup.psfhosted.org> Ido Michael added the comment: Does it includes the FancyURLopener? This class is derived from URLopener. Also what needs to be done? Remove the URLopener, URLopener_Tests and DummyURLopeners ? ---------- nosy: +Ido Michael _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 11:04:48 2020 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 25 May 2020 15:04:48 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1590419088.21.0.423627566953.issue29882@roundup.psfhosted.org> Mark Dickinson added the comment: > For example, should numpy.int64 get this method as well? That's for the NumPy folks to decide (and I've added Nathaniel Smith to the nosy in case he wants to comment), but I don't see any particularly strong reason that NumPy would need to add it. It looks as though the NumPy integer types have survived happily without a bit_length method, for example - I don't even see any issues in the NumPy tracker suggesting that anyone missed it. (Though perhaps that's because in the case of a NumPy int one always has at least an upper bound on the bit_length available.) > What is the effect on https://docs.python.org/3.9/library/numbers.html? No effect, just as int.bit_length has no effect. > Does it make sense to call (True).popcount()? It would be spelled `True.bit_count()` if the PR goes in as-is, but sure, why not. :-) ---------- nosy: +njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 11:07:19 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Mon, 25 May 2020 15:07:19 +0000 Subject: [issue40769] Pegen: cover extra surrounding parentheses for invalid annotated assignment In-Reply-To: <1590418980.01.0.581408233442.issue40769@roundup.psfhosted.org> Message-ID: <1590419239.72.0.490504599219.issue40769@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch pull_requests: +19650 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20387 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 11:08:54 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Mon, 25 May 2020 15:08:54 +0000 Subject: [issue40769] Pegen: cover extra surrounding parentheses for invalid annotated assignment In-Reply-To: <1590418980.01.0.581408233442.issue40769@roundup.psfhosted.org> Message-ID: <1590419334.8.0.366660503315.issue40769@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- nosy: +gvanrossum, lys.nikolaou, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 11:09:21 2020 From: report at bugs.python.org (SilentGhost) Date: Mon, 25 May 2020 15:09:21 +0000 Subject: [issue40768] pyaudio In-Reply-To: <1590413194.23.0.388195454914.issue40768@roundup.psfhosted.org> Message-ID: <1590419361.57.0.505475426279.issue40768@roundup.psfhosted.org> Change by SilentGhost : ---------- resolution: -> third party stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 11:11:46 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 15:11:46 +0000 Subject: [issue38972] [venv] Link to instructions to change PowerShell execution policy for venv activation In-Reply-To: <1575483846.28.0.24893284684.issue38972@roundup.psfhosted.org> Message-ID: <1590419506.1.0.844908073464.issue38972@roundup.psfhosted.org> miss-islington added the comment: New changeset 331b2dfadb2a5dd990145c043d006166e568af7b by Miss Islington (bot) in branch '3.8': bpo-38972: Fix typos in PowerShell Execution Policies links (GH-20383) https://github.com/python/cpython/commit/331b2dfadb2a5dd990145c043d006166e568af7b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 11:13:52 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 15:13:52 +0000 Subject: [issue38972] [venv] Link to instructions to change PowerShell execution policy for venv activation In-Reply-To: <1575483846.28.0.24893284684.issue38972@roundup.psfhosted.org> Message-ID: <1590419632.45.0.425900693059.issue38972@roundup.psfhosted.org> miss-islington added the comment: New changeset 20b2bf318345170502b9840673594a5a12a40829 by Miss Islington (bot) in branch '3.9': bpo-38972: Fix typos in PowerShell Execution Policies links (GH-20383) https://github.com/python/cpython/commit/20b2bf318345170502b9840673594a5a12a40829 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 11:37:10 2020 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 25 May 2020 15:37:10 +0000 Subject: [issue39245] Public API for Vectorcall (PEP 590) In-Reply-To: <1578400570.24.0.962646656542.issue39245@roundup.psfhosted.org> Message-ID: <1590421030.96.0.845527933822.issue39245@roundup.psfhosted.org> Change by Miro Hron?ok : ---------- nosy: +hroncok nosy_count: 2.0 -> 3.0 pull_requests: +19651 pull_request: https://github.com/python/cpython/pull/20388 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 11:42:55 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 15:42:55 +0000 Subject: [issue39245] Public API for Vectorcall (PEP 590) In-Reply-To: <1578400570.24.0.962646656542.issue39245@roundup.psfhosted.org> Message-ID: <1590421375.4.0.1159159982.issue39245@roundup.psfhosted.org> miss-islington added the comment: New changeset e50883ccc4bfa198c3d5e3367306324fc49730cb by Miro Hron?ok in branch 'master': bpo-39245: Fix docs links to the stable ABI (GH-20388) https://github.com/python/cpython/commit/e50883ccc4bfa198c3d5e3367306324fc49730cb ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 11:43:04 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 15:43:04 +0000 Subject: [issue39245] Public API for Vectorcall (PEP 590) In-Reply-To: <1578400570.24.0.962646656542.issue39245@roundup.psfhosted.org> Message-ID: <1590421384.6.0.534882579041.issue39245@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19652 pull_request: https://github.com/python/cpython/pull/20389 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 11:49:39 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 15:49:39 +0000 Subject: [issue39245] Public API for Vectorcall (PEP 590) In-Reply-To: <1578400570.24.0.962646656542.issue39245@roundup.psfhosted.org> Message-ID: <1590421779.19.0.195922763935.issue39245@roundup.psfhosted.org> miss-islington added the comment: New changeset 9a5e643483578c3a944ceb5aa511d6c24280aedc by Miss Islington (bot) in branch '3.9': bpo-39245: Fix docs links to the stable ABI (GH-20388) https://github.com/python/cpython/commit/9a5e643483578c3a944ceb5aa511d6c24280aedc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 12:09:02 2020 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 25 May 2020 16:09:02 +0000 Subject: [issue40770] RFE: Run linkchecker on documentation on the CI Message-ID: <1590422942.58.0.668271802455.issue40770@roundup.psfhosted.org> New submission from Miro Hron?ok : In Fedora, we run the following check when we build Python documentation: # Verify that all of the local links work # # (we can't check network links, as we shouldn't be making network connections # within a build. Also, don't bother checking the .txt source files; some # contain example URLs, which don't work) linkchecker \ --ignore-url=^mailto: --ignore-url=^http --ignore-url=^ftp \ --ignore-url=.txt\$ --no-warnings \ Doc/build/html/index.html >From time to time, it discovers broken links: https://github.com/python/cpython/pull/15700 https://github.com/python/cpython/pull/20383 https://github.com/python/cpython/pull/20388 It would be really nice if this check run as part of the CI that builds the documentation. ---------- assignee: docs at python components: Documentation messages: 369892 nosy: docs at python, hroncok, vstinner priority: normal severity: normal status: open title: RFE: Run linkchecker on documentation on the CI versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 12:17:39 2020 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 25 May 2020 16:17:39 +0000 Subject: [issue40770] RFE: Run linkchecker on documentation on the CI In-Reply-To: <1590422942.58.0.668271802455.issue40770@roundup.psfhosted.org> Message-ID: <1590423459.43.0.472181982898.issue40770@roundup.psfhosted.org> Miro Hron?ok added the comment: Side note: linkchecker can be installed via pip, but the released version is not Python 3 compatible. In Fedora, we package it from git. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 12:40:09 2020 From: report at bugs.python.org (Ama Aje My Fren) Date: Mon, 25 May 2020 16:40:09 +0000 Subject: [issue40748] Tutorial 4.7 More on Defining Functions missing screen prompts In-Reply-To: <1590352457.14.0.0722275473169.issue40748@roundup.psfhosted.org> Message-ID: Ama Aje My Fren added the comment: On Sun, May 24, 2020 at 11:34 PM Chas Belov wrote: > > I'm guessing your point is that we only need to show >>> and ... when there will be print output so that we need to distinguish between what is input and what is output. > Yes, that is my understanding of the devguide. > As someone who is currently learning Python, however, consistency in presentation is important to me and reduces cognitive load. This is a valid concern, but it may not be the case that all people will face this issue. More importantly it should be right so the second time you come back to refresh on a point you can also grasp it quickly ... no? > > By REPL, do you mean Read-Eval-Print Loop? I'm not familiar with the acronym and that's what Google is telling me it means. But a Read-Eval-Print Loop would have output, > and my understanding is that you are arguing against use of ... when there is no output. > Yes - that is the shell of CPython that does the Read-Eval-Print Loop. My reading of the Docs Dev-quide - and I am not an expert - discourages the sys.ps1 and sys.ps2 (although the current docs site can hide them to allow for copy-pasta) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 12:43:00 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 May 2020 16:43:00 +0000 Subject: [issue39465] [subinterpreters] Design a subinterpreter friendly alternative to _Py_IDENTIFIER In-Reply-To: <1580135310.72.0.978238650594.issue39465@roundup.psfhosted.org> Message-ID: <1590424980.47.0.72871095836.issue39465@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19653 pull_request: https://github.com/python/cpython/pull/20390 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 12:47:53 2020 From: report at bugs.python.org (Jim Carroll) Date: Mon, 25 May 2020 16:47:53 +0000 Subject: [issue40771] python3 fromtimestamp generates OSError Message-ID: <1590425273.09.0.343345283384.issue40771@roundup.psfhosted.org> New submission from Jim Carroll : We encountered an interesting mtime problem in the field, that I believe represents a bug in python's datetime timestamp handling. A file stored on a windows server had the last-modified date '1/1/4501' (that's the year 4501). os.path.getmtime() returns a valid timestamp, but when we try to pass this back into datetime.datetime.fromtimestamp() we get an OSError. I understand that generating an OSError when the date exceeds the epoch support on Windows is consistent with the python docs. In our case, the date is clearly supported by Windows as evidenced by it's storage in the filesystem. Further, we can reproduce the situation using the cygwin touch utility. >>> import os, datetime >>> os.system('touch -d "4501-01-01" file.txt') >>> t = os.path.getmtime('file.txt') >>> datetime.datetime.fromtimestamp(t) Traceback (most recent call last): File "", line 1, in OSError: [Errno 22] Invalid argument What's interesting is we can manually convert it with reference to the epoch >>> datetime.datetime(1970, 1, 1) + datetime.timedelta(seconds=t) datetime.datetime(4501, 1, 1, 5, 0) We used Windows 10-Pro for our tests running python 3.8.1. ---------- components: Library (Lib) messages: 369895 nosy: jamercee priority: normal severity: normal status: open title: python3 fromtimestamp generates OSError versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 12:52:58 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 25 May 2020 16:52:58 +0000 Subject: [issue39573] [C API] Make PyObject an opaque structure in the limited C API In-Reply-To: <1581030432.16.0.48160379721.issue39573@roundup.psfhosted.org> Message-ID: <1590425578.0.0.812050534778.issue39573@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset ad3252bad905d41635bcbb4b76db30d570cf0087 by Dong-hee Na in branch 'master': bpo-39573: Convert Py_TYPE() to a static inline function (GH-20290) https://github.com/python/cpython/commit/ad3252bad905d41635bcbb4b76db30d570cf0087 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 12:56:30 2020 From: report at bugs.python.org (Andy Lester) Date: Mon, 25 May 2020 16:56:30 +0000 Subject: [issue40770] RFE: Run linkchecker on documentation on the CI In-Reply-To: <1590422942.58.0.668271802455.issue40770@roundup.psfhosted.org> Message-ID: <1590425790.31.0.656820759367.issue40770@roundup.psfhosted.org> Change by Andy Lester : ---------- nosy: +petdance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 13:00:03 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 25 May 2020 17:00:03 +0000 Subject: [issue39573] [C API] Make PyObject an opaque structure in the limited C API In-Reply-To: <1581030432.16.0.48160379721.issue39573@roundup.psfhosted.org> Message-ID: <1590426003.32.0.947330496082.issue39573@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +19654 pull_request: https://github.com/python/cpython/pull/20391 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 13:23:39 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 25 May 2020 17:23:39 +0000 Subject: [issue40764] Conflation of Counter with Multiset In-Reply-To: <1590398910.64.0.370990898211.issue40764@roundup.psfhosted.org> Message-ID: <1590427419.37.0.676551375048.issue40764@roundup.psfhosted.org> Raymond Hettinger added the comment: For the most part, Counter() works fine with negative counts. The update() and subtract() methods were specifically designed to work with negative values. Nothing prevents use cases with negative counts. In addition, there are some methods like elements() that only make sense with positive counts. So if your use case has negative counts, then these methods methods wouldn't be applicable. Should the Counter() have been two different classes? Maybe yes, maybe no. But that ship sailed a long time ago. For now, it is what it is and wouldn't be easy to change without breaking a lot of code. >From the outset, the central concept of Counter() is that it is a dictionary that returns zero when a value is missing. Pretty much everything else is a set of convenience methods supporting all the different ways people aspire to use it (multisets, bags, counters, sparse arrays, etc). People needing multiset methods use the multiset methods. People want negative counts use the other methods. Am marking this a closed. There isn't much that can be changed here. Also, theoretical objections aside, what we have now seems to be working well enough for most people most of the time. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 13:25:35 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 25 May 2020 17:25:35 +0000 Subject: [issue39573] [C API] Make PyObject an opaque structure in the limited C API In-Reply-To: <1581030432.16.0.48160379721.issue39573@roundup.psfhosted.org> Message-ID: <1590427535.39.0.405917314106.issue39573@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 7d847e29d76b178c2db66b180065771b4d90c78f by Dong-hee Na in branch 'master': bpo-39573: Fix buildbot failure for tupleobject.c (GH-20391) https://github.com/python/cpython/commit/7d847e29d76b178c2db66b180065771b4d90c78f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 13:38:52 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 25 May 2020 17:38:52 +0000 Subject: [issue40750] Support -d flag in the new parser In-Reply-To: <1590284497.38.0.369695690738.issue40750@roundup.psfhosted.org> Message-ID: <1590428332.04.0.712913443681.issue40750@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 800a35c623bbcdb5793c7d7a4974524286311479 by Pablo Galindo in branch 'master': bpo-40750: Support -d flag in the new parser (GH-20340) https://github.com/python/cpython/commit/800a35c623bbcdb5793c7d7a4974524286311479 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 13:39:00 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 25 May 2020 17:39:00 +0000 Subject: [issue40750] Support -d flag in the new parser In-Reply-To: <1590284497.38.0.369695690738.issue40750@roundup.psfhosted.org> Message-ID: <1590428340.68.0.766999210468.issue40750@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 May 25 13:39:25 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 17:39:25 +0000 Subject: [issue40750] Support -d flag in the new parser In-Reply-To: <1590284497.38.0.369695690738.issue40750@roundup.psfhosted.org> Message-ID: <1590428365.19.0.0689328654059.issue40750@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +19655 pull_request: https://github.com/python/cpython/pull/20392 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 13:46:47 2020 From: report at bugs.python.org (Ama Aje My Fren) Date: Mon, 25 May 2020 17:46:47 +0000 Subject: [issue40763] zipfile.extractall is safe by now In-Reply-To: <1590391095.61.0.387813168658.issue40763@roundup.psfhosted.org> Message-ID: Ama Aje My Fren added the comment: Hi, On Mon, May 25, 2020 at 10:18 AM Va wrote: > > So, the big red warning in Python 3 documentation might be relevant only for Python < 2.7.4, not for any Python 3 version. > You may be on to something. It does appear to be what was discussed in msg181646 on issue6972. What I see is that from CPython 3.4 (https://docs.python.org/3.4/library/zipfile.html#zipfile.ZipFile.extractall) while the security warning is still there they add the following line in it: > This module attempts to prevent that. See extract() note. The extract() note goes into some detail to explain what and how they attempt to prevent it. It is not obvious to me that zipfile._extract_member() together with (for windows) zipfile._sanitize_windows_name() have handled everything that could happen. May I suggest that out of caution we leave it as it is? ---------- nosy: +amaajemyfren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 13:58:10 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 17:58:10 +0000 Subject: [issue40750] Support -d flag in the new parser In-Reply-To: <1590284497.38.0.369695690738.issue40750@roundup.psfhosted.org> Message-ID: <1590429490.66.0.0945960821914.issue40750@roundup.psfhosted.org> miss-islington added the comment: New changeset 82da2c3eb4d69b55d9e300ab5d9c1d22bd09b9cd by Miss Islington (bot) in branch '3.9': bpo-40750: Support -d flag in the new parser (GH-20340) https://github.com/python/cpython/commit/82da2c3eb4d69b55d9e300ab5d9c1d22bd09b9cd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 14:08:13 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 25 May 2020 18:08:13 +0000 Subject: [issue40737] Fix possible reference leak for sqlite3 initialization In-Reply-To: <1590185760.13.0.611798281854.issue40737@roundup.psfhosted.org> Message-ID: <1590430093.05.0.317490211357.issue40737@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- title: Handle PyModule_AddObject() error correctly in sqlite3 -> Fix possible reference leak for sqlite3 initialization _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 14:09:07 2020 From: report at bugs.python.org (Titusz Ban) Date: Mon, 25 May 2020 18:09:07 +0000 Subject: [issue40772] module 'resource' has no attribute 'RLIMIT_VMEM' Message-ID: <1590430147.26.0.291044051097.issue40772@roundup.psfhosted.org> New submission from Titusz Ban : While trying to limit the virtual memory used by a process, using import resource MAX_VIRTUAL_MEMORY = 1 * 1024 * 1024 resource.setrlimit(resource.RLIMIT_VMEM, (MAX_VIRTUAL_MEMORY, MAX_VIRTUAL_MEMORY)) The following error occurred: AttributeError: module 'resource' has no attribute 'RLIMIT_VMEM' This is on Ubuntu 16.04 running inside WSL. on Python 3.8.2. ---------- messages: 369902 nosy: Titusz Ban priority: normal severity: normal status: open title: module 'resource' has no attribute 'RLIMIT_VMEM' type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 14:18:28 2020 From: report at bugs.python.org (SilentGhost) Date: Mon, 25 May 2020 18:18:28 +0000 Subject: [issue40771] python3 fromtimestamp generates OSError In-Reply-To: <1590425273.09.0.343345283384.issue40771@roundup.psfhosted.org> Message-ID: <1590430708.78.0.765752282395.issue40771@roundup.psfhosted.org> SilentGhost added the comment: You seem to have read the docs, so I'm a bit confused why you think that is a bug. According to https://docs.python.org/3/library/datetime.html#datetime.datetime.fromtimestamp > fromtimestamp() may raise OverflowError, if the timestamp is out of the range of values supported by the platform C localtime() or gmtime() functions, and OSError on localtime() or gmtime() failure. This looks exactly like this type of error. It is completely irrelevant whether Windows supports a timestamp this far in the future, clearly platform's localtime() / gmtime() do not. Constructing datetime object in Python does not require such system calls and their limitations no longer apply. ---------- nosy: +SilentGhost, belopolsky, p-ganssle type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 14:18:41 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 25 May 2020 18:18:41 +0000 Subject: [issue30008] OpenSSL 1.1.0 deprecated functions In-Reply-To: <1491496485.65.0.239768530197.issue30008@psf.upfronthosting.co.za> Message-ID: <1590430721.35.0.932676218757.issue30008@roundup.psfhosted.org> Cheryl Sabella added the comment: @christian.heimes, is this issue and PR still relevant? You mention 3.8 in msg291343. Thanks! ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 14:19:20 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 25 May 2020 18:19:20 +0000 Subject: [issue40756] Second argument of LoggerAdapter.__init__ should default to None In-Reply-To: <1590343358.29.0.207811312221.issue40756@roundup.psfhosted.org> Message-ID: <1590430760.35.0.813301302691.issue40756@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: -> vinay.sajip nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 14:20:59 2020 From: report at bugs.python.org (Brett Cannon) Date: Mon, 25 May 2020 18:20:59 +0000 Subject: [issue40753] Remove Python 2 compatibility code from pathlib In-Reply-To: <1590310305.67.0.10587858574.issue40753@roundup.psfhosted.org> Message-ID: <1590430859.83.0.779058087167.issue40753@roundup.psfhosted.org> Brett Cannon added the comment: > Is this an axiom or is the reasoning written down somewhere? It should be written down in the devguide at devguide.python.org. I agree with Serhiy that this isn't really adding anything by making the code that much more readable, idiomatic, or faster to warrant the overhead of this issue or the PR. While I appreciate the effort, Ram, I'm closing this issue as rejected and the related PR. ---------- nosy: +brett.cannon resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 14:21:33 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 25 May 2020 18:21:33 +0000 Subject: [issue30008] OpenSSL 1.1.0 deprecated functions In-Reply-To: <1491496485.65.0.239768530197.issue30008@psf.upfronthosting.co.za> Message-ID: <1590430893.31.0.440152115321.issue30008@roundup.psfhosted.org> Christian Heimes added the comment: Yes, it's still relevant. I haven't got time to look into the matter yet. ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 14:22:41 2020 From: report at bugs.python.org (Brett Cannon) Date: Mon, 25 May 2020 18:22:41 +0000 Subject: [issue23721] Set up a daily test coverage run In-Reply-To: <1426858130.98.0.810512379451.issue23721@psf.upfronthosting.co.za> Message-ID: <1590430961.9.0.17687075643.issue23721@roundup.psfhosted.org> Change by Brett Cannon : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 14:36:11 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 25 May 2020 18:36:11 +0000 Subject: [issue40750] Support -d flag in the new parser In-Reply-To: <1590284497.38.0.369695690738.issue40750@roundup.psfhosted.org> Message-ID: <1590431771.72.0.426241399581.issue40750@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +19656 pull_request: https://github.com/python/cpython/pull/20393 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 14:59:24 2020 From: report at bugs.python.org (Ram Rachum) Date: Mon, 25 May 2020 18:59:24 +0000 Subject: [issue40753] Remove Python 2 compatibility code from pathlib In-Reply-To: <1590310305.67.0.10587858574.issue40753@roundup.psfhosted.org> Message-ID: <1590433164.7.0.131501468606.issue40753@roundup.psfhosted.org> Ram Rachum added the comment: Brett: Oh well, I understand. Looking at the devguide, I can't find where this is written. I'm interested in seeing how it's phrased, because I do think that tiny, incremental changes are important. I would want to know why, for example, my change https://github.com/python/cpython/pull/17929 was accepted and this one wasn't. Or maybe there isn't a clear cut rule, and it's somewhat random? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 15:17:19 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 25 May 2020 19:17:19 +0000 Subject: [issue40750] Support -d flag in the new parser In-Reply-To: <1590284497.38.0.369695690738.issue40750@roundup.psfhosted.org> Message-ID: <1590434239.72.0.948411200912.issue40750@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset deb4355a37e41edf1199920789fe9572c1fb43c2 by Pablo Galindo in branch 'master': bpo-40750: Do not expand the new parser debug flags if Py_BUILD_CORE is not defined (GH-20393) https://github.com/python/cpython/commit/deb4355a37e41edf1199920789fe9572c1fb43c2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 15:17:30 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 19:17:30 +0000 Subject: [issue40750] Support -d flag in the new parser In-Reply-To: <1590284497.38.0.369695690738.issue40750@roundup.psfhosted.org> Message-ID: <1590434250.24.0.468038866742.issue40750@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19657 pull_request: https://github.com/python/cpython/pull/20394 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 15:19:46 2020 From: report at bugs.python.org (Zachary Ware) Date: Mon, 25 May 2020 19:19:46 +0000 Subject: [issue40558] update CONTRIBUTING.rst docs In-Reply-To: <1588915803.68.0.575667736057.issue40558@roundup.psfhosted.org> Message-ID: <1590434386.12.0.0607976829089.issue40558@roundup.psfhosted.org> Zachary Ware added the comment: New changeset 2377a9bae3f698efaa81ff0426d0feb14c9f6329 by Hai Shi in branch 'master': Closes bpo-40558: update CONTRIBUTING.rst to reflect current branches (GH-19989) https://github.com/python/cpython/commit/2377a9bae3f698efaa81ff0426d0feb14c9f6329 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 15:23:06 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 25 May 2020 19:23:06 +0000 Subject: [issue40740] Missing api-ms-win-core-path-l1-1.0.dll for python-3.9.0b1-amd64.exe Under Win7 In-Reply-To: <1590225113.89.0.949676590632.issue40740@roundup.psfhosted.org> Message-ID: <1590434586.67.0.492428509564.issue40740@roundup.psfhosted.org> Steve Dower added the comment: Sorry, Windows 7 is no longer supported in Python 3.9. You'll need to update, ideally to Windows 10, but if you want to stay on Windows 8.1 then I believe that one's supported until Python 3.10. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 15:29:25 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 25 May 2020 19:29:25 +0000 Subject: [issue32280] Expose `_PyRuntime` through a section name In-Reply-To: <1513034681.19.0.213398074469.issue32280@psf.upfronthosting.co.za> Message-ID: <1590434965.76.0.0827929078549.issue32280@roundup.psfhosted.org> Steve Dower added the comment: It looks fine to me, but we probably want to clearly document it as unsupported/likely to change between releases/etc., especially since it's relying on an assumption that we want to change (one static runtime per process). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 15:33:13 2020 From: report at bugs.python.org (Zachary Ware) Date: Mon, 25 May 2020 19:33:13 +0000 Subject: [issue40754] ModuleNotFoundError: No module named '_testinternalcapi' under Win10 In-Reply-To: <1590324430.61.0.117510991737.issue40754@roundup.psfhosted.org> Message-ID: <1590435193.83.0.130939014323.issue40754@roundup.psfhosted.org> Zachary Ware added the comment: At a guess, it looks like we're not including that module in the Windows installer. And indeed, it looks like it's left out of Tools/msi/test/test_files.wxs if you would like to provide a PR :) On the other hand, I'm not sure that test (and any other depending on that module) shouldn't be skipped if _testinternalcapi is missing. ---------- components: +Installation, Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 15:38:03 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 19:38:03 +0000 Subject: [issue40750] Support -d flag in the new parser In-Reply-To: <1590284497.38.0.369695690738.issue40750@roundup.psfhosted.org> Message-ID: <1590435483.34.0.201855756187.issue40750@roundup.psfhosted.org> miss-islington added the comment: New changeset 31084be618b6b7602d58e4d21ceef2e65ed8ef1b by Miss Islington (bot) in branch '3.9': bpo-40750: Do not expand the new parser debug flags if Py_BUILD_CORE is not defined (GH-20393) https://github.com/python/cpython/commit/31084be618b6b7602d58e4d21ceef2e65ed8ef1b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 15:42:32 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 25 May 2020 19:42:32 +0000 Subject: [issue23082] pathlib relative_to() can give confusing error message In-Reply-To: <1418909839.25.0.648032443428.issue23082@psf.upfronthosting.co.za> Message-ID: <1590435752.7.0.507747247723.issue23082@roundup.psfhosted.org> Steve Dower added the comment: New changeset 448325369ff73011d34d6c3a493014fe3ead8843 by Rotuna in branch 'master': bpo-23082: Better error message for PurePath.relative_to() from pathlib (GH-19611) https://github.com/python/cpython/commit/448325369ff73011d34d6c3a493014fe3ead8843 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 15:42:49 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 19:42:49 +0000 Subject: [issue23082] pathlib relative_to() can give confusing error message In-Reply-To: <1418909839.25.0.648032443428.issue23082@psf.upfronthosting.co.za> Message-ID: <1590435769.09.0.786528787745.issue23082@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +19658 pull_request: https://github.com/python/cpython/pull/20395 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 15:43:02 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 25 May 2020 19:43:02 +0000 Subject: [issue23082] pathlib relative_to() can give confusing error message In-Reply-To: <1418909839.25.0.648032443428.issue23082@psf.upfronthosting.co.za> Message-ID: <1590435782.51.0.795363960817.issue23082@roundup.psfhosted.org> Change by Steve Dower : ---------- nosy: -miss-islington resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 15:48:31 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 25 May 2020 19:48:31 +0000 Subject: [issue40741] Upgrade to SQLite v3.32.1 in Windows and macOS builds In-Reply-To: <1590229958.06.0.659446886323.issue40741@roundup.psfhosted.org> Message-ID: <1590436111.52.0.372200548083.issue40741@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- title: Upgrade to SQLite v3.32.0 in Windows and macOS builds -> Upgrade to SQLite v3.32.1 in Windows and macOS builds _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 15:49:11 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 25 May 2020 19:49:11 +0000 Subject: [issue40741] Upgrade to SQLite v3.32.1 in Windows and macOS builds In-Reply-To: <1590229958.06.0.659446886323.issue40741@roundup.psfhosted.org> Message-ID: <1590436151.18.0.457213166597.issue40741@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Patch release is out now: https://www.sqlite.org/releaselog/3_32_1.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 15:49:29 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 25 May 2020 19:49:29 +0000 Subject: [issue40654] shutil.copyfile mutates symlink for absolute path In-Reply-To: <1589685995.41.0.350903765679.issue40654@roundup.psfhosted.org> Message-ID: <1590436169.84.0.617479316914.issue40654@roundup.psfhosted.org> Steve Dower added the comment: I think we can safely say this is by design (I know Jason got his backport working). > Understood. However, this statement assumes the "correct path" is the most precise path to resolve the target. If you instead define "correct path" as the one that would be most friendly to the user who created the path, readlink no longer honors that expectation. Nothing about the os module is meant to be user-friendly first - it's based on the POSIX spec ;) The most important thing is that operations that traverse symlinks should end up at the same file as a manual traversal using readlink. The easiest way to spoil this is to optimise for readability over correctness. As discussed, realpath does a little more work to ensure readability, and anything else that cares about UI can do similar work. But if the lowest-level function loses critical information, there's no way for the developer to get it back. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 15:52:13 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 19:52:13 +0000 Subject: [issue40688] PEG Generator: Fix scripts to always use the correct parser In-Reply-To: <1589915135.03.0.240212573029.issue40688@roundup.psfhosted.org> Message-ID: <1590436333.68.0.684932125489.issue40688@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +19659 pull_request: https://github.com/python/cpython/pull/20396 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 15:52:03 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 25 May 2020 19:52:03 +0000 Subject: [issue40688] PEG Generator: Fix scripts to always use the correct parser In-Reply-To: <1589915135.03.0.240212573029.issue40688@roundup.psfhosted.org> Message-ID: <1590436323.86.0.4818361384.issue40688@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 9645930b5bc1833ef495891d22052d1ba65ab7ea by Lysandros Nikolaou in branch 'master': bpo-40688: Use the correct parser in the peg_generator scripts (GH-20235) https://github.com/python/cpython/commit/9645930b5bc1833ef495891d22052d1ba65ab7ea ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 15:53:34 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 25 May 2020 19:53:34 +0000 Subject: [issue40773] DOC: Fix rendering for 'retval' on the pdb page Message-ID: <1590436414.36.0.494727849447.issue40773@roundup.psfhosted.org> New submission from Cheryl Sabella : Please only work on this issue if it would be your first contribution to CPython. The rendering for 'retval' description at the bottom of the pdb doc page isn't quite right. https://docs.python.org/3/library/pdb.html ---------- assignee: docs at python components: Documentation keywords: easy, newcomer friendly messages: 369918 nosy: cheryl.sabella, docs at python priority: normal severity: normal stage: needs patch status: open title: DOC: Fix rendering for 'retval' on the pdb page type: enhancement versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 16:00:16 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 25 May 2020 20:00:16 +0000 Subject: [issue40688] PEG Generator: Fix scripts to always use the correct parser In-Reply-To: <1589915135.03.0.240212573029.issue40688@roundup.psfhosted.org> Message-ID: <1590436816.96.0.979487664564.issue40688@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 16:01:26 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 20:01:26 +0000 Subject: [issue23082] pathlib relative_to() can give confusing error message In-Reply-To: <1418909839.25.0.648032443428.issue23082@psf.upfronthosting.co.za> Message-ID: <1590436886.11.0.407786459666.issue23082@roundup.psfhosted.org> miss-islington added the comment: New changeset 318a18eb889e8733ffb25ada139fdd423606a609 by Miss Islington (bot) in branch '3.9': bpo-23082: Better error message for PurePath.relative_to() from pathlib (GH-19611) https://github.com/python/cpython/commit/318a18eb889e8733ffb25ada139fdd423606a609 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 16:11:43 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 25 May 2020 20:11:43 +0000 Subject: [issue40688] PEG Generator: Fix scripts to always use the correct parser In-Reply-To: <1589915135.03.0.240212573029.issue40688@roundup.psfhosted.org> Message-ID: <1590437503.71.0.169699424151.issue40688@roundup.psfhosted.org> miss-islington added the comment: New changeset 3c6c86ab77464e6bcb489064d0ec1be5d1b19f3a by Miss Islington (bot) in branch '3.9': bpo-40688: Use the correct parser in the peg_generator scripts (GH-20235) https://github.com/python/cpython/commit/3c6c86ab77464e6bcb489064d0ec1be5d1b19f3a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 16:16:58 2020 From: report at bugs.python.org (paul rubin) Date: Mon, 25 May 2020 20:16:58 +0000 Subject: [issue40734] /usr/bin surprisingly in sys.path under IDLE In-Reply-To: <1590179721.27.0.0407406629035.issue40734@roundup.psfhosted.org> Message-ID: <1590437818.09.0.427174450773.issue40734@roundup.psfhosted.org> paul rubin added the comment: I'm using Debian 10 MATE live install and have been running IDLE by clicking an icon on the top panel, but I just tried running IDLE from the shell prompt in a terminal window, and also see /usr/bin in the path. In both cases, the output of os.system('pwd').read() is my home directory. IDLE itself is installed in /usr/bin . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 16:31:34 2020 From: report at bugs.python.org (Zachary Ware) Date: Mon, 25 May 2020 20:31:34 +0000 Subject: [issue40761] unittest.TestCase.assertTrue return True even if the expr is False In-Reply-To: <1590375765.94.0.197466932598.issue40761@roundup.psfhosted.org> Message-ID: <1590438694.21.0.55430685837.issue40761@roundup.psfhosted.org> Zachary Ware added the comment: `unittest.TestCase.assertTrue` is simple enough (the entire implementation is copied below) that there is almost no way for it to fail to raise some kind of exception when its first argument is not truthy: def assertTrue(self, expr, msg=None): """Check that the expression is true.""" if not expr: msg = self._formatMessage(msg, "%s is not true" % safe_repr(expr)) raise self.failureException(msg) This basically hasn't changed in the 19 years since the unittest module was added (though variously at times named `assert_` or `failUnless`), so I'm going to go ahead and close the issue. ---------- nosy: +zach.ware resolution: -> works for me stage: -> resolved status: open -> closed title: unittest.TestCase.asserTrue return True even if the expr is False -> unittest.TestCase.assertTrue return True even if the expr is False _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 16:33:11 2020 From: report at bugs.python.org (Ama Aje My Fren) Date: Mon, 25 May 2020 20:33:11 +0000 Subject: [issue40558] update CONTRIBUTING.rst docs In-Reply-To: <1590434386.12.0.0607976829089.issue40558@roundup.psfhosted.org> Message-ID: Ama Aje My Fren added the comment: Hello all, they don't seem to be working now? Thanks. ---------- nosy: +amaajemyfren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 16:38:04 2020 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 25 May 2020 20:38:04 +0000 Subject: [issue39673] Map errno==ETIME to TimeoutError In-Reply-To: <1582019519.42.0.474248510986.issue39673@roundup.psfhosted.org> Message-ID: <1590439084.59.0.192415959343.issue39673@roundup.psfhosted.org> Giampaolo Rodola' added the comment: I'm -1 about TimeoutError because the concept of "timeout" is generic enough to be often implemented as a custom exception, which poses questions re. backward/forward compatibilty. E.g. in psutil I have "TimeoutExpired", also providing a "seconds" attribute. Also I've probably never seen ETIME / ETIMEDOUT happening, whereas AFAIU the point of PEP 3151 was to create mappings for the most common errnos. ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 16:39:37 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 25 May 2020 20:39:37 +0000 Subject: [issue30008] OpenSSL 1.1.0 deprecated functions In-Reply-To: <1491496485.65.0.239768530197.issue30008@psf.upfronthosting.co.za> Message-ID: <1590439177.6.0.0640449376386.issue30008@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +19660 pull_request: https://github.com/python/cpython/pull/20397 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 16:52:22 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 25 May 2020 20:52:22 +0000 Subject: [issue40766] Add support for SQLITE_DIRECTONLY and SQLITE_INNOCUOUS for user-defined functions In-Reply-To: <1590405226.61.0.516885064285.issue40766@roundup.psfhosted.org> Message-ID: <1590439942.38.0.311694606595.issue40766@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +19661 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20398 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 17:05:15 2020 From: report at bugs.python.org (Zachary Ware) Date: Mon, 25 May 2020 21:05:15 +0000 Subject: [issue40558] update CONTRIBUTING.rst docs In-Reply-To: <1588915803.68.0.575667736057.issue40558@roundup.psfhosted.org> Message-ID: <1590440715.04.0.732203996518.issue40558@roundup.psfhosted.org> Zachary Ware added the comment: The very tiny disk on buildbot.python.org had filled up; its had some space cleared and is now working again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 17:45:18 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 25 May 2020 21:45:18 +0000 Subject: [issue38964] Output of syntax error in f-string contains wrong filename In-Reply-To: <1575448073.72.0.500810200955.issue38964@roundup.psfhosted.org> Message-ID: <1590443118.03.0.314425486123.issue38964@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- keywords: +patch nosy: +lys.nikolaou nosy_count: 4.0 -> 5.0 pull_requests: +19662 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20399 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 17:45:56 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 25 May 2020 21:45:56 +0000 Subject: [issue38964] Output of syntax error in f-string contains wrong filename In-Reply-To: <1575448073.72.0.500810200955.issue38964@roundup.psfhosted.org> Message-ID: <1590443156.2.0.673338007256.issue38964@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 17:51:17 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 25 May 2020 21:51:17 +0000 Subject: [issue40736] better message for re.search TypeError ("expected string or bytes-like object") In-Reply-To: <1590181975.57.0.833400253921.issue40736@roundup.psfhosted.org> Message-ID: <1590443477.14.0.35755772528.issue40736@roundup.psfhosted.org> Chris Jerdonek added the comment: I already started one actually. But if I don't get to it in a week, I'll make a note here and you can take it up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 17:56:49 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 25 May 2020 21:56:49 +0000 Subject: [issue5846] Deprecate obsolete functions in unittest In-Reply-To: <1240703100.05.0.329458142097.issue5846@psf.upfronthosting.co.za> Message-ID: <1590443809.88.0.0634943558503.issue5846@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch nosy: +erlendaasland nosy_count: 3.0 -> 4.0 pull_requests: +19663 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20400 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 18:26:50 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 25 May 2020 22:26:50 +0000 Subject: [issue40734] /usr/bin surprisingly in sys.path under IDLE In-Reply-To: <1590179721.27.0.0407406629035.issue40734@roundup.psfhosted.org> Message-ID: <1590445610.66.0.199545704439.issue40734@roundup.psfhosted.org> Terry J. Reedy added the comment: 'IDLE' is an application implemented by Lib/idlelib. At least on Windows, application startup executables (like pip.exe, on Windows) are normally installed in /Scripts, at least on Windows. What, precisely, in 'installed in /usr/bin'? By 'shell prompt', I presume you mean the $ prompt of bash or older unix shell. What precisely did you type? What happens if you start with $ python3 -m idlelib ? Unless you add -n to the above, IDLE runs in two processes: the IDLE process that runs the IDLE GUI and the user process that runs user code under the supervision of idlelib/run.py. Each has its own sys and sys.path. You are seeing the user process sys.path. To see how python initially sets sys.python in the user process, before IDLE can possible modify it, edit idlelib.run by (temporarily) adding print(sys.path, file=sys.__stdout__) after 'import sys'. To do this with IDLE, click File => Open module and enter 'idlelib.run'. In case you mistakenly make IDLE not run, note where the file is and maybe make a backup first. Then close and start IDLE in your terminal and you should see sys.path printed there. You may see it twice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 18:32:48 2020 From: report at bugs.python.org (Joshua Walden) Date: Mon, 25 May 2020 22:32:48 +0000 Subject: [issue40773] DOC: Fix rendering for 'retval' on the pdb page In-Reply-To: <1590436414.36.0.494727849447.issue40773@roundup.psfhosted.org> Message-ID: <1590445968.96.0.8650572159.issue40773@roundup.psfhosted.org> Joshua Walden added the comment: I am interesting in contributing and would like to claim this issue. ---------- nosy: +Joshua Walden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 18:41:46 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 25 May 2020 22:41:46 +0000 Subject: [issue37824] IDLE: Handle Shell input warnings properly. In-Reply-To: <1565541132.63.0.273797082992.issue37824@roundup.psfhosted.org> Message-ID: <1590446506.6.0.661192476693.issue37824@roundup.psfhosted.org> Cheryl Sabella added the comment: Terry, I put this into debug and found the reason it's printing the warning three times. In `codeop.py`, it's running `_maybe_compile` and there are three try statements: ``` def _maybe_compile(compiler, source, filename, symbol): # Check for source consisting of only blank lines and comments for line in source.split("\n"): line = line.strip() if line and line[0] != '#': break # Leave it alone else: if symbol != "eval": source = "pass" # Replace it with a 'pass' statement err = err1 = err2 = None code = code1 = code2 = None try: code = compiler(source, filename, symbol) except SyntaxError: pass try: code1 = compiler(source + "\n", filename, symbol) except SyntaxError as e: err1 = e try: code2 = compiler(source + "\n\n", filename, symbol) except SyntaxError as e: err2 = e try: if code: return code if not code1 and repr(err1) == repr(err2): raise err1 finally: err1 = err2 = None ``` It also has this in the module docstring: ``` Compile three times: as is, with \n, and with \n\n appended. If it compiles as is, it's complete. If it compiles with one \n appended, we expect more. If it doesn't compile either way, we compare the error we get when compiling with \n or \n\n appended. If the errors are the same, the code is broken. But if the errors are different, we expect more. Not intuitive; not even guaranteed to hold in future releases; but this matches the compiler's behavior from Python 1.4 through 2.2, at least. ``` ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 19:07:08 2020 From: report at bugs.python.org (Stephan Hohe) Date: Mon, 25 May 2020 23:07:08 +0000 Subject: [issue40774] "Important" block in documentation of asyncio.create_subprocess_shell() not indented correctly Message-ID: <1590448028.26.0.390757544859.issue40774@roundup.psfhosted.org> New submission from Stephan Hohe : The [documentation][1] for asyncio.create_subprocess_shell() contains an "important" block about quoting special characters. This block and the following deprecation note belong to this specific function, but are not correctly indented and shown at module level. [1]: https://docs.python.org/3.10/library/asyncio-subprocess.html#asyncio.create_subprocess_shell ---------- assignee: docs at python components: Documentation messages: 369930 nosy: docs at python, sth priority: normal severity: normal status: open title: "Important" block in documentation of asyncio.create_subprocess_shell() not indented correctly versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 19:16:16 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Mon, 25 May 2020 23:16:16 +0000 Subject: [issue40246] Different error messages for same error - invalid string prefixes In-Reply-To: <1586541958.33.0.891000303304.issue40246@roundup.psfhosted.org> Message-ID: <1590448576.38.0.356303394619.issue40246@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +19664 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/20402 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 19:18:35 2020 From: report at bugs.python.org (Stephan Hohe) Date: Mon, 25 May 2020 23:18:35 +0000 Subject: [issue40774] "Important" block in documentation of asyncio.create_subprocess_shell() not indented correctly In-Reply-To: <1590448028.26.0.390757544859.issue40774@roundup.psfhosted.org> Message-ID: <1590448715.12.0.569739654604.issue40774@roundup.psfhosted.org> Change by Stephan Hohe : ---------- keywords: +patch pull_requests: +19665 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20403 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 20:10:07 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 26 May 2020 00:10:07 +0000 Subject: [issue40246] Different error messages for same error - invalid string prefixes In-Reply-To: <1586541958.33.0.891000303304.issue40246@roundup.psfhosted.org> Message-ID: <1590451807.78.0.384109049152.issue40246@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 6cb0ad20396116b5076a58b05b55286d6d5e0c94 by Lysandros Nikolaou in branch '3.9': bpo-40246: Fix test_fstring when run with the old parser (GH-20402) https://github.com/python/cpython/commit/6cb0ad20396116b5076a58b05b55286d6d5e0c94 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 20:12:34 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Tue, 26 May 2020 00:12:34 +0000 Subject: [issue40246] Different error messages for same error - invalid string prefixes In-Reply-To: <1586541958.33.0.891000303304.issue40246@roundup.psfhosted.org> Message-ID: <1590451954.81.0.187680725263.issue40246@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 20:27:05 2020 From: report at bugs.python.org (Stephen J. Turnbull) Date: Tue, 26 May 2020 00:27:05 +0000 Subject: [issue39673] Map errno==ETIME to TimeoutError In-Reply-To: <1582019519.42.0.474248510986.issue39673@roundup.psfhosted.org> Message-ID: <1590452825.98.0.152332193911.issue39673@roundup.psfhosted.org> Stephen J. Turnbull added the comment: First, let me say I like Giampaolo's TimeoutExpired *much* better as the name for this kind of exception! But that ship has sailed. I don't understand Giampaolo's comment. If I understand the claim correctly, the problem is that people who should be catching some application-specific exception may be misled into catching TimeoutError instead, or into trying to get application-specific attributes from TimeoutError. But that ship sailed with the creation of TimeoutError. (We have a whole fleet sailing with this exception.) Unless Giampaolo is proposing to deprecate TimeoutError? I'm sympathetic ;-), but deprecation is a PITA and takes forever. If we're not going to deprecate, it seems to me that it's much more developer-friendly to catch ETIME with TimeoutError, as that seems very likely to be the expected behavior. It's true that even if Giampaolo changes TimeoutExpired to subclass TimeoutError, generic TimeoutError won't have .seconds. But if you catch a TimeoutExpired with TimeoutError, that instance *will* have .seconds, and if you try to get .seconds on generic TimeoutError, you'll get a different uncaught exception (AttributeError vs. TimeoutError), but that TimeoutError wouldn't have been handled by catching TimeoutExpired. I agree with Eric that people who were distinguishing OSError with .errno=ETIME from TimeoutError might be at risk, but I wouldn't do that: if I were going to be distinguishing particular OSErrors on the basis of errno (other than in "Unexpected OSError (errno = %d)" reporting style), I'd just catch OSError and do that. On the other hand, I might expect TimeoutError to catch ETIME. And Giampaolo says he's never seen either. I suppose the author of psutil would be as likely as anyone to have seen it! On net (unless we go the deprecation route) it seems that the convenience and "intuition" of adding ETIME to TimeoutError outweighs that risk. I wish there were somebody who was there at the creation of ETIME! ---------- nosy: +sjt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 20:32:25 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 26 May 2020 00:32:25 +0000 Subject: [issue38964] Output of syntax error in f-string contains wrong filename In-Reply-To: <1575448073.72.0.500810200955.issue38964@roundup.psfhosted.org> Message-ID: <1590453145.8.0.18110356807.issue38964@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset f7b1e461567e5e3fa3ba46f589d9edc1b45b2dd0 by Lysandros Nikolaou in branch 'master': bpo-38964: Print correct filename on a SyntaxError in an fstring (GH-20399) https://github.com/python/cpython/commit/f7b1e461567e5e3fa3ba46f589d9edc1b45b2dd0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 20:41:23 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Tue, 26 May 2020 00:41:23 +0000 Subject: [issue38964] Output of syntax error in f-string contains wrong filename In-Reply-To: <1575448073.72.0.500810200955.issue38964@roundup.psfhosted.org> Message-ID: <1590453683.29.0.687390084738.issue38964@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- pull_requests: +19666 pull_request: https://github.com/python/cpython/pull/20404 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 21:05:14 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 26 May 2020 01:05:14 +0000 Subject: [issue37824] IDLE: Handle Shell input warnings properly. In-Reply-To: <1565541132.63.0.273797082992.issue37824@roundup.psfhosted.org> Message-ID: <1590455114.29.0.956584154336.issue37824@roundup.psfhosted.org> Cheryl Sabella added the comment: I added a commit to the PR to show warnings once. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 21:14:02 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 26 May 2020 01:14:02 +0000 Subject: [issue40773] DOC: Fix rendering for 'retval' on the pdb page In-Reply-To: <1590436414.36.0.494727849447.issue40773@roundup.psfhosted.org> Message-ID: <1590455642.62.0.703464756876.issue40773@roundup.psfhosted.org> Cheryl Sabella added the comment: Hi Joshua, Go for it! :-) Please take a look at https://devguide.python.org for how to get started and let us know if you have any questions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 21:24:39 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 26 May 2020 01:24:39 +0000 Subject: [issue38964] Output of syntax error in f-string contains wrong filename In-Reply-To: <1575448073.72.0.500810200955.issue38964@roundup.psfhosted.org> Message-ID: <1590456279.79.0.93076324259.issue38964@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 791a46ed58f74d673cf2c0d81deec57155bf7583 by Lysandros Nikolaou in branch '3.9': [3.9] bpo-38964: Print correct filename on a SyntaxError in an fstring (GH-20399) (GH-20404) https://github.com/python/cpython/commit/791a46ed58f74d673cf2c0d81deec57155bf7583 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 22:44:53 2020 From: report at bugs.python.org (Sidhant Bansal) Date: Tue, 26 May 2020 02:44:53 +0000 Subject: [issue40762] Writing bytes using CSV module results in b prefixed strings In-Reply-To: <1590385758.36.0.528402625132.issue40762@roundup.psfhosted.org> Message-ID: <1590461093.72.0.417643512103.issue40762@roundup.psfhosted.org> Sidhant Bansal added the comment: Hi Remi, I understand your concerns with the current approach to resolve this issue. I would like to propose a new/different change to the way `csv.writer` works. I am putting here the diff of how the updated docs (https://docs.python.org/3/library/csv.html#csv.writer) should look for my proposed change: -.. function:: writer(csvfile, dialect='excel', **fmtparams) +.. function:: writer(csvfile, encoding=None, dialect='excel', **fmtparams) Return a writer object responsible for converting the user's data into delimited strings on the given file-like object. *csvfile* can be any object with a :func:`write` method. If *csvfile* is a file object, it should be opened with - ``newline=''`` [1]_. An optional *dialect* + ``newline=''`` [1]_. An optional *encoding* parameter can be given which is + used to define how to decode the bytes encountered before writing them to + the csv. After being decoded using this encoding scheme, this resulting string + will then be transcoded from this encoding scheme to the encoding scheme specified + by the file object and be written into the CSV file. If the decoding or the + transcoding fails an error will be thrown. Incase this optional parameter is not + provided or is set to None then all the bytes will be stringified with :func:`str` + before being written just like all the other non-string data. Another optional *dialect* parameter can be given which is used to define a set of parameters specific to a particular CSV dialect. It may be an instance of a subclass of the :class:`Dialect` class or one of the strings returned by the import csv with open('eggs.csv', 'w', newline='') as csvfile: - spamwriter = csv.writer(csvfile, delimiter=' ', + spamwriter = csv.writer(csvfile, encoding='latin1', delimiter=' ', quotechar='|', quoting=csv.QUOTE_MINIMAL) + spamwriter.writerow([b'\xc2', 'A', 'B']) spamwriter.writerow(['Spam'] * 5 + ['Baked Beans']) spamwriter.writerow(['Spam', 'Lovely Spam', 'Wonderful Spam']) (This diff can be found here: https://github.com/sidhant007/cpython/commit/50d809ca21eeab72edfd8c3e5a2e8a998fb467bd) > If another program opens this CSV file, it will read the string "b'A'" which is what this field actually contains. Everything that is not a number or a string gets converted to a string: In this proposal, I am proposing "bytes" to be treated specially just like strings and numbers are treated by the CSV module, since it also one of the primitive datatypes and more relevant than other use defined custom datatypes (in your example the point and person object) in a lot of use cases. > I read your PR, but succeeding to decode it does not mean it's correct Now we will be providing the user the option to decode according to what encoding scheme they want to and that will overcome this. If they provide no encoding scheme or set it to None we will simply revert to the current behaviour, i.e the b-prefixed string will be written to the CSV. This will ensure no accidental conversions using incorrect encoding schemes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 25 23:47:36 2020 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Tue, 26 May 2020 03:47:36 +0000 Subject: [issue40755] Add missing multiset predicates to collections.Counter In-Reply-To: <1590333060.51.0.256014570882.issue40755@roundup.psfhosted.org> Message-ID: <1590464856.12.0.399909166694.issue40755@roundup.psfhosted.org> Vedran ?a?i? added the comment: isequal is really strange considering we're talking about Python here. Do any of other stdlib types have that method instead of just using == (which works fine even now)? I'd even spell the second and third as <= and >=, same as set does. But if we're finally going to accept that Counters are just bags (CS term for multisets), then surely .add and .remove (and maybe .discard, setting the count to 0) would be more natural additions. I can't count (pun intended) all the times I had to write that '] += 1' just to count some element. ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 00:05:22 2020 From: report at bugs.python.org (Ammar Askar) Date: Tue, 26 May 2020 04:05:22 +0000 Subject: [issue35808] Let's retire pgen In-Reply-To: <1548221537.82.0.492786218381.issue35808@roundup.psfhosted.org> Message-ID: <1590465922.83.0.745467207661.issue35808@roundup.psfhosted.org> Change by Ammar Askar : ---------- nosy: +ammar2 nosy_count: 7.0 -> 8.0 pull_requests: +19667 pull_request: https://github.com/python/cpython/pull/20405 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 00:08:44 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 26 May 2020 04:08:44 +0000 Subject: [issue40774] "Important" block in documentation of asyncio.create_subprocess_shell() not indented correctly In-Reply-To: <1590448028.26.0.390757544859.issue40774@roundup.psfhosted.org> Message-ID: <1590466124.63.0.722223412222.issue40774@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 4a0ac42c52a4d9ccfb0a78ab02aa03172ce0e31a by sth in branch 'master': closes bpo-40774: Fix docs indentation for asyncio.create_subprocess_shell() (GH-20403) https://github.com/python/cpython/commit/4a0ac42c52a4d9ccfb0a78ab02aa03172ce0e31a ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 00:08:56 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 26 May 2020 04:08:56 +0000 Subject: [issue40774] "Important" block in documentation of asyncio.create_subprocess_shell() not indented correctly In-Reply-To: <1590448028.26.0.390757544859.issue40774@roundup.psfhosted.org> Message-ID: <1590466136.85.0.197802386325.issue40774@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +19668 pull_request: https://github.com/python/cpython/pull/20406 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 00:11:58 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 26 May 2020 04:11:58 +0000 Subject: [issue40774] "Important" block in documentation of asyncio.create_subprocess_shell() not indented correctly In-Reply-To: <1590448028.26.0.390757544859.issue40774@roundup.psfhosted.org> Message-ID: <1590466318.34.0.615389505482.issue40774@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- pull_requests: +19669 pull_request: https://github.com/python/cpython/pull/20407 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 00:15:59 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 26 May 2020 04:15:59 +0000 Subject: [issue40774] "Important" block in documentation of asyncio.create_subprocess_shell() not indented correctly In-Reply-To: <1590448028.26.0.390757544859.issue40774@roundup.psfhosted.org> Message-ID: <1590466559.87.0.728775459075.issue40774@roundup.psfhosted.org> miss-islington added the comment: New changeset 1f2cc7cedee1a768ee43151c115f6e338751eb8c by Miss Islington (bot) in branch '3.8': closes bpo-40774: Fix docs indentation for asyncio.create_subprocess_shell() (GH-20403) https://github.com/python/cpython/commit/1f2cc7cedee1a768ee43151c115f6e338751eb8c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 00:19:49 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 26 May 2020 04:19:49 +0000 Subject: [issue40774] "Important" block in documentation of asyncio.create_subprocess_shell() not indented correctly In-Reply-To: <1590448028.26.0.390757544859.issue40774@roundup.psfhosted.org> Message-ID: <1590466789.73.0.0195795970533.issue40774@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset b03e0ee226b72da737dd0fbf39b635d13bcc220d by Benjamin Peterson in branch '3.9': [3.9] closes bpo-40774: Fix docs indentation for asyncio.create_subprocess_shell() (GH-20403) (#20407) https://github.com/python/cpython/commit/b03e0ee226b72da737dd0fbf39b635d13bcc220d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 00:45:41 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 26 May 2020 04:45:41 +0000 Subject: [issue40745] Typo in library/typing In-Reply-To: <1590252952.01.0.421861710026.issue40745@roundup.psfhosted.org> Message-ID: <1590468341.53.0.16354888732.issue40745@roundup.psfhosted.org> miss-islington added the comment: New changeset 2b0e654f91f28379c6c7ef5fd80e8754afb70935 by ziheng in branch 'master': bpo-40745: Fix typos in NewType docs (GH-20379) https://github.com/python/cpython/commit/2b0e654f91f28379c6c7ef5fd80e8754afb70935 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 00:45:48 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 26 May 2020 04:45:48 +0000 Subject: [issue40745] Typo in library/typing In-Reply-To: <1590252952.01.0.421861710026.issue40745@roundup.psfhosted.org> Message-ID: <1590468348.67.0.501261866921.issue40745@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19670 pull_request: https://github.com/python/cpython/pull/20410 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 00:45:55 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 26 May 2020 04:45:55 +0000 Subject: [issue40745] Typo in library/typing In-Reply-To: <1590252952.01.0.421861710026.issue40745@roundup.psfhosted.org> Message-ID: <1590468355.95.0.626974277028.issue40745@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19671 pull_request: https://github.com/python/cpython/pull/20411 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 00:52:17 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 26 May 2020 04:52:17 +0000 Subject: [issue40745] Typo in library/typing In-Reply-To: <1590252952.01.0.421861710026.issue40745@roundup.psfhosted.org> Message-ID: <1590468737.8.0.131809138529.issue40745@roundup.psfhosted.org> miss-islington added the comment: New changeset 6597e2af83e947d18706a3c2a463a7b728974a64 by Miss Islington (bot) in branch '3.9': bpo-40745: Fix typos in NewType docs (GH-20379) https://github.com/python/cpython/commit/6597e2af83e947d18706a3c2a463a7b728974a64 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 00:52:58 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 26 May 2020 04:52:58 +0000 Subject: [issue40745] Typo in library/typing In-Reply-To: <1590252952.01.0.421861710026.issue40745@roundup.psfhosted.org> Message-ID: <1590468778.73.0.265781099857.issue40745@roundup.psfhosted.org> miss-islington added the comment: New changeset b38bd8888a6e90741a989db2fe321e8b98d5a5c4 by Miss Islington (bot) in branch '3.8': bpo-40745: Fix typos in NewType docs (GH-20379) https://github.com/python/cpython/commit/b38bd8888a6e90741a989db2fe321e8b98d5a5c4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 01:59:56 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 26 May 2020 05:59:56 +0000 Subject: [issue17258] multiprocessing.connection challenge implicitly uses MD5 In-Reply-To: <1361391096.59.0.84157337171.issue17258@psf.upfronthosting.co.za> Message-ID: <1590472796.52.0.387447937912.issue17258@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +19672 pull_request: https://github.com/python/cpython/pull/20412 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 02:07:30 2020 From: report at bugs.python.org (zihengCat) Date: Tue, 26 May 2020 06:07:30 +0000 Subject: [issue40736] better message for re.search TypeError ("expected string or bytes-like object") In-Reply-To: <1590181975.57.0.833400253921.issue40736@roundup.psfhosted.org> Message-ID: <1590473250.49.0.643075990404.issue40736@roundup.psfhosted.org> zihengCat added the comment: Does it mean modify `cpython/Modules/_sre.c` and add `PyObject` information to PyError string ? https://github.com/python/cpython/blob/master/Modules/_sre.c#L376 ---------- nosy: +zihengcat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 02:31:37 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 26 May 2020 06:31:37 +0000 Subject: [issue40654] shutil.copyfile mutates symlink for absolute path In-Reply-To: <1589685995.41.0.350903765679.issue40654@roundup.psfhosted.org> Message-ID: <1590474697.79.0.0524887034454.issue40654@roundup.psfhosted.org> Jason R. Coombs added the comment: Thanks Steve. While I was able to avoid the original symptom by not using readlink, I still think there's an issue here, both in the surprising behavior observed by shutil.copyfile, but also by the essential behavior of readlink. The more essential issue can be illustrated this simple problem: how could one write the `cmd.exe` `dir` command using Python? Using cmd.exe: ``` C:\Users\jaraco>mklink foo C:\USERS\jaraco\bar symbolic link created for foo <<===>> C:\USERS\jaraco\bar C:\Users\jaraco>dir foo Volume in drive C has no label. Volume Serial Number is B8F4-40BB Directory of C:\Users\jaraco 2020-05-26 02:04 AM foo [C:\USERS\jaraco\bar] 1 File(s) 0 bytes 0 Dir(s) 21,078,786,048 bytes free ``` Similarly in powershell: ``` PS C:\Users\jaraco> cmd /c mklink foo c:\users\jaraco\bar symbolic link created for foo <<===>> c:\users\jaraco\bar PS C:\Users\jaraco> dir 'foo' | ?{$_.LinkType} | select Target Target ------ {c:\users\jaraco\bar} ``` Whether 'bar' exists or not, it seems to me that these tools use the "print name" to render the next hop of the link to the user (even if that target doesn't exist). `realpath` doesn't provide this functionality and neither does `readlink`. Perhaps more importantly, the "print name" is lost when copying the file using shutil, but for the same underlying reason--the print name is not exposed by the low level API, and the result is that implementation details about the platform leak out to the user interface. If "\\?\C:\Users\jaraco\bar" is the more correct form of the target, then shouldn't these tools also be exposing that value to the user? How would a Python developer wishing to implement the dir command do so? Is there a way to retain the fidelity of the print name during an shutil.copy? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 02:31:51 2020 From: report at bugs.python.org (Mariusz Felisiak) Date: Tue, 26 May 2020 06:31:51 +0000 Subject: [issue40696] exception chain cycles cause hangs (was "Exception handling with "await" can hang in Python3.9.0b1") In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1590474711.02.0.193428897395.issue40696@roundup.psfhosted.org> Mariusz Felisiak added the comment: FYI, I created fix https://github.com/django/django/pull/12978 for view's exception handling in Django. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 02:45:04 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 26 May 2020 06:45:04 +0000 Subject: [issue39830] zipfile.Path is not included in __all__ In-Reply-To: <1583176669.44.0.585908649046.issue39830@roundup.psfhosted.org> Message-ID: <1590475504.09.0.328813033571.issue39830@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset 5c1d745da5e1166a8724b619060165dcf3949e93 by Miss Islington (bot) in branch '3.8': bpo-39830: Add zipfile.Path to __all__ (GH-19115) (GH-19116) https://github.com/python/cpython/commit/5c1d745da5e1166a8724b619060165dcf3949e93 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 02:48:17 2020 From: report at bugs.python.org (Kubilay Kocak) Date: Tue, 26 May 2020 06:48:17 +0000 Subject: [issue39321] AMD64 FreeBSD Non-Debug 3.x: out of swap space (test process killed by signal 9) In-Reply-To: <1578925087.43.0.642221025557.issue39321@roundup.psfhosted.org> Message-ID: <1590475697.43.0.461311422282.issue39321@roundup.psfhosted.org> Kubilay Kocak added the comment: Added 8gb swap disk to each BB worker ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 02:51:28 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Tue, 26 May 2020 06:51:28 +0000 Subject: [issue38964] Output of syntax error in f-string contains wrong filename In-Reply-To: <1575448073.72.0.500810200955.issue38964@roundup.psfhosted.org> Message-ID: <1590475888.5.0.287259876799.issue38964@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 03:05:02 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 26 May 2020 07:05:02 +0000 Subject: [issue35714] Document that the null character '\0' terminates a struct format spec In-Reply-To: <1547160130.27.0.885629506261.issue35714@roundup.psfhosted.org> Message-ID: <1590476702.85.0.457535481543.issue35714@roundup.psfhosted.org> miss-islington added the comment: New changeset 5221a10dde4a3853fe7ace316d95767648055109 by Miss Islington (bot) in branch '3.9': bpo-35714: Reject null characters in struct format strings (GH-16928) https://github.com/python/cpython/commit/5221a10dde4a3853fe7ace316d95767648055109 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 03:10:11 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 26 May 2020 07:10:11 +0000 Subject: [issue35714] Document that the null character '\0' terminates a struct format spec In-Reply-To: <1547160130.27.0.885629506261.issue35714@roundup.psfhosted.org> Message-ID: <1590477011.85.0.624870920033.issue35714@roundup.psfhosted.org> Serhiy Storchaka added the comment: Zackery, do you mind to create a backport to 3.8? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 03:51:28 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 26 May 2020 07:51:28 +0000 Subject: [issue31485] Tkinter widget.unbind(sequence, funcid) unbind all bindings In-Reply-To: <1505483834.38.0.808110743528.issue31485@psf.upfronthosting.co.za> Message-ID: <1590479488.0.0.680766513923.issue31485@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 04:16:41 2020 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 26 May 2020 08:16:41 +0000 Subject: [issue39301] Specification of bitshift on integers should clearly state floor division used In-Reply-To: <1578725984.98.0.631488660974.issue39301@roundup.psfhosted.org> Message-ID: <1590481001.26.0.566447537875.issue39301@roundup.psfhosted.org> Mark Dickinson added the comment: New changeset af7553ac95a96713be847dd45bc5a8aeb0a75955 by Zackery Spytz in branch 'master': bpo-39301: State that floor division is used for right shift operations (GH-20347) https://github.com/python/cpython/commit/af7553ac95a96713be847dd45bc5a8aeb0a75955 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 04:16:47 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 26 May 2020 08:16:47 +0000 Subject: [issue39301] Specification of bitshift on integers should clearly state floor division used In-Reply-To: <1578725984.98.0.631488660974.issue39301@roundup.psfhosted.org> Message-ID: <1590481007.91.0.0948261088911.issue39301@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +19673 pull_request: https://github.com/python/cpython/pull/20414 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 04:16:56 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 26 May 2020 08:16:56 +0000 Subject: [issue39301] Specification of bitshift on integers should clearly state floor division used In-Reply-To: <1578725984.98.0.631488660974.issue39301@roundup.psfhosted.org> Message-ID: <1590481016.71.0.696038418654.issue39301@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19674 pull_request: https://github.com/python/cpython/pull/20415 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 04:17:05 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 26 May 2020 08:17:05 +0000 Subject: [issue39301] Specification of bitshift on integers should clearly state floor division used In-Reply-To: <1578725984.98.0.631488660974.issue39301@roundup.psfhosted.org> Message-ID: <1590481025.63.0.813645199535.issue39301@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19675 pull_request: https://github.com/python/cpython/pull/20416 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 04:17:14 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 26 May 2020 08:17:14 +0000 Subject: [issue39301] Specification of bitshift on integers should clearly state floor division used In-Reply-To: <1578725984.98.0.631488660974.issue39301@roundup.psfhosted.org> Message-ID: <1590481034.22.0.264413100061.issue39301@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19676 pull_request: https://github.com/python/cpython/pull/20417 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 04:22:48 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 26 May 2020 08:22:48 +0000 Subject: [issue40775] Fix missing dot in sqlite3 Node type name Message-ID: <1590481368.15.0.745796272194.issue40775@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- components: Library (Lib) nosy: erlendaasland priority: normal severity: normal status: open title: Fix missing dot in sqlite3 Node type name versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 04:25:50 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 26 May 2020 08:25:50 +0000 Subject: [issue40775] Fix missing dot in sqlite3 Node type name Message-ID: <1590481550.55.0.96295175677.issue40775@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +19677 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20418 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 04:26:41 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 26 May 2020 08:26:41 +0000 Subject: [issue40762] Writing bytes using CSV module results in b prefixed strings In-Reply-To: <1590385758.36.0.528402625132.issue40762@roundup.psfhosted.org> Message-ID: <1590481601.33.0.875290231114.issue40762@roundup.psfhosted.org> R?mi Lapeyre added the comment: I don't think this would be accepted but I think you could try to propose that on the python-ideas mailing list to get some feedback on your proposal. ---------- nosy: +skip.montanaro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 04:32:45 2020 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 26 May 2020 08:32:45 +0000 Subject: [issue35714] Document that the null character '\0' terminates a struct format spec In-Reply-To: <1547160130.27.0.885629506261.issue35714@roundup.psfhosted.org> Message-ID: <1590481965.26.0.372523056947.issue35714@roundup.psfhosted.org> Change by Zackery Spytz : ---------- pull_requests: +19678 pull_request: https://github.com/python/cpython/pull/20419 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 04:33:13 2020 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 26 May 2020 08:33:13 +0000 Subject: [issue39301] Specification of bitshift on integers should clearly state floor division used In-Reply-To: <1578725984.98.0.631488660974.issue39301@roundup.psfhosted.org> Message-ID: <1590481993.96.0.923839619426.issue39301@roundup.psfhosted.org> Mark Dickinson added the comment: New changeset cc0f50d62c75a1d171f5de9b56caef64e79eb013 by Miss Islington (bot) in branch '3.9': bpo-39301: State that floor division is used for right shift operations (GH-20347) (GH-20414) https://github.com/python/cpython/commit/cc0f50d62c75a1d171f5de9b56caef64e79eb013 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 04:33:46 2020 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 26 May 2020 08:33:46 +0000 Subject: [issue39301] Specification of bitshift on integers should clearly state floor division used In-Reply-To: <1578725984.98.0.631488660974.issue39301@roundup.psfhosted.org> Message-ID: <1590482026.18.0.0243473118371.issue39301@roundup.psfhosted.org> Mark Dickinson added the comment: New changeset c2a177adf3575d4eb81030fba851f78d7a8e3f51 by Miss Islington (bot) in branch '3.8': bpo-39301: State that floor division is used for right shift operations (GH-20347) (GH-20415) https://github.com/python/cpython/commit/c2a177adf3575d4eb81030fba851f78d7a8e3f51 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 04:34:07 2020 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 26 May 2020 08:34:07 +0000 Subject: [issue39301] Specification of bitshift on integers should clearly state floor division used In-Reply-To: <1578725984.98.0.631488660974.issue39301@roundup.psfhosted.org> Message-ID: <1590482047.38.0.129155089748.issue39301@roundup.psfhosted.org> Mark Dickinson added the comment: New changeset b068d892c1ba7b996e43aceb974bfadac3c577ed by Miss Islington (bot) in branch '3.7': bpo-39301: State that floor division is used for right shift operations (GH-20347) (GH-20416) https://github.com/python/cpython/commit/b068d892c1ba7b996e43aceb974bfadac3c577ed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 04:38:39 2020 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 26 May 2020 08:38:39 +0000 Subject: [issue39301] Specification of bitshift on integers should clearly state floor division used In-Reply-To: <1578725984.98.0.631488660974.issue39301@roundup.psfhosted.org> Message-ID: <1590482319.62.0.75809125956.issue39301@roundup.psfhosted.org> Mark Dickinson added the comment: Thanks Zackery for the fix! Nick: is this good enough to close, or would you like to see something more here? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 04:55:23 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 26 May 2020 08:55:23 +0000 Subject: [issue40762] Writing bytes using CSV module results in b prefixed strings In-Reply-To: <1590385758.36.0.528402625132.issue40762@roundup.psfhosted.org> Message-ID: <1590483323.73.0.634768850463.issue40762@roundup.psfhosted.org> Serhiy Storchaka added the comment: It would be confusing. There would be the encoding argument for open() to encode strings to bytes and the encoding argument for csv.writer() to decode bytes to strings. The latter will be ignored in all normal cases (for strings and numbers). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 04:57:18 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 26 May 2020 08:57:18 +0000 Subject: [issue35714] Document that the null character '\0' terminates a struct format spec In-Reply-To: <1547160130.27.0.885629506261.issue35714@roundup.psfhosted.org> Message-ID: <1590483438.74.0.0569620018605.issue35714@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 5ff5edfef63b3dbc1abb004b3fa4b3db87e79ff9 by Zackery Spytz in branch '3.8': [3.8] bpo-35714: Reject null characters in struct format strings (GH-16928) (GH-20419) https://github.com/python/cpython/commit/5ff5edfef63b3dbc1abb004b3fa4b3db87e79ff9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 04:57:22 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 26 May 2020 08:57:22 +0000 Subject: [issue35714] Document that the null character '\0' terminates a struct format spec In-Reply-To: <1547160130.27.0.885629506261.issue35714@roundup.psfhosted.org> Message-ID: <1590483442.56.0.20578399528.issue35714@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19679 pull_request: https://github.com/python/cpython/pull/20420 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 05:06:20 2020 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 26 May 2020 09:06:20 +0000 Subject: [issue39673] Map errno==ETIME to TimeoutError In-Reply-To: <1582019519.42.0.474248510986.issue39673@roundup.psfhosted.org> Message-ID: <1590483980.42.0.668332877742.issue39673@roundup.psfhosted.org> Giampaolo Rodola' added the comment: Sigh! I misread the OP's post and thought the proposal was to add TimeoutError which I forgot existed. Sorry for the noise and please disregard my previous comment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 05:16:42 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 26 May 2020 09:16:42 +0000 Subject: [issue35714] Document that the null character '\0' terminates a struct format spec In-Reply-To: <1547160130.27.0.885629506261.issue35714@roundup.psfhosted.org> Message-ID: <1590484602.64.0.77418393175.issue35714@roundup.psfhosted.org> miss-islington added the comment: New changeset 4ea802868460fad54e40cb99eb0ca283b3b293f0 by Miss Islington (bot) in branch '3.7': [3.8] bpo-35714: Reject null characters in struct format strings (GH-16928) (GH-20419) https://github.com/python/cpython/commit/4ea802868460fad54e40cb99eb0ca283b3b293f0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 05:28:56 2020 From: report at bugs.python.org (Asmi Ariv) Date: Tue, 26 May 2020 09:28:56 +0000 Subject: [issue40776] Python 3.7.6 installation issue on mac os x 10.6.8 Message-ID: <1590485336.47.0.935532303121.issue40776@roundup.psfhosted.org> New submission from Asmi Ariv : I am unable to install Python 3.7.6 on my Macbook with OS X 10.6.8 (Snow Leopard). I am getting the following error: The operation couldn?t be completed. (com.apple.installer.pagecontroller error -1.) Couldn't open "python-3.7.6-macosx10.6.pkg". Is it possible for you to provide .dmg file for the same or any higher version compatible with Mac OS X 10.6.8 (Snow Leopard). Many thanks! Regards Asmi Ariv ---------- components: Installation messages: 369962 nosy: AsmiAriv priority: normal severity: normal status: open title: Python 3.7.6 installation issue on mac os x 10.6.8 type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 05:39:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 May 2020 09:39:17 +0000 Subject: [issue39321] AMD64 FreeBSD Non-Debug 3.x: out of swap space (test process killed by signal 9) In-Reply-To: <1578925087.43.0.642221025557.issue39321@roundup.psfhosted.org> Message-ID: <1590485957.37.0.0380478802181.issue39321@roundup.psfhosted.org> STINNER Victor added the comment: > Added 8gb swap disk to each BB worker Great! Thank you very much! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 05:44:46 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 26 May 2020 09:44:46 +0000 Subject: [issue40654] shutil.copyfile mutates symlink for absolute path In-Reply-To: <1589685995.41.0.350903765679.issue40654@roundup.psfhosted.org> Message-ID: <1590486286.19.0.486178609956.issue40654@roundup.psfhosted.org> Steve Dower added the comment: > how could one write the `cmd.exe` `dir` command using Python? I haven't checked, but if the dir command resolves the entire symlink chain rather than one step at a time, you'd use realpath (though that seems unlikely, tbh). Failing that, you'd add extra logic to prepare the path for display to the user, and then you _would not_ use that prepared display path to resolve the link. readlink() is intended for resolving links, not for displaying links. That's why it doesn't prepare them for display, but preserves the most accurate information possible. (We chose a more pragmatic route with realpath(), by checking that the nicer path resolves to the same target as the accurate one, and only then returning the nicer one.) Really, for dir, you'd read the print name and display it when it's in the contents of the target. But you'd use the substitute name to resolve the target when "dir " is called. We _could_ add a new API to Python for this, but it wouldn't be cross-platform and it doesn't solve a correctness issue, so we didn't. Feel free to request it, bearing in mind that it would be Windows-only (AFAIK). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 05:55:41 2020 From: report at bugs.python.org (Sandro Mani) Date: Tue, 26 May 2020 09:55:41 +0000 Subject: [issue40777] _datetimemodule.c:3328:16: error: initializer element is not constant Message-ID: <1590486941.4.0.263574761351.issue40777@roundup.psfhosted.org> New submission from Sandro Mani : Hitting this when attempting to cross-compile python-3.9 to mingw: /builddir/build/BUILD/Python-3.9.0b1/Modules/_datetimemodule.c:3328:16: error: initializer element is not constant 3328 | .tp_base = &PyTuple_Type, Indeed PyTuple_Type does not have static storage, so I suppose this [1] applies. [1] https://stackoverflow.com/a/3025106/1338788 ---------- components: Build messages: 369965 nosy: smani priority: normal severity: normal status: open title: _datetimemodule.c:3328:16: error: initializer element is not constant type: compile error versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 06:05:03 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 26 May 2020 10:05:03 +0000 Subject: [issue40637] Allow users to disable builtin hash modules on compile time In-Reply-To: <1589572477.51.0.0723794421446.issue40637@roundup.psfhosted.org> Message-ID: <1590487503.53.0.646656654476.issue40637@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +19680 pull_request: https://github.com/python/cpython/pull/20422 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 06:15:46 2020 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 26 May 2020 10:15:46 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1590488146.5.0.252634583715.issue29882@roundup.psfhosted.org> Mark Dickinson added the comment: PR is updated and mergeable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 06:22:37 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 26 May 2020 10:22:37 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1545303410.27.0.788709270274.issue35545@psf.upfronthosting.co.za> Message-ID: <1590488557.46.0.609093374567.issue35545@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 06:23:45 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 26 May 2020 10:23:45 +0000 Subject: [issue33678] selector_events.BaseSelectorEventLoop.sock_connect should preserve socket type In-Reply-To: <1527587007.35.0.682650639539.issue33678@psf.upfronthosting.co.za> Message-ID: <1590488625.5.0.376441466224.issue33678@roundup.psfhosted.org> Cheryl Sabella added the comment: For reference, please note the comments in https://github.com/python/cpython/pull/11403#issuecomment-633779644. ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 06:26:32 2020 From: report at bugs.python.org (Christian Heimes) Date: Tue, 26 May 2020 10:26:32 +0000 Subject: [issue40637] Allow users to disable builtin hash modules on compile time In-Reply-To: <1589572477.51.0.0723794421446.issue40637@roundup.psfhosted.org> Message-ID: <1590488792.45.0.445130719188.issue40637@roundup.psfhosted.org> Christian Heimes added the comment: New changeset be63019ed726b2da045bf232782062830bb6c27d by Christian Heimes in branch 'master': bpo-40637: Fix test_pbkdf2_hmac_py for missing sha1 (#20422) https://github.com/python/cpython/commit/be63019ed726b2da045bf232782062830bb6c27d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 06:27:07 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 26 May 2020 10:27:07 +0000 Subject: [issue40637] Allow users to disable builtin hash modules on compile time In-Reply-To: <1589572477.51.0.0723794421446.issue40637@roundup.psfhosted.org> Message-ID: <1590488827.98.0.0808059053823.issue40637@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19681 pull_request: https://github.com/python/cpython/pull/20423 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 06:46:31 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 26 May 2020 10:46:31 +0000 Subject: [issue40637] Allow users to disable builtin hash modules on compile time In-Reply-To: <1589572477.51.0.0723794421446.issue40637@roundup.psfhosted.org> Message-ID: <1590489991.0.0.570875656391.issue40637@roundup.psfhosted.org> miss-islington added the comment: New changeset 66391b0c6e792236b9f487283ae161bdaf0e7ad7 by Miss Islington (bot) in branch '3.9': bpo-40637: Fix test_pbkdf2_hmac_py for missing sha1 (GH-20422) https://github.com/python/cpython/commit/66391b0c6e792236b9f487283ae161bdaf0e7ad7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 07:29:52 2020 From: report at bugs.python.org (Rafael Fontenelle) Date: Tue, 26 May 2020 11:29:52 +0000 Subject: [issue40719] Add pt-br to the language switcher at the Python 3.6 and 2.7 docs website In-Reply-To: <1590093639.24.0.0882809667446.issue40719@roundup.psfhosted.org> Message-ID: <1590492592.91.0.0485460561091.issue40719@roundup.psfhosted.org> Rafael Fontenelle added the comment: 3.6 applied. Since 2.7 was already "sunsetted", leave as is. Closing. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 07:47:41 2020 From: report at bugs.python.org (Va) Date: Tue, 26 May 2020 11:47:41 +0000 Subject: [issue40763] zipfile.extractall is safe by now In-Reply-To: <1590391095.61.0.387813168658.issue40763@roundup.psfhosted.org> Message-ID: <1590493661.5.0.153351512966.issue40763@roundup.psfhosted.org> Va added the comment: > It is not obvious to me that zipfile._extract_member() together with (for windows) zipfile._sanitize_windows_name() have handled everything that could happen. What hasn't been handled then? What is the safe way to use it? I think documenting "this function is unsafe" without suggesting a replacement or a safe way to use it isn't very constructive: as a developer, I want to extract a zip archive, but the only function supposed to do the job tells me "this is unsafe". Ok, so what am I supposed to do to be safe? That's what documentation should tell me, not let me puzzled with doubt. > May I suggest that out of caution we leave it as it is? I don't think the situation should stay like this. - either the documentation should be more precise on what are the problems that can occur, and how to handle those problems - or better, the function should be fixed and made fully safe, so all programs using it are safe (and the warning can be removed) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 07:51:57 2020 From: report at bugs.python.org (Va) Date: Tue, 26 May 2020 11:51:57 +0000 Subject: [issue40763] zipfile.extractall is safe by now? In-Reply-To: <1590391095.61.0.387813168658.issue40763@roundup.psfhosted.org> Message-ID: <1590493917.34.0.0525804539159.issue40763@roundup.psfhosted.org> Change by Va : ---------- components: +Library (Lib) title: zipfile.extractall is safe by now -> zipfile.extractall is safe by now? type: behavior -> security _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 08:16:01 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 26 May 2020 12:16:01 +0000 Subject: [issue38580] select()'s documentation claims only sequences are accepted, but it allows all iterables In-Reply-To: <1571915326.93.0.150606644361.issue38580@roundup.psfhosted.org> Message-ID: <1590495361.72.0.541261204773.issue38580@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: +19682 pull_request: https://github.com/python/cpython/pull/20424 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 08:18:22 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 26 May 2020 12:18:22 +0000 Subject: [issue40737] Fix possible reference leak for sqlite3 initialization In-Reply-To: <1590185760.13.0.611798281854.issue40737@roundup.psfhosted.org> Message-ID: <1590495502.66.0.678987523141.issue40737@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 5eb45d7d4e812e89d77da84cc619e9db81561a34 by Erlend Egeberg Aasland in branch 'master': bpo-40737: Fix possible reference leak for sqlite3 initialization (GH-20323) https://github.com/python/cpython/commit/5eb45d7d4e812e89d77da84cc619e9db81561a34 ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 08:18:33 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 26 May 2020 12:18:33 +0000 Subject: [issue40737] Fix possible reference leak for sqlite3 initialization In-Reply-To: <1590185760.13.0.611798281854.issue40737@roundup.psfhosted.org> Message-ID: <1590495513.9.0.557456252057.issue40737@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +19683 pull_request: https://github.com/python/cpython/pull/20425 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 08:20:15 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 26 May 2020 12:20:15 +0000 Subject: [issue38580] select()'s documentation claims only sequences are accepted, but it allows all iterables In-Reply-To: <1571915326.93.0.150606644361.issue38580@roundup.psfhosted.org> Message-ID: <1590495615.48.0.0238567636226.issue38580@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: +19684 pull_request: https://github.com/python/cpython/pull/20426 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 08:20:54 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 26 May 2020 12:20:54 +0000 Subject: [issue39673] Map errno==ETIME to TimeoutError In-Reply-To: <1582019519.42.0.474248510986.issue39673@roundup.psfhosted.org> Message-ID: <1590495654.22.0.688632838012.issue39673@roundup.psfhosted.org> Eric V. Smith added the comment: Thanks for clarifying, Giampaolo. I'll accept this PR once it's cleaned up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 08:31:35 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 26 May 2020 12:31:35 +0000 Subject: [issue40778] Updating Py_REFCNT and Py_SIZE to use _PyObject_CAST_CONS Message-ID: <1590496295.28.0.309191612297.issue40778@roundup.psfhosted.org> New submission from Dong-hee Na : See: https://github.com/python/cpython/pull/20290#discussion_r430007803 ---------- assignee: corona10 components: C API messages: 369974 nosy: corona10, vstinner priority: normal severity: normal status: open title: Updating Py_REFCNT and Py_SIZE to use _PyObject_CAST_CONS type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 08:38:54 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 26 May 2020 12:38:54 +0000 Subject: [issue40737] Fix possible reference leak for sqlite3 initialization In-Reply-To: <1590185760.13.0.611798281854.issue40737@roundup.psfhosted.org> Message-ID: <1590496734.86.0.33591100683.issue40737@roundup.psfhosted.org> miss-islington added the comment: New changeset 7df9c41c69e2af8d0d36452c09d243b0975495af by Miss Islington (bot) in branch '3.9': bpo-40737: Fix possible reference leak for sqlite3 initialization (GH-20323) https://github.com/python/cpython/commit/7df9c41c69e2af8d0d36452c09d243b0975495af ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 08:39:23 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 26 May 2020 12:39:23 +0000 Subject: [issue40737] Fix possible reference leak for sqlite3 initialization In-Reply-To: <1590185760.13.0.611798281854.issue40737@roundup.psfhosted.org> Message-ID: <1590496763.5.0.0939948098331.issue40737@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 May 26 08:45:23 2020 From: report at bugs.python.org (honglei jiang) Date: Tue, 26 May 2020 12:45:23 +0000 Subject: [issue40754] ModuleNotFoundError: No module named '_testinternalcapi' under Win10 In-Reply-To: <1590435193.83.0.130939014323.issue40754@roundup.psfhosted.org> Message-ID: honglei jiang added the comment: == Tests result: FAILURE == 357 tests OK. 24 tests failed: test__locale test_array test_buffer test_capi test_deque test_exceptions test_flufl test_grammar test_itertools test_locale test_memoryio test_ordered_dict test_parser test_pickle test_positional_only_arg test_string_literals test_struct test_syntax test_sys test_traceback test_urllib test_urllib2 test_urllib2_localnet test_xml_etree_c 43 tests skipped: test_asdl_parser test_check_c_globals test_clinic test_curses test_dbm_gnu test_dbm_ndbm test_devpoll test_epoll test_fcntl test_fork1 test_gdb test_grp test_ioctl test_kqueue test_multiprocessing_fork test_multiprocessing_forkserver test_nis test_openpty test_ossaudiodev test_pipes test_poll test_posix test_pty test_pwd test_readline test_resource test_smtpnet test_socketserver test_spwd test_syslog test_threadsignals test_timeout test_tix test_tk test_ttk_guionly test_urllib2net test_urllibnet test_wait3 test_wait4 test_winsound test_xmlrpc_net test_xxtestfuzz test_zipfile64 Zachary Ware ?2020?5?26??? ??3:33??? > > Zachary Ware added the comment: > > At a guess, it looks like we're not including that module in the Windows > installer. And indeed, it looks like it's left out of > Tools/msi/test/test_files.wxs if you would like to provide a PR :) > > On the other hand, I'm not sure that test (and any other depending on that > module) shouldn't be skipped if _testinternalcapi is missing. > > ---------- > components: +Installation, Windows > nosy: +paul.moore, steve.dower, tim.golden, zach.ware > versions: +Python 3.10 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 08:59:30 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 26 May 2020 12:59:30 +0000 Subject: [issue38580] select()'s documentation claims only sequences are accepted, but it allows all iterables In-Reply-To: <1571915326.93.0.150606644361.issue38580@roundup.psfhosted.org> Message-ID: <1590497970.21.0.85146005011.issue38580@roundup.psfhosted.org> Tal Einat added the comment: New changeset 3f215f35bdb9d666f5a692fc60f800da1bb1e4a9 by Tal Einat in branch '3.7': [3.7] bpo-38580: Document that select() accepts iterables, not just sequences (GH-16832) https://github.com/python/cpython/commit/3f215f35bdb9d666f5a692fc60f800da1bb1e4a9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 08:59:35 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 26 May 2020 12:59:35 +0000 Subject: [issue38580] select()'s documentation claims only sequences are accepted, but it allows all iterables In-Reply-To: <1571915326.93.0.150606644361.issue38580@roundup.psfhosted.org> Message-ID: <1590497975.34.0.146628887322.issue38580@roundup.psfhosted.org> Tal Einat added the comment: New changeset e3e800f3d28881cc9de38cd9bcbcf8fbdea238a6 by Tal Einat in branch '3.8': [3.8] bpo-38580: Document that select() accepts iterables, not just sequences (GH-16832) https://github.com/python/cpython/commit/e3e800f3d28881cc9de38cd9bcbcf8fbdea238a6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 09:33:10 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 May 2020 13:33:10 +0000 Subject: [issue39321] AMD64 FreeBSD Non-Debug 3.x: out of swap space (test process killed by signal 9) In-Reply-To: <1578925087.43.0.642221025557.issue39321@roundup.psfhosted.org> Message-ID: <1590499990.2.0.00628497943268.issue39321@roundup.psfhosted.org> STINNER Victor added the comment: Oh. I'm not sure that it works as expected :-( AMD64 FreeBSD Non-Debug 3.x build 804, Finished 18 minutes ago: https://buildbot.python.org/all/#/builders/214/builds/804 0:33:28 load avg: 4.64 [329/425/1] test_code_module passed -- running: test_multiprocessing_forkserver (2 min 13 sec) *** Signal 9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 09:38:25 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 26 May 2020 13:38:25 +0000 Subject: [issue38580] select()'s documentation claims only sequences are accepted, but it allows all iterables In-Reply-To: <1571915326.93.0.150606644361.issue38580@roundup.psfhosted.org> Message-ID: <1590500305.05.0.947138072459.issue38580@roundup.psfhosted.org> miss-islington added the comment: New changeset 500cd89ecce97750a1af32d4097d9945b7296bac by Miss Islington (bot) in branch '3.9': bpo-38580: Document that select() accepts iterables, not just sequences (GH-16832) https://github.com/python/cpython/commit/500cd89ecce97750a1af32d4097d9945b7296bac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 09:42:13 2020 From: report at bugs.python.org (Jakub Stasiak) Date: Tue, 26 May 2020 13:42:13 +0000 Subject: [issue38580] select()'s documentation claims only sequences are accepted, but it allows all iterables In-Reply-To: <1571915326.93.0.150606644361.issue38580@roundup.psfhosted.org> Message-ID: <1590500533.93.0.0802129839225.issue38580@roundup.psfhosted.org> Jakub Stasiak added the comment: Cheers for backporting this, Tal, you beat me to it! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 10:06:10 2020 From: report at bugs.python.org (Tomasz Pytel) Date: Tue, 26 May 2020 14:06:10 +0000 Subject: [issue40779] incorrect end column for single argument generator function call AST Message-ID: <1590501970.38.0.210271516775.issue40779@roundup.psfhosted.org> New submission from Tomasz Pytel : When calling a function with a single argument which is an unparenthesized generator expression the end column for the AST node is incorrect, it is one greater than the start of the function call parentheses where I assume it should be one past the closing parentheses. This call: func(i for i in range(3)) Generates the following node for the generator expression (line:col_offset -> end_line:end_col_offset): <_ast.GeneratorExp object at 0x7f3ba61f78c0> .. 1:4 -> 1:5 ---------- components: Interpreter Core messages: 369982 nosy: Tomasz Pytel priority: normal severity: normal status: open title: incorrect end column for single argument generator function call AST versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 10:08:00 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 26 May 2020 14:08:00 +0000 Subject: [issue40778] Updating Py_REFCNT and Py_SIZE to use _PyObject_CAST_CONS In-Reply-To: <1590496295.28.0.309191612297.issue40778@roundup.psfhosted.org> Message-ID: <1590502080.66.0.835609120588.issue40778@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +19685 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20428 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 10:11:05 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 26 May 2020 14:11:05 +0000 Subject: [issue40779] incorrect end column for single argument generator function call AST In-Reply-To: <1590501970.38.0.210271516775.issue40779@roundup.psfhosted.org> Message-ID: <1590502265.14.0.822624930868.issue40779@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 10:15:19 2020 From: report at bugs.python.org (David Chambers) Date: Tue, 26 May 2020 14:15:19 +0000 Subject: =?utf-8?q?=5Bissue40780=5D_str=2Eformat=28=29_handles_trailing_zeros_inco?= =?utf-8?q?nsistently_in_=E2=80=9Cgeneral=E2=80=9D_format?= Message-ID: <1590502519.54.0.593108276962.issue40780@roundup.psfhosted.org> New submission from David Chambers : According to https://docs.python.org/3/library/string.html#format-specification-mini-language, ?insignificant trailing zeros are removed from the significand? when 'g' is specified. I encountered a situation in which a trailing zero is not removed: $ python3 Python 3.7.7 (default, Mar 10 2020, 15:43:03) [Clang 11.0.0 (clang-1100.0.33.17)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> '{0:.3g}'.format(1504) '1.5e+03' >>> '{0:.3g}'.format(1505) '1.50e+03' >>> '{0:.3g}'.format(1506) '1.51e+03' Is this behaviour intentional? If so, why is the trailing zero in 1.50 considered significant for 1505 but insignificant for 1504? ---------- messages: 369983 nosy: davidchambers priority: normal severity: normal status: open title: str.format() handles trailing zeros inconsistently in ?general? format type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 10:19:06 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 26 May 2020 14:19:06 +0000 Subject: [issue40778] Updating Py_REFCNT and Py_SIZE to use _PyObject_CAST_CONS In-Reply-To: <1590496295.28.0.309191612297.issue40778@roundup.psfhosted.org> Message-ID: <1590502746.59.0.384080067443.issue40778@roundup.psfhosted.org> Dong-hee Na added the comment: Victor will convert the macros to the functions. So this change will be included in his PR. ---------- resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 10:19:53 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 May 2020 14:19:53 +0000 Subject: [issue39573] [C API] Make PyObject an opaque structure in the limited C API In-Reply-To: <1581030432.16.0.48160379721.issue39573@roundup.psfhosted.org> Message-ID: <1590502793.81.0.902259927458.issue39573@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19686 pull_request: https://github.com/python/cpython/pull/20429 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 10:22:12 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 26 May 2020 14:22:12 +0000 Subject: [issue39244] multiprocessing.get_all_start_methods() wrong default on macOS In-Reply-To: <1578398087.26.0.562792969059.issue39244@roundup.psfhosted.org> Message-ID: <1590502932.93.0.708886439345.issue39244@roundup.psfhosted.org> Change by Tal Einat : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 10:22:42 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 26 May 2020 14:22:42 +0000 Subject: [issue40779] incorrect end column for single argument generator function call AST In-Reply-To: <1590501970.38.0.210271516775.issue40779@roundup.psfhosted.org> Message-ID: <1590502962.86.0.769288136798.issue40779@roundup.psfhosted.org> Batuhan Taskaya added the comment: What version are you using, 3.8? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 10:23:05 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 26 May 2020 14:23:05 +0000 Subject: [issue40779] incorrect end column for single argument generator function call AST In-Reply-To: <1590501970.38.0.210271516775.issue40779@roundup.psfhosted.org> Message-ID: <1590502985.97.0.390877411339.issue40779@roundup.psfhosted.org> Batuhan Taskaya added the comment: For more context, see also bpo-39235. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 10:51:01 2020 From: report at bugs.python.org (Tomasz Pytel) Date: Tue, 26 May 2020 14:51:01 +0000 Subject: [issue40779] incorrect end column for single argument generator function call AST In-Reply-To: <1590501970.38.0.210271516775.issue40779@roundup.psfhosted.org> Message-ID: <1590504661.75.0.717913087426.issue40779@roundup.psfhosted.org> Tomasz Pytel added the comment: I am on 3.8.1 and you are right this is the same as #39235 so please disregard. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 10:53:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 May 2020 14:53:12 +0000 Subject: [issue40781] Remove sys._debugmallocstats() function and PYTHONMALLOCSTATS environment variable In-Reply-To: <1590504532.44.0.996467674313.issue40781@roundup.psfhosted.org> Message-ID: <1590504792.21.0.413044270084.issue40781@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +19687 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20430 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 10:54:16 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 May 2020 14:54:16 +0000 Subject: [issue40781] Remove sys._debugmallocstats() function and PYTHONMALLOCSTATS environment variable In-Reply-To: <1590504532.44.0.996467674313.issue40781@roundup.psfhosted.org> Message-ID: <1590504856.74.0.183947202425.issue40781@roundup.psfhosted.org> STINNER Victor added the comment: INADA-san, Antoine, Serhiy, Pablo: did any of you used this feature recently? Is it useful for your hacks? ---------- nosy: +inada.naoki, pablogsal, pitrou, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 10:54:28 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 26 May 2020 14:54:28 +0000 Subject: [issue39244] multiprocessing.get_all_start_methods() wrong default on macOS In-Reply-To: <1578398087.26.0.562792969059.issue39244@roundup.psfhosted.org> Message-ID: <1590504868.26.0.208312013931.issue39244@roundup.psfhosted.org> Tal Einat added the comment: New changeset db098bc1f05bd0773943e59f83489f05f28dedf8 by idomic in branch 'master': bpo-39244: multiprocessing return default start method first on macOS (GH-18625) https://github.com/python/cpython/commit/db098bc1f05bd0773943e59f83489f05f28dedf8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 10:54:36 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 26 May 2020 14:54:36 +0000 Subject: [issue39244] multiprocessing.get_all_start_methods() wrong default on macOS In-Reply-To: <1578398087.26.0.562792969059.issue39244@roundup.psfhosted.org> Message-ID: <1590504876.23.0.414510240351.issue39244@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +19688 pull_request: https://github.com/python/cpython/pull/20431 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 10:54:44 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 26 May 2020 14:54:44 +0000 Subject: [issue39244] multiprocessing.get_all_start_methods() wrong default on macOS In-Reply-To: <1578398087.26.0.562792969059.issue39244@roundup.psfhosted.org> Message-ID: <1590504884.76.0.452934607363.issue39244@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19689 pull_request: https://github.com/python/cpython/pull/20432 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 10:55:25 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 26 May 2020 14:55:25 +0000 Subject: [issue40756] Second argument of LoggerAdapter.__init__ should default to None In-Reply-To: <1590343358.29.0.207811312221.issue40756@roundup.psfhosted.org> Message-ID: <1590504925.39.0.487703118912.issue40756@roundup.psfhosted.org> miss-islington added the comment: New changeset 8ad052464a4e0aef9a11663b80f187087b773592 by Arturo Escaip in branch 'master': bpo-40756: Default second argument of LoggerAdapter.__init__ to None (GH-20362) https://github.com/python/cpython/commit/8ad052464a4e0aef9a11663b80f187087b773592 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 10:56:17 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 26 May 2020 14:56:17 +0000 Subject: [issue39244] multiprocessing.get_all_start_methods() wrong default on macOS In-Reply-To: <1578398087.26.0.562792969059.issue39244@roundup.psfhosted.org> Message-ID: <1590504977.98.0.0298487457946.issue39244@roundup.psfhosted.org> Tal Einat added the comment: Thanks for fixing this, Ido! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 11:00:34 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 26 May 2020 15:00:34 +0000 Subject: [issue39724] IDLE threading + stdout/stdin observed blocking behavior In-Reply-To: <1582367377.76.0.509554808526.issue39724@roundup.psfhosted.org> Message-ID: <1590505234.59.0.396994649347.issue39724@roundup.psfhosted.org> Tal Einat added the comment: This seems to be at least partly intentional: When waiting for user input, IDLE starts a nested Tk mainloop (!), which is stopped by the end-of-line handler. It seems to me that this is what is causing displaying other outputs to be delayed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 10:48:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 May 2020 14:48:52 +0000 Subject: [issue40781] Remove sys._debugmallocstats() function and PYTHONMALLOCSTATS environment variable Message-ID: <1590504532.44.0.996467674313.issue40781@roundup.psfhosted.org> New submission from STINNER Victor : I never used sys._debugmallocstats() function or PYTHONMALLOCSTATS environment variable, whereas I spend significant time on optimizing memory allocators and free lists. The output is written into stderr which is very convenient to process these data. I only "re"-discovered recently this debug feature when writing PR 20247 "Make tuple free list per-interpreter": I had to update _PyTuple_DebugMallocStats(). Removing this debug feature reduces the maintenance burden. Attached PR removes all code related to the sys._debugmallocstats() function and the PYTHONMALLOCSTATS environment variable. If someone wants to hack Python memory allocators or free lists, I suggest to add temporary code to dump some stats. But I don't think that it's worth it to keep the feature for all uses in Python. People who worry about the memory usage of their application don't have to go into this low level of details, but care more about memory peak, where the memory was allocated (ex: tracemalloc module), RSS memory, etc. ---------- components: Interpreter Core messages: 369987 nosy: vstinner priority: normal severity: normal status: open title: Remove sys._debugmallocstats() function and PYTHONMALLOCSTATS environment variable versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 11:01:26 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 26 May 2020 15:01:26 +0000 Subject: [issue39724] IDLE threading + stdout/stdin observed blocking behavior In-Reply-To: <1582367377.76.0.509554808526.issue39724@roundup.psfhosted.org> Message-ID: <1590505286.09.0.994418260064.issue39724@roundup.psfhosted.org> Tal Einat added the comment: Can someone talk about the reasoning behind the nested Tk mainloop? I haven't managed to find anything useful in code comments and such. Guido? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 11:01:57 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 May 2020 15:01:57 +0000 Subject: [issue40781] Remove sys._debugmallocstats() function and PYTHONMALLOCSTATS environment variable In-Reply-To: <1590504532.44.0.996467674313.issue40781@roundup.psfhosted.org> Message-ID: <1590505317.35.0.768298118655.issue40781@roundup.psfhosted.org> STINNER Victor added the comment: "Recent" changes in builtin Python debug tools. * In Python 3.9, I removed the "COUNT_ALLOCS" special build: bpo-39489. * Debug build of Python 3.8 is now ABI compatible with release build: I disabled Py_TRACE_REFS macro by default in --with-pydebug build. There is a new opt-in --with-trace-refs option for configure. We have a dedicated buildbot to ensure that the feature continue to work. * In Python 3.8, I modified the debug hooks on Python memory allocators to omit the serial number by default. It reduces the memory footprint when these hooks are used (1 size_t per memory block). Extract of Objects/obmalloc.c: /* Uncomment this define to add the "serialno" field */ /* #define PYMEM_DEBUG_SERIALNO */ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 11:09:23 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 26 May 2020 15:09:23 +0000 Subject: =?utf-8?q?=5Bissue40780=5D_str=2Eformat=28=29_handles_trailing_zeros_inco?= =?utf-8?q?nsistently_in_=E2=80=9Cgeneral=E2=80=9D_format?= In-Reply-To: <1590502519.54.0.593108276962.issue40780@roundup.psfhosted.org> Message-ID: <1590505763.01.0.270514185536.issue40780@roundup.psfhosted.org> Change by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 11:12:32 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 26 May 2020 15:12:32 +0000 Subject: =?utf-8?q?=5Bissue40780=5D_str=2Eformat=28=29_handles_trailing_zeros_inco?= =?utf-8?q?nsistently_in_=E2=80=9Cgeneral=E2=80=9D_format?= In-Reply-To: <1590502519.54.0.593108276962.issue40780@roundup.psfhosted.org> Message-ID: <1590505952.46.0.720545405962.issue40780@roundup.psfhosted.org> Eric V. Smith added the comment: FWIW, which is probably not much with ".g" formatting, this is how Decimal behaves: >>> from decimal import Decimal as D >>> format(D(1504), '.3g') '1.50e+3' >>> format(D(1505), '.3g') '1.50e+3' >>> format(D(1506), '.3g') '1.51e+3' >>> format(D(1504.0), '.3g') '1.50e+3' >>> format(D(1505.0), '.3g') '1.50e+3' >>> format(D(1506.0), '.3g') '1.51e+3' >>> format(D("1504.0"), '.3g') '1.50e+3' >>> format(D("1505.0"), '.3g') '1.50e+3' >>> format(D("1506.0"), '.3g') '1.51e+3' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 11:13:40 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 26 May 2020 15:13:40 +0000 Subject: [issue39244] multiprocessing.get_all_start_methods() wrong default on macOS In-Reply-To: <1578398087.26.0.562792969059.issue39244@roundup.psfhosted.org> Message-ID: <1590506020.22.0.772459640493.issue39244@roundup.psfhosted.org> miss-islington added the comment: New changeset 1c88bf8541e6fa292f1578144add17d3672c5fcf by Miss Islington (bot) in branch '3.9': bpo-39244: multiprocessing return default start method first on macOS (GH-18625) https://github.com/python/cpython/commit/1c88bf8541e6fa292f1578144add17d3672c5fcf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 11:13:16 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 26 May 2020 15:13:16 +0000 Subject: =?utf-8?q?=5Bissue40780=5D_str=2Eformat=28=29_handles_trailing_zeros_inco?= =?utf-8?q?nsistently_in_=E2=80=9Cgeneral=E2=80=9D_format?= In-Reply-To: <1590502519.54.0.593108276962.issue40780@roundup.psfhosted.org> Message-ID: <1590505996.43.0.518853738551.issue40780@roundup.psfhosted.org> Change by Eric V. Smith : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 11:14:04 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 26 May 2020 15:14:04 +0000 Subject: [issue39244] multiprocessing.get_all_start_methods() wrong default on macOS In-Reply-To: <1578398087.26.0.562792969059.issue39244@roundup.psfhosted.org> Message-ID: <1590506044.84.0.0338254724854.issue39244@roundup.psfhosted.org> miss-islington added the comment: New changeset 285ff63351bb5a42099527c283f65434e761be83 by Miss Islington (bot) in branch '3.8': bpo-39244: multiprocessing return default start method first on macOS (GH-18625) https://github.com/python/cpython/commit/285ff63351bb5a42099527c283f65434e761be83 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 11:15:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 May 2020 15:15:54 +0000 Subject: [issue40601] [C API] Hide static types from the limited C API In-Reply-To: <1589235805.82.0.0888479979707.issue40601@roundup.psfhosted.org> Message-ID: <1590506154.62.0.848716127159.issue40601@roundup.psfhosted.org> STINNER Victor added the comment: > Technically, it is not, see https://www.python.org/dev/peps/pep-0384/#structures > Structures like PyLong_Type are *not* part of the limited API. The symbol is exported by libpython: $ objdump -T /lib64/libpython3.8.so.1.0|grep PyLong_Type 000000000030de00 g DO .data 00000000000001a0 Base PyLong_Type A C extension can use a reference to PyLong_Type. > I don't think it's necessary here. Did you read my rationale (first message)? Do you mean that per-interpreter GIL is not worth it? -- A first step would be to expose "CheckExact" macros as function calls in the limited C API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 11:16:53 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 May 2020 15:16:53 +0000 Subject: [issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10 In-Reply-To: <1572192430.43.0.755831692199.issue38605@roundup.psfhosted.org> Message-ID: <1590506213.48.0.333879449897.issue38605@roundup.psfhosted.org> STINNER Victor added the comment: Is there anyone interested to implement this change in Python 3.10? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 11:16:59 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 May 2020 15:16:59 +0000 Subject: [issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10 In-Reply-To: <1572192430.43.0.755831692199.issue38605@roundup.psfhosted.org> Message-ID: <1590506219.75.0.625148455159.issue38605@roundup.psfhosted.org> Change by STINNER Victor : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 11:21:56 2020 From: report at bugs.python.org (Florian Wickert) Date: Tue, 26 May 2020 15:21:56 +0000 Subject: [issue19500] ftplib: Add client-side SSL session resumption In-Reply-To: <1383624130.64.0.185541289049.issue19500@psf.upfronthosting.co.za> Message-ID: <1590506516.55.0.737512312633.issue19500@roundup.psfhosted.org> Florian Wickert added the comment: Using vsftpd 3.0.3 with ssl_enable=YES and require_ssl_reuse=YES I get the following error when I try to upload a file with conn.storbinary(): FTP command: Client "192.168.178.115", "STOR something.bin" FTP response: Client "192.168.178.115", "150 Ok to send data." FTP response: Client "x.x.x.x", "150 Ok to send data." DEBUG: Client "x.x.x.x", "DATA connection terminated without SSL shutdown. Buggy client! Integrity of upload cannot be asserted." FTP response: Client "x.x.x.x", "426 Failure reading network stream." This also happens when SSL reuse is disabled on the server side. Uploading with FileZilla works and there is basically no difference in the log until the error happens. ---------- nosy: +Florian Wickert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 11:34:30 2020 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 26 May 2020 15:34:30 +0000 Subject: =?utf-8?q?=5Bissue40780=5D_str=2Eformat=28=29_handles_trailing_zeros_inco?= =?utf-8?q?nsistently_in_=E2=80=9Cgeneral=E2=80=9D_format?= In-Reply-To: <1590502519.54.0.593108276962.issue40780@roundup.psfhosted.org> Message-ID: <1590507270.72.0.27092730753.issue40780@roundup.psfhosted.org> Mark Dickinson added the comment: Very interesting. Agreed that this looks like a bug. It affects old-style formatting, too: >>> "%.3g" % 1503 '1.5e+03' >>> "%.3g" % 1504 '1.5e+03' >>> "%.3g" % 1505 '1.50e+03' ---------- versions: +Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 11:42:15 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 26 May 2020 15:42:15 +0000 Subject: [issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10 In-Reply-To: <1572192430.43.0.755831692199.issue38605@roundup.psfhosted.org> Message-ID: <1590507735.18.0.855276602755.issue38605@roundup.psfhosted.org> Batuhan Taskaya added the comment: I'm starting it if anyone else already prepared a patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 11:43:49 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 26 May 2020 15:43:49 +0000 Subject: [issue37999] No longer use implicit convertion to int with loss In-Reply-To: <1567337044.72.0.119982097156.issue37999@roundup.psfhosted.org> Message-ID: <1590507829.11.0.0526219984202.issue37999@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 578c3955e0222ec7b3146197467fbb0fcfae12fe by Serhiy Storchaka in branch 'master': bpo-37999: No longer use __int__ in implicit integer conversions. (GH-15636) https://github.com/python/cpython/commit/578c3955e0222ec7b3146197467fbb0fcfae12fe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 11:45:38 2020 From: report at bugs.python.org (James Barrett) Date: Tue, 26 May 2020 15:45:38 +0000 Subject: [issue40782] AbstactEventLoop.run_in_executor is listed as an async method, but should actually return a Futrue Message-ID: <1590507938.7.0.58927076005.issue40782@roundup.psfhosted.org> New submission from James Barrett : As discussed in < https://github.com/python/typeshed/issues/3999#issuecomment-634097968 > the type of `AbstractEventLoop.run_in_executor` is defined at < https://github.com/python/cpython/blob/master/Lib/asyncio/events.py#L286 > as follows: ``` async def run_in_executor(self, executor, func, *args): raise NotImplementedError ``` However all concrete implementations of this method are actually not async methods but rather synchronous methods which return a Future object. Logically this appears to make sense: at base `run_in_executor` is not a coroutine, since it doesn't create an object representing code which will be executed when the object is awaited, rather it returns an object representing code which is running asynchronously elsewhere (on another thread) and which can be awaited to wait for that other thread to complete its task. Which seems to be a perfect match to what a Future object is supposed to be. As such it seems that the current definition of the method as a coroutine is possibly a mistake. Alternatively if some feel that it is important to allow concrete implementations to implement it as a coroutine if they need to then perhaps it could be specified to be a method returning an Awaitable, since that would cover both options? ---------- components: Library (Lib) messages: 370005 nosy: jamesba priority: normal severity: normal status: open title: AbstactEventLoop.run_in_executor is listed as an async method, but should actually return a Futrue type: behavior versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 11:47:48 2020 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 26 May 2020 15:47:48 +0000 Subject: [issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type In-Reply-To: <1586276621.78.0.843757244355.issue40217@roundup.psfhosted.org> Message-ID: <1590508068.73.0.868559038763.issue40217@roundup.psfhosted.org> Change by Petr Viktorin : ---------- pull_requests: +19690 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/20433 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 11:49:15 2020 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 26 May 2020 15:49:15 +0000 Subject: =?utf-8?q?=5Bissue40780=5D_str=2Eformat=28=29_handles_trailing_zeros_inco?= =?utf-8?q?nsistently_in_=E2=80=9Cgeneral=E2=80=9D_format?= In-Reply-To: <1590502519.54.0.593108276962.issue40780@roundup.psfhosted.org> Message-ID: <1590508155.63.0.729883651566.issue40780@roundup.psfhosted.org> Mark Dickinson added the comment: This appears to go all the way down to _Py_dg_dtoa, which in mode 3 is supposed to suppress trailing zeros. I'll dig in and see if I can find a fix. (Assigning to me so that I don't forget it, but I also don't want to block anyone else - if anyone else feels like working on this, please do go ahead.) ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 11:56:46 2020 From: report at bugs.python.org (Inada Naoki) Date: Tue, 26 May 2020 15:56:46 +0000 Subject: [issue40781] Remove sys._debugmallocstats() function and PYTHONMALLOCSTATS environment variable In-Reply-To: <1590504532.44.0.996467674313.issue40781@roundup.psfhosted.org> Message-ID: <1590508606.57.0.597160879619.issue40781@roundup.psfhosted.org> Inada Naoki added the comment: I use it often when I investigate memory usage. It provides some useful information even in release Python build. For example: * Which size class is most allocated? * How many block are allocated? * Which size class have most free blocks? (e.g. Inner fragmentation) * Combined with tracing application to stderr, which part of the application increase memory usage? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 11:57:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 May 2020 15:57:58 +0000 Subject: [issue40781] Remove sys._debugmallocstats() function and PYTHONMALLOCSTATS environment variable In-Reply-To: <1590504532.44.0.996467674313.issue40781@roundup.psfhosted.org> Message-ID: <1590508678.65.0.708835372935.issue40781@roundup.psfhosted.org> STINNER Victor added the comment: > I use it often when I investigate memory usage. Oh. If you use it, we should keep the feature :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 12:06:27 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 26 May 2020 16:06:27 +0000 Subject: [issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10 In-Reply-To: <1572192430.43.0.755831692199.issue38605@roundup.psfhosted.org> Message-ID: <1590509187.26.0.25198778252.issue38605@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch pull_requests: +19691 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20434 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 12:12:53 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 26 May 2020 16:12:53 +0000 Subject: =?utf-8?q?=5Bissue40780=5D_str=2Eformat=28=29_handles_trailing_zeros_inco?= =?utf-8?q?nsistently_in_=E2=80=9Cgeneral=E2=80=9D_format?= In-Reply-To: <1590502519.54.0.593108276962.issue40780@roundup.psfhosted.org> Message-ID: <1590509573.87.0.0732681393737.issue40780@roundup.psfhosted.org> Eric V. Smith added the comment: For completeness, here's the output using just format, which I prefer over str.format because there's less going on: it removes all of the str.format machinery and basically directly calls obj.__format__. >>> format(1504, '.3g') '1.5e+03' >>> format(1505, '.3g') '1.50e+03' >>> format(1506, '.3g') '1.51e+03' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 12:21:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 May 2020 16:21:49 +0000 Subject: [issue40778] Updating Py_REFCNT and Py_SIZE to use _PyObject_CAST_CONS In-Reply-To: <1590496295.28.0.309191612297.issue40778@roundup.psfhosted.org> Message-ID: <1590510109.33.0.122115716648.issue40778@roundup.psfhosted.org> STINNER Victor added the comment: Should be fixed by https://github.com/python/cpython/pull/20429 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 12:24:34 2020 From: report at bugs.python.org (Jim Carroll) Date: Tue, 26 May 2020 16:24:34 +0000 Subject: [issue40771] python3 fromtimestamp generates OSError In-Reply-To: <1590425273.09.0.343345283384.issue40771@roundup.psfhosted.org> Message-ID: <1590510274.54.0.879984058522.issue40771@roundup.psfhosted.org> Jim Carroll added the comment: My bad. I read the docs, but mistakenly believed platform support meant OS. I figured since Windows maketh then Windows should taketh. I've spent the day studying the _datetimemodule.c code and now realize my error. Question -- it seems to me an unnecessary limitation. If someone were willing to submit a platform neutral version of localtime/gmtime that worked identically on all platforms, would this be met with eagerness? Or more of a shoulder shrug? It's a fair amount of effort, and I'm willing to commit to it, but if the issue only matters to me, I can work around it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 12:28:34 2020 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 26 May 2020 16:28:34 +0000 Subject: =?utf-8?q?=5Bissue40780=5D_str=2Eformat=28=29_handles_trailing_zeros_inco?= =?utf-8?q?nsistently_in_=E2=80=9Cgeneral=E2=80=9D_format?= In-Reply-To: <1590502519.54.0.593108276962.issue40780@roundup.psfhosted.org> Message-ID: <1590510514.1.0.942577875532.issue40780@roundup.psfhosted.org> Change by Mark Dickinson : ---------- keywords: +patch pull_requests: +19692 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20435 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 12:30:09 2020 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 26 May 2020 16:30:09 +0000 Subject: =?utf-8?q?=5Bissue40780=5D_str=2Eformat=28=29_handles_trailing_zeros_inco?= =?utf-8?q?nsistently_in_=E2=80=9Cgeneral=E2=80=9D_format?= In-Reply-To: <1590502519.54.0.593108276962.issue40780@roundup.psfhosted.org> Message-ID: <1590510609.56.0.129314091981.issue40780@roundup.psfhosted.org> Mark Dickinson added the comment: Created a PR with a tentative fix. It still needs regression tests; working on those. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 12:33:35 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 26 May 2020 16:33:35 +0000 Subject: [issue40781] Remove sys._debugmallocstats() function and PYTHONMALLOCSTATS environment variable In-Reply-To: <1590504532.44.0.996467674313.issue40781@roundup.psfhosted.org> Message-ID: <1590510815.14.0.527635605746.issue40781@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Please, don't remove these as I use them often to track down memory usage in a similar way as Inada-san. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 12:37:11 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 26 May 2020 16:37:11 +0000 Subject: [issue40783] test_interpreters test_interpreters leaked [216, 216, 216] references In-Reply-To: <1590511023.44.0.277670003926.issue40783@roundup.psfhosted.org> Message-ID: <1590511031.42.0.681788181535.issue40783@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- assignee: -> nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 12:37:03 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 26 May 2020 16:37:03 +0000 Subject: [issue40783] test_interpreters test_interpreters leaked [216, 216, 216] references Message-ID: <1590511023.44.0.277670003926.issue40783@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : https://buildbot.python.org/all/#/builders/394/builds/94 ...... test_interpreters leaked [216, 216, 216] references, sum=648 test_interpreters leaked [84, 84, 84] memory blocks, sum=252 1 test failed again: test_interpreters ---------- components: Tests messages: 370014 nosy: eric.snow, nanjekyejoannah, pablogsal, vstinner priority: normal severity: normal status: open title: test_interpreters test_interpreters leaked [216, 216, 216] references type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 12:41:59 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 May 2020 16:41:59 +0000 Subject: [issue40783] test_interpreters test_interpreters leaked [216, 216, 216] references In-Reply-To: <1590511023.44.0.277670003926.issue40783@roundup.psfhosted.org> Message-ID: <1590511319.4.0.481240451395.issue40783@roundup.psfhosted.org> STINNER Victor added the comment: Issue already reported at https://bugs.python.org/issue32604#msg369454 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 12:43:39 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 May 2020 16:43:39 +0000 Subject: [issue40781] Remove sys._debugmallocstats() function and PYTHONMALLOCSTATS environment variable In-Reply-To: <1590504532.44.0.996467674313.issue40781@roundup.psfhosted.org> Message-ID: <1590511419.0.0.759195876338.issue40781@roundup.psfhosted.org> STINNER Victor added the comment: > Please, don't remove these as I use them often to track down memory usage in a similar way as Inada-san. Ok, sure. I close my issue and I closed my PR. Note: Maybe your advanced usage of statistics on memory allocators should be documented somewhere in https://devguide.python.org/. ---------- resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 12:44:24 2020 From: report at bugs.python.org (Joannah Nanjekye) Date: Tue, 26 May 2020 16:44:24 +0000 Subject: [issue40783] test_interpreters test_interpreters leaked [216, 216, 216] references In-Reply-To: <1590511023.44.0.277670003926.issue40783@roundup.psfhosted.org> Message-ID: <1590511464.24.0.172594676063.issue40783@roundup.psfhosted.org> Joannah Nanjekye added the comment: Yes, We can track it under here: https://bugs.python.org/issue32604#msg369454 Following up when my schedule improves this week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 12:56:18 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 26 May 2020 16:56:18 +0000 Subject: [issue40783] test_interpreters test_interpreters leaked [216, 216, 216] references In-Reply-To: <1590511023.44.0.277670003926.issue40783@roundup.psfhosted.org> Message-ID: <1590512178.18.0.0936324113595.issue40783@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Ok, closing as duplicate although I prefer to track the leaks in different issues for organizational pourposes. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 12:58:30 2020 From: report at bugs.python.org (Brett Cannon) Date: Tue, 26 May 2020 16:58:30 +0000 Subject: [issue40753] Remove Python 2 compatibility code from pathlib In-Reply-To: <1590310305.67.0.10587858574.issue40753@roundup.psfhosted.org> Message-ID: <1590512310.49.0.107945093018.issue40753@roundup.psfhosted.org> Brett Cannon added the comment: If you can't find the guidance then please either open an issue or submit a PR to update the devguide with the info. As for why your other PR was accepted, that was fixing an actual bug in the docstring. This one has absolutely no semantic change to Python; it's the equivalent of changing some whitespace just because it isn't quite in line with PEP 8. It simply isn't worth the overhead of the PR review or the churn on the file as now the `git blame` info is off for who last made a semantic change to that line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 13:21:47 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 26 May 2020 17:21:47 +0000 Subject: [issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10 In-Reply-To: <1572192430.43.0.755831692199.issue38605@roundup.psfhosted.org> Message-ID: <1590513707.97.0.636993757401.issue38605@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- Removed message: https://bugs.python.org/msg370003 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 13:24:25 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 26 May 2020 17:24:25 +0000 Subject: [issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10 In-Reply-To: <1572192430.43.0.755831692199.issue38605@roundup.psfhosted.org> Message-ID: <1590513865.68.0.334605271046.issue38605@roundup.psfhosted.org> Batuhan Taskaya added the comment: I opened the PR 20434 as draft, but from what I understand, there is going to be some breakage (on our test suite). I'll try to narrow it down (currently ~4 tests instead of ~20) but I dont want to prevent anyone else from working on this, so feel free to ignore my PR if you have a working test suite with a low breakage level. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 13:31:25 2020 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 26 May 2020 17:31:25 +0000 Subject: =?utf-8?q?=5Bissue40780=5D_str=2Eformat=28=29_handles_trailing_zeros_inco?= =?utf-8?q?nsistently_in_=E2=80=9Cgeneral=E2=80=9D_format?= In-Reply-To: <1590502519.54.0.593108276962.issue40780@roundup.psfhosted.org> Message-ID: <1590514285.86.0.833686063541.issue40780@roundup.psfhosted.org> Mark Dickinson added the comment: The PR is ready for review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 13:33:00 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 May 2020 17:33:00 +0000 Subject: [issue40784] test_sqlite: CheckFuncDeterministic() fails with SQLite 3.32 Message-ID: <1590514380.08.0.324391488999.issue40784@roundup.psfhosted.org> New submission from STINNER Victor : With SQLite 3.32, test_sqlite fails with: FAIL: CheckFuncDeterministic (sqlite3.test.userfunctions.FunctionTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.9.0b1/Lib/sqlite3/test/userfunctions.py", line 290, in CheckFuncDeterministic self.assertEqual(mock.call_count, 1) AssertionError: 2 != 1 This test defines a "deterministic" function and ensures that calling it twice in SQLite with only call the underyling Python function only once. Copy of the test: @unittest.skipIf(sqlite.sqlite_version_info < (3, 8, 3), "deterministic parameter not supported") def CheckFuncDeterministic(self): mock = unittest.mock.Mock(return_value=None) self.con.create_function("deterministic", 0, mock, deterministic=True) self.con.execute("select deterministic() = deterministic()") self.assertEqual(mock.call_count, 1) In pysqlite_connection_create_function() of Modules/_sqlite/connection.c, determistic=1 sets the following flag: flags |= SQLITE_DETERMINISTIC; This flag is documented as: "A deterministic function always gives the same answer when it has the same inputs." * https://www.sqlite.org/deterministic.html * https://www.sqlite.org/c3ref/c_deterministic.html "SELECT 1 WHERE deterministic() = deterministic()" query also calls the mock twice. Running "SELECT deterministic()" query twice also calls the mock twice. It seems like SQLite 3.32 behaves differently. Fedora issue: https://bugzilla.redhat.com/show_bug.cgi?id=1839826 ---------- components: Tests messages: 370022 nosy: ghaering, vstinner priority: normal severity: normal status: open title: test_sqlite: CheckFuncDeterministic() fails with SQLite 3.32 versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 13:33:05 2020 From: report at bugs.python.org (SilentGhost) Date: Tue, 26 May 2020 17:33:05 +0000 Subject: [issue40771] python3 fromtimestamp generates OSError In-Reply-To: <1590425273.09.0.343345283384.issue40771@roundup.psfhosted.org> Message-ID: <1590514385.7.0.795192441194.issue40771@roundup.psfhosted.org> SilentGhost added the comment: I think I would have to leave judgement on that to core developers. This, if accepted, would be a candidate for 3.10. ---------- versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 13:35:21 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 May 2020 17:35:21 +0000 Subject: [issue40784] test_sqlite: CheckFuncDeterministic() fails with SQLite 3.32 In-Reply-To: <1590514380.08.0.324391488999.issue40784@roundup.psfhosted.org> Message-ID: <1590514521.75.0.0485497718036.issue40784@roundup.psfhosted.org> STINNER Victor added the comment: Oh, I also tried with a function taking one argument and then call it twice by running "SELECT deterministic(1)" query twice: again, the mock is also called twice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 13:37:33 2020 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 26 May 2020 17:37:33 +0000 Subject: =?utf-8?q?=5Bissue40780=5D_str=2Eformat=28=29_handles_trailing_zeros_inco?= =?utf-8?q?nsistently_in_=E2=80=9Cgeneral=E2=80=9D_format?= In-Reply-To: <1590502519.54.0.593108276962.issue40780@roundup.psfhosted.org> Message-ID: <1590514653.48.0.0486498617234.issue40780@roundup.psfhosted.org> Mark Dickinson added the comment: I'm wondering how far back the fix should be backported. Clearly it should go into the 3.9 branch as well as master, but it feels like the sort of fix where the behaviour change resulting from the fix is as likely to break code as the bug itself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 14:02:44 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 26 May 2020 18:02:44 +0000 Subject: =?utf-8?q?=5Bissue40780=5D_str=2Eformat=28=29_handles_trailing_zeros_inco?= =?utf-8?q?nsistently_in_=E2=80=9Cgeneral=E2=80=9D_format?= In-Reply-To: <1590502519.54.0.593108276962.issue40780@roundup.psfhosted.org> Message-ID: <1590516164.69.0.255133379538.issue40780@roundup.psfhosted.org> Eric V. Smith added the comment: I think I'd just do 3.9 and master. It does seem subtle for a minor release, when people are less likely to be looking at the release notes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 15:43:57 2020 From: report at bugs.python.org (Chitrank-Dixit) Date: Tue, 26 May 2020 19:43:57 +0000 Subject: [issue16954] Add docstrings for ElementTree module In-Reply-To: <1358090813.12.0.93631082121.issue16954@psf.upfronthosting.co.za> Message-ID: <1590522237.85.0.511411613148.issue16954@roundup.psfhosted.org> Chitrank-Dixit added the comment: I would like to work on this issue, I found this open and needs a patch. ---------- nosy: +Chitrank-Dixit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 15:51:33 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 26 May 2020 19:51:33 +0000 Subject: [issue37999] No longer use implicit convertion to int with loss In-Reply-To: <1567337044.72.0.119982097156.issue37999@roundup.psfhosted.org> Message-ID: <1590522693.18.0.391201129415.issue37999@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +19693 pull_request: https://github.com/python/cpython/pull/20437 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 16:07:05 2020 From: report at bugs.python.org (Tal Einat) Date: Tue, 26 May 2020 20:07:05 +0000 Subject: [issue37824] IDLE: Handle Shell input warnings properly. In-Reply-To: <1565541132.63.0.273797082992.issue37824@roundup.psfhosted.org> Message-ID: <1590523625.19.0.52111368896.issue37824@roundup.psfhosted.org> Change by Tal Einat : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 16:27:06 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 26 May 2020 20:27:06 +0000 Subject: [issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10 In-Reply-To: <1572192430.43.0.755831692199.issue38605@roundup.psfhosted.org> Message-ID: <1590524826.54.0.400268055738.issue38605@roundup.psfhosted.org> Batuhan Taskaya added the comment: After trying to complete a patch, there are a few issues that immediately showed itself (and this might lead to not to do this in 3.10, I dont know); First one is double-forward-ref, which is usage of string-annotations when there is postponed evaluatation of annotations: >>> import typing >>> from __future__ import annotations >>> def x(a: 'int'): pass ... >>> typing.get_type_hints(x) {'a': ForwardRef('int')} If we make annoatations feature default, this would be default behavior. The solution would be a workaround to the compiler; static int compiler_visit_annexpr(struct compiler *c, expr_ty annotation) { if (annotation->kind == Constant_kind && PyUnicode_CheckExact(annotation->v.Constant.value)) { PyObject *text = annotation->v.Constant.value; Py_INCREF(text); ADDOP_LOAD_CONST_NEW(c, text); } else { ADDOP_LOAD_CONST_NEW(c, _PyAST_ExprAsUnicode(annotation)); } return 1; } But I am not sure if this is too silly or not. The second problem is `inspect.signature`. If we don't resolve annotations there and continue it is definitely going to break some code. If we resolve, that would mean that annotations must able to point something real (and this might not be the real case if the user uses a string annotation etc.) and will break code. (both tried and both breaks different modules on the stdlib tests) The third problem is various dataclass hacks. Like `_type_{field.name}` etc. annotations and how ClassVar/InitVar parsed. There are also some little parts that need to change. Any thoughts on these issues? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 16:38:43 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 26 May 2020 20:38:43 +0000 Subject: =?utf-8?b?W2lzc3VlNDA3ODBdIGZsb2F0Ll9fZm9ybWF0X18oKSBoYW5kbGVzIHRyYWls?= =?utf-8?q?ing_zeros_inconsistently_in_=E2=80=9Cgeneral=E2=80=9D_format?= In-Reply-To: <1590502519.54.0.593108276962.issue40780@roundup.psfhosted.org> Message-ID: <1590525523.05.0.00858531831983.issue40780@roundup.psfhosted.org> Change by Eric V. Smith : ---------- title: str.format() handles trailing zeros inconsistently in ?general? format -> float.__format__() handles trailing zeros inconsistently in ?general? format _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 16:44:43 2020 From: report at bugs.python.org (Enji Cooper) Date: Tue, 26 May 2020 20:44:43 +0000 Subject: [issue40785] `mmap.mmap(..., 0)` doesn't work as advertised in docs (fails with EINVAL); relies on compatibility behavior no longer permitted by [some] Unix OSes Message-ID: <1590525883.45.0.922905943745.issue40785@roundup.psfhosted.org> New submission from Enji Cooper : The documentation for mmap.mmap() claims that passing a length of 0 will map in an entire file, but unfortunately that doesn't work as shown below: >>> mmap.mmap(-1, 0) Traceback (most recent call last): File "", line 1, in OSError: [Errno 22] Invalid argument I've double-checked that this isn't an OS specific bug on the following OS platforms: * Fedora 31 * FreeBSD * OSX Catalina The errno == EINVAL issue is documented in the OS X Catalina manpage as follows: ``` [EINVAL] The len argument was negative or zero. Historically, the system call would not return an error if the argument was zero. See other potential additional restrictions in the COMPATIBILITY section below. ... COMPATIBILITY mmap() now returns with errno set to EINVAL in places that historically succeeded. The rules have changed as follows: o The flags parameter must specify either MAP_PRIVATE or MAP_SHARED. o The len parameter must not be 0. o The off parameter must be a multiple of pagesize, as returned by sysconf(). ``` POSIX concurs: https://pubs.opengroup.org/onlinepubs/9699919799/ . So, in short -- python's mmap.mmap(.., 0) implementation relies on behavior which is now not permitted in multiple OSes and is not permitted per the POSIX spec for mmap(2). 1. https://docs.python.org/3/library/mmap.html#mmap.mmap ---------- components: Interpreter Core messages: 370029 nosy: ngie priority: normal severity: normal status: open title: `mmap.mmap(..., 0)` doesn't work as advertised in docs (fails with EINVAL); relies on compatibility behavior no longer permitted by [some] Unix OSes versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 16:45:19 2020 From: report at bugs.python.org (Enji Cooper) Date: Tue, 26 May 2020 20:45:19 +0000 Subject: [issue40785] `mmap.mmap(..., 0)` doesn't work as advertised in docs (fails with EINVAL); relies on compatibility behavior no longer permitted by [some] Unix OSes In-Reply-To: <1590525883.45.0.922905943745.issue40785@roundup.psfhosted.org> Message-ID: <1590525919.06.0.104768396062.issue40785@roundup.psfhosted.org> Enji Cooper added the comment: Sidenote: all versions tested were 3.8.2: pinklady:freebsd ngie$ /usr/local/opt/python at 3.8/bin/python3 -V Python 3.8.2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 16:45:55 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 May 2020 20:45:55 +0000 Subject: [issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10 In-Reply-To: <1572192430.43.0.755831692199.issue38605@roundup.psfhosted.org> Message-ID: <1590525955.37.0.315529072755.issue38605@roundup.psfhosted.org> STINNER Victor added the comment: > The second problem is `inspect.signature`. If we don't resolve annotations there and continue it is definitely going to break some code. Would you mind to elaborate why would it break some code? Consumers of annotations should already be prepared to get directly types or strings, no? > If we resolve, that would mean that annotations must able to point something real (and this might not be the real case if the user uses a string annotation etc.) and will break code. (both tried and both breaks different modules on the stdlib tests) I expect that resolving has an impact on performance, whereas the caller may not use annotations at all but only cares of the number of parameters or their name. It would be resonable to not resolve annotations in signature() by default. If someone cares, maybe a new parameter can be added to resolve annotations? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 16:47:05 2020 From: report at bugs.python.org (Shantanu) Date: Tue, 26 May 2020 20:47:05 +0000 Subject: [issue20928] xml.etree.ElementInclude does not include nested xincludes In-Reply-To: <1394829606.55.0.5394943571.issue20928@psf.upfronthosting.co.za> Message-ID: <1590526025.45.0.434588693581.issue20928@roundup.psfhosted.org> Change by Shantanu : ---------- nosy: +hauntsaninja nosy_count: 8.0 -> 9.0 pull_requests: +19695 pull_request: https://github.com/python/cpython/pull/20438 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 16:47:05 2020 From: report at bugs.python.org (Shantanu) Date: Tue, 26 May 2020 20:47:05 +0000 Subject: [issue33187] Document ElementInclude (XInclude) support in ElementTree In-Reply-To: <1522427694.7.0.467229070634.issue33187@psf.upfronthosting.co.za> Message-ID: <1590526025.3.0.874033467935.issue33187@roundup.psfhosted.org> Change by Shantanu : ---------- nosy: +hauntsaninja nosy_count: 6.0 -> 7.0 pull_requests: +19694 pull_request: https://github.com/python/cpython/pull/20438 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 17:20:35 2020 From: report at bugs.python.org (Erwan Le Pape) Date: Tue, 26 May 2020 21:20:35 +0000 Subject: [issue34689] Lib/sysconfig.py expands non-variables In-Reply-To: <1536955893.22.0.956365154283.issue34689@psf.upfronthosting.co.za> Message-ID: <1590528035.81.0.499783745878.issue34689@roundup.psfhosted.org> Change by Erwan Le Pape : ---------- pull_requests: +19696 pull_request: https://github.com/python/cpython/pull/20439 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 17:42:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 May 2020 21:42:27 +0000 Subject: [issue40611] Add MAP_POPULATE to the mmap library In-Reply-To: <1589328997.25.0.34201550923.issue40611@roundup.psfhosted.org> Message-ID: <1590529347.61.0.0785418828749.issue40611@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 21fda91f8da96406e6a912f7c312424209c19bef by Ethan Steinberg in branch 'master': bpo-40611: Adds MAP_POPULATE to the mmap module (GH-20061) https://github.com/python/cpython/commit/21fda91f8da96406e6a912f7c312424209c19bef ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 17:42:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 May 2020 21:42:52 +0000 Subject: [issue40611] Add MAP_POPULATE to the mmap library In-Reply-To: <1589328997.25.0.34201550923.issue40611@roundup.psfhosted.org> Message-ID: <1590529372.53.0.638155821506.issue40611@roundup.psfhosted.org> Change by STINNER Victor : ---------- versions: +Python 3.10 -Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 17:44:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 May 2020 21:44:11 +0000 Subject: [issue40611] Add MAP_POPULATE to the mmap library In-Reply-To: <1589328997.25.0.34201550923.issue40611@roundup.psfhosted.org> Message-ID: <1590529451.48.0.422486107471.issue40611@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Ethan Steinberg, the constant is added to 3.10. Sadly, adding a new constant is a new feature, and we don't add new features to stable branches. The 3.9 branch no longer accept new features past the feature freeze which is over. In the meanwhile, you can hardcode the constant, but its value may depend on the platform, be careful! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 17:55:30 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 26 May 2020 21:55:30 +0000 Subject: [issue40654] shutil.copyfile mutates symlink for absolute path In-Reply-To: <1589685995.41.0.350903765679.issue40654@roundup.psfhosted.org> Message-ID: <1590530130.29.0.959862091018.issue40654@roundup.psfhosted.org> Jason R. Coombs added the comment: What do you think about readlink returning something like: class Link(str): print_name = None # type: str | None @property def friendly_name(self) -> str: return self.print_name or self os.readlink would always return one of these Link objects, and since it's a substr, it would behave the way it currently behaves, but with an additional property. This approach would expose the underlying duality of the "name" of a link or junction, such that tools that need a friendly name could use .friendly_name and tools that need to inspect the print name could do that... but for the cases that wish for the most precise target could use the default value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 18:18:57 2020 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 26 May 2020 22:18:57 +0000 Subject: [issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10 In-Reply-To: <1572192430.43.0.755831692199.issue38605@roundup.psfhosted.org> Message-ID: <1590531537.36.0.978423475325.issue38605@roundup.psfhosted.org> Guido van Rossum added the comment: - Double forward ref: IMO this can be resolved in the get_type_hints() functions. (?ukasz do you agree?) - inspect.signature(): Maybe this could switch to using typing.get_type_hints()? Then again if performance is important here maybe we cannot change anything. - dataclasses hacks: these should just be resolved. Another thought: maybe some of these issues can be considered bugs in 3.9 as well, and we should fix them there too? That might help us decide the right path forward. After all we should really encourage people to start using `from __future__ import annotations` in their code, to help them get ready for these issues in 3.10. Final thought: I know at least the Dropbox client team, and possibly also Instagram, has already turned on `from __future__ import annotations` by default in their local fork of Python. Maybe we can ask them if they ever felt the need to change inspect.signature or typing.get_type_hints. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 18:30:35 2020 From: report at bugs.python.org (Enji Cooper) Date: Tue, 26 May 2020 22:30:35 +0000 Subject: [issue40786] madvise should be accessible outside of mmap instance Message-ID: <1590532235.06.0.164268406367.issue40786@roundup.psfhosted.org> New submission from Enji Cooper : madvise can be used when manipulating mmap'ed pages, but it can also be used when protecting processes and other things. Having madvise be available in mmap as a function would be helpful instead of having to jump through a lot of hoops to run `MADV_PROTECT` on a process. ---------- messages: 370036 nosy: ngie priority: normal severity: normal status: open title: madvise should be accessible outside of mmap instance versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 18:31:15 2020 From: report at bugs.python.org (Enji Cooper) Date: Tue, 26 May 2020 22:31:15 +0000 Subject: [issue40786] madvise should be accessible outside of mmap instance In-Reply-To: <1590532235.06.0.164268406367.issue40786@roundup.psfhosted.org> Message-ID: <1590532275.55.0.307751436581.issue40786@roundup.psfhosted.org> Change by Enji Cooper : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 19:13:14 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 26 May 2020 23:13:14 +0000 Subject: [issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10 In-Reply-To: <1572192430.43.0.755831692199.issue38605@roundup.psfhosted.org> Message-ID: <1590534794.44.0.744150497815.issue38605@roundup.psfhosted.org> Eric V. Smith added the comment: To my knowledge, dataclasses works with `from __future__ import annotations`. If there are specific examples of problems, I'd like to hear about it: please open a separate issue. There is a hack (discussed at PyCon 2018 with all of the relevant players) where it avoids importing typing to look at typing.ClassVar, but I think that code is all correct. Maybe I should just bite the bullet and import typing, since I believe importing it is faster than it used to be. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 20:08:10 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Wed, 27 May 2020 00:08:10 +0000 Subject: [issue16995] Add Base32 support for RFC4648 "Extended Hex" alphabet (patch attached) In-Reply-To: <1358533279.94.0.666576182033.issue16995@psf.upfronthosting.co.za> Message-ID: <1590538090.84.0.905168388966.issue16995@roundup.psfhosted.org> Change by Filipe La?ns : ---------- nosy: +FFY00 nosy_count: 6.0 -> 7.0 pull_requests: +19697 pull_request: https://github.com/python/cpython/pull/20441 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 20:58:19 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 27 May 2020 00:58:19 +0000 Subject: [issue40779] incorrect end column for single argument generator function call AST In-Reply-To: <1590501970.38.0.210271516775.issue40779@roundup.psfhosted.org> Message-ID: <1590541099.35.0.911275430061.issue40779@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 20:58:53 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 27 May 2020 00:58:53 +0000 Subject: [issue39724] IDLE threading + stdout/stdin observed blocking behavior In-Reply-To: <1582367377.76.0.509554808526.issue39724@roundup.psfhosted.org> Message-ID: <1590541133.97.0.910448570955.issue39724@roundup.psfhosted.org> Terry J. Reedy added the comment: Researching 'nested mainloop': the one we are concerned with is in pyshell.PyShell.readline, currently line 1078. self.top.mainloop() # nested mainloop() This was in David Scherer's 'Initial Revision' of 2000 Aug 14 without the comment. It has since been touched once to add the comment. 2004 Dec 22, KBK, 5c3df35b6b1f48cb48c91b0c7a8754590a694171. The GUI was hanging if the shell window was closed while a raw_input() was pending. Restored the quit() of the readline() mainloop(). http://mail.python.org/pipermail/idle-dev/2004-December/002307.html So no hint of reason. --- https://stackoverflow.com/questions/17252056/tkinter-nested-mainloop OP asked about using a nested mainloop for a video player. There is discussion (dispute) of whether or not this blocked the mainloop. Tkinter expert Bryan Oakley opined "While it's possible, there is very rarely ever a need to call it. reason to do it, and what you are trying to do probably won't work the way you think it will. ?" OP Raoul quoted FL "Event loops can be nested; it's ok to call mainloop from within an event handler." (dead link to draft version). It is now in mainloop entry of https://effbot.org/tkinterbook/widget.htm. There is no explanation of why or what effect. --- Mark Lutz, Programming Python, discusses recursive mainloop calls as an alternative way to make modal dialogs, without 'wait' and other setup calls. In the 3rd edition, displayed by Google Books, the half page is expanded to a full page (442-443, Example 9-14, PP3E/Gui/Tour/dlg-recursive.py) and he adds that calling quit() is mandatory (see KBK patch above) and that using 'wait', etc, is 'probably better'. The latter is what IDLE does. Since 'modal' means 'disable event handling outside the dialog', the intent must be to suspend the outer event loop, as we see for this issue. --- While I still think that IDLE should protect user code input in response to *IDLE's* '>>>' prompt, even more than it does now, I now agree that IDLE should not do the same with try user *input()* calls. The usability of the latter is the responsibility of users who write them. Not blocking thread prints may just be a matter of removing mainloop() and all corresponding quit() calls. Proper sequencing may be trickier. Tem4.py calls input() and print() from both main and thread. Run directly with 3.9.0b1, it results in thread start main input: m # wait before entering 'm\n'. main got: m thread input: t thread got: t What surprised me is 'thread input:' being held up until 'main got' was printed. Run from IDLE, the result is thread startmain input: m thread input: main got: t thread got: m t This is more jumbled, not less. 'main input:' is printed before the '\n' after 'thread start'. etc. Separating print(...input()) into two statements had no effect. Neither did removing sleep(.1). We will have to retest after blocking is removed. ---------- Added file: https://bugs.python.org/file49194/tem4.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 21:50:46 2020 From: report at bugs.python.org (Lucas) Date: Wed, 27 May 2020 01:50:46 +0000 Subject: [issue40787] Mysql + unittest crash Message-ID: <1590544246.45.0.611703260783.issue40787@roundup.psfhosted.org> New submission from Lucas : environment: win10 cmd, python 3.8 32-bit, mysql, unittest description: When restoring a database through mysql in a unittest function, the command prompt freezes before giving the result of the test, and I am forced to close it to quit. steps to replicate: Have mysql installed, create a database with some content, dump the latter in a file, create a unit test using python's unittest with at least two test functions, and restore the file in one of them. ---------- components: Library (Lib) messages: 370039 nosy: lgerosa priority: normal severity: normal status: open title: Mysql + unittest crash type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 22:09:47 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 27 May 2020 02:09:47 +0000 Subject: [issue40762] Writing bytes using CSV module results in b prefixed strings In-Reply-To: <1590385758.36.0.528402625132.issue40762@roundup.psfhosted.org> Message-ID: <1590545387.05.0.387979829628.issue40762@roundup.psfhosted.org> Steven D'Aprano added the comment: The csv file object knows the encoding it was opened with, I think? If so, we could add an enhancement that bytes objects are first decoded to str using the same encoding the file was opened with. That seems like a reasonable new feature to me. Everything else would continue to be passed through str(). ---------- nosy: +steven.daprano type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 22:58:42 2020 From: report at bugs.python.org (Warren Hardy) Date: Wed, 27 May 2020 02:58:42 +0000 Subject: [issue40788] Build issue Solaris 10 Sparc Message-ID: <1590548322.5.0.995785667003.issue40788@roundup.psfhosted.org> New submission from Warren Hardy : I am using Solaris 10 (last oracle release). GCC 5.5.0 I had trouble with _ssl not building it was failing out with sethostname reference I fixed this by removing the -Werror=implicit-function-declaration My main issue is that _ctypes is not being built and I am not sure why. I have googled for an answer, I have not found one. please can somebody explain simply how I rectify this problem. Thank you in advanced ---------- assignee: christian.heimes components: SSL, ctypes messages: 370041 nosy: christian.heimes, munocat priority: normal severity: normal status: open title: Build issue Solaris 10 Sparc versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 22:59:50 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 27 May 2020 02:59:50 +0000 Subject: [issue40784] test_sqlite: CheckFuncDeterministic() fails with SQLite 3.32 In-Reply-To: <1590514380.08.0.324391488999.issue40784@roundup.psfhosted.org> Message-ID: <1590548390.02.0.698047053594.issue40784@roundup.psfhosted.org> Benjamin Peterson added the comment: This seems like it's testing an implementation detail. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 23:01:35 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 27 May 2020 03:01:35 +0000 Subject: [issue40762] Writing bytes using CSV module results in b prefixed strings In-Reply-To: <1590545387.05.0.387979829628.issue40762@roundup.psfhosted.org> Message-ID: <20200527025544.GS11884@ando.pearwood.info> Steven D'Aprano added the comment: On further thought, no, I don't think it would be a reasonable feature. User opens the CSV file, probably using the default encoding (UTF-8?) but potentially in anything. They collect some data as bytes. Those bytes could be from any unknown encoding. When they try writing those bytes to the CSV file, at best they get an explicit but confusing exception that the decoding failed, at worst they get data loss (mojibake). # Latin-1 to UTF-8 fails py> b = '??'.encode('latin-1') py> b.decode('utf-8') # raises UnicodeDecodeError: 'utf-8' codec can't decode # byte 0xdf in position 0: invalid continuation byte # UTF-8 to Latin-1 loses data py> b = '??'.encode('UTF-8') py> b.decode('latin-1') # returns mojibake '?\x9f??' Short of outright banning the use of bytes (raise a TypeError), I think the current behaviour is least-worst. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 23:12:21 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 27 May 2020 03:12:21 +0000 Subject: [issue40776] Python 3.7.6 installation issue on mac os x 10.6.8 In-Reply-To: <1590485336.47.0.935532303121.issue40776@roundup.psfhosted.org> Message-ID: <1590549141.8.0.834940154531.issue40776@roundup.psfhosted.org> Ned Deily added the comment: Thanks for your report. Because of very low usage and the increasing difficulty of supporting new features and bug fixes on very old versions of macOS, like 10.6.x, we no longer provide binary installers on python.org for macOS versions earlier than 10.9. On top of that, there was a specific problem with using the last several 10.6+ installers on 10.6 itself, due to changes in Apple packaging tools. This is the problem you are seeing and was first reported and tracked in Issue36890. As noted there, there is a link to a 3.7.4 installer that will work on macOS 10.6. However, we do not recommend you use it as the most recent release of Python 3.7 is now 3.7.7 with the final bugfix release of 3.7.x coming next month; Python 3.8.3 is now current. Instead, if you expect to continue using 10.6 Snow Leopard, I would strongly suggest you look at installing Python(s) from the MacPorts project. They do an excellent job of providing up-to-date versions of open source software, like Python, for multiple versions of macOS, including 10.6. They have pre-built packages of the most recent versions of python37 and python38 for 10.6. See https://www.macports.org/install.php#installing for a link to their base package installer for 10.6. You can then install Python with: sudo port selfupdate sudo port install python37 or sudo port install python38 Many third-party Python packages have also been ported and pre-built. You can search for them with: sudo port search py37 # (or py38) or on their website at https://ports.macports.org Good luck! ---------- nosy: +ned.deily resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> python-3.7.3-macosx10.6.pkg verification error on macOS 10.6 Snow Leopard type: compile error -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 23:37:08 2020 From: report at bugs.python.org (Kyle Stanley) Date: Wed, 27 May 2020 03:37:08 +0000 Subject: [issue40782] AbstactEventLoop.run_in_executor is listed as an async method, but should actually return a Futrue In-Reply-To: <1590507938.7.0.58927076005.issue40782@roundup.psfhosted.org> Message-ID: <1590550628.45.0.931904621528.issue40782@roundup.psfhosted.org> Kyle Stanley added the comment: >From looking at the commit history of AbstactEventLoop.run_in_executor(), it seems that it was previously be a non-coroutine method prior to the conversion from the `@asyncio.coroutine` decorator to `async def` (PR-4753). See https://github.com/python/cpython/blame/ede157331b4f9e550334900b3b4de1c8590688de/Lib/asyncio/events.py#L305. The only context for the change I can find is the following conversation between Andrew and Yury: https://github.com/python/cpython/pull/4753#issuecomment-350114336. However, the example provided of `connect_read_pipe()` had already been a coroutine at the time for the BaseEventLoop implementation, which makes sense in that case. So, it's not clear to me as to why `run_in_executor()` was also converted to "async def" when its main implementation is not a coroutine. Furthermore, it's documented as an awaitable rather than a coroutine (https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.run_in_executor). @Andrew do you have any additional context to provide that I'm potentially missing? ---------- nosy: +aeros, asvetlov, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 26 23:56:31 2020 From: report at bugs.python.org (Nathaniel Smith) Date: Wed, 27 May 2020 03:56:31 +0000 Subject: [issue40789] C-level destructor in PySide2 breaks gen_send_ex, which assumes it's safe to call Py_DECREF with a live exception Message-ID: <1590551791.79.0.515609150701.issue40789@roundup.psfhosted.org> New submission from Nathaniel Smith : Consider the following short program. demo() is a trivial async function that creates a QObject instance, connects a Python signal, and then exits. When we call `send(None)` on this object, we expect to get a StopIteration exception. ----- from PySide2 import QtCore class MyQObject(QtCore.QObject): sig = QtCore.Signal() async def demo(): myqobject = MyQObject() myqobject.sig.connect(lambda: None) return 1 coro = demo() try: coro.send(None) except StopIteration as exc: print(f"OK: got {exc!r}") except SystemError as exc: print(f"WTF: got {exc!r}") ----- Actual output (tested on 3.8.2, but I think the code is present on all versions): ----- StopIteration: 1 WTF: got SystemError(" returned NULL without setting an error") ----- So there are two weird things here: the StopIteration exception is being printed on the console for some reason, and then the actual `send` method is raising SystemError instead of StopIteration. Here's what I think is happening: In genobject.c:gen_send_ex, when the coroutine finishes, we call _PyGen_SetStopIterationValue to raise the StopIteration exception: https://github.com/python/cpython/blob/404b23b85b17c84e022779f31fc89cb0ed0d37e8/Objects/genobject.c#L241 Then, after that, gen_send_ex clears the frame object and drops references to it: https://github.com/python/cpython/blob/404b23b85b17c84e022779f31fc89cb0ed0d37e8/Objects/genobject.c#L266-L273 At this point, the reference count for `myqobject` drops to zero, so its destructor is invoked. And this destructor ends up clearing the current exception again. Here's a stack trace: ----- #0 0x0000000000677eb7 in _PyErr_Fetch (p_traceback=0x7ffd9fda77d0, p_value=0x7ffd9fda77d8, p_type=0x7ffd9fda77e0, tstate=0x2511280) at ../Python/errors.c:399 #1 _PyErr_PrintEx (tstate=0x2511280, set_sys_last_vars=1) at ../Python/pythonrun.c:670 #2 0x00007f1afb455967 in PySide::GlobalReceiverV2::qt_metacall(QMetaObject::Call, int, void**) () from /home/njs/.user-python3.8/lib/python3.8/site-packages/PySide2/libpyside2.abi3.so.5.14 #3 0x00007f1afaf2f657 in void doActivate(QObject*, int, void**) () from /home/njs/.user-python3.8/lib/python3.8/site-packages/PySide2/Qt/lib/libQt5Core.so.5 #4 0x00007f1afaf2a37f in QObject::destroyed(QObject*) () from /home/njs/.user-python3.8/lib/python3.8/site-packages/PySide2/Qt/lib/libQt5Core.so.5 #5 0x00007f1afaf2d742 in QObject::~QObject() () from /home/njs/.user-python3.8/lib/python3.8/site-packages/PySide2/Qt/lib/libQt5Core.so.5 #6 0x00007f1afb852681 in QObjectWrapper::~QObjectWrapper() () from /home/njs/.user-python3.8/lib/python3.8/site-packages/PySide2/QtCore.abi3.so #7 0x00007f1afbf785bb in SbkDeallocWrapperCommon () from /home/njs/.user-python3.8/lib/python3.8/site-packages/shiboken2/libshiboken2.abi3.so.5.14 #8 0x00000000005a4fbc in subtype_dealloc (self=) at ../Objects/typeobject.c:1289 #9 0x00000000005e8c08 in _Py_Dealloc (op=) at ../Objects/object.c:2215 #10 _Py_DECREF (filename=0x881795 "../Objects/frameobject.c", lineno=430, op=) at ../Include/object.h:478 #11 frame_dealloc (f=Frame 0x7f1afc572dd0, for file qget-min.py, line 12, in demo ()) at ../Objects/frameobject.c:430 #12 0x00000000004fdf30 in _Py_Dealloc ( op=Frame 0x7f1afc572dd0, for file qget-min.py, line 12, in demo ()) at ../Objects/object.c:2215 #13 _Py_DECREF (filename=, lineno=279, op=Frame 0x7f1afc572dd0, for file qget-min.py, line 12, in demo ()) at ../Include/object.h:478 #14 gen_send_ex (gen=0x7f1afbd08440, arg=, exc=, closing=) at ../Objects/genobject.c:279 ------ We can read the source for PySide::GlobalReceiverV2::qt_metacall here: https://sources.debian.org/src/pyside2/5.13.2-3/sources/pyside2/libpyside/globalreceiverv2.cpp/?hl=310#L310 And we see that it (potentially) runs some arbitrary Python code, and then handles any exceptions by doing: if (PyErr_Occurred()) { PyErr_Print(); } This is intended to catch exceptions caused by the code it just executed, but in this case, gen_send_ex ends up invoking it with an exception already active, so PySide2 gets confused and clears the StopIteration. ----------------------------------- OK so... what to do. I'm actually not 100% certain whether this is a CPython bug or a PySide2 bug. In PySide2, it could be worked around by saving the exception state before executing that code, and then restoring it afterwards. In gen_send_ex, it could be worked around by dropping the reference to the frame before setting the StopIteration exception. In CPython in general, it could be worked around by not invoking deallocators with a live exception... I'm actually pretty surprised that this is even possible! It seems like having a live exception when you start executing arbitrary Python code would be bad. So maybe that's the real bug? Adding both "asyncio" and "memory management" interest groups to the nosy. ---------- messages: 370046 nosy: asvetlov, lemburg, njs, tim.peters, twouters, yselivanov priority: normal severity: normal status: open title: C-level destructor in PySide2 breaks gen_send_ex, which assumes it's safe to call Py_DECREF with a live exception versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 01:02:34 2020 From: report at bugs.python.org (paul rubin) Date: Wed, 27 May 2020 05:02:34 +0000 Subject: [issue40734] /usr/bin surprisingly in sys.path under IDLE In-Reply-To: <1590179721.27.0.0407406629035.issue40734@roundup.psfhosted.org> Message-ID: <1590555754.47.0.358383462891.issue40734@roundup.psfhosted.org> paul rubin added the comment: Yes as mentioned I'm running Debian GNU/Linux, not Windows. By "idle is installed in /usr/bin" I mean that it is an executable shell script stored at /usr/bin/idle . Yes, shell prompt is the $ prompt to bash. When I run "python3 -m idlelib", /usr/bin does not appear in sys.path. "python -m idlelib" attempts to run python2 and I don't have python2 idle installed. I'll see if I can figure out what's going on with sys.path in the user process. The explanation about the two processes was helpful. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 01:16:28 2020 From: report at bugs.python.org (=?utf-8?b?TWljaGHFgiBHw7Nybnk=?=) Date: Wed, 27 May 2020 05:16:28 +0000 Subject: [issue27657] urlparse fails if the path is numeric In-Reply-To: <1469908637.82.0.696114480311.issue27657@psf.upfronthosting.co.za> Message-ID: <1590556588.21.0.0225552362229.issue27657@roundup.psfhosted.org> Micha? G?rny added the comment: Do I understand correctly that the new behavior is intentional in 3.9, or is that still being discussed? ---------- nosy: +mgorny _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 01:32:05 2020 From: report at bugs.python.org (Roundup Robot) Date: Wed, 27 May 2020 05:32:05 +0000 Subject: [issue40701] tempfile mixes str and bytes in an inconsistent manner In-Reply-To: <1590002424.23.0.821521735552.issue40701@roundup.psfhosted.org> Message-ID: <1590557525.78.0.723020696864.issue40701@roundup.psfhosted.org> Change by Roundup Robot : ---------- nosy: +python-dev nosy_count: 3.0 -> 4.0 pull_requests: +19698 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20442 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 01:44:50 2020 From: report at bugs.python.org (Eric L.) Date: Wed, 27 May 2020 05:44:50 +0000 Subject: [issue40701] tempfile mixes str and bytes in an inconsistent manner In-Reply-To: <1590002424.23.0.821521735552.issue40701@roundup.psfhosted.org> Message-ID: <1590558290.59.0.369378881798.issue40701@roundup.psfhosted.org> Eric L. added the comment: Well, your decision but, as a user of the library, it didn't feel like a new feature just like a bug to be fixed, the main issue being the inconsistent handling of bytes vs. str. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 02:53:24 2020 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 27 May 2020 06:53:24 +0000 Subject: [issue40784] test_sqlite: CheckFuncDeterministic() fails with SQLite 3.32 In-Reply-To: <1590514380.08.0.324391488999.issue40784@roundup.psfhosted.org> Message-ID: <1590562404.81.0.567907652754.issue40784@roundup.psfhosted.org> Petr Viktorin added the comment: Indeed. The SQLite documentation talks about the limitations that non-deterministic functions have, not about deterministic functions being memoized: https://www.sqlite.org/deterministic.html The flag would be better tested e.g. with a CHECK constraint: https://www.sqlite.org/lang_createtable.html#ckconst ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 03:13:03 2020 From: report at bugs.python.org (laike9m) Date: Wed, 27 May 2020 07:13:03 +0000 Subject: [issue40790] Python should enable computed gotos on Mac by default Message-ID: <1590563583.44.0.646993465948.issue40790@roundup.psfhosted.org> New submission from laike9m : Issue is described here with more details: https://stackoverflow.com/q/61860463/2142577 Basically, when building on Mac, Python should enable computed gotos by default, because it is supported (https://stackoverflow.com/a/62037189/2142577). The documentation(https://docs.python.org/3/whatsnew/3.2.html#build-and-c-api-changes) says > Computed gotos are now enabled by default on supported compilers (which are detected by the configure script). They can still be disabled selectively by specifying --without-computed-gotos. This seems to imply that the capability detection is wrong. ---------- components: macOS messages: 370051 nosy: laike9m, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Python should enable computed gotos on Mac by default type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 03:27:20 2020 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 27 May 2020 07:27:20 +0000 Subject: [issue40789] C-level destructor in PySide2 breaks gen_send_ex, which assumes it's safe to call Py_DECREF with a live exception In-Reply-To: <1590551791.79.0.515609150701.issue40789@roundup.psfhosted.org> Message-ID: <997819e1-d94a-d72a-199e-0de2522facfa@egenix.com> Marc-Andre Lemburg added the comment: On 27.05.2020 05:56, Nathaniel Smith wrote: > In CPython in general, it could be worked around by not invoking deallocators with a live exception... I'm actually pretty surprised that this is even possible! It seems like having a live exception when you start executing arbitrary Python code would be bad. So maybe that's the real bug? Adding both "asyncio" and "memory management" interest groups to the nosy. Exception handlers can execute arbitrary Python code, so it's not surprising that objects get allocated, deallocated, etc. What you're describing sounds more like a problem with the PySide2 code not being reentrant. Clearing exceptions always has to be done with some care. It's normally only applied to replace the exception with a more specific one, when the exception is expected and handled in the C code, or when there is no way to report the exception back up the stack. Note: Even the PyErr_Print() can result in Python code being executed and because it's likely that PySide2 objects are part of the stack trace, even PySide2 methods may be called as a result. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Experts (#1, May 27 2020) >>> Python Projects, Coaching and Support ... https://www.egenix.com/ >>> Python Product Development ... https://consulting.egenix.com/ ________________________________________________________________________ ::: We implement business ideas - efficiently in both time and costs ::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 https://www.egenix.com/company/contact/ https://www.malemburg.com/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 03:41:07 2020 From: report at bugs.python.org (Devin Jeanpierre) Date: Wed, 27 May 2020 07:41:07 +0000 Subject: [issue40791] hmac.compare_digest could try harder to be constant-time. Message-ID: <1590565267.04.0.961881522519.issue40791@roundup.psfhosted.org> New submission from Devin Jeanpierre : `hmac.compare_digest` (via `_tscmp`) does not mark the accumulator variable `result` as volatile, which means that the compiler is allowed to short-circuit the comparison loop as long as it still reads from both strings. In particular, when `result` is non-volatile, the compiler is allowed to change the loop from this: ```c for (i=0; i < length; i++) { result |= *left++ ^ *right++; } return (result == 0); ``` into (the moral equivalent of) this: ```c for (i=0; i < length; i++) { result |= *left++ ^ *right++; if (result) { for (; ++i < length;) { *left++; *right++; } return 1; } } return (result == 0); ``` (Code not tested.) This might not seem like much, but it cuts out almost all of the data dependencies between `result`, `left`, and `right`, which in theory would free the CPU to race ahead using out of order execution -- it could execute code that depends on the result of `_tscmp`, even while `_tscmp` is still performing the volatile reads. (I have not actually benchmarked this. :)) In other words, this weird short circuiting could still actually improve performance. That, in turn, means that it would break constant-time guarantees. (This is different from saying that it _would_ increase performance, but marking it volatile removes the worry.) (Prior art/discussion: https://github.com/google/tink/commit/335291c42eecf29fca3d85fed6179d11287d253e ) I propose two changes, one trivial, and one that's more invasive: 1) Make `result` a `volatile unsigned char` instead of `unsigned char`. 2) When SSL is available, instead use `CRYPTO_memcmp` from OpenSSL/BoringSSL. We are, in effect, "rolling our own crypto". The SSL libraries are more strictly audited for timing issues, down to actually checking the generated machine code. As tools improve, those libraries will grow to use those tools. If we use their functions, we get the benefit of those audits and improvements. ---------- components: Library (Lib) messages: 370053 nosy: Devin Jeanpierre priority: normal severity: normal status: open title: hmac.compare_digest could try harder to be constant-time. versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 03:57:47 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 27 May 2020 07:57:47 +0000 Subject: [issue40792] Make PyNumber_Index() always returning an exact int instance Message-ID: <1590566267.28.0.18988326269.issue40792@roundup.psfhosted.org> New submission from Serhiy Storchaka : Currently PyNumber_Index() can return something that's an instance of a strict subclass of int. For example PyNumber_Index(Py_True) returns Py_True. The same for operator.index(): >>> import operator >>> operator.index(True) True The proposed PR makes it always return an int. To avoid possible overhead for creating temporary integer object, added private function _PyNumber_Index() with the past behavior. It can be used for short-living integer objects which for which only its value will be used, but not its methods. For example in the implementation of PyLong_AsLong() and similar functions. See also issue17576. ---------- components: Interpreter Core messages: 370054 nosy: barry, mark.dickinson, serhiy.storchaka priority: normal severity: normal status: open title: Make PyNumber_Index() always returning an exact int instance type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 04:04:31 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 27 May 2020 08:04:31 +0000 Subject: [issue40792] Make PyNumber_Index() always returning an exact int instance In-Reply-To: <1590566267.28.0.18988326269.issue40792@roundup.psfhosted.org> Message-ID: <1590566671.78.0.248832023295.issue40792@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +19699 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20443 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 04:49:33 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 27 May 2020 08:49:33 +0000 Subject: [issue40787] Mysql + unittest crash In-Reply-To: <1590544246.45.0.611703260783.issue40787@roundup.psfhosted.org> Message-ID: <1590569373.12.0.926633969941.issue40787@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi Lucas, this is probably not an issue with unittest but a bug in the test themselves. Can you attach an example to reproduce the issue? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 04:58:15 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 27 May 2020 08:58:15 +0000 Subject: [issue40741] Upgrade to SQLite v3.32.1 in Windows and macOS builds In-Reply-To: <1590229958.06.0.659446886323.issue40741@roundup.psfhosted.org> Message-ID: <1590569895.44.0.950197652465.issue40741@roundup.psfhosted.org> Ned Deily added the comment: Note: Issue40784 documents a test failure introduced by running with v3.32+. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 05:00:13 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 27 May 2020 09:00:13 +0000 Subject: [issue40784] test_sqlite: CheckFuncDeterministic() fails with SQLite 3.32 In-Reply-To: <1590514380.08.0.324391488999.issue40784@roundup.psfhosted.org> Message-ID: <1590570013.17.0.863769120135.issue40784@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 05:00:48 2020 From: report at bugs.python.org (Devin Jeanpierre) Date: Wed, 27 May 2020 09:00:48 +0000 Subject: [issue40791] hmac.compare_digest could try harder to be constant-time. In-Reply-To: <1590565267.04.0.961881522519.issue40791@roundup.psfhosted.org> Message-ID: <1590570048.63.0.723023794999.issue40791@roundup.psfhosted.org> Change by Devin Jeanpierre : ---------- keywords: +patch pull_requests: +19700 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20444 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 05:03:46 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 27 May 2020 09:03:46 +0000 Subject: [issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type In-Reply-To: <1586276621.78.0.843757244355.issue40217@roundup.psfhosted.org> Message-ID: <1590570226.94.0.222218375123.issue40217@roundup.psfhosted.org> miss-islington added the comment: New changeset 1cf15af9a6f28750f37b08c028ada31d38e818dd by Pablo Galindo in branch 'master': bpo-40217: Ensure Py_VISIT(Py_TYPE(self)) is always called for PyType_FromSpec types (reverts GH-19414) (GH-20264) https://github.com/python/cpython/commit/1cf15af9a6f28750f37b08c028ada31d38e818dd ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 05:07:16 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 27 May 2020 09:07:16 +0000 Subject: [issue27657] urlparse fails if the path is numeric In-Reply-To: <1469908637.82.0.696114480311.issue27657@psf.upfronthosting.co.za> Message-ID: <1590570436.31.0.443589814605.issue27657@roundup.psfhosted.org> Change by Ned Deily : ---------- stage: patch review -> needs patch versions: +Python 3.10, Python 3.9 -Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 05:15:12 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 27 May 2020 09:15:12 +0000 Subject: [issue40762] Writing bytes using CSV module results in b prefixed strings In-Reply-To: <1590385758.36.0.528402625132.issue40762@roundup.psfhosted.org> Message-ID: <1590570912.93.0.64132542841.issue40762@roundup.psfhosted.org> Eric V. Smith added the comment: > Short of outright banning the use of bytes (raise a TypeError), I think > the current behaviour is least-worst. I agree. I'd like to see the TypeError raised for everything that's not a string or number (since the docs say that's what's accepted), but at this point that would be big change. Maybe we could add a parameter to __init__ to turn on that behavior. ---------- nosy: +eric.smith type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 05:25:52 2020 From: report at bugs.python.org (Ama Aje My Fren) Date: Wed, 27 May 2020 09:25:52 +0000 Subject: [issue40763] zipfile.extractall is safe by now In-Reply-To: <1590493661.5.0.153351512966.issue40763@roundup.psfhosted.org> Message-ID: Ama Aje My Fren added the comment: On Tue, May 26, 2020 at 2:47 PM Va wrote: > > What hasn't been handled then? > The rules for naming files in Windows is long (https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file). It is e.g. possible to create files under WSL within Windows that break these rules. In my case it was to add the colon (:) to a file name. In Python for windows this would fail because the underlying system API would stop it from happening (and in zip, it will be changed to an underscore (_)) - but it is unclear what would actually happen if you do so. In the old days just trying to open C:\Con\Con (which did not exist) caused a BSOD. > > What is the safe way to use it? > The Security message suggests _with care_ - to wit - "Never extract archives from untrusted sources without prior inspection." There may be no absolutely safe way if the zipfile was crafted maliciously. Just like there are inherent vulnerabilities in using XML ... (https://docs.python.org/3/library/xml.html#xml-vulnerabilities). If a zipped file had a tree starting at C:\ and replaced a dll in C:\Windows (and was running as Admin), a lot of caveats I know, but it could be a problem. > I think documenting "this function is unsafe" without suggesting a replacement or a safe way to use it isn't very constructive: as a developer, I want to extract a zip archive, but the only function supposed to do the job tells me "this is unsafe". Ok, so what am I supposed to do to be safe? Does it say that unzipping a file is unsafe? It looks to me like it says that in special conditions the extraction of a zipped file tree may be unsafe and it is important to use caution. It is the case in a lot of programming, is it not, that there are instances of security vulnerabilities entering ordinary looking code? It happens in sql (https://xkcd.com/327/) and many places within Python's Standard Library (https://hackernoon.com/10-common-security-gotchas-in-python-and-how-to-avoid-them-e19fbe265e03) even something as innocuous as using the new-style string format (https://lucumr.pocoo.org/2016/12/29/careful-with-str-format/). > > That's what documentation should tell me, not let me puzzled with doubt. > This is an interesting point. What is the scope of Python Library Documentation? I disagree with your view on scope. In my view the Library Documentation should focus on what is exposed in the library for ordinary use. So e.g. implementation details may not be expected to be shown in the Documentation (like there is no documentation for zipfile._extract_member()). It does have a duty of care - especially to well known gotchas - but it is _not_ security documentation. I think (this is my view, it is not god given) that in many cases it is fair to assume that if one told a developer to be careful with her code it is enough in so far as library documentation is concerned. Thanks. ---------- title: zipfile.extractall is safe by now? -> zipfile.extractall is safe by now _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 05:49:43 2020 From: report at bugs.python.org (Roundup Robot) Date: Wed, 27 May 2020 09:49:43 +0000 Subject: [issue40586] Pydoc should support https for hyperlinks. In-Reply-To: <1589158231.48.0.0342376329959.issue40586@roundup.psfhosted.org> Message-ID: <1590572983.58.0.590728848322.issue40586@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 4.0 -> 5.0 pull_requests: +19701 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19976 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 05:52:37 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 27 May 2020 09:52:37 +0000 Subject: [issue40586] Pydoc should support https for hyperlinks. In-Reply-To: <1589158231.48.0.0342376329959.issue40586@roundup.psfhosted.org> Message-ID: <1590573157.04.0.224209787074.issue40586@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Add parsing of https links to pydoc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 06:14:50 2020 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 27 May 2020 10:14:50 +0000 Subject: [issue40762] Writing bytes using CSV module results in b prefixed strings In-Reply-To: <1590385758.36.0.528402625132.issue40762@roundup.psfhosted.org> Message-ID: <1590574490.93.0.286376002449.issue40762@roundup.psfhosted.org> Skip Montanaro added the comment: This likely worked in the past because bytes == str in Python 2.x. This is just a corner case people porting from 2 to 3 need to address in their code. Papering over it so people using Pandas don't have to do the right thing is no reason to make changes. Bytes aren't strings any longer. A huge effort was undertaken to clean up this aspect of Python's data model in the move to Python 3. Conflating bytes and strings at this point (no matter which way you try to accomplish that conflation) makes no sense to me. The current behavior should not be changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 06:23:01 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 27 May 2020 10:23:01 +0000 Subject: [issue40784] test_sqlite: CheckFuncDeterministic() fails with SQLite 3.32 In-Reply-To: <1590514380.08.0.324391488999.issue40784@roundup.psfhosted.org> Message-ID: <1590574981.22.0.621724342059.issue40784@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +19702 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20448 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 06:23:55 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 27 May 2020 10:23:55 +0000 Subject: [issue40784] test_sqlite: CheckFuncDeterministic() fails with SQLite 3.32 In-Reply-To: <1590514380.08.0.324391488999.issue40784@roundup.psfhosted.org> Message-ID: <1590575035.02.0.192654103471.issue40784@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Hi, folks. I took the liberty to create a PR for this; hope you don't mind. I've used partial indices to test deterministic behaviour. https://www.sqlite.org/partialindex.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 06:39:05 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 27 May 2020 10:39:05 +0000 Subject: [issue39580] Check for COMMAND_LINE_INSTALL variable in Python_Documentation.pkg In-Reply-To: <1581111850.29.0.0540786191291.issue39580@roundup.psfhosted.org> Message-ID: <1590575945.38.0.864244969742.issue39580@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the PR! It looks reasonable but I do want to test it first on older macOS versions that we support before merging it. I'll do that before the next releases. ---------- versions: +Python 3.10, Python 3.7, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 06:47:00 2020 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 27 May 2020 10:47:00 +0000 Subject: [issue37999] No longer use implicit convertion to int with loss In-Reply-To: <1567337044.72.0.119982097156.issue37999@roundup.psfhosted.org> Message-ID: <1590576420.32.0.311817354647.issue37999@roundup.psfhosted.org> Mark Dickinson added the comment: There are some comments in the Objects/longobject.c code that still refer to __int__, and could use an update. For example: https://github.com/python/cpython/blob/7da46b676aed7111de34b57c8b942a7f3bb80327/Objects/longobject.c#L366 ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 07:28:38 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 27 May 2020 11:28:38 +0000 Subject: [issue40792] Make PyNumber_Index() always returning an exact int instance In-Reply-To: <1590566267.28.0.18988326269.issue40792@roundup.psfhosted.org> Message-ID: <1590578918.07.0.0191462238365.issue40792@roundup.psfhosted.org> Serhiy Storchaka added the comment: This change conflicts with the test added in issue26202. We perhaps should revert issue26202. This can also affect the user code which depends on range() attributes start, stop and step being instances of the int subclass. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 07:32:31 2020 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 27 May 2020 11:32:31 +0000 Subject: [issue37999] No longer use implicit convertion to int with loss In-Reply-To: <1567337044.72.0.119982097156.issue37999@roundup.psfhosted.org> Message-ID: <1590579151.74.0.593915180996.issue37999@roundup.psfhosted.org> Change by Mark Dickinson : ---------- pull_requests: +19703 pull_request: https://github.com/python/cpython/pull/20449 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 07:55:12 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 27 May 2020 11:55:12 +0000 Subject: [issue30462] urllib does not support NO_PROXY environment variable containing domain with asterisk In-Reply-To: <1495656791.66.0.906077456639.issue30462@psf.upfronthosting.co.za> Message-ID: <1590580512.04.0.846813137465.issue30462@roundup.psfhosted.org> Cheryl Sabella added the comment: The original pull request has been closed for inactivity, so this is now available for anyone to work on. Please credit the original author if anyone change is based on the original PR. Thanks! ---------- nosy: +cheryl.sabella versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 08:03:59 2020 From: report at bugs.python.org (U.W.) Date: Wed, 27 May 2020 12:03:59 +0000 Subject: [issue40793] print() performance problem with very large numbers Message-ID: <1590581039.49.0.292614137466.issue40793@roundup.psfhosted.org> New submission from U.W. : Printing very large numbers takes forever. Example: print((2**24)**(3840*2160)) That number has about 60 Million digits and my machine is busy now for more than an hour and still not finished. The calculation of the number is no problem, btw. and finishes in under a second. ---------- components: Interpreter Core messages: 370066 nosy: U.W. priority: normal severity: normal status: open title: print() performance problem with very large numbers versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 08:08:39 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 27 May 2020 12:08:39 +0000 Subject: [issue40762] Writing bytes using CSV module results in b prefixed strings In-Reply-To: <1590385758.36.0.528402625132.issue40762@roundup.psfhosted.org> Message-ID: <1590581318.99.0.298143025951.issue40762@roundup.psfhosted.org> Serhiy Storchaka added the comment: Since Pandas opens an output file it has control on what encoding is used. It is a Pandas' responsibility to decode bytes, or raise an exception, or just ignore the problem if it is pretty uncommon case. Pandas already have a complex code for formatting output data into CSV files, one additional check does not matter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 08:11:39 2020 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 27 May 2020 12:11:39 +0000 Subject: [issue40762] Writing bytes using CSV module results in b prefixed strings In-Reply-To: <1590385758.36.0.528402625132.issue40762@roundup.psfhosted.org> Message-ID: <1590581499.32.0.634621184404.issue40762@roundup.psfhosted.org> Skip Montanaro added the comment: I would also that tweaking Python to make this work with no change in Pandas would be a case of the tail wagging the dog. A big tail, but a tail nonetheless. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 08:24:27 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 27 May 2020 12:24:27 +0000 Subject: [issue40793] print() performance problem with very large numbers In-Reply-To: <1590581039.49.0.292614137466.issue40793@roundup.psfhosted.org> Message-ID: <1590582267.88.0.437906922303.issue40793@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is not a print() problem, it is a problem with converting an integer to decimal string representation. AFAIK it has quadratic complexity from the size of the integer. ---------- nosy: +mark.dickinson, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 08:31:43 2020 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 27 May 2020 12:31:43 +0000 Subject: [issue40793] print() performance problem with very large numbers In-Reply-To: <1590581039.49.0.292614137466.issue40793@roundup.psfhosted.org> Message-ID: <1590582703.27.0.646175902423.issue40793@roundup.psfhosted.org> Mark Dickinson added the comment: Right; the naive algorithm for converting the internal binary representation to the decimal representation is quadratic time. In *theory* we could implement a subquadratic time algorithm, but the complexity of such an implementation outweighs the benefits. Python really isn't targeted at super-fast million-digit arithmetic; that's more the domain of libraries like GMP. Closing as "won't fix". I'd recommend using gmpy2[1] instead. Alternatively, you may be able to make the `Decimal` type work with a suitably huge precision. Related: #26256. [1] gmpy2: https://gmpy2.readthedocs.io/en/latest/intro.html ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 08:41:25 2020 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 27 May 2020 12:41:25 +0000 Subject: [issue40792] Make PyNumber_Index() always returning an exact int instance In-Reply-To: <1590566267.28.0.18988326269.issue40792@roundup.psfhosted.org> Message-ID: <1590583285.64.0.988784065531.issue40792@roundup.psfhosted.org> Mark Dickinson added the comment: The behaviour change for range sounds reasonable to me. Just to make sure I understand the impact of the change: - For Python < 3.10, we sometimes convert the range inputs to Python ints, and sometimes don't. For example, a start value of `np.int64(5)` would be converted, but a value of `True` would not be. - With this change, we'd always convert a non-int to an int, so both `np.int64(1)` and `True` would be converted to a `1` of exact type int. IMO this is fine; the new behaviour seems more consistent than the old. >>> import numpy as np >>> start = np.int64(2) >>> range(start, 5).start is start False >>> start = True >>> range(start, 5).start is start True ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 08:43:20 2020 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 27 May 2020 12:43:20 +0000 Subject: [issue37999] No longer use implicit convertion to int with loss In-Reply-To: <1567337044.72.0.119982097156.issue37999@roundup.psfhosted.org> Message-ID: <1590583400.96.0.343383246691.issue37999@roundup.psfhosted.org> Mark Dickinson added the comment: New changeset 20941de0ddc39ce9f07e29b4cc770e8a9ef14d41 by Mark Dickinson in branch 'master': bpo-37999: Fix outdated __int__ and nb_int references in comments (GH-20449) https://github.com/python/cpython/commit/20941de0ddc39ce9f07e29b4cc770e8a9ef14d41 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 08:48:52 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 27 May 2020 12:48:52 +0000 Subject: [issue40794] dataclass signatures and docstrings w/future-annotations Message-ID: <1590583732.13.0.63871735416.issue40794@roundup.psfhosted.org> New submission from Batuhan Taskaya : While I was working on making 'future annotations' default, I noticed that dataclasses acts differently under the annotation feature. One example would be the file [signature.py]: [ without future import] $ python t.py X(a: int, b: int) [ with future import] $ python t.py X(a: '_type_a', b: '_type_b') -> '_return_type' This is causing too much test to fail, AssertionError: '_return_type' is not None - C(x:'_type_x')->'_return_type' + C(x:collections.deque) - C(x:'_type_x'=)->'_return_type' + C(x:collections.deque=) - C(x:'_type_x')->'_return_type' + C(x:List[int]) (and more) ---------- files: script.py messages: 370073 nosy: BTaskaya, eric.smith priority: normal severity: normal status: open title: dataclass signatures and docstrings w/future-annotations Added file: https://bugs.python.org/file49195/script.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 08:55:16 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 12:55:16 +0000 Subject: [issue39573] [C API] Make PyObject an opaque structure in the limited C API In-Reply-To: <1581030432.16.0.48160379721.issue39573@roundup.psfhosted.org> Message-ID: <1590584116.13.0.0540317296729.issue39573@roundup.psfhosted.org> STINNER Victor added the comment: New changeset fe2978b3b940fe2478335e3a2ca5ad22338cdf9c by Victor Stinner in branch 'master': bpo-39573: Convert Py_REFCNT and Py_SIZE to functions (GH-20429) https://github.com/python/cpython/commit/fe2978b3b940fe2478335e3a2ca5ad22338cdf9c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 09:17:35 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 27 May 2020 13:17:35 +0000 Subject: [issue40741] Upgrade to SQLite v3.32.1 in Windows and macOS builds In-Reply-To: <1590229958.06.0.659446886323.issue40741@roundup.psfhosted.org> Message-ID: <1590585455.12.0.838300395553.issue40741@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 09:26:50 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 27 May 2020 13:26:50 +0000 Subject: [issue40741] Upgrade to SQLite v3.32.1 in Windows and macOS builds In-Reply-To: <1590229958.06.0.659446886323.issue40741@roundup.psfhosted.org> Message-ID: <1590586010.77.0.0956426688638.issue40741@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Ready with PR as soon as GH-20448 is merged and cpython-source-deps (https://github.com/python/cpython-source-deps/pull/19) is merged and tagged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 09:30:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 13:30:48 +0000 Subject: [issue40794] dataclass signatures and docstrings w/future-annotations In-Reply-To: <1590583732.13.0.63871735416.issue40794@roundup.psfhosted.org> Message-ID: <1590586248.82.0.932293784829.issue40794@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +gvanrossum, lukasz.langa, vstinner, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 09:37:47 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 27 May 2020 13:37:47 +0000 Subject: [issue39073] email incorrect handling of crlf in Address objects. In-Reply-To: <1576586803.42.0.942657577592.issue39073@roundup.psfhosted.org> Message-ID: <1590586667.07.0.743252077942.issue39073@roundup.psfhosted.org> miss-islington added the comment: New changeset 75635c6095bcfbb9fccc239115d3d03ae20a307f by Miss Islington (bot) in branch '3.8': bpo-39073: validate Address parts to disallow CRLF (GH-19007) https://github.com/python/cpython/commit/75635c6095bcfbb9fccc239115d3d03ae20a307f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 09:38:18 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 27 May 2020 13:38:18 +0000 Subject: [issue39073] email incorrect handling of crlf in Address objects. In-Reply-To: <1576586803.42.0.942657577592.issue39073@roundup.psfhosted.org> Message-ID: <1590586698.52.0.6409606467.issue39073@roundup.psfhosted.org> miss-islington added the comment: New changeset a93bf82980d7c02217a088bafa193f32a4d13abb by Miss Islington (bot) in branch '3.7': bpo-39073: validate Address parts to disallow CRLF (GH-19007) https://github.com/python/cpython/commit/a93bf82980d7c02217a088bafa193f32a4d13abb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 09:42:42 2020 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 27 May 2020 13:42:42 +0000 Subject: =?utf-8?b?W2lzc3VlNDA3ODBdIGZsb2F0Ll9fZm9ybWF0X18oKSBoYW5kbGVzIHRyYWls?= =?utf-8?q?ing_zeros_inconsistently_in_=E2=80=9Cgeneral=E2=80=9D_format?= In-Reply-To: <1590502519.54.0.593108276962.issue40780@roundup.psfhosted.org> Message-ID: <1590586962.88.0.417728382853.issue40780@roundup.psfhosted.org> Change by Mark Dickinson : ---------- versions: -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 09:42:39 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 27 May 2020 13:42:39 +0000 Subject: [issue40794] dataclass signatures and docstrings w/future-annotations In-Reply-To: <1590583732.13.0.63871735416.issue40794@roundup.psfhosted.org> Message-ID: <1590586959.52.0.747283736013.issue40794@roundup.psfhosted.org> Guido van Rossum added the comment: It,sounds like you are trying to get the effect of putting 'from __future__ import dataclasses' at the top of dataclasses'.py, right? Are you saying that without this, the output of the test script is correct? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 09:45:29 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 27 May 2020 13:45:29 +0000 Subject: [issue40794] dataclass signatures and docstrings w/future-annotations In-Reply-To: <1590583732.13.0.63871735416.issue40794@roundup.psfhosted.org> Message-ID: <1590587129.29.0.615402941634.issue40794@roundup.psfhosted.org> Batuhan Taskaya added the comment: > It,sounds like you are trying to get the effect of putting 'from __future__ import dataclasses' at the top of dataclasses'.py, right? Yes, since compile will automatically inherit the flags of the current frame to the compiled code I'm basically inserting a 'future annotations' import at the top of the file. > Are you saying that without this, the output of the test script is correct? Yes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 09:48:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 13:48:27 +0000 Subject: [issue39073] email incorrect handling of crlf in Address objects. In-Reply-To: <1576586803.42.0.942657577592.issue39073@roundup.psfhosted.org> Message-ID: <1590587307.95.0.15252707922.issue39073@roundup.psfhosted.org> STINNER Victor added the comment: I created PR 20450: backport to 3.5, since it's a security fix. ---------- versions: +Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 09:47:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 13:47:46 +0000 Subject: [issue39073] email incorrect handling of crlf in Address objects. In-Reply-To: <1576586803.42.0.942657577592.issue39073@roundup.psfhosted.org> Message-ID: <1590587266.48.0.636439124633.issue39073@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner nosy_count: 6.0 -> 7.0 pull_requests: +19704 stage: backport needed -> patch review pull_request: https://github.com/python/cpython/pull/20450 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 09:49:21 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 13:49:21 +0000 Subject: [issue39073] email incorrect handling of crlf in Address objects. In-Reply-To: <1576586803.42.0.942657577592.issue39073@roundup.psfhosted.org> Message-ID: <1590587361.02.0.378252983494.issue39073@roundup.psfhosted.org> STINNER Victor added the comment: FYI I created https://python-security.readthedocs.io/vuln/email-address-header-injection.html to track fixes of this vulnerability. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 09:49:40 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 13:49:40 +0000 Subject: [issue39073] [security] email module incorrect handling of CR and LF newline characters in Address objects. In-Reply-To: <1576586803.42.0.942657577592.issue39073@roundup.psfhosted.org> Message-ID: <1590587380.29.0.275038830198.issue39073@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: email incorrect handling of crlf in Address objects. -> [security] email module incorrect handling of CR and LF newline characters in Address objects. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 09:50:45 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 27 May 2020 13:50:45 +0000 Subject: [issue40790] Python should enable computed gotos on Mac by default In-Reply-To: <1590563583.44.0.646993465948.issue40790@roundup.psfhosted.org> Message-ID: <1590587445.8.0.614776350845.issue40790@roundup.psfhosted.org> Benjamin Peterson added the comment: The configure script sets the result of compiler probing with HAVE_COMPUTED_GOTOS not USE_COMPUTED_GOTOS. ---------- nosy: +benjamin.peterson resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 09:50:54 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 27 May 2020 13:50:54 +0000 Subject: [issue40794] dataclass signatures and docstrings w/future-annotations In-Reply-To: <1590583732.13.0.63871735416.issue40794@roundup.psfhosted.org> Message-ID: <1590587454.72.0.824928070534.issue40794@roundup.psfhosted.org> Guido van Rossum added the comment: Have you come up with a fix yet? (Preferably a fix that can be applied locally to dataclasses.py.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 09:51:57 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 27 May 2020 13:51:57 +0000 Subject: [issue40794] dataclass signatures and docstrings w/future-annotations In-Reply-To: <1590583732.13.0.63871735416.issue40794@roundup.psfhosted.org> Message-ID: <1590587517.08.0.291164471241.issue40794@roundup.psfhosted.org> Batuhan Taskaya added the comment: > Have you come up with a fix yet? (Preferably a fix that can be applied locally to dataclasses.py.) I'm working on it, but no luck so far. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 09:56:09 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 27 May 2020 13:56:09 +0000 Subject: [issue40794] dataclass signatures and docstrings w/future-annotations In-Reply-To: <1590583732.13.0.63871735416.issue40794@roundup.psfhosted.org> Message-ID: <1590587769.94.0.16333546192.issue40794@roundup.psfhosted.org> Eric V. Smith added the comment: Hmm. That's a regression, at least from 3.7, which is the only version I have ready access to: $ python3 Python 3.7.3 (default, Mar 27 2019, 13:36:35) [GCC 9.0.1 20190227 (Red Hat 9.0.1-0.8)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import dataclasses >>> @dataclasses.dataclass ... class X: ... a: int ... b:int ... >>> X.__doc__ 'X(a: int, b: int)' >>> $ python3 Python 3.7.3 (default, Mar 27 2019, 13:36:35) [GCC 9.0.1 20190227 (Red Hat 9.0.1-0.8)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from __future__ import annotations >>> import dataclasses >>> @dataclasses.dataclass ... class X: ... a: int ... b:int ... >>> X.__doc__ "X(a: 'int', b: 'int')" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 10:22:42 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 27 May 2020 14:22:42 +0000 Subject: [issue40794] dataclass signatures and docstrings w/future-annotations In-Reply-To: <1590583732.13.0.63871735416.issue40794@roundup.psfhosted.org> Message-ID: <1590589362.07.0.877272863015.issue40794@roundup.psfhosted.org> Batuhan Taskaya added the comment: > Hmm. That's a regression, at least from 3.7, which is the only version I have ready access to: That is the same behavior with the current master, the problem I am having is related to using annotations feature on dataclasses itself rather than the program that imports it. I've tested script.py on 3.7.5 and it gives the same output. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 10:41:28 2020 From: report at bugs.python.org (Rupert Nash) Date: Wed, 27 May 2020 14:41:28 +0000 Subject: [issue14527] How to link with a non-system libffi? In-Reply-To: <1333851935.11.0.629390980004.issue14527@psf.upfronthosting.co.za> Message-ID: <1590590488.7.0.589988913559.issue14527@roundup.psfhosted.org> Change by Rupert Nash : ---------- keywords: +patch nosy: +rnash nosy_count: 3.0 -> 4.0 pull_requests: +19705 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20451 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 10:43:24 2020 From: report at bugs.python.org (Rupert Nash) Date: Wed, 27 May 2020 14:43:24 +0000 Subject: [issue14527] How to link with a non-system libffi? In-Reply-To: <1333851935.11.0.629390980004.issue14527@psf.upfronthosting.co.za> Message-ID: <1590590604.49.0.298677910268.issue14527@roundup.psfhosted.org> Rupert Nash added the comment: I have just struggled with building CPython with the _ctypes module. Fundamentally, the problem appears to be that configure uses pkgconfig to find the libffi include directory, while setup.py's detect_ctypes only uses the global list of library directories. I have made an attempt at fixing this by having configure produce the directory containing libffi (`LIBFFI_LIBDIR`) and setup.py use this. However I've hardly any experience with autotools, so I would be very happy to be corrected if this is no use at all. The PR is https://github.com/python/cpython/pull/20451 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 10:44:18 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 14:44:18 +0000 Subject: [issue40795] ctypes: PyErr_WriteUnraisable() called with no exception set on converting callback result failure Message-ID: <1590590658.49.0.612790938119.issue40795@roundup.psfhosted.org> New submission from STINNER Victor : Example: --- from ctypes import c_int, CFUNCTYPE def func(): return (1, 2, 3) cb = CFUNCTYPE(c_int)(func) cb() --- Output: --- Traceback (most recent call last): File "_ctypes/callbacks.c", line 262, in 'converting callback result' TypeError: an integer is required (got type tuple) Exception ignored in: --- Assertion error in debug mode: --- Traceback (most recent call last): File "_ctypes/callbacks.c", line 262, in 'converting callback result' TypeError: 'tuple' object cannot be interpreted as an integer python: Python/errors.c:1435: _PyErr_WriteUnraisableMsg: Assertion `exc_type != NULL' failed. Abandon (core dumped) --- Attached PR fix the issue. ---------- components: Library (Lib) messages: 370089 nosy: vstinner priority: normal severity: normal status: open title: ctypes: PyErr_WriteUnraisable() called with no exception set on converting callback result failure versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 10:58:41 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 27 May 2020 14:58:41 +0000 Subject: [issue40794] dataclass signatures and docstrings w/future-annotations In-Reply-To: <1590583732.13.0.63871735416.issue40794@roundup.psfhosted.org> Message-ID: <1590591521.6.0.958192482153.issue40794@roundup.psfhosted.org> Guido van Rossum added the comment: To clarify, for Eric: what Batuhan did is effectively adding `from __future__ import annotations` to the top of dataclasses.py. I believe the root cause is that dataclasses creates functions by synthesizing `def` statements (in _create_fn()) and the annotations there are references to variables in a dedicated namespace. Maybe we should patch the __annotations__ attribute of the result before sticking it into the class? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 11:02:00 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 15:02:00 +0000 Subject: [issue40795] ctypes: PyErr_WriteUnraisable() called with no exception set on converting callback result failure In-Reply-To: <1590590658.49.0.612790938119.issue40795@roundup.psfhosted.org> Message-ID: <1590591720.51.0.349540843823.issue40795@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +19707 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20452 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 11:10:15 2020 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 27 May 2020 15:10:15 +0000 Subject: [issue14562] urllib2 maybe blocks too long with small chunks In-Reply-To: <1334233390.52.0.591380103695.issue14562@psf.upfronthosting.co.za> Message-ID: <1590592215.04.0.769562246213.issue14562@roundup.psfhosted.org> Zackery Spytz added the comment: Python 2 is EOL, so I think this issue should be closed. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 11:14:42 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 27 May 2020 15:14:42 +0000 Subject: [issue40794] dataclass signatures and docstrings w/future-annotations In-Reply-To: <1590583732.13.0.63871735416.issue40794@roundup.psfhosted.org> Message-ID: <1590592482.31.0.318819935668.issue40794@roundup.psfhosted.org> Eric V. Smith added the comment: I see. Not sure how I overlooked that. Thanks. At first blush, I think your approach would work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 11:22:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 15:22:11 +0000 Subject: [issue13097] [easy C issue] ctypes: segfault with large number of callback arguments In-Reply-To: <1317700637.71.0.186696346618.issue13097@psf.upfronthosting.co.za> Message-ID: <1590592931.36.0.509637036902.issue13097@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 29a1384c040d39659e7d01f1fd7b6eb71ef2634e by Sean Gillespie in branch 'master': bpo-13097: ctypes: limit callback to 1024 arguments (GH-19914) https://github.com/python/cpython/commit/29a1384c040d39659e7d01f1fd7b6eb71ef2634e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 11:22:34 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 27 May 2020 15:22:34 +0000 Subject: [issue13097] [easy C issue] ctypes: segfault with large number of callback arguments In-Reply-To: <1317700637.71.0.186696346618.issue13097@psf.upfronthosting.co.za> Message-ID: <1590592954.59.0.341355419048.issue13097@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +19708 pull_request: https://github.com/python/cpython/pull/20453 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 11:23:15 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 27 May 2020 15:23:15 +0000 Subject: [issue13097] [easy C issue] ctypes: segfault with large number of callback arguments In-Reply-To: <1317700637.71.0.186696346618.issue13097@psf.upfronthosting.co.za> Message-ID: <1590592995.95.0.272878768183.issue13097@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19709 pull_request: https://github.com/python/cpython/pull/20454 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 11:23:35 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 27 May 2020 15:23:35 +0000 Subject: [issue13097] [easy C issue] ctypes: segfault with large number of callback arguments In-Reply-To: <1317700637.71.0.186696346618.issue13097@psf.upfronthosting.co.za> Message-ID: <1590593015.48.0.906706231969.issue13097@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19710 pull_request: https://github.com/python/cpython/pull/20455 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 11:25:47 2020 From: report at bugs.python.org (Zachary Ware) Date: Wed, 27 May 2020 15:25:47 +0000 Subject: [issue40791] hmac.compare_digest could try harder to be constant-time. In-Reply-To: <1590565267.04.0.961881522519.issue40791@roundup.psfhosted.org> Message-ID: <1590593147.15.0.446332963756.issue40791@roundup.psfhosted.org> Change by Zachary Ware : ---------- nosy: +christian.heimes, gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 11:26:51 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 27 May 2020 15:26:51 +0000 Subject: [issue40791] hmac.compare_digest could try harder to be constant-time. In-Reply-To: <1590565267.04.0.961881522519.issue40791@roundup.psfhosted.org> Message-ID: <1590593211.53.0.348610520944.issue40791@roundup.psfhosted.org> Raymond Hettinger added the comment: +1 for both of these suggestions ---------- nosy: +rhettinger type: -> security versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 11:37:04 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 27 May 2020 15:37:04 +0000 Subject: [issue40794] dataclass signatures and docstrings w/future-annotations In-Reply-To: <1590583732.13.0.63871735416.issue40794@roundup.psfhosted.org> Message-ID: <1590593824.79.0.895112764579.issue40794@roundup.psfhosted.org> Batuhan Taskaya added the comment: I have applied Guido's suggestion and it looks like it is working. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 11:37:35 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 27 May 2020 15:37:35 +0000 Subject: [issue40794] dataclass signatures and docstrings w/future-annotations In-Reply-To: <1590583732.13.0.63871735416.issue40794@roundup.psfhosted.org> Message-ID: <1590593855.38.0.45443553465.issue40794@roundup.psfhosted.org> Batuhan Taskaya added the comment: (I applied it to my own branch, don't know if a seperate PR needed) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 11:42:49 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 27 May 2020 15:42:49 +0000 Subject: [issue40794] dataclass signatures and docstrings w/future-annotations In-Reply-To: <1590583732.13.0.63871735416.issue40794@roundup.psfhosted.org> Message-ID: <1590594169.58.0.876463583401.issue40794@roundup.psfhosted.org> Guido van Rossum added the comment: You can do this as part of your mega-PR to turn on `from __future__ import annotations` by default. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 11:44:39 2020 From: report at bugs.python.org (Matthias Braun) Date: Wed, 27 May 2020 15:44:39 +0000 Subject: [issue2897] Deprecate structmember.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1590594279.83.0.670680512665.issue2897@roundup.psfhosted.org> Matthias Braun added the comment: This wasn't mentioned before: Having PyMemberDef part of the structmember.h is a big problem for users of PEP384/limited API, because structmember.h is not part of it. Which results in the odd situation that `Py_tp_members` or `PyDescr_NewMember()` are part of the limited API but technically you cannot use it because you are not supposed to include headers that are not part of `Python.h`. The proposed patch here, would fix this! ---------- nosy: +Matthias Braun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 11:46:23 2020 From: report at bugs.python.org (Matthias Braun) Date: Wed, 27 May 2020 15:46:23 +0000 Subject: [issue2897] Deprecate structmember.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1590594383.25.0.951716139618.issue2897@roundup.psfhosted.org> Change by Matthias Braun : ---------- components: +C API versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 11:47:04 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 27 May 2020 15:47:04 +0000 Subject: [issue13097] [easy C issue] ctypes: segfault with large number of callback arguments In-Reply-To: <1317700637.71.0.186696346618.issue13097@psf.upfronthosting.co.za> Message-ID: <1590594424.63.0.759872614559.issue13097@roundup.psfhosted.org> miss-islington added the comment: New changeset 788d7bfe189e715eab3855c20ea5d6da0d8bed70 by Miss Islington (bot) in branch '3.9': bpo-13097: ctypes: limit callback to 1024 arguments (GH-19914) https://github.com/python/cpython/commit/788d7bfe189e715eab3855c20ea5d6da0d8bed70 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 11:49:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 15:49:17 +0000 Subject: [issue2897] Deprecate structmember.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1590594557.09.0.888003497478.issue2897@roundup.psfhosted.org> STINNER Victor added the comment: > The proposed patch here, would fix this! The issue title is misleading, it says "Deprecate structmember.h". Is the plan still to deprecate it? Or to make it usable in the limited C API? Please update the title. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 11:51:31 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 27 May 2020 15:51:31 +0000 Subject: [issue13097] [easy C issue] ctypes: segfault with large number of callback arguments In-Reply-To: <1317700637.71.0.186696346618.issue13097@psf.upfronthosting.co.za> Message-ID: <1590594691.09.0.158358581641.issue13097@roundup.psfhosted.org> miss-islington added the comment: New changeset 1c4dcafd0b025e771f4dbd7197d0b5f263c9cb54 by Miss Islington (bot) in branch '3.7': bpo-13097: ctypes: limit callback to 1024 arguments (GH-19914) https://github.com/python/cpython/commit/1c4dcafd0b025e771f4dbd7197d0b5f263c9cb54 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 11:50:39 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 15:50:39 +0000 Subject: [issue40794] dataclass signatures and docstrings w/future-annotations In-Reply-To: <1590583732.13.0.63871735416.issue40794@roundup.psfhosted.org> Message-ID: <1590594639.74.0.222999363843.issue40794@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 11:53:11 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 27 May 2020 15:53:11 +0000 Subject: [issue13097] [easy C issue] ctypes: segfault with large number of callback arguments In-Reply-To: <1317700637.71.0.186696346618.issue13097@psf.upfronthosting.co.za> Message-ID: <1590594791.6.0.176173148383.issue13097@roundup.psfhosted.org> miss-islington added the comment: New changeset a285af7e626d1b81cf09f8b2bf7656f100bc1237 by Miss Islington (bot) in branch '3.8': bpo-13097: ctypes: limit callback to 1024 arguments (GH-19914) https://github.com/python/cpython/commit/a285af7e626d1b81cf09f8b2bf7656f100bc1237 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 11:54:33 2020 From: report at bugs.python.org (Matthias Braun) Date: Wed, 27 May 2020 15:54:33 +0000 Subject: [issue2897] Deprecate structmember.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1590594873.67.0.741365374673.issue2897@roundup.psfhosted.org> Matthias Braun added the comment: > The issue title is misleading, it says "Deprecate structmember.h". Is the plan still to deprecate it? Or to make it usable in the limited C API? Please update the title. As far as I understand it: The attached diff, moves the interesting declaration to `object.h` solving the limited API problem. And only leaves structmember.h around for backward compatibility for people using the "old" names `READONLY` or `RESTRICTED`. So in that sense it does deprecate structmember.h But indeed I hijacked this issue with my complaints about the limited API which may not have been the original intention here, but they get solved nonetheless. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 11:54:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 15:54:46 +0000 Subject: [issue13097] [easy C issue] ctypes: segfault with large number of callback arguments In-Reply-To: <1317700637.71.0.186696346618.issue13097@psf.upfronthosting.co.za> Message-ID: <1590594886.31.0.286700595551.issue13097@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Meador Inge for the bug report and thanks Sean Gillespie for the fix! It just took 9 years to fix this corner case ;-) Copy of the comment on the PR: https://github.com/python/cpython/pull/19914#pullrequestreview-419331432 I tried to rewrite _ctypes_callproc() to use PyMem_Malloc() instead of alloca(), but it's quite complicated. There are 3 arrays with a length of argcount items: args, avalues, atypes. Moreover, resbuf is also allocated with alloca(). When using PyMem_Malloc(), error handling is much more complicated. I also tried to restrict the overall usage of stack memory to 4096 bytes (size of one page on x86), but users would be surprised by CTYPES_MAX_ARGCOUNT value. I would say that raising an exception is better than crashing for a lot of arguments. If someone is blocked by this new limitation, in that case we can revisit the PyMem_Malloc() idea. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.7, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 11:59:00 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 15:59:00 +0000 Subject: [issue2897] Deprecate structmember.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1590595140.52.0.194668727461.issue2897@roundup.psfhosted.org> STINNER Victor added the comment: Also, the bare minimum enhancement would be add rename READONLY to PY_READONLY, but keep a deprecated alias READONLY to PY_READONLY, and update CPython code base to use PY_READONLY. (Same for other similar flags.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 11:59:28 2020 From: report at bugs.python.org (Matthias Braun) Date: Wed, 27 May 2020 15:59:28 +0000 Subject: [issue2897] PyMemberDef missing in limited API / Deprecate structmember.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1590595168.49.0.649263486403.issue2897@roundup.psfhosted.org> Change by Matthias Braun : ---------- title: Deprecate structmember.h -> PyMemberDef missing in limited API / Deprecate structmember.h _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 11:50:25 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 15:50:25 +0000 Subject: [issue2897] Deprecate structmember.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1590594625.42.0.31147261754.issue2897@roundup.psfhosted.org> STINNER Victor added the comment: > Note that structmember.h pollutes global namespace with macros that do not have conventional Py_ or PY_ prefix. READONLY and RESTRICTED macros seem to be most likely to conflict with other code. One small enhance would be to add such prefix when Py_LIMITED_API is defined. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 12:02:45 2020 From: report at bugs.python.org (Matthias Braun) Date: Wed, 27 May 2020 16:02:45 +0000 Subject: [issue2897] PyMemberDef missing in limited API / Deprecate structmember.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1590595365.56.0.503389512947.issue2897@roundup.psfhosted.org> Matthias Braun added the comment: Happy to take the proposed diff here (assuming @belopolsky wont mind) and include it into a pull request that also renames the uses of the READONLY flags (and maybe removes the RESTRICTED flags) within cpython source itself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 12:05:20 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 27 May 2020 16:05:20 +0000 Subject: [issue40791] hmac.compare_digest could try harder to be constant-time. In-Reply-To: <1590565267.04.0.961881522519.issue40791@roundup.psfhosted.org> Message-ID: <1590595520.03.0.0206316130989.issue40791@roundup.psfhosted.org> Gregory P. Smith added the comment: Christian - Devin could likely use some help with the build/ifdef plumbing required for (2) to use CRYPTO_memcmp from Modules/_operator.c when OpenSSL is available. ---------- assignee: -> christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 12:12:11 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 27 May 2020 16:12:11 +0000 Subject: [issue40791] hmac.compare_digest could try harder to be constant-time. In-Reply-To: <1590565267.04.0.961881522519.issue40791@roundup.psfhosted.org> Message-ID: <1590595931.98.0.345475621115.issue40791@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +19711 pull_request: https://github.com/python/cpython/pull/20456 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 12:14:21 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 27 May 2020 16:14:21 +0000 Subject: [issue40791] hmac.compare_digest could try harder to be constant-time. In-Reply-To: <1590565267.04.0.961881522519.issue40791@roundup.psfhosted.org> Message-ID: <1590596061.98.0.303802874541.issue40791@roundup.psfhosted.org> Christian Heimes added the comment: GPS, I got you covered :) CRYPTO_memcmp() was on my TODO list for a while. Thanks for nagging me. _operator is a built-in module. I don't want to add libcrypto dependency to libpython. I copied the code, made some adjustments and added it to _hashopenssl.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 12:43:32 2020 From: report at bugs.python.org (hai shi) Date: Wed, 27 May 2020 16:43:32 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1590597812.82.0.645721090952.issue40275@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +19712 pull_request: https://github.com/python/cpython/pull/20459 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 12:56:07 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 27 May 2020 16:56:07 +0000 Subject: [issue40701] tempfile mixes str and bytes in an inconsistent manner In-Reply-To: <1590002424.23.0.821521735552.issue40701@roundup.psfhosted.org> Message-ID: <1590598567.79.0.441231792373.issue40701@roundup.psfhosted.org> Gregory P. Smith added the comment: We consider it closer to new feature as it changes existing behavior in a way that people cannot _depend_ on being present in older Python releases as it'd only appear in a bugfix release, so most people could never write code depending on it while claiming to generally support 3.7-3.9. Anyways your PR overall looks good for 3.10. I left some comments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 13:08:07 2020 From: report at bugs.python.org (Steve Dower) Date: Wed, 27 May 2020 17:08:07 +0000 Subject: [issue40667] [Windows] Add global python and python3 commands In-Reply-To: <1589792809.51.0.970244169965.issue40667@roundup.psfhosted.org> Message-ID: <1590599287.04.0.168732854456.issue40667@roundup.psfhosted.org> Steve Dower added the comment: After thinking this through some more, I don't think this solves the problem, but only changes it. And we're better off leaving things as they are than just moving them around. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 13:23:18 2020 From: report at bugs.python.org (Darrick Yee) Date: Wed, 27 May 2020 17:23:18 +0000 Subject: [issue40796] dataclasses.make_dataclass: Exception when called with different field orders Message-ID: <1590600197.98.0.468559404003.issue40796@roundup.psfhosted.org> New submission from Darrick Yee : https://docs.python.org/3/library/dataclasses.html#module-dataclasses `make_dataclass` takes a `field` parameter, which is an iterable whose entries may be tuples of `(name, type)` or `(name, type, dataclasses.Field)`. However, an exception is thrown if such tuples are provided in a particular order. Example: from dataclasses import field, make_dataclass fieldspec1 = ('field1', str) fieldspec2 = ('field2', str, field(default='Hello')) MyDc1 = make_dataclass('MyDc1', [fieldspec1, fieldspec2]) # Ok MyDc2 = make_dataclass('MyDc2', [fieldspec2, fieldspec1]) # TypeError I am guessing this is not intentional... ---------- messages: 370112 nosy: Darrick Yee priority: normal severity: normal status: open title: dataclasses.make_dataclass: Exception when called with different field orders type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 13:26:47 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 27 May 2020 17:26:47 +0000 Subject: [issue40796] dataclasses.make_dataclass: Exception when called with different field orders In-Reply-To: <1590600197.98.0.468559404003.issue40796@roundup.psfhosted.org> Message-ID: <1590600407.29.0.843489374352.issue40796@roundup.psfhosted.org> Eric V. Smith added the comment: Isn't this error that you're providing a field without a default value after one with a default value? What's the exception look like? ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 13:33:48 2020 From: report at bugs.python.org (Darrick Yee) Date: Wed, 27 May 2020 17:33:48 +0000 Subject: [issue40796] dataclasses.make_dataclass: Exception when called with different field orders In-Reply-To: <1590600197.98.0.468559404003.issue40796@roundup.psfhosted.org> Message-ID: <1590600828.76.0.164799161984.issue40796@roundup.psfhosted.org> Darrick Yee added the comment: TypeError: non-default argument 'field1' follows default argument You are right. For some reason I believed it would automatically gather the required fields first when creating the new class' signature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 13:34:06 2020 From: report at bugs.python.org (Darrick Yee) Date: Wed, 27 May 2020 17:34:06 +0000 Subject: [issue40796] dataclasses.make_dataclass: Exception when called with different field orders In-Reply-To: <1590600197.98.0.468559404003.issue40796@roundup.psfhosted.org> Message-ID: <1590600846.48.0.147976933295.issue40796@roundup.psfhosted.org> Change by Darrick Yee : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 13:40:16 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 27 May 2020 17:40:16 +0000 Subject: [issue40796] dataclasses.make_dataclass: Exception when called with different field orders In-Reply-To: <1590600197.98.0.468559404003.issue40796@roundup.psfhosted.org> Message-ID: <1590601216.78.0.316508115641.issue40796@roundup.psfhosted.org> Eric V. Smith added the comment: No problem! It can't reorder fields, because you might not be passing them by name. There's some discussion about requiring keyword-only parameters, in which case what you're doing would work (as long as they were keyword-only params). ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 13:42:32 2020 From: report at bugs.python.org (Darrick Yee) Date: Wed, 27 May 2020 17:42:32 +0000 Subject: [issue40796] dataclasses.make_dataclass: Exception when called with different field orders In-Reply-To: <1590601216.78.0.316508115641.issue40796@roundup.psfhosted.org> Message-ID: Darrick Yee added the comment: Yes, that makes sense. Thank you! On Wed, May 27, 2020, 1:40 PM Eric V. Smith wrote: > > Eric V. Smith added the comment: > > No problem! > > It can't reorder fields, because you might not be passing them by name. > There's some discussion about requiring keyword-only parameters, in which > case what you're doing would work (as long as they were keyword-only > params). > > ---------- > resolution: -> not a bug > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 13:47:10 2020 From: report at bugs.python.org (Lucas) Date: Wed, 27 May 2020 17:47:10 +0000 Subject: [issue40787] Mysql + unittest crash In-Reply-To: <1590544246.45.0.611703260783.issue40787@roundup.psfhosted.org> Message-ID: <1590601630.04.0.0598148756547.issue40787@roundup.psfhosted.org> Lucas added the comment: While trying to simplify my program for you, I found that the problem was caused by a very specific interaction of one of the functions that was being tested with the restore command, which did not happen when I tried to rule this problem out in other ways. Anyways, thank you for your time. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 14:36:31 2020 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 27 May 2020 18:36:31 +0000 Subject: [issue37028] Implement asyncio repl In-Reply-To: <1558652233.35.0.225299391791.issue37028@roundup.psfhosted.org> Message-ID: <1590604591.21.0.954603035057.issue37028@roundup.psfhosted.org> ?ric Araujo added the comment: Compared to the vanilla REPL, this doesn?t include readline setup for tab completion and history file. Was it on purpose? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 14:58:13 2020 From: report at bugs.python.org (Lucas) Date: Wed, 27 May 2020 18:58:13 +0000 Subject: [issue40787] Mysql + unittest crash In-Reply-To: <1590544246.45.0.611703260783.issue40787@roundup.psfhosted.org> Message-ID: <1590605893.89.0.524327743045.issue40787@roundup.psfhosted.org> Lucas added the comment: The problem was that I didn't close the 1st connection to the database and then made another request, which had to wait for the 1st to close, to be exact. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 15:14:43 2020 From: report at bugs.python.org (=?utf-8?b?TWljaGHFgiBHw7Nybnk=?=) Date: Wed, 27 May 2020 19:14:43 +0000 Subject: [issue27657] urlparse fails if the path is numeric In-Reply-To: <1469908637.82.0.696114480311.issue27657@psf.upfronthosting.co.za> Message-ID: <1590606883.46.0.749376702171.issue27657@roundup.psfhosted.org> Micha? G?rny added the comment: I'm sorry but does this change mean that it's not final or...? My main concern is whether we should be adjusting our packages to the new behavior in py3.9, or wait for further changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 15:18:24 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 27 May 2020 19:18:24 +0000 Subject: [issue40791] hmac.compare_digest could try harder to be constant-time. In-Reply-To: <1590565267.04.0.961881522519.issue40791@roundup.psfhosted.org> Message-ID: <1590607104.44.0.506241770589.issue40791@roundup.psfhosted.org> Christian Heimes added the comment: Greg, is GH-20456 a bug fix / security enhancement or a new feature? I'm hesitant to backport it to 3.7 and 3.8. 3.9 might be ok. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 15:46:01 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 27 May 2020 19:46:01 +0000 Subject: [issue40791] hmac.compare_digest could try harder to be constant-time. In-Reply-To: <1590565267.04.0.961881522519.issue40791@roundup.psfhosted.org> Message-ID: <1590608761.36.0.0922211805623.issue40791@roundup.psfhosted.org> Gregory P. Smith added the comment: I'd feel fine doing that for 3.9 given 3.9.0 is only in beta and this changes no public APIs. For 3.8 and 3.7 i wouldn't. Be sure to update the versionchanged in the docs if you choose to do it for 3.9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 15:47:37 2020 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 27 May 2020 19:47:37 +0000 Subject: [issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled In-Reply-To: <1492073709.93.0.33740565749.issue30064@psf.upfronthosting.co.za> Message-ID: <1590608857.55.0.32829811868.issue30064@roundup.psfhosted.org> Yury Selivanov added the comment: New changeset 210a137396979d747c2602eeef46c34fc4955448 by Fantix King in branch 'master': bpo-30064: Fix asyncio loop.sock_* race condition issue (#20369) https://github.com/python/cpython/commit/210a137396979d747c2602eeef46c34fc4955448 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 15:47:47 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 27 May 2020 19:47:47 +0000 Subject: [issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled In-Reply-To: <1492073709.93.0.33740565749.issue30064@psf.upfronthosting.co.za> Message-ID: <1590608867.76.0.883611387308.issue30064@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 8.0 -> 9.0 pull_requests: +19713 pull_request: https://github.com/python/cpython/pull/20460 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 15:50:11 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 27 May 2020 19:50:11 +0000 Subject: [issue40791] hmac.compare_digest could try harder to be constant-time. In-Reply-To: <1590565267.04.0.961881522519.issue40791@roundup.psfhosted.org> Message-ID: <1590609011.23.0.621613258802.issue40791@roundup.psfhosted.org> Christian Heimes added the comment: New changeset db5aed931f8a617f7b63e773f62db468fe9c5ca1 by Christian Heimes in branch 'master': bpo-40791: Use CRYPTO_memcmp() for compare_digest (#20456) https://github.com/python/cpython/commit/db5aed931f8a617f7b63e773f62db468fe9c5ca1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 15:51:51 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 27 May 2020 19:51:51 +0000 Subject: [issue40791] hmac.compare_digest could try harder to be constant-time. In-Reply-To: <1590565267.04.0.961881522519.issue40791@roundup.psfhosted.org> Message-ID: <1590609111.03.0.574799917933.issue40791@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +19714 pull_request: https://github.com/python/cpython/pull/20461 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 15:56:18 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 27 May 2020 19:56:18 +0000 Subject: [issue40701] tempfile mixes str and bytes in an inconsistent manner In-Reply-To: <1590002424.23.0.821521735552.issue40701@roundup.psfhosted.org> Message-ID: <1590609378.12.0.451244576504.issue40701@roundup.psfhosted.org> Serhiy Storchaka added the comment: Well, the behavior for an existing bytes path was not unintended, but some people can depend on it. But before making it an official feature, we should also check other cases of an unintended behavior. What if set tempfile.tempdir to a Path object or to a file descriptor of a directory? Does anything work in these cases and should we support them? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 15:59:51 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 27 May 2020 19:59:51 +0000 Subject: [issue40701] tempfile mixes str and bytes in an inconsistent manner In-Reply-To: <1590002424.23.0.821521735552.issue40701@roundup.psfhosted.org> Message-ID: <1590609591.02.0.659002367289.issue40701@roundup.psfhosted.org> Gregory P. Smith added the comment: I expect the best decision to be to get rid of tempfile.tempdir entirely. That would need be its own issue with a deprecation period involved. A process global that alters behavior of all calls into a module that don't explicitly opt-out is a bad API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 15:52:48 2020 From: report at bugs.python.org (Matthias Braun) Date: Wed, 27 May 2020 19:52:48 +0000 Subject: [issue2897] PyMemberDef missing in limited API / Deprecate structmember.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1590609168.57.0.697622105866.issue2897@roundup.psfhosted.org> Change by Matthias Braun : ---------- pull_requests: +19715 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/20462 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 16:12:15 2020 From: report at bugs.python.org (Ethan Furman) Date: Wed, 27 May 2020 20:12:15 +0000 Subject: [issue40025] enum: _generate_next_value_ is not called if its definition occurs after calls to auto() In-Reply-To: <1584703504.0.0.0724934497115.issue40025@roundup.psfhosted.org> Message-ID: <1590610335.44.0.771295891518.issue40025@roundup.psfhosted.org> Ethan Furman added the comment: New changeset b5ecbf02e4dbdea6d1c9a6d7189137f76e70c073 by Miss Islington (bot) in branch '3.8': bpo-40025: Require _generate_next_value_ to be defined before members(GH-19763) https://github.com/python/cpython/commit/b5ecbf02e4dbdea6d1c9a6d7189137f76e70c073 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 16:27:22 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 27 May 2020 20:27:22 +0000 Subject: [issue40797] multiprocessing.Semaphore has undocumented get_value() method Message-ID: <1590611242.05.0.840609180281.issue40797@roundup.psfhosted.org> New submission from R?mi Lapeyre : The threading.Semaphore class does not have this method, it is undocumented and useless on some system (at least MacOS): >>> s.get_value() Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/synchronize.py", line 129, in get_value return self._semlock._get_value() NotImplementedError The implementation is at https://github.com/python/cpython/blob/master/Modules/_multiprocessing/semaphore.c#L537-L553 I think this method could be removed, since it's undocumented and probably not used can I just remove it or does it need a deprecation cycle? ---------- components: Library (Lib) messages: 370128 nosy: remi.lapeyre priority: normal severity: normal status: open title: multiprocessing.Semaphore has undocumented get_value() method type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 16:30:44 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 27 May 2020 20:30:44 +0000 Subject: [issue40614] ast.parse doesn't respect feature_version for debug f-strings In-Reply-To: <1589354255.32.0.89059001676.issue40614@roundup.psfhosted.org> Message-ID: <1590611444.94.0.594482423068.issue40614@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset c116c94ff119485761460f1033cdee425bed0310 by Shantanu in branch 'master': bpo-40614: Respect feature version for f-string debug expressions (GH-20196) https://github.com/python/cpython/commit/c116c94ff119485761460f1033cdee425bed0310 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 16:31:42 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 27 May 2020 20:31:42 +0000 Subject: [issue40614] ast.parse doesn't respect feature_version for debug f-strings In-Reply-To: <1589354255.32.0.89059001676.issue40614@roundup.psfhosted.org> Message-ID: <1590611502.35.0.658292160797.issue40614@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +19716 pull_request: https://github.com/python/cpython/pull/20464 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 16:35:11 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 27 May 2020 20:35:11 +0000 Subject: [issue32604] [subinterpreters] PEP 554 implementation: add interpreters module In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1590611711.55.0.0700186015948.issue32604@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal nosy_count: 13.0 -> 14.0 pull_requests: +19717 pull_request: https://github.com/python/cpython/pull/20465 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 16:37:44 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 27 May 2020 20:37:44 +0000 Subject: [issue32604] [subinterpreters] PEP 554 implementation: add interpreters module In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1590611864.34.0.242902674271.issue32604@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Commit 9d17cbf33df7cfb67ca0f37f6463ba5c18676641 is causing all refleak buildbots to fail and is masking other issues and causing some confusion already in other PRs (like https://github.com/python/cpython/pull/20433) so I opened a revert in PR 20465 following the buildbot revert policy (https://discuss.python.org/t/policy-to-revert-commits-on-buildbot-failure/404). Please, open a new PR with this change again once the refleaks have been resolved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 16:39:07 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 27 May 2020 20:39:07 +0000 Subject: [issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled In-Reply-To: <1492073709.93.0.33740565749.issue30064@psf.upfronthosting.co.za> Message-ID: <1590611947.29.0.32436587572.issue30064@roundup.psfhosted.org> miss-islington added the comment: New changeset 3a2667d91e33493ccde113ddf5092afefc3c89fa by Miss Islington (bot) in branch '3.9': bpo-30064: Fix asyncio loop.sock_* race condition issue (GH-20369) https://github.com/python/cpython/commit/3a2667d91e33493ccde113ddf5092afefc3c89fa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 16:42:01 2020 From: report at bugs.python.org (Shantanu) Date: Wed, 27 May 2020 20:42:01 +0000 Subject: [issue40614] ast.parse doesn't respect feature_version for debug f-strings In-Reply-To: <1589354255.32.0.89059001676.issue40614@roundup.psfhosted.org> Message-ID: <1590612121.29.0.0748895469355.issue40614@roundup.psfhosted.org> Change by Shantanu : ---------- pull_requests: +19718 pull_request: https://github.com/python/cpython/pull/20466 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 16:44:41 2020 From: report at bugs.python.org (Matthias Bussonnier) Date: Wed, 27 May 2020 20:44:41 +0000 Subject: [issue37028] Implement asyncio repl In-Reply-To: <1558652233.35.0.225299391791.issue37028@roundup.psfhosted.org> Message-ID: <1590612281.42.0.367341187276.issue37028@roundup.psfhosted.org> Matthias Bussonnier added the comment: > Compared to the vanilla REPL, this doesn?t include readline setup for tab completion and history file. Was it on purpose? Not particularly, it was mostly to show it is possible. I'm guessing any improvement to make it more consistent with the normal REPL would be welcome. If you want a fancier repl that also have these features it should work out of the box with IPython. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 16:46:24 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 27 May 2020 20:46:24 +0000 Subject: =?utf-8?b?W2lzc3VlNDA3ODBdIGZsb2F0Ll9fZm9ybWF0X18oKSBoYW5kbGVzIHRyYWls?= =?utf-8?q?ing_zeros_inconsistently_in_=E2=80=9Cgeneral=E2=80=9D_format?= In-Reply-To: <1590502519.54.0.593108276962.issue40780@roundup.psfhosted.org> Message-ID: <1590612384.01.0.638230795875.issue40780@roundup.psfhosted.org> Raymond Hettinger added the comment: +1 for 3.9 and later. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 17:01:16 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 27 May 2020 21:01:16 +0000 Subject: [issue40614] ast.parse doesn't respect feature_version for debug f-strings In-Reply-To: <1589354255.32.0.89059001676.issue40614@roundup.psfhosted.org> Message-ID: <1590613276.79.0.905572475499.issue40614@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 9b83829e7d476acecc86d48978acc5813ec51e65 by Pablo Galindo in branch '3.9': [3.9] bpo-40614: Respect feature version for f-string debug expressions (GH-20196) (GH-20464) https://github.com/python/cpython/commit/9b83829e7d476acecc86d48978acc5813ec51e65 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 17:04:36 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 27 May 2020 21:04:36 +0000 Subject: [issue40690] unittest: if FunctionTestCase is imported, the loader loads "tests" from it In-Reply-To: <1589919425.78.0.0609580372109.issue40690@roundup.psfhosted.org> Message-ID: <1590613476.97.0.382506173885.issue40690@roundup.psfhosted.org> R?mi Lapeyre added the comment: I checked and FunctionTestCase seems to completely break the loader. The tests for FunctionTestCase in the standard library instantiate the class from inside the method of a TestCase so the loader never see them but even the simple test file I attached completely breaks: ? python3 -m unittest E ====================================================================== Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 193, in _run_module_as_main return _run_code(code, main_globals, None, File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 86, in _run_code exec(code, run_globals) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/unittest/__main__.py", line 18, in main(module=None) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/unittest/main.py", line 101, in __init__ self.runTests() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/unittest/main.py", line 271, in runTests self.result = testRunner.run(self.test) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/unittest/runner.py", line 183, in run result.printErrors() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/unittest/runner.py", line 109, in printErrors self.printErrorList('ERROR', self.errors) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/unittest/runner.py", line 115, in printErrorList self.stream.writeln("%s: %s" % (flavour,self.getDescription(test))) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/unittest/runner.py", line 47, in getDescription return '\n'.join((str(test), doc_first_line)) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/unittest/case.py", line 1472, in __str__ self._testFunc.__name__) AttributeError: 'str' object has no attribute '__name__' I look at plenty of usages of FunctionTestCase on Github and all of them seemed to be false positive, they were copies of the unittest/test/test_functiontestcase.py file The patch in the attached PR is not correct thought, it only fixes one of the loader and all of them suffer from the same issue. ---------- versions: +Python 3.10 Added file: https://bugs.python.org/file49196/test_functiontest.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 17:29:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 21:29:04 +0000 Subject: [issue34204] Bump the default pickle protocol in shelve In-Reply-To: <1532423802.47.0.56676864532.issue34204@psf.upfronthosting.co.za> Message-ID: <1590614944.85.0.852832823699.issue34204@roundup.psfhosted.org> STINNER Victor added the comment: I wrote a short script to see the impact of file size depending on the protocol: --- import shelve import os.path print("== Short value ==") for proto in (0, 1, 2, 3, 4, 5): filename = 'shelve-picklev%s' % proto with shelve.open(filename, protocol=proto) as db: assert db._protocol == proto for x in range(1000): db[str(x)] = str(x) print(f'Protocol {proto}: {os.path.getsize(filename)} bytes') os.unlink(filename) print() print("== Large value ==") large_value = [str(x) for x in range(1000)] for proto in (0, 1, 2, 3, 4, 5): filename = 'shelve-picklev%s' % proto with shelve.open(filename, protocol=proto) as db: assert db._protocol == proto for x in range(10): db[str(x)] = large_value print(f'Protocol {proto}: {os.path.getsize(filename)} bytes') os.unlink(filename) --- Output with Python 3.9.0b1 (on Fedora 32): --- == Short value == Protocol 0: 90112 bytes Protocol 1: 94208 bytes Protocol 2: 94208 bytes Protocol 3: 94208 bytes Protocol 4: 94208 bytes Protocol 5: 94208 bytes == Large value == Protocol 0: 139264 bytes Protocol 1: 139264 bytes Protocol 2: 139264 bytes Protocol 3: 139264 bytes Protocol 4: 98304 bytes Protocol 5: 98304 bytes --- For short string values, protocol 0 produces smaller files than protocol 1 and higher. For large value, protocol 4 and higher produce smaller files than protocol 3 and lower. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 17:29:17 2020 From: report at bugs.python.org (Matthias Braun) Date: Wed, 27 May 2020 21:29:17 +0000 Subject: [issue2897] PyMemberDef missing in limited API / Deprecate structmember.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1590614957.46.0.19697131052.issue2897@roundup.psfhosted.org> Matthias Braun added the comment: While working on the pull request I felt that the type and constants better fit `descrobject.h` rather than `object.h`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 17:32:26 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 21:32:26 +0000 Subject: [issue37129] Add os.RWF_APPEND flag for os.pwritev In-Reply-To: <1559933925.78.0.510794410466.issue37129@roundup.psfhosted.org> Message-ID: <1590615146.78.0.911293970762.issue37129@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 76ef255bde772005bbd0761399b274c2240e61d3 by YoSTEALTH in branch 'master': bpo-37129: Add os.RWF_APPEND flag for os.pwritev() (GH-20336) https://github.com/python/cpython/commit/76ef255bde772005bbd0761399b274c2240e61d3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 17:33:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 21:33:17 +0000 Subject: [issue32604] [subinterpreters] PEP 554 implementation: add interpreters module In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1590615197.66.0.790587545247.issue32604@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 7d80b35af1ee03834ae4af83e920dee89c2bc273 by Pablo Galindo in branch 'master': Revert "bpo-32604: PEP 554 for use in test suite (GH-19985)" (#20465) https://github.com/python/cpython/commit/7d80b35af1ee03834ae4af83e920dee89c2bc273 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 17:56:58 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 27 May 2020 21:56:58 +0000 Subject: [issue40798] The deprecated-removed Sphinx extension need to change the error message based on the Python version Message-ID: <1590616618.29.0.703498404088.issue40798@roundup.psfhosted.org> New submission from R?mi Lapeyre : The new deprecated-removed extension in the documentation always produces text like this: Deprecated since version 3.4, will be removed in version 3.8: MD5 as implicit default digest This message should be used in the documentation of 3.4 to 3.7 and then it should produce: Deprecated since version 3.4, removed in version 3.8: MD5 as implicit default digest I'm not sure if Sphinx knows which Python version it is building the documentation for. This is the only instance were this is used with a version less than 3.9 so all other messages are currently correct. I think a new contributor should be able to fix this. ---------- assignee: docs at python components: Documentation messages: 370141 nosy: docs at python, remi.lapeyre priority: normal severity: normal status: open title: The deprecated-removed Sphinx extension need to change the error message based on the Python version type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 18:10:34 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 22:10:34 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1590617434.65.0.0471916137681.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: New changeset e80697d687b610bd7fb9104af905dec8f0bc55a7 by Hai Shi in branch 'master': bpo-40275: Adding threading_helper submodule in test.support (GH-20263) https://github.com/python/cpython/commit/e80697d687b610bd7fb9104af905dec8f0bc55a7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 18:17:25 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 22:17:25 +0000 Subject: [issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled In-Reply-To: <1492073709.93.0.33740565749.issue30064@psf.upfronthosting.co.za> Message-ID: <1590617845.51.0.877070395876.issue30064@roundup.psfhosted.org> STINNER Victor added the comment: The new test_sock_client_racing() test seems to have... a race condition... AMD64 FreeBSD Non-Debug 3.9: https://buildbot.python.org/all/#/builders/750/builds/11 ERROR: test_sock_client_racing (test.test_asyncio.test_sock_lowlevel.KqueueEventLoopTests) ERROR: test_sock_client_racing (test.test_asyncio.test_sock_lowlevel.PollEventLoopTests) ERROR: test_sock_client_racing (test.test_asyncio.test_sock_lowlevel.SelectEventLoopTests) Example: ERROR: test_sock_client_racing (test.test_asyncio.test_sock_lowlevel.PollEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.9.koobs-freebsd-9e36.nondebug/build/Lib/test/test_asyncio/test_sock_lowlevel.py", line 216, in _basetest_sock_connect_racing await self.loop.sock_connect(sock, addr) File "/usr/home/buildbot/python/3.9.koobs-freebsd-9e36.nondebug/build/Lib/asyncio/selector_events.py", line 500, in sock_connect return await fut File "/usr/home/buildbot/python/3.9.koobs-freebsd-9e36.nondebug/build/Lib/asyncio/selector_events.py", line 505, in _sock_connect sock.connect(address) ConnectionRefusedError: [Errno 61] Connection refused During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/home/buildbot/python/3.9.koobs-freebsd-9e36.nondebug/build/Lib/test/test_asyncio/test_sock_lowlevel.py", line 253, in test_sock_client_racing self.loop.run_until_complete(asyncio.wait_for( File "/usr/home/buildbot/python/3.9.koobs-freebsd-9e36.nondebug/build/Lib/asyncio/base_events.py", line 642, in run_until_complete return future.result() File "/usr/home/buildbot/python/3.9.koobs-freebsd-9e36.nondebug/build/Lib/asyncio/tasks.py", line 496, in wait_for return fut.result() File "/usr/home/buildbot/python/3.9.koobs-freebsd-9e36.nondebug/build/Lib/test/test_asyncio/test_sock_lowlevel.py", line 219, in _basetest_sock_connect_racing await self.loop.sock_connect(sock, addr) File "/usr/home/buildbot/python/3.9.koobs-freebsd-9e36.nondebug/build/Lib/asyncio/selector_events.py", line 500, in sock_connect return await fut File "/usr/home/buildbot/python/3.9.koobs-freebsd-9e36.nondebug/build/Lib/asyncio/selector_events.py", line 505, in _sock_connect sock.connect(address) ConnectionRefusedError: [Errno 61] Connection refused ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 18:18:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 22:18:29 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1590617909.01.0.905679409378.issue40275@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19720 pull_request: https://github.com/python/cpython/pull/20468 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 18:36:33 2020 From: report at bugs.python.org (Furkan Onder) Date: Wed, 27 May 2020 22:36:33 +0000 Subject: [issue27779] Sync-up docstrings in C version of the the decimal module In-Reply-To: <1471375735.77.0.977501297817.issue27779@psf.upfronthosting.co.za> Message-ID: <1590618993.39.0.499356587541.issue27779@roundup.psfhosted.org> Furkan Onder added the comment: Patches are prepared but not continued. It can be merge by small additions to the patches. ---------- nosy: +furkanonder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 18:38:18 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 22:38:18 +0000 Subject: [issue40795] ctypes: PyErr_WriteUnraisable() called with no exception set on converting callback result failure In-Reply-To: <1590590658.49.0.612790938119.issue40795@roundup.psfhosted.org> Message-ID: <1590619098.97.0.225403065306.issue40795@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 10228bad0452d94e66c964b625a0b61befa08e59 by Victor Stinner in branch 'master': bpo-40795: ctypes calls unraisablehook with an exception (GH-20452) https://github.com/python/cpython/commit/10228bad0452d94e66c964b625a0b61befa08e59 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 18:38:31 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 27 May 2020 22:38:31 +0000 Subject: [issue40795] ctypes: PyErr_WriteUnraisable() called with no exception set on converting callback result failure In-Reply-To: <1590590658.49.0.612790938119.issue40795@roundup.psfhosted.org> Message-ID: <1590619111.33.0.717796063651.issue40795@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +19721 pull_request: https://github.com/python/cpython/pull/20469 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 18:38:39 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 27 May 2020 22:38:39 +0000 Subject: [issue40795] ctypes: PyErr_WriteUnraisable() called with no exception set on converting callback result failure In-Reply-To: <1590590658.49.0.612790938119.issue40795@roundup.psfhosted.org> Message-ID: <1590619119.34.0.703941389611.issue40795@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19722 pull_request: https://github.com/python/cpython/pull/20470 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 18:44:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 22:44:29 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1590619469.7.0.0279371973743.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b0461e19b5ecb2d89917b23efb5ce1048fab1b22 by Victor Stinner in branch 'master': bpo-40275: test.support.check_impl_detail() uses sys.implementation (GH-20468) https://github.com/python/cpython/commit/b0461e19b5ecb2d89917b23efb5ce1048fab1b22 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 18:51:03 2020 From: report at bugs.python.org (Fantix King) Date: Wed, 27 May 2020 22:51:03 +0000 Subject: [issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled In-Reply-To: <1492073709.93.0.33740565749.issue30064@psf.upfronthosting.co.za> Message-ID: <1590619863.93.0.476305085067.issue30064@roundup.psfhosted.org> Fantix King added the comment: Ouch ... looks like FreeBSD also needs a few more retries than a single retry. I'll test on a FreeBSD and create a PR for that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 18:56:43 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 27 May 2020 22:56:43 +0000 Subject: [issue40795] ctypes: PyErr_WriteUnraisable() called with no exception set on converting callback result failure In-Reply-To: <1590590658.49.0.612790938119.issue40795@roundup.psfhosted.org> Message-ID: <1590620203.52.0.960710310499.issue40795@roundup.psfhosted.org> miss-islington added the comment: New changeset 45ce0dbc4f8c68fe22ae97860faa8f2ec7faf27b by Miss Islington (bot) in branch '3.8': bpo-40795: ctypes calls unraisablehook with an exception (GH-20452) https://github.com/python/cpython/commit/45ce0dbc4f8c68fe22ae97860faa8f2ec7faf27b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 19:00:05 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 27 May 2020 23:00:05 +0000 Subject: [issue40795] ctypes: PyErr_WriteUnraisable() called with no exception set on converting callback result failure In-Reply-To: <1590590658.49.0.612790938119.issue40795@roundup.psfhosted.org> Message-ID: <1590620405.19.0.989230041479.issue40795@roundup.psfhosted.org> miss-islington added the comment: New changeset 9e3c583954f75a6396d1935e000df85d89b78a3d by Miss Islington (bot) in branch '3.9': bpo-40795: ctypes calls unraisablehook with an exception (GH-20452) https://github.com/python/cpython/commit/9e3c583954f75a6396d1935e000df85d89b78a3d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 19:01:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 23:01:28 +0000 Subject: [issue40795] ctypes: PyErr_WriteUnraisable() called with no exception set on converting callback result failure In-Reply-To: <1590590658.49.0.612790938119.issue40795@roundup.psfhosted.org> Message-ID: <1590620488.09.0.663815197049.issue40795@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 19:07:15 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 27 May 2020 23:07:15 +0000 Subject: [issue40798] The deprecated-removed Sphinx extension need to change the error message based on the Python version In-Reply-To: <1590616618.29.0.703498404088.issue40798@roundup.psfhosted.org> Message-ID: <1590620835.6.0.596473392919.issue40798@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 19:09:48 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 27 May 2020 23:09:48 +0000 Subject: [issue40797] multiprocessing.Semaphore has undocumented get_value() method In-Reply-To: <1590611242.05.0.840609180281.issue40797@roundup.psfhosted.org> Message-ID: <1590620988.71.0.0502212510891.issue40797@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +davin, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 19:13:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 23:13:17 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1590621197.4.0.35997231947.issue40275@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19723 pull_request: https://github.com/python/cpython/pull/20471 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 19:17:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 23:17:33 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1590621453.4.0.311110857595.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: Attached count_imports.py script counts how many modules are imported by "import test.support". With PR 20471, we are down to 74 modules. It's way better than 171 (when I created this issue)! ---------- Added file: https://bugs.python.org/file49197/count_imports.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 19:17:58 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 27 May 2020 23:17:58 +0000 Subject: [issue39073] [security] email module incorrect handling of CR and LF newline characters in Address objects. In-Reply-To: <1576586803.42.0.942657577592.issue39073@roundup.psfhosted.org> Message-ID: <1590621478.96.0.967115936785.issue39073@roundup.psfhosted.org> Ned Deily added the comment: New changeset 7df32f844efed33ca781a016017eab7050263b90 by Miss Islington (bot) in branch '3.6': bpo-39073: validate Address parts to disallow CRLF (GH-19007) (#19224) https://github.com/python/cpython/commit/7df32f844efed33ca781a016017eab7050263b90 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 19:56:36 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 May 2020 23:56:36 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1590623796.36.0.738377524808.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: New changeset aa890630bc877c73ec806c9982d8b7b2e7019723 by Victor Stinner in branch 'master': bpo-40275: test.support imports subprocess lazily (GH-20471) https://github.com/python/cpython/commit/aa890630bc877c73ec806c9982d8b7b2e7019723 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 20:06:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 00:06:58 +0000 Subject: [issue40799] Create Lib/_pydecimal.py file to optimize "import datetime" when _decimal is available Message-ID: <1590624418.05.0.296780868092.issue40799@roundup.psfhosted.org> New submission from STINNER Victor : Currently, "import datetime" starts by importing time, math, sys and operator modules, and then execute 2500 lines of Python code, define 7 classes, etc. For what? Just to remove all classes, functions, etc. to replace them with symbols from _decimal module: --- try: from _datetime import * except ImportError: pass else: # Clean up unused names del (_DAYNAMES, _DAYS_BEFORE_MONTH, _DAYS_IN_MONTH, _DI100Y, _DI400Y, _DI4Y, _EPOCH, _MAXORDINAL, _MONTHNAMES, _build_struct_time, _check_date_fields, _check_time_fields, _check_tzinfo_arg, _check_tzname, _check_utc_offset, _cmp, _cmperror, _date_class, _days_before_month, _days_before_year, _days_in_month, _format_time, _format_offset, _index, _is_leap, _isoweek1monday, _math, _ord2ymd, _time, _time_class, _tzinfo_class, _wrap_strftime, _ymd2ord, _divide_and_round, _parse_isoformat_date, _parse_isoformat_time, _parse_hh_mm_ss_ff, _IsoCalendarDate) # XXX Since import * above excludes names that start with _, # docstring does not get overwritten. In the future, it may be # appropriate to maintain a single module level docstring and # remove the following line. from _datetime import __doc__ --- I would prefer to use the same approach than the decimal module which also has large C and Python implementation. Lib/decimal.py is just: --- try: from _decimal import * from _decimal import __doc__ from _decimal import __version__ from _decimal import __libmpdec_version__ except ImportError: from _pydecimal import * from _pydecimal import __doc__ from _pydecimal import __version__ from _pydecimal import __libmpdec_version__ --- Advantages: * Faster import time * Avoid importing indirectly time, math, sys and operator modules, whereas they are not used IMO it also better separate the C and the Python implementations. Attached PR implements this idea. Currently, "import datetime" imports 4 modules: ['_operator', 'encodings.ascii', 'math', 'operator'] With the PR, "import datetime" imports only 1 module: ['encodings.ascii'] Import performance: [ref] 814 us +- 32 us -> [change] 189 us +- 4 us: 4.31x faster (-77%) Measured by: env/bin/python -m pyperf timeit -s 'import sys' 'import datetime; del sys.modules["datetime"]; del sys.modules["_datetime"]; del datetime' Note: I noticed that "import datetime" imports the math module while working on minimizing "import test.support" imports, bpo-40275. ---------- components: Library (Lib) messages: 370153 nosy: vstinner priority: normal severity: normal status: open title: Create Lib/_pydecimal.py file to optimize "import datetime" when _decimal is available versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 20:09:57 2020 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 28 May 2020 00:09:57 +0000 Subject: [issue40799] Create Lib/_pydecimal.py file to optimize "import datetime" when _decimal is available In-Reply-To: <1590624418.05.0.296780868092.issue40799@roundup.psfhosted.org> Message-ID: <1590624597.84.0.269983963616.issue40799@roundup.psfhosted.org> Change by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 20:10:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 00:10:17 +0000 Subject: [issue40799] Create Lib/_pydecimal.py file to optimize "import datetime" when _decimal is available In-Reply-To: <1590624418.05.0.296780868092.issue40799@roundup.psfhosted.org> Message-ID: <1590624617.28.0.290306414655.issue40799@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +19724 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20472 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 20:10:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 00:10:49 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1590624649.18.0.548048074547.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-40799: Create Lib/_pydecimal.py file to optimize "import datetime" when _decimal is available. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 20:16:23 2020 From: report at bugs.python.org (Sumana Harihareswara) Date: Thu, 28 May 2020 00:16:23 +0000 Subject: [issue23897] Update Python 3 extension module porting guide In-Reply-To: <1428588935.72.0.479238222018.issue23897@psf.upfronthosting.co.za> Message-ID: <1590624983.22.0.0236371443602.issue23897@roundup.psfhosted.org> Sumana Harihareswara added the comment: Following the large rewrite in https://github.com/python/cpython/pull/9317 to point to other guides (including py3c) instead of providing a guide, should we a) add a pointer to Barry's notes as well b) migrate this bug to request enhancements to py3c docs or http://python3porting.com/cextensions.html c) something else? ---------- keywords: +patch message_count: 1.0 -> 2.0 nosy: +sumanah nosy_count: 6.0 -> 7.0 pull_requests: +19725 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/9317 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 20:16:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 00:16:52 +0000 Subject: [issue37129] Add os.RWF_APPEND flag for os.pwritev In-Reply-To: <1559933925.78.0.510794410466.issue37129@roundup.psfhosted.org> Message-ID: <1590625012.88.0.584659746314.issue37129@roundup.psfhosted.org> STINNER Victor added the comment: Thanks YoSTEALTH. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 20:18:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 00:18:11 +0000 Subject: [issue37028] Implement asyncio repl In-Reply-To: <1558652233.35.0.225299391791.issue37028@roundup.psfhosted.org> Message-ID: <1590625091.5.0.204750880498.issue37028@roundup.psfhosted.org> STINNER Victor added the comment: This issue is now closed. If someone wants to enhane the asyncio REPL, please open a new issue. ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 20:40:35 2020 From: report at bugs.python.org (Elazar Gershuni) Date: Thu, 28 May 2020 00:40:35 +0000 Subject: [issue39939] PEP 616: Add str.removeprefix and str.removesuffix methods In-Reply-To: <1583953898.19.0.613718077904.issue39939@roundup.psfhosted.org> Message-ID: <1590626435.75.0.418660344678.issue39939@roundup.psfhosted.org> Change by Elazar Gershuni : ---------- nosy: +elazar nosy_count: 8.0 -> 9.0 pull_requests: +19726 pull_request: https://github.com/python/cpython/pull/20473 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 20:41:37 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 00:41:37 +0000 Subject: [issue39939] PEP 616: Add str.removeprefix and str.removesuffix methods In-Reply-To: <1583953898.19.0.613718077904.issue39939@roundup.psfhosted.org> Message-ID: <1590626497.31.0.56074274377.issue39939@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 56853d8ec6ed89bf5a9b81c3781a4df46ac391d3 by Elazar Gershuni in branch 'master': bpo-39939: Fix removeprefix issue number in the What's New in Python 3.9 (GH-20473) https://github.com/python/cpython/commit/56853d8ec6ed89bf5a9b81c3781a4df46ac391d3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 20:41:41 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 28 May 2020 00:41:41 +0000 Subject: [issue39939] PEP 616: Add str.removeprefix and str.removesuffix methods In-Reply-To: <1583953898.19.0.613718077904.issue39939@roundup.psfhosted.org> Message-ID: <1590626501.36.0.439242876686.issue39939@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 9.0 -> 10.0 pull_requests: +19727 pull_request: https://github.com/python/cpython/pull/20474 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 20:50:44 2020 From: report at bugs.python.org (Fantix King) Date: Thu, 28 May 2020 00:50:44 +0000 Subject: [issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled In-Reply-To: <1492073709.93.0.33740565749.issue30064@psf.upfronthosting.co.za> Message-ID: <1590627044.8.0.676340857119.issue30064@roundup.psfhosted.org> Fantix King added the comment: Not a simple one - FreeBSD is returning ECONNREFUSED immediately when trying to connect to a non-listening port on the loopback address: https://lists.freebsd.org/pipermail/freebsd-current/2005-May/049876.html Then all following connect attempts on the same socket return ECONNREFUSED regardless of whether the port is listening or not. I think I'll have to skip this test on FreeBSD. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 21:24:39 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 01:24:39 +0000 Subject: [issue39939] PEP 616: Add str.removeprefix and str.removesuffix methods In-Reply-To: <1583953898.19.0.613718077904.issue39939@roundup.psfhosted.org> Message-ID: <1590629079.5.0.470687830851.issue39939@roundup.psfhosted.org> STINNER Victor added the comment: New changeset de6b6841098e1a5967cb7a50b665ca7473d0ddad by Miss Islington (bot) in branch '3.9': bpo-39939: Fix removeprefix issue number in the What's New in Python 3.9 (GH-20473) (GH-20474) https://github.com/python/cpython/commit/de6b6841098e1a5967cb7a50b665ca7473d0ddad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 21:38:07 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 28 May 2020 01:38:07 +0000 Subject: [issue30665] pass big values for arg to fcntl.ioctl In-Reply-To: <1497450472.17.0.838126084809.issue30665@psf.upfronthosting.co.za> Message-ID: <1590629887.99.0.260616814484.issue30665@roundup.psfhosted.org> Change by Ned Deily : ---------- versions: +Python 3.10, Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 21:46:36 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 01:46:36 +0000 Subject: [issue40799] Create Lib/_pydecimal.py file to optimize "import datetime" when _decimal is available In-Reply-To: <1590624418.05.0.296780868092.issue40799@roundup.psfhosted.org> Message-ID: <1590630396.71.0.132042328598.issue40799@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 22:21:40 2020 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 28 May 2020 02:21:40 +0000 Subject: [issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled In-Reply-To: <1492073709.93.0.33740565749.issue30064@psf.upfronthosting.co.za> Message-ID: <1590632500.83.0.165361130372.issue30064@roundup.psfhosted.org> Kyle Stanley added the comment: > The new test_sock_client_racing() test seems to have... a race condition... I'm also a bit skeptical about relying on `time.sleep(0.01)` at the end of the loop in `_basetest_sock_recv_racing()`, but I don't have an idea for a better approach at the moment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 22:27:09 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 28 May 2020 02:27:09 +0000 Subject: [issue14562] urllib2 maybe blocks too long with small chunks In-Reply-To: <1334233390.52.0.591380103695.issue14562@psf.upfronthosting.co.za> Message-ID: <1590632829.06.0.745288475339.issue14562@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 23:07:28 2020 From: report at bugs.python.org (laike9m) Date: Thu, 28 May 2020 03:07:28 +0000 Subject: [issue40790] Python should enable computed gotos on Mac by default In-Reply-To: <1590563583.44.0.646993465948.issue40790@roundup.psfhosted.org> Message-ID: <1590635248.43.0.374081562951.issue40790@roundup.psfhosted.org> laike9m added the comment: Hi Benjamin, do you mean that disabling computed gotos on Mac is the expected behavior? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 27 23:50:16 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 28 May 2020 03:50:16 +0000 Subject: [issue37824] IDLE: Handle Shell input warnings properly. In-Reply-To: <1565541132.63.0.273797082992.issue37824@roundup.psfhosted.org> Message-ID: <1590637816.01.0.54765938773.issue37824@roundup.psfhosted.org> Terry J. Reedy added the comment: codeop._maybe_compile wraps each compile in try ... except SyntaxError. It can later reraise just once. I think it a bug that it is not similarly careful about SyntaxWarning and DeprecationWarning to only emit a particular warning just once. Cheryl, would you like to open a new issue and submit a patch? ---------- versions: -Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 00:20:34 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 28 May 2020 04:20:34 +0000 Subject: [issue37824] IDLE: Handle Shell input warnings properly. In-Reply-To: <1565541132.63.0.273797082992.issue37824@roundup.psfhosted.org> Message-ID: <1590639634.74.0.674196926436.issue37824@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 01:26:06 2020 From: report at bugs.python.org (hai shi) Date: Thu, 28 May 2020 05:26:06 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1590643566.85.0.915453145095.issue40275@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +19728 pull_request: https://github.com/python/cpython/pull/20479 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 01:36:59 2020 From: report at bugs.python.org (Davy Durham) Date: Thu, 28 May 2020 05:36:59 +0000 Subject: [issue40800] asyncio.sleep(0) should "yield" back to the event loop, but it doesn't behave as expected Message-ID: <1590644219.7.0.394616254827.issue40800@roundup.psfhosted.org> New submission from Davy Durham : I was searching for a way to "yield" from task/coroutinue back to the event loop (not yielding a value in terms of a generator) and not finding anything documented, I found this bug report and PR: https://github.com/python/asyncio/issues/284 It states that asyncio.sleep(0) should cause the coroutine to send control back to the event loop without wastefully doing other work. That makes sense and a perfectly good way to do that. And, the code appears to handle a value of <= 0 specifically: https://github.com/python/cpython/blob/3.8/Lib/asyncio/tasks.py#L632 However, using sleep(0) to yield back does not cause it to raise a CancelledError if the task has been cancelled as cancel()'s documentation indicates it should. But sleeping for anything >0 does (e.g. 0.001) The below code snippet will demonstrate the problem: TIA ---- import asyncio import time async def cancel_me(): print('cancel_me(): before sleep') try: while True: print("doing some really intensive cpu stuff") time.sleep(2) # now I want to yield control back to the event loop in order to determine if we've been cancelled await asyncio.sleep(0) # I'm expecting this to throw CancelledError, but it never does.. it DOES throw if the delay > 0 (e.g. 0.001) except asyncio.CancelledError: print('cancel_me(): cancelled!') raise async def main(): task = asyncio.create_task(cancel_me()) await asyncio.sleep(1) task.cancel() try: await task except asyncio.CancelledError: print("main(): cancel_me is cancelled now") asyncio.run(main()) ---------- components: asyncio messages: 370164 nosy: Davy Durham, asvetlov, yselivanov priority: normal severity: normal status: open title: asyncio.sleep(0) should "yield" back to the event loop, but it doesn't behave as expected type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 01:49:18 2020 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 28 May 2020 05:49:18 +0000 Subject: [issue37674] Is imp module deprecated or pending deprecation? In-Reply-To: <1564006542.59.0.779053208257.issue37674@roundup.psfhosted.org> Message-ID: <1590644958.03.0.160378683385.issue37674@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 5.0 -> 6.0 pull_requests: +19729 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20480 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 03:03:31 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 28 May 2020 07:03:31 +0000 Subject: [issue40799] Create Lib/_pydecimal.py file to optimize "import datetime" when _decimal is available In-Reply-To: <1590624418.05.0.296780868092.issue40799@roundup.psfhosted.org> Message-ID: <1590649411.91.0.349220897363.issue40799@roundup.psfhosted.org> Serhiy Storchaka added the comment: What do decimals have to datetime? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 03:24:01 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 28 May 2020 07:24:01 +0000 Subject: [issue40790] Python should enable computed gotos on Mac by default In-Reply-To: <1590563583.44.0.646993465948.issue40790@roundup.psfhosted.org> Message-ID: <1590650641.62.0.403943623737.issue40790@roundup.psfhosted.org> Ronald Oussoren added the comment: The result of auto detection of computed gotos can be seen using the HAVE_COMPUTED_GOTOS macro, not the USE_... one. Computed gotos should work on macOS, and does on my machine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 03:34:43 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 28 May 2020 07:34:43 +0000 Subject: [issue40792] Make PyNumber_Index() always returning an exact int instance In-Reply-To: <1590566267.28.0.18988326269.issue40792@roundup.psfhosted.org> Message-ID: <1590651283.26.0.0456883555857.issue40792@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 5f4b229df7812f1788287095eb6b138bb21876a4 by Serhiy Storchaka in branch 'master': bpo-40792: Make the result of PyNumber_Index() always having exact type int. (GH-20443) https://github.com/python/cpython/commit/5f4b229df7812f1788287095eb6b138bb21876a4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 03:34:43 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 28 May 2020 07:34:43 +0000 Subject: [issue26202] The range() object is deepcopied as atomic In-Reply-To: <1453755186.26.0.578500471201.issue26202@psf.upfronthosting.co.za> Message-ID: <1590651283.14.0.00561680259651.issue26202@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 5f4b229df7812f1788287095eb6b138bb21876a4 by Serhiy Storchaka in branch 'master': bpo-40792: Make the result of PyNumber_Index() always having exact type int. (GH-20443) https://github.com/python/cpython/commit/5f4b229df7812f1788287095eb6b138bb21876a4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 03:36:23 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 28 May 2020 07:36:23 +0000 Subject: [issue40792] Make PyNumber_Index() always returning an exact int instance In-Reply-To: <1590566267.28.0.18988326269.issue40792@roundup.psfhosted.org> Message-ID: <1590651383.23.0.275403269826.issue40792@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 May 28 03:51:18 2020 From: report at bugs.python.org (Nathaniel Smith) Date: Thu, 28 May 2020 07:51:18 +0000 Subject: [issue40789] C-level destructor in PySide2 breaks gen_send_ex, which assumes it's safe to call Py_DECREF with a live exception In-Reply-To: <1590551791.79.0.515609150701.issue40789@roundup.psfhosted.org> Message-ID: <1590652278.45.0.456977303615.issue40789@roundup.psfhosted.org> Nathaniel Smith added the comment: I don't think I understand what you mean by "reentrant"... we don't have any single piece of code that's calling back into itself. The question is about what the tp_dealloc contract is. Digging into it more, it looks like the standard is for typeobject.c:slot_tp_finalize to save/restore exceptions when invoking Python-level __del__ methods, rather than it being the responsibility of the tp_dealloc or tp_finalizer caller. (And finding that code also answers my next question, which was going to be whether there are any other dance steps you have to do when re-entering CPython from a tp_dealloc!) So I guess this is a PySide2 bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 04:05:28 2020 From: report at bugs.python.org (Ram Rachum) Date: Thu, 28 May 2020 08:05:28 +0000 Subject: [issue22250] unittest lowercase methods In-Reply-To: <1408719448.02.0.0961602464064.issue22250@psf.upfronthosting.co.za> Message-ID: <1590653128.68.0.413457804644.issue22250@roundup.psfhosted.org> Ram Rachum added the comment: I see it's been 6 years since the last comment here. I think it's important to revisit these kind of decisions once in a while. Maybe now the time is ripe for a change? We could do it backward compatibility with a long deprecation schedule. Ezio: You said this was proposed and rejected. Can you link to the discussion? I couldn't find it. ---------- nosy: +cool-RR _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 04:10:59 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 28 May 2020 08:10:59 +0000 Subject: [issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) In-Reply-To: <1364595911.19.0.826873230127.issue17576@psf.upfronthosting.co.za> Message-ID: <1590653459.72.0.928385391851.issue17576@roundup.psfhosted.org> Serhiy Storchaka added the comment: The current status: * Decimal and Fraction are no longer automatically converted to int when pass to functions implemented in C. PyLong_AsLong() etc no longer call __int__. (see issue36048 and issue37999) * operator.index() and PyNumber_Index() always return an instance of exact type int. (see issue40792) * int() and PyNumber_Long() always return an instance of exact type int. (see issue26984) * __index__ is used as a fallback if __int__ is not defined. (see issue20092) But: * __index__ and __int__ are not called for int subclasses in operator.index() and int() (also in the C API PyNumber_Index(), PyNumber_Long(), PyLong_AsLong(), etc). * Instances of int sublasses are accepted as result of __index__ and __int__ (but it is deprecated). * The Python implementation of operator.index() differs from the C implementation in many ways. (see issue18712) What I prefer as solutions of the remaining issues: * It is good to not call __index__ and __int__ for int subclasses. __index__ and __int__ were designed for converting non-integers to int. There are no good use cases for overriding __index__ and __int__ in int subclasses, and calling them is just a waste of time. We should just document this behavior. * Undeprecate accepting __index__ and __int__ returning instances of int sublasses. There is no difference from the side of using int and index(), but it can simplify user implementations of __index__ and __int__. * Either sync the pure Python implementation of operator.index() with the C implementation or get rid of Python implementation of the operator module at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 04:12:11 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 28 May 2020 08:12:11 +0000 Subject: [issue22250] unittest lowercase methods In-Reply-To: <1408719448.02.0.0961602464064.issue22250@psf.upfronthosting.co.za> Message-ID: <1590653531.14.0.0434913275965.issue22250@roundup.psfhosted.org> R?mi Lapeyre added the comment: See for example https://mail.python.org/archives/list/python-ideas at python.org/thread/4HE2GFL27LGBSHGWOBDOOBPEULC52U4D/#RC3QWQUX6VP56K2WXSMRZ5IGNAUBXKRI ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 04:12:29 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 28 May 2020 08:12:29 +0000 Subject: [issue37999] No longer use implicit convertion to int with loss In-Reply-To: <1567337044.72.0.119982097156.issue37999@roundup.psfhosted.org> Message-ID: <1590653549.83.0.847424538494.issue37999@roundup.psfhosted.org> Serhiy Storchaka added the comment: I think it is all here. Thank you Mark for your review and for fixing outdated docs and comments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 04:12:43 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 28 May 2020 08:12:43 +0000 Subject: [issue37999] No longer use implicit convertion to int with loss In-Reply-To: <1567337044.72.0.119982097156.issue37999@roundup.psfhosted.org> Message-ID: <1590653563.58.0.147543475114.issue37999@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 04:15:50 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 28 May 2020 08:15:50 +0000 Subject: [issue26202] The range() object is deepcopied as atomic In-Reply-To: <1453755186.26.0.578500471201.issue26202@psf.upfronthosting.co.za> Message-ID: <1590653750.33.0.200913999378.issue26202@roundup.psfhosted.org> Serhiy Storchaka added the comment: This change has been reverted in issue40792. The range object attributes has now exact type int, so the original issue with deep copying is gone. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 04:21:11 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 28 May 2020 08:21:11 +0000 Subject: [issue22250] unittest lowercase methods In-Reply-To: <1408719448.02.0.0961602464064.issue22250@psf.upfronthosting.co.za> Message-ID: <1590654071.97.0.74130427713.issue22250@roundup.psfhosted.org> Serhiy Storchaka added the comment: https://www.python.org/dev/peps/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 04:27:16 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Thu, 28 May 2020 08:27:16 +0000 Subject: [issue38938] Possible performance improvement for heapq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1590654436.59.0.505587708189.issue38938@roundup.psfhosted.org> Dennis Sweeney added the comment: less_movement.py is my favorite so far. It still handles key and reverse, but using instance attributes instead of the list indices I tried before. It does this by only advancing the "key" and "leaf" attributes up toward the root (where the key is just the value if key is None), while the value is stored only in the leaf. Since the "value" attribute is no longer used except for at the leaves, we can pack a leaf's value into its left slot and reduce the number of slots. This seems to run very well on pypy and it looks like it would be pretty receptive to a c implementation, which I would be happy to work on. ---------- title: Possible performance improvement for heaqq.merge() -> Possible performance improvement for heapq.merge() versions: +Python 3.10 -Python 3.9 Added file: https://bugs.python.org/file49198/less_movement.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 04:41:58 2020 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 28 May 2020 08:41:58 +0000 Subject: [issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) In-Reply-To: <1364595911.19.0.826873230127.issue17576@psf.upfronthosting.co.za> Message-ID: <1590655318.62.0.0309690680564.issue17576@roundup.psfhosted.org> Mark Dickinson added the comment: [Serhiy] > * Undeprecate accepting __index__ and __int__ returning instances of int sublasses. There is no difference from the side of using int and index(), but it can simplify user implementations of __index__ and __int__. I'm not sure about this. Thinking about the bigger picture, we have a similar deprecation in place for __float__ returning an instance of a float subclass. That one I'd like to keep (and probably make an error for 3.10). A problem I've run into in Real Code (TM) is needing to convert something float-like to a float, using the same mechanisms that (for example) something like `math.sqrt` uses. One option is to call "float", but that requires explicitly excluding str, bytes and bytearray, which feels ugly and not very future-proof. So the code ends up calling __float__. But because __float__ can return an instance of a float subclass, it then still needs some way to convert the return value to an actual float. And that's surprisingly tricky. So I really *do* want to see the ability of __float__ to return a non-float eventually removed. Similarly for __int__, there's no easy Python-side way to mimic the effect of calling __int__, followed by converting to an exact int. We have to: 1. Do an explicit check for non-numbers (str, bytes, bytearray) 2. Call int Or: 1. Call __int__ 2. Convert an instance of a possible subclass of int to something of exact type int. I don't know how to do this cleanly in general in Python, and end up resorting to evil tricks like adding `0`. Deprecating allowing __int__ to return a non-int helps here, because it lets me simply call __int__. I care much more about the __float__ case than the __int__ case, because the "right way" to duck-type integers is to use __index__ rather than __int__, and for __index__ we have operator.index as a solution. But it would seem odd to have the rule in place for __float__ but not for __int__ and __index__. The other way to solve my problem would be to provide an operator module function (operator.as_float?) that does a duck-typed conversion of an arbitrary Python object to a float. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 04:42:20 2020 From: report at bugs.python.org (Nathaniel Smith) Date: Thu, 28 May 2020 08:42:20 +0000 Subject: [issue40789] C-level destructor in PySide2 breaks gen_send_ex, which assumes it's safe to call Py_DECREF with a live exception In-Reply-To: <1590551791.79.0.515609150701.issue40789@roundup.psfhosted.org> Message-ID: <1590655340.52.0.723909961618.issue40789@roundup.psfhosted.org> Nathaniel Smith added the comment: Filed with PySide2: https://bugreports.qt.io/browse/PYSIDE-1313 ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 04:56:10 2020 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 28 May 2020 08:56:10 +0000 Subject: [issue23897] Update Python 3 extension module porting guide In-Reply-To: <1428588935.72.0.479238222018.issue23897@psf.upfronthosting.co.za> Message-ID: <1590656170.46.0.359239004471.issue23897@roundup.psfhosted.org> Petr Viktorin added the comment: py3c has an open issue to check that Barry's notes on C extensions are included: https://github.com/encukou/py3c/issues/1 However, C extensions are only a small part of the wiki page. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 05:17:47 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 28 May 2020 09:17:47 +0000 Subject: [issue33436] Add an interactive shell for Sqlite3 In-Reply-To: <1525657620.33.0.682650639539.issue33436@psf.upfronthosting.co.za> Message-ID: <1590657467.91.0.629402820762.issue33436@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: I think this is a good idea. Proof-of-concept implementation added (invoke REPL with `python -m sqlite3`). Possible improvements: - Use sqlite3.complete_statement() - Support Python syntax as well. For example: >>> select * from t >>> res = _ >>> print(res[0]) ---------- keywords: +patch nosy: +erlendaasland Added file: https://bugs.python.org/file49199/0001-Add-proof-of-concept-REPL.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 05:23:06 2020 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 28 May 2020 09:23:06 +0000 Subject: [issue40801] Expose PyFloat_ToDouble at Python level: operator.to_float? Message-ID: <1590657786.78.0.118668826809.issue40801@roundup.psfhosted.org> New submission from Mark Dickinson : Motivation ---------- Various pieces of Python need to do a duck-typed conversion of an arbitrary float-like object to a float (or a C double) for computation. The math module is the most obvious example - most math-module functions that accept a float also accept float-like things, like np.float32 and Decimal - but it's not the only place that this is needed. This conversion is easy at C level, being encapsulated in a single function call: PyFloat_AsDouble. (Plus a PyFloat_FromDouble if you want to go back to Python space, of course.) But: it's surprisingly awkward to get an equivalent effect in pure Python code. Options are: 1. Do an explicit type check to exclude str, bytes and bytearray, and then call the float constructor. But the extra type check is ugly and potentially not future-proof. 2. Call type(obj).__float__(obj). But this has several problems: __float__ can return an instance of a float subclass rather than a strict float, and then it's hard to convert to an actual float. And in more recent versions of Python, this no longer matches PyFloat_AsDouble because it doesn't account for objects that provide __index__ but not __float__. And calling dunder methods directly should rarely be the Right Way To Do It. 3. Use the implicit ability of the math module to do this, for example using math.copysign(obj, obj). This works! But it's not a clear expression of the intent. This has bitten me in Real Code (TM), where I've needed a way to convert an arbitrary float-like thing to a float, ideally following the same rules that Python uses. And also ideally in such a way that my own code doesn't have to change if Python updates its rules, as for example it did recently to allow things with an __index__ to be considered float-like. Proposal -------- Add a new operator function "operator.as_float" which matches Python's duck-typed acceptance of float-like things, in the same way that the existing operator.index matches Python's implicit acceptance of int-like things in various APIs that expect integers. Internally, "operator.as_float" would simply call PyFloat_AsDouble followed by PyFloat_FromDouble (possibly with a fast path to pass objects of exact type float through directly). Related: #17576. ---------- messages: 370181 nosy: mark.dickinson, serhiy.storchaka priority: normal severity: normal status: open title: Expose PyFloat_ToDouble at Python level: operator.to_float? type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 05:23:29 2020 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 28 May 2020 09:23:29 +0000 Subject: [issue40801] Expose PyFloat_ToDouble at Python level: operator.as_float? In-Reply-To: <1590657786.78.0.118668826809.issue40801@roundup.psfhosted.org> Message-ID: <1590657809.35.0.943464756472.issue40801@roundup.psfhosted.org> Change by Mark Dickinson : ---------- title: Expose PyFloat_ToDouble at Python level: operator.to_float? -> Expose PyFloat_ToDouble at Python level: operator.as_float? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 05:31:51 2020 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 28 May 2020 09:31:51 +0000 Subject: [issue40802] AbstractEventLoop.shutdown_default_executor breaks backwards compatibility Message-ID: <1590658311.02.0.725664008315.issue40802@roundup.psfhosted.org> New submission from Petr Viktorin : In bpo-34037, AbstractEventLoop gained a new abstract method, shutdown_default_executor: https://docs.python.org/dev/library/asyncio-eventloop.html#asyncio.loop.shutdown_default_executor All AbstractEventLoop subclasses need to define this method, otherwise they are not compatible with Python 3.9's asyncio. It seems that the anyio and uvloop projects are affected: https://github.com/agronholm/anyio/issues/110 This is mentioned in What's New: https://docs.python.org/dev/whatsnew/3.9.html#changes-in-the-python-api I'd like to make extra sure asyncio experts know about this backwards incompatibility. Since asyncio is no longer provisional, should it break backwards compatibility with just a What's New entry? ---------- components: asyncio messages: 370182 nosy: asvetlov, petr.viktorin, yselivanov priority: normal severity: normal status: open title: AbstractEventLoop.shutdown_default_executor breaks backwards compatibility versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 05:39:16 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 28 May 2020 09:39:16 +0000 Subject: [issue36859] sqlite3 dml statement detection does not account for CTEs In-Reply-To: <1557356904.4.0.529350025795.issue36859@roundup.psfhosted.org> Message-ID: <1590658756.56.0.260748229867.issue36859@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 05:46:22 2020 From: report at bugs.python.org (Robin) Date: Thu, 28 May 2020 09:46:22 +0000 Subject: [issue40803] Unable to execute python.exe from zip in wine Message-ID: <1590659182.08.0.861288349289.issue40803@roundup.psfhosted.org> New submission from Robin : I've downloaded python38.zip(and python32.zip). It doesn't run because it's using an API `PathCchCanonicalizeEx()` that's not provided in wine. ``` Z:\home\rmills\temp\python-3>wine: Call from 0x7b43cfbc to unimplemented function api-ms-win-core-path-l1-1-0.dll.PathCchCanonicalizeEx, aborting wine: Unimplemented function api-ms-win-core-path-l1-1-0.dll.PathCchCanonicalizeEx called at address 0x7bc50023:0x7b43cfbc (thread 0034), starting debugger... Unhandled exception: unimplemented function api-ms-win-core-path-l1-1-0.dll.PathCchCanonicalizeEx called in 32-bit code (0x7b43cfbc). ``` ---------- components: Windows messages: 370183 nosy: clanmills, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Unable to execute python.exe from zip in wine type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 06:02:25 2020 From: report at bugs.python.org (amansi26) Date: Thu, 28 May 2020 10:02:25 +0000 Subject: [issue40804] Bug report in python3.6.8 using argparse module Message-ID: <1590660145.62.0.878153960448.issue40804@roundup.psfhosted.org> New submission from amansi26 : I am using 3.6.8 version of python. I am seeing an error as AttributeError: 'Namespace' object has no attribute 'func' while using argparse . The code is working fine with python2.7 argparser. I see a similar bug [4] reported at python 3.3 and python3.4. The workaround mentioned works fine for a single level command. Scenarios: - If there is one command and various subcommands, like [1].The solution works fine. - But suppose I have a command with mutiple level of subcommands like [2]. In this case if I give [3] as a command the ArgumentParser.prog() takes just the first command as input in this case (open-stack). Hence the parser.print_usage prints [1]. [1] [2] [3] https://bpa.st/PUPA [4] https://bugs.python.org/issue16308 ---------- messages: 370184 nosy: amansi26 priority: normal severity: normal status: open title: Bug report in python3.6.8 using argparse module type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 06:20:39 2020 From: report at bugs.python.org (Robin) Date: Thu, 28 May 2020 10:20:39 +0000 Subject: [issue40803] Unable to execute python.exe from zip in wine In-Reply-To: <1590659182.08.0.861288349289.issue40803@roundup.psfhosted.org> Message-ID: <1590661239.77.0.939385378743.issue40803@roundup.psfhosted.org> Robin added the comment: I've reported this to the wine team: https://bugs.winehq.org/show_bug.cgi?id=49271 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 06:23:19 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 28 May 2020 10:23:19 +0000 Subject: [issue40803] Unable to execute python.exe from zip in wine In-Reply-To: <1590659182.08.0.861288349289.issue40803@roundup.psfhosted.org> Message-ID: <1590661399.48.0.986531274513.issue40803@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi Robin, it looks like you are trying to run Python for Windows on Linux using Wine but that it's not supported by Wine. Why would this be a bug in the CPython interpreter thought? It looks like there is nothing we can do here to fix this right? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 06:35:00 2020 From: report at bugs.python.org (=?utf-8?b?RMOhdmlkIEhvcnbDoXRo?=) Date: Thu, 28 May 2020 10:35:00 +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: <1590662100.54.0.844778847769.issue9338@roundup.psfhosted.org> Change by D?vid Horv?th : ---------- nosy: +D?vid Horv?th _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 06:38:10 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 28 May 2020 10:38:10 +0000 Subject: [issue40804] Bug report in python3.6.8 using argparse module In-Reply-To: <1590660145.62.0.878153960448.issue40804@roundup.psfhosted.org> Message-ID: <1590662290.52.0.98284777039.issue40804@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi amansi26, thanks for reporting this issue. Without an example program that reproduces it, we won't be able to diagnose and fix it thought. Can you post one? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 06:51:15 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Thu, 28 May 2020 10:51:15 +0000 Subject: [issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10 In-Reply-To: <1572192430.43.0.755831692199.issue38605@roundup.psfhosted.org> Message-ID: <1590663075.23.0.995014572805.issue38605@roundup.psfhosted.org> Batuhan Taskaya added the comment: >From now on, should typing.get_type_hints automatically resolve arguments too? An example would be this; import typing T = typing.TypeVar("T") class Loop(typing.Generic[T]): subloop: typing.Final["Loop[int]"] print(typing.get_type_hints(Loop)) >>> {'subloop': typing.Final[__main__.Loop[int]]} If we run the same code under future annotations >>> {'subloop': typing.Final[ForwardRef('Loop[int]')]} ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 07:01:32 2020 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 28 May 2020 11:01:32 +0000 Subject: [issue40801] Expose PyFloat_ToDouble at Python level: operator.as_float? In-Reply-To: <1590657786.78.0.118668826809.issue40801@roundup.psfhosted.org> Message-ID: <1590663692.55.0.191164793512.issue40801@roundup.psfhosted.org> Change by Mark Dickinson : ---------- keywords: +patch pull_requests: +19730 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20481 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 07:03:44 2020 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 28 May 2020 11:03:44 +0000 Subject: [issue40801] Expose PyFloat_ToDouble at Python level: operator.as_float? In-Reply-To: <1590657786.78.0.118668826809.issue40801@roundup.psfhosted.org> Message-ID: <1590663824.22.0.521863263334.issue40801@roundup.psfhosted.org> Mark Dickinson added the comment: Proof of concept in GH-20481 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 07:07:35 2020 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 28 May 2020 11:07:35 +0000 Subject: [issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) In-Reply-To: <1364595911.19.0.826873230127.issue17576@psf.upfronthosting.co.za> Message-ID: <1590664055.45.0.271220474519.issue17576@roundup.psfhosted.org> Mark Dickinson added the comment: > The other way to solve my problem would be to provide an operator module function (operator.as_float?) that does a duck-typed conversion of an arbitrary Python object to a float. This does feel like the *right* solution to me. See #40801 and the linked PR. If we can do something like this, I'd be happy to drop the expectation that __float__ return something of exact type float, and similarly for __index__. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 07:12:44 2020 From: report at bugs.python.org (hai shi) Date: Thu, 28 May 2020 11:12:44 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1590664364.83.0.28975648079.issue40275@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +19731 pull_request: https://github.com/python/cpython/pull/20482 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 07:21:11 2020 From: report at bugs.python.org (Robin) Date: Thu, 28 May 2020 11:21:11 +0000 Subject: [issue40803] Unable to execute python.exe from zip in wine In-Reply-To: <1590659182.08.0.861288349289.issue40803@roundup.psfhosted.org> Message-ID: <1590664871.35.0.442688551884.issue40803@roundup.psfhosted.org> Robin added the comment: Thanks for such a rapid response. Much appreciated. I think it's a bug in wine, so I've also reported it to them. And you both know that you both have it on your radar! I believe the Win32/API PathCchCanonicalizeEx() is quite new, and that's why it's not in wine-core-magic. However, python could consider reverting to your earlier code. And another possibility is to test that PathCchCanonicalizeEx != NULL before calling it. If it is NULL, then use the "old" code. https://docs.microsoft.com/en-us/windows/win32/api/pathcch/nf-pathcch-pathcchcanonicalizeex Let's see what the wine men (and ladies) say! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 07:29:27 2020 From: report at bugs.python.org (Robin) Date: Thu, 28 May 2020 11:29:27 +0000 Subject: [issue40803] Unable to execute python.exe from zip in wine In-Reply-To: <1590659182.08.0.861288349289.issue40803@roundup.psfhosted.org> Message-ID: <1590665367.69.0.244403481812.issue40803@roundup.psfhosted.org> Robin added the comment: Good News. The wine people say "Fixed in wine 4.0". So, a happy result. https://bugs.winehq.org/show_bug.cgi?id=49271 We can close this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 07:33:18 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 28 May 2020 11:33:18 +0000 Subject: [issue40803] Unable to execute python.exe from zip in wine In-Reply-To: <1590659182.08.0.861288349289.issue40803@roundup.psfhosted.org> Message-ID: <1590665598.14.0.0409405558413.issue40803@roundup.psfhosted.org> R?mi Lapeyre added the comment: Thanks, I think you can close it by setting the Status field to "closed". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 07:35:09 2020 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 28 May 2020 11:35:09 +0000 Subject: [issue40724] Support buffer protocol with type specs In-Reply-To: <1590133862.04.0.206694262407.issue40724@roundup.psfhosted.org> Message-ID: <1590665709.8.0.327005384853.issue40724@roundup.psfhosted.org> Petr Viktorin added the comment: Yes, it should be possible to wrap them in #if so they aren't part of the stable ABI. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 07:40:09 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Thu, 28 May 2020 11:40:09 +0000 Subject: [issue40804] Bug report in python3.6.8 using argparse module In-Reply-To: <1590660145.62.0.878153960448.issue40804@roundup.psfhosted.org> Message-ID: <1590666009.11.0.437100631271.issue40804@roundup.psfhosted.org> Change by Florian Dahlitz : ---------- nosy: +DahlitzFlorian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 07:40:52 2020 From: report at bugs.python.org (Robin) Date: Thu, 28 May 2020 11:40:52 +0000 Subject: [issue40803] Unable to execute python.exe from zip in wine In-Reply-To: <1590659182.08.0.861288349289.issue40803@roundup.psfhosted.org> Message-ID: <1590666052.14.0.913008841671.issue40803@roundup.psfhosted.org> Change by Robin : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 07:45:40 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Thu, 28 May 2020 11:45:40 +0000 Subject: [issue40798] The deprecated-removed Sphinx extension need to change the error message based on the Python version In-Reply-To: <1590616618.29.0.703498404088.issue40798@roundup.psfhosted.org> Message-ID: <1590666340.92.0.905040765719.issue40798@roundup.psfhosted.org> Change by Florian Dahlitz : ---------- nosy: +DahlitzFlorian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 08:10:04 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 28 May 2020 12:10:04 +0000 Subject: [issue40791] hmac.compare_digest could try harder to be constant-time. In-Reply-To: <1590565267.04.0.961881522519.issue40791@roundup.psfhosted.org> Message-ID: <1590667804.72.0.647387928286.issue40791@roundup.psfhosted.org> miss-islington added the comment: New changeset 8183e11d87388e4e44e3242c42085b87a878f781 by Christian Heimes in branch '3.9': [3.9] bpo-40791: Use CRYPTO_memcmp() for compare_digest (GH-20456) (GH-20461) https://github.com/python/cpython/commit/8183e11d87388e4e44e3242c42085b87a878f781 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 08:12:54 2020 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Thu, 28 May 2020 12:12:54 +0000 Subject: [issue40770] RFE: Run linkchecker on documentation on the CI In-Reply-To: <1590422942.58.0.668271802455.issue40770@roundup.psfhosted.org> Message-ID: <1590667974.99.0.0475298875375.issue40770@roundup.psfhosted.org> Miro Hron?ok added the comment: Note: I would gladly contribute this check, but I have no idea where should I do that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 08:19:57 2020 From: report at bugs.python.org (Rob Taft) Date: Thu, 28 May 2020 12:19:57 +0000 Subject: [issue40805] Can no longer patch flask.g Message-ID: <1590668397.14.0.891806096405.issue40805@roundup.psfhosted.org> New submission from Rob Taft : Whenever I try to patch flask.g, it appears to do nothing. This happened when I upgraded mock from 3.x to 4.x. I reported it on the mock github page https://github.com/testing-cabal/mock/issues/490 and was asked to report it here. The folllowing code run with pytest works fine in mock 3.0.5, but fails to patch in 4.0.0 and up. from mock import patch import flask def some_function(): flask.g.somevariable = True return flask.g.somevariable @patch('flask.g') def test_some_function(mock_flask_global): assert some_function() ---------- components: Tests messages: 370197 nosy: Rob Taft priority: normal severity: normal status: open title: Can no longer patch flask.g type: behavior versions: Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 08:25:46 2020 From: report at bugs.python.org (Eryk Sun) Date: Thu, 28 May 2020 12:25:46 +0000 Subject: [issue40654] shutil.copyfile mutates symlink for absolute path In-Reply-To: <1589685995.41.0.350903765679.issue40654@roundup.psfhosted.org> Message-ID: <1590668746.91.0.0877377108198.issue40654@roundup.psfhosted.org> Eryk Sun added the comment: Modifying readlink() to return an str subclass that preserves the print name is an interesting idea, but not on topic here. For the cases where os.readlink is used to manually follow links (*), such as ntpath.realpath, using the substitute name is the most reliable option since that's the actual path that the system uses. But this issue is about the use of os.readlink in order to copy symlinks in shutil.move, shutil.copyfile, and shutil.copytree. I'd still be happy to assist with the development of an os.copylink function that copies the reparse point exactly via low-level FSCTL_GET_REPARSE_POINT and FSCTL_SET_REPARSE_POINT. It has to use the low-level API because it turns out that CopyFileExW and CreateDirectoryExW fail if they can't enable the symlink privilege, which is not actually required if the system is in developer mode. For shutil, it would be used as shutil._copylink. In POSIX, shutil._copylink would continue to just use readlink and symlink. --- (*) off-topic note Manually following remote mountpoints is never correct. They are intended to be evaluated by the remote system using its local devices. Manually following remote-to-local (R2L) symlinks is almost always incorrect and should be disallowed by local symlink evaluation policy Check `fsutil behavior query symlinkevaluation`. A remote SMB server opens a path in a way that has the remote I/O manager stop parsing at the first symlink, which may be a directory symlink in the path (it's not necessarily the final component, unlike FILE_FLAG_OPEN_REPARSE_POINT). The server completes the request with a message to the client redirector that contains the parsed path of the symlink, the remaining unparsed path, and the target of the symlink. The local SMB redirector decides whether to allow reparsing based on its L2L, L2R, R2L, and R2R symlink policies. This reparse is implemented locally, with local devices. It is unlikely that a non-relative symlink that targets local device paths (e.g. "//server/share/symlink" -> "E:/work/file") was intended to be evaluated on another machine, so R2L should almost always be disallowed. Bypassing the system's R2L policy when manually following a symlink is always wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 08:30:55 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Thu, 28 May 2020 12:30:55 +0000 Subject: [issue40798] The deprecated-removed Sphinx extension need to change the error message based on the Python version In-Reply-To: <1590616618.29.0.703498404088.issue40798@roundup.psfhosted.org> Message-ID: <1590669055.5.0.562478106237.issue40798@roundup.psfhosted.org> Florian Dahlitz added the comment: I would like to submit a PR for it if possible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 08:37:06 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 28 May 2020 12:37:06 +0000 Subject: [issue40798] The deprecated-removed Sphinx extension need to change the error message based on the Python version In-Reply-To: <1590616618.29.0.703498404088.issue40798@roundup.psfhosted.org> Message-ID: <1590669426.18.0.651788702985.issue40798@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi Florian, please have a go and open one on GitHub so it can be reviewed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 08:52:45 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 28 May 2020 12:52:45 +0000 Subject: [issue40805] Can no longer patch flask.g In-Reply-To: <1590668397.14.0.891806096405.issue40805@roundup.psfhosted.org> Message-ID: <1590670365.95.0.231661864507.issue40805@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 08:55:46 2020 From: report at bugs.python.org (Ramil Nugmanov) Date: Thu, 28 May 2020 12:55:46 +0000 Subject: [issue40806] itertools.product not lazy Message-ID: <1590670546.03.0.0667180087022.issue40806@roundup.psfhosted.org> New submission from Ramil Nugmanov : def x(y): while True: yield y p = product(x(1), x(2)) next(p) # this string will never be reached. ---------- components: Library (Lib) messages: 370201 nosy: nougmanoff priority: normal severity: normal status: open title: itertools.product not lazy type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 09:01:20 2020 From: report at bugs.python.org (Ama Aje My Fren) Date: Thu, 28 May 2020 13:01:20 +0000 Subject: [issue40770] RFE: Run linkchecker on documentation on the CI In-Reply-To: <1590667974.99.0.0475298875375.issue40770@roundup.psfhosted.org> Message-ID: Ama Aje My Fren added the comment: On Thu, May 28, 2020 at 3:13 PM Miro Hron?ok wrote: > > Note: I would gladly contribute this check, but I have no idea where should I do that. > I don't know either. I suspect it will have to be with one of the CI/CD providers that cpython uses. I _think_ it uses three: a. Travis cpython/.travis.yml b. Github Actions .github/workflows/doc.yml c. Azures Pipelines .azure-pipelines/docs-steps.yml Beyond that no idea. I fear I am also blind here. Still google is my friend. ---------- nosy: +amaajemyfren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 09:05:53 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 28 May 2020 13:05:53 +0000 Subject: [issue40806] itertools.product not lazy In-Reply-To: <1590670546.03.0.0667180087022.issue40806@roundup.psfhosted.org> Message-ID: <1590671153.99.0.820013297452.issue40806@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi Ramil, itertools.product() expect its argument to be finite iterables, it needs to keep all their elements in memory anyway at it "cycles around" to produce all possible pairs. Basically, product(x(1), x(2)) is equivalent to product(tuple(x(1)), tuple(x(2))). I see that the documentation does not mention that the arguments must be finite, could you open a PR to improve it? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 09:06:10 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 28 May 2020 13:06:10 +0000 Subject: [issue40806] itertools.product not lazy In-Reply-To: <1590670546.03.0.0667180087022.issue40806@roundup.psfhosted.org> Message-ID: <1590671170.37.0.139296201228.issue40806@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- nosy: +rhettinger, tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 09:23:13 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Thu, 28 May 2020 13:23:13 +0000 Subject: [issue40798] The deprecated-removed Sphinx extension need to change the error message based on the Python version In-Reply-To: <1590616618.29.0.703498404088.issue40798@roundup.psfhosted.org> Message-ID: <1590672193.42.0.217463049987.issue40798@roundup.psfhosted.org> Change by Florian Dahlitz : ---------- keywords: +patch pull_requests: +19732 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20483 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 09:25:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 13:25:28 +0000 Subject: [issue38488] Update bundled pip to 19.3 Message-ID: <1590672328.1.0.455055461704.issue38488@roundup.psfhosted.org> New submission from STINNER Victor : > Various buildbots which run the tests with an installed python, fail with: (...) It's the "chmod" step which fails. I guess that only "Install" buildbot workers are affected. I failed to reproduce the issue with commands: --- ./configure --prefix $PWD/target --with-pydebug make && make install chmod -R -w target/ --- I get these permissions: --- $ ls -l target/lib/python3.10/site-packages/setuptools-46.1.3.dist-info/RECORD -r--r--r--. 1 vstinner vstinner 14560 28 mai 03:40 target/lib/python3.10/site-packages/setuptools-46.1.3.dist-info/RECORD --- ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 09:31:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 13:31:17 +0000 Subject: [issue38488] Update bundled pip to 19.3 In-Reply-To: <1590672328.1.0.455055461704.issue38488@roundup.psfhosted.org> Message-ID: <1590672677.82.0.0165572945132.issue38488@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +19733 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20484 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 09:47:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 13:47:27 +0000 Subject: [issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled In-Reply-To: <1492073709.93.0.33740565749.issue30064@psf.upfronthosting.co.za> Message-ID: <1590673647.42.0.629972508599.issue30064@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19734 pull_request: https://github.com/python/cpython/pull/20485 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 09:48:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 13:48:52 +0000 Subject: [issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled In-Reply-To: <1492073709.93.0.33740565749.issue30064@psf.upfronthosting.co.za> Message-ID: <1590673732.21.0.897207907084.issue30064@roundup.psfhosted.org> STINNER Victor added the comment: I created https://github.com/python/cpython/pull/20485 to skip the unstable tests until someone fix them. IMO it's better to skip the test than reverting the fix, since the fix does fix a race condition. The test is still failing on buildbots which makes analysis of buildbot failures more difficult. For example, a SQLite change got 3 different 4 different bugs on buildbots: https://github.com/python/cpython/pull/20448#issuecomment-635350054 See the "revert on fail" policy for buildbots: https://pythondev.readthedocs.io/ci.html#revert-on-fail > I'm also a bit skeptical about relying on `time.sleep(0.01)` at the end of the loop in `_basetest_sock_recv_racing()` Yeah, please avoid sleep as a synchronization primitive: https://pythondev.readthedocs.io/unstable_tests.html#don-t-use-sleep-as-synchronization ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 09:51:57 2020 From: report at bugs.python.org (Robert Reynolds) Date: Thu, 28 May 2020 13:51:57 +0000 Subject: [issue8087] Unupdated source file in traceback In-Reply-To: <1267990809.73.0.116039880896.issue8087@psf.upfronthosting.co.za> Message-ID: <1590673917.65.0.776134160467.issue8087@roundup.psfhosted.org> Robert Reynolds added the comment: I second [what was said by Aigars Mahinovs](https://bugs.python.org/issue8087#msg300990) about long-running processes giving confusing tracebacks that make debugging very difficult. I have a Natural Language Processing pipeline extracting features from a large corpus of texts, and that process can take days to complete. If the underlying modules have since been edited, then when an Exception occurs ? including a KeyboardInterrupt ? then the traceback shows the wrong lines. The functions listed at the end of the line are correct, which is the only reason I was able to easily detect the source of my confusion; the line number cited was no longer inside of the listed function! I propose one more simple thing to track that would be helpful in my situation: how many lines were in the file at call time vs now. It would be (potentially) helpful to have a warning point out that the cited module is now 17 lines longer than it was when it was imported. That way I can make more intelligent guesses about what line was actually the culprit. Obviously there could have been additions and deletions, which muddies the water, but this would at least be a starting point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 09:55:08 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 28 May 2020 13:55:08 +0000 Subject: [issue40807] CODEOP: Show warnings once during _maybe_compile Message-ID: <1590674108.19.0.341062869134.issue40807@roundup.psfhosted.org> New submission from Cheryl Sabella : When calling `codeop._maybe_compile`, `compile` is run three times. If the code being compiled causes a warning message, the warning is generated each time that `compile` is called, thus (possibly) showing the message three times. See msg370163 and that issue for context. ---------- components: Library (Lib) messages: 370208 nosy: cheryl.sabella priority: normal severity: normal status: open title: CODEOP: Show warnings once during _maybe_compile type: enhancement versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 09:56:01 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 13:56:01 +0000 Subject: [issue40808] test_venv fails with HOME=/ on AMD64 FreeBSD Non-Debug 3.x Message-ID: <1590674161.97.0.214019790638.issue40808@roundup.psfhosted.org> New submission from STINNER Victor : test_venv fails on AMD64 FreeBSD Non-Debug 3.x since this build: https://buildbot.python.org/all/#/builders/214/builds/808 This build has 3 changes. IMHO the regression comes from the commit feb0846c3a28b05b4cfbc6ab34c764957f3eff55: "Upgrade bundled versions of pip & setuptools (#16782)" (bpo-38488). ====================================================================== FAIL: test_with_pip (test.test_venv.EnsurePipTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-9e36.nondebug/build/Lib/test/test_venv.py", line 535, in test_with_pip self.do_test_with_pip(False) File "/usr/home/buildbot/python/3.x.koobs-freebsd-9e36.nondebug/build/Lib/test/test_venv.py", line 518, in do_test_with_pip self.assertEqual(err.rstrip(), "") AssertionError: "WARNING: The directory '/.cache/pip' or [206 chars]lag." != '' - WARNING: The directory '/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. + test.pythoninfo says: os.environ[HOME]: / pwd.getpwuid(1002): pwd.struct_passwd(pw_name='buildbot', pw_passwd='*', pw_uid=1002, pw_gid=1002, pw_gecos='FreeBSD BuildBot', pw_dir='/home/buildbot', pw_shell='/bin/sh') os.getuid: 1002 os.login: koobs os.getgid: 1002 os.getgrouplist: 1002 os.getgroups: 1002 ---------- components: Tests messages: 370209 nosy: vstinner priority: normal severity: normal status: open title: test_venv fails with HOME=/ on AMD64 FreeBSD Non-Debug 3.x versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 09:56:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 13:56:29 +0000 Subject: [issue38488] Update bundled pip to 19.3 In-Reply-To: <1590672328.1.0.455055461704.issue38488@roundup.psfhosted.org> Message-ID: <1590674189.19.0.036595851785.issue38488@roundup.psfhosted.org> STINNER Victor added the comment: commit feb0846c3a28b05b4cfbc6ab34c764957f3eff55 Author: Xavier Fernandez Date: Wed May 27 12:49:34 2020 +0200 Upgrade bundled versions of pip & setuptools (#16782) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 09:56:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 13:56:58 +0000 Subject: [issue38488] Update bundled pip to 19.3 In-Reply-To: <1590672328.1.0.455055461704.issue38488@roundup.psfhosted.org> Message-ID: <1590674218.67.0.0360956550785.issue38488@roundup.psfhosted.org> STINNER Victor added the comment: This commit introduced another regression, bpo-40808: test_venv fails with HOME=/ on AMD64 FreeBSD Non-Debug 3.x. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 09:57:54 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 28 May 2020 13:57:54 +0000 Subject: [issue40807] CODEOP: Show warnings once during _maybe_compile In-Reply-To: <1590674108.19.0.341062869134.issue40807@roundup.psfhosted.org> Message-ID: <1590674274.32.0.128960396221.issue40807@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +19735 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20486 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 09:59:21 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 28 May 2020 13:59:21 +0000 Subject: [issue37824] IDLE: Handle Shell input warnings properly. In-Reply-To: <1565541132.63.0.273797082992.issue37824@roundup.psfhosted.org> Message-ID: <1590674361.6.0.451438494474.issue37824@roundup.psfhosted.org> Cheryl Sabella added the comment: Thanks, Terry. I created issue40807 for the codeop warnings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 10:01:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 14:01:04 +0000 Subject: [issue38488] Update bundled pip to 19.3 In-Reply-To: <1590672328.1.0.455055461704.issue38488@roundup.psfhosted.org> Message-ID: <1590674464.65.0.202238910252.issue38488@roundup.psfhosted.org> STINNER Victor added the comment: The change broke multiple buildbots. Since nobody is available to investigate the two regressions (install buildbots and test_venv), I reverted the change following this policy: https://pythondev.readthedocs.io/ci.html#revert-on-fail Buildbot failures were reported directly the on PR, see: https://github.com/python/cpython/pull/16782#issuecomment-634640005 The revert is an opportunity to have more time to investigate the issue and write a proper fix, rather than working on urgency. commit 4fd4963ccce5c12f742303dab6e43818b1133c7e (HEAD -> master, upstream/master) Author: Victor Stinner Date: Thu May 28 15:57:49 2020 +0200 Revert "Upgrade bundled versions of pip & setuptools (#16782)" (GH-20484) This reverts commit feb0846c3a28b05b4cfbc6ab34c764957f3eff55. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 09:50:28 2020 From: report at bugs.python.org (Robert Reynolds) Date: Thu, 28 May 2020 13:50:28 +0000 Subject: [issue8087] Unupdated source file in traceback In-Reply-To: <1267990809.73.0.116039880896.issue8087@psf.upfronthosting.co.za> Message-ID: <1590673828.37.0.269760554354.issue8087@roundup.psfhosted.org> Robert Reynolds added the comment: A pure python demonstration of the problem looks like this (`__file__` stores the path to the executed module): ```python with open(__file__) as f: src = f.read() with open(__file__, 'w') as f: f.write('\n\n\n\n\n# Whoops! Wrong line!\n') f.write(src) raise NotImplementedError('The prepended lines have confused you.') ``` ---------- nosy: +Robert Reynolds _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 10:02:42 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 28 May 2020 14:02:42 +0000 Subject: [issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10 In-Reply-To: <1572192430.43.0.755831692199.issue38605@roundup.psfhosted.org> Message-ID: <1590674562.17.0.336750371881.issue38605@roundup.psfhosted.org> Guido van Rossum added the comment: I think in general it is more insightful to discuss the behavior of get_type_hints() given specific things in annotations. We generally don't write forward refs inside forward refs, like "SomeClass['int']". So maybe that code was wrong? Where did you find it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 10:06:46 2020 From: report at bugs.python.org (Florian Bruhin) Date: Thu, 28 May 2020 14:06:46 +0000 Subject: [issue38488] Update bundled pip to 19.3 In-Reply-To: <1590672328.1.0.455055461704.issue38488@roundup.psfhosted.org> Message-ID: <1590674806.04.0.0609609695984.issue38488@roundup.psfhosted.org> Change by Florian Bruhin : ---------- nosy: +The Compiler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 10:08:57 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 14:08:57 +0000 Subject: [issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled In-Reply-To: <1492073709.93.0.33740565749.issue30064@psf.upfronthosting.co.za> Message-ID: <1590674937.34.0.450029538126.issue30064@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 84ee7e1573d166fe7a9be676813e12523b62ab24 by Victor Stinner in branch 'master': bpo-30064: Fix unstable asyncio "racing" socket tests (GH-20485) https://github.com/python/cpython/commit/84ee7e1573d166fe7a9be676813e12523b62ab24 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 10:09:09 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 28 May 2020 14:09:09 +0000 Subject: [issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled In-Reply-To: <1492073709.93.0.33740565749.issue30064@psf.upfronthosting.co.za> Message-ID: <1590674949.11.0.824978528615.issue30064@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19736 pull_request: https://github.com/python/cpython/pull/20487 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 10:13:26 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 14:13:26 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1590675206.54.0.420124055684.issue40275@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19737 pull_request: https://github.com/python/cpython/pull/20488 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 10:18:38 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 14:18:38 +0000 Subject: [issue40799] Create Lib/_pydatetime.py file to optimize "import datetime" when _datetime is available In-Reply-To: <1590624418.05.0.296780868092.issue40799@roundup.psfhosted.org> Message-ID: <1590675518.78.0.810084496412.issue40799@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Create Lib/_pydecimal.py file to optimize "import datetime" when _decimal is available -> Create Lib/_pydatetime.py file to optimize "import datetime" when _datetime is available _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 10:19:30 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 14:19:30 +0000 Subject: [issue40799] Create Lib/_pydatetime.py file to optimize "import datetime" when _datetime is available In-Reply-To: <1590624418.05.0.296780868092.issue40799@roundup.psfhosted.org> Message-ID: <1590675570.68.0.865779054821.issue40799@roundup.psfhosted.org> STINNER Victor added the comment: > What do decimals have to datetime? Oops. Sorry, I was confused between "datetime" and "decimal" when I created this issue. I fixed the issue title. My idea is to mimick Lib/decimal.py design for Lib/datetime.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 10:24:43 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 14:24:43 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1590675883.01.0.420258355139.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 24bddc1b3b58f6899b2d412e51b37f68536e4fe2 by Hai Shi in branch 'master': bpo-40275: Remove test.support.TESTFN_ENCODING (GH-20482) https://github.com/python/cpython/commit/24bddc1b3b58f6899b2d412e51b37f68536e4fe2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 10:28:23 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 28 May 2020 14:28:23 +0000 Subject: [issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled In-Reply-To: <1492073709.93.0.33740565749.issue30064@psf.upfronthosting.co.za> Message-ID: <1590676103.85.0.977294675338.issue30064@roundup.psfhosted.org> miss-islington added the comment: New changeset 1d82f003678816ff8dd822452ec91669844d2d09 by Miss Islington (bot) in branch '3.9': bpo-30064: Fix unstable asyncio "racing" socket tests (GH-20485) https://github.com/python/cpython/commit/1d82f003678816ff8dd822452ec91669844d2d09 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 10:29:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 14:29:04 +0000 Subject: [issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled In-Reply-To: <1492073709.93.0.33740565749.issue30064@psf.upfronthosting.co.za> Message-ID: <1590676144.64.0.532383273365.issue30064@roundup.psfhosted.org> STINNER Victor added the comment: > bpo-30064: Fix unstable asyncio "racing" socket tests (GH-20485) Sorry. You should read "Skip" tests, not "Fix" tests :-p ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 10:31:04 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Thu, 28 May 2020 14:31:04 +0000 Subject: [issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10 In-Reply-To: <1572192430.43.0.755831692199.issue38605@roundup.psfhosted.org> Message-ID: <1590676264.12.0.753883462758.issue38605@roundup.psfhosted.org> Batuhan Taskaya added the comment: An example would be this https://github.com/python/cpython/blob/24bddc1b3b58f6899b2d412e51b37f68536e4fe2/Lib/test/test_typing.py#L2744-L2745. Either I can change tests in order to reflect now everything is a forward ref by default class Loop: attr: Final['Loop'] to class Loop: attr: Final[Loop] or resolve everything on get_type_hints. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 10:34:21 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 14:34:21 +0000 Subject: [issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent() In-Reply-To: <1565985235.6.0.212314052144.issue37878@roundup.psfhosted.org> Message-ID: <1590676461.25.0.170331250255.issue37878@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19738 pull_request: https://github.com/python/cpython/pull/20489 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 10:37:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 14:37:44 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1590676664.54.0.594604820504.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 753643205a28531fd43ef36b40b86282ae6956a7 by Victor Stinner in branch 'master': bpo-40275: Fix test.support.threading_helper (GH-20488) https://github.com/python/cpython/commit/753643205a28531fd43ef36b40b86282ae6956a7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 10:39:10 2020 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 28 May 2020 14:39:10 +0000 Subject: [issue40799] Create Lib/_pydatetime.py file to optimize "import datetime" when _datetime is available In-Reply-To: <1590624418.05.0.296780868092.issue40799@roundup.psfhosted.org> Message-ID: <1590676750.24.0.854141439341.issue40799@roundup.psfhosted.org> Paul Ganssle added the comment: I basically agree with this ? this is one of the reasons I structured the zoneinfo module the way I did rather than mimicking the pattern in datetime. I believe that there are other modules that have similar situations like heapq, but datetime is probably the worst offender. I am inclined to say that we should restructure datetime into a folder, containing __init__.py, _datetime.py and possibly _strptime.py (which I think is also only used in datetime), but I think that sort of restructuring is way more sensitive to weird import bugs than this one. As it is now, I would be shocked if this didn't break *someone*, because people are always relying on weird implementation details (knowingly or unknowingly), but I think it's worth doing; it's good to tackle it this early in the cycle. @vstinner What do you think about restructuring into a folder-based submodule rather than _pydatetime.py? It's way more likely to break someone, but I think it might be the better way to organize the code, and I don't want to have to go through *two* refactors of this sort. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 10:41:50 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 14:41:50 +0000 Subject: [issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10 In-Reply-To: <1572192430.43.0.755831692199.issue38605@roundup.psfhosted.org> Message-ID: <1590676910.17.0.476583491419.issue38605@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 10:43:25 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 28 May 2020 14:43:25 +0000 Subject: [issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type In-Reply-To: <1586276621.78.0.843757244355.issue40217@roundup.psfhosted.org> Message-ID: <1590677005.23.0.260071876574.issue40217@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19739 pull_request: https://github.com/python/cpython/pull/20490 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 10:53:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 14:53:35 +0000 Subject: [issue40799] Create Lib/_pydatetime.py file to optimize "import datetime" when _datetime is available In-Reply-To: <1590624418.05.0.296780868092.issue40799@roundup.psfhosted.org> Message-ID: <1590677615.63.0.129240469206.issue40799@roundup.psfhosted.org> STINNER Victor added the comment: > I believe that there are other modules that have similar situations like heapq, but datetime is probably the worst offender. heapq seems to be a little bit different. _heapq is not a drop-in replacement of heapq.py. For example, nlargest() seems to only be implemented in pure Python. > I am inclined to say that we should restructure datetime into a folder, containing __init__.py, _datetime.py and possibly _strptime.py (which I think is also only used in datetime), but I think that sort of restructuring is way more sensitive to weird import bugs than this one. I have no idea what are the side effects of converting datetime.py file into a package. A single file _pydatetime.py seems more convenient to me. I'm aware of _strptime.py but I don't see it as a datetime submodule and I don't see the value of moving it as a datetime submodule. I'm fine with _datetime accessing _strptime module. It sounds more complex to me if _datetime would be imported by datetime which contains datetime._strptime. I see a higher risk of subtle import issues, since datetime has two implementations (C and Python). But it may be wrong :-) Also, all other stdlib modules which have a C implementation are designed with files, not folders: io.py (_io and _pyio) and decimal.py (_decimal and _pydecimal) are good examples. I mostly case about reducing the number of indirect imports and import performance. I don't have a strong opinion about file vs folder. > As it is now, I would be shocked if this didn't break *someone*, because people are always relying on weird implementation details (knowingly or unknowingly), but I think it's worth doing; it's good to tackle it this early in the cycle. I'm fine with breaking applications relying on implementation details. Also, we can adjust the code to fix such corner cases later if it's needed, possible and justified :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 10:54:13 2020 From: report at bugs.python.org (Xavier Fernandez) Date: Thu, 28 May 2020 14:54:13 +0000 Subject: [issue38488] Update bundled pip to 19.3 In-Reply-To: <1590672328.1.0.455055461704.issue38488@roundup.psfhosted.org> Message-ID: <1590677653.23.0.0274843711802.issue38488@roundup.psfhosted.org> Change by Xavier Fernandez : ---------- pull_requests: +19740 pull_request: https://github.com/python/cpython/pull/20491 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 11:09:56 2020 From: report at bugs.python.org (Manjusaka) Date: Thu, 28 May 2020 15:09:56 +0000 Subject: [issue40700] Make WSGIRequestHandler easier to be customized by the user In-Reply-To: <1589990041.35.0.995968442309.issue40700@roundup.psfhosted.org> Message-ID: <1590678596.89.0.134060761708.issue40700@roundup.psfhosted.org> Manjusaka added the comment: ping~ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 11:12:30 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 28 May 2020 15:12:30 +0000 Subject: [issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type In-Reply-To: <1586276621.78.0.843757244355.issue40217@roundup.psfhosted.org> Message-ID: <1590678750.32.0.870623710734.issue40217@roundup.psfhosted.org> miss-islington added the comment: New changeset bcbe5c59dde5fcb9ad21991c2afd91837b14bbd5 by Miss Islington (bot) in branch '3.9': bpo-40217: Ensure Py_VISIT(Py_TYPE(self)) is always called for PyType_FromSpec types (reverts GH-19414) (GH-20264) https://github.com/python/cpython/commit/bcbe5c59dde5fcb9ad21991c2afd91837b14bbd5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 11:20:04 2020 From: report at bugs.python.org (Andy Lester) Date: Thu, 28 May 2020 15:20:04 +0000 Subject: [issue40770] RFE: Run linkchecker on documentation on the CI In-Reply-To: <1590422942.58.0.668271802455.issue40770@roundup.psfhosted.org> Message-ID: <1590679204.57.0.889512423121.issue40770@roundup.psfhosted.org> Andy Lester added the comment: Some high-level questions to consider: * Is it run only when a build of the docs is started? Or should it be done regularly (daily/weekly?) to keep an eye on links so that it's not a surprise when build time comes along? * Does a broken link stop the build, or is it just advisory? * Who sees the results? Are they emailed to someone? A mailing list? Posted somewhere publicly? * Is someone assigned responsibility for acting on the failures? * What counts as a failure? Is a 301 redirect OK? It seems that a 301 might be OK to pass, but someone should know about it to update to the new URL. I am not familiar with the current documentation build process, so forgive me if these are already answered somehow. I'm not looking for answers myself, but providing suggestions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 11:23:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 15:23:47 +0000 Subject: [issue25920] PyOS_AfterFork should reset socketmodule's lock In-Reply-To: <1450739972.22.0.163393011494.issue25920@psf.upfronthosting.co.za> Message-ID: <1590679427.12.0.53261197417.issue25920@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 0de437de6210c2b32b09d6c47a805b23d023bd59 by Victor Stinner in branch 'master': bpo-25920: Remove socket.getaddrinfo() lock on macOS (GH-20177) https://github.com/python/cpython/commit/0de437de6210c2b32b09d6c47a805b23d023bd59 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 11:34:32 2020 From: report at bugs.python.org (Ramil Nugmanov) Date: Thu, 28 May 2020 15:34:32 +0000 Subject: [issue40806] itertools.product not lazy In-Reply-To: <1590670546.03.0.0667180087022.issue40806@roundup.psfhosted.org> Message-ID: <1590680072.96.0.128408430708.issue40806@roundup.psfhosted.org> Change by Ramil Nugmanov : ---------- keywords: +patch pull_requests: +19741 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20492 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 11:35:53 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 28 May 2020 15:35:53 +0000 Subject: [issue40755] Add missing multiset predicates to collections.Counter In-Reply-To: <1590333060.51.0.256014570882.issue40755@roundup.psfhosted.org> Message-ID: <1590680153.97.0.874925102059.issue40755@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 60398512c86c5535edd817c99ccb50453b3b0471 by Raymond Hettinger in branch 'master': bpo-40755: Add missing multiset operations to Counter() (GH-20339) https://github.com/python/cpython/commit/60398512c86c5535edd817c99ccb50453b3b0471 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 11:37:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 15:37:32 +0000 Subject: [issue25920] PyOS_AfterFork should reset socketmodule's lock In-Reply-To: <1450739972.22.0.163393011494.issue25920@psf.upfronthosting.co.za> Message-ID: <1590680252.93.0.0862850402947.issue25920@roundup.psfhosted.org> STINNER Victor added the comment: If I understood correctly, Python 3.8 and 3.9 binaries provided by python.org is *not* impacted by this issue. Only Python binaries built manually with explicit support for macOS 10.4 ("MAC_OS_X_VERSION_MIN_REQUIRED") were impacted. Python 3.9 and older are not fixed (keep the lock). The workaround is to require macOS 10.5 or newer. macOS 10.4 was released in 2004, it's maybe time to stop support it :-) Python 3.7 (and newer) requires macOS 10.6 or newer (again, I'm talking about binaries provided by python.org). > bpo-25920: Remove socket.getaddrinfo() lock on macOS (GH-20177) I chose to leave the lock for gethostbyname(). Ronald wrote that this lock is no longer needed: "As an aside (not to be addressed in the PR): Apparently gethostbyname() and related functions are thread-safe on macOS. This is according to the manpage on macOS 10.15. I haven't checked in which version that changed. This allows avoiding the use of the gethostbyname lock as well." https://github.com/python/cpython/pull/20177#pullrequestreview-418909595 Please open a separated issue for this lock. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 11:41:30 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 28 May 2020 15:41:30 +0000 Subject: [issue40755] Add missing multiset predicates to collections.Counter In-Reply-To: <1590333060.51.0.256014570882.issue40755@roundup.psfhosted.org> Message-ID: <1590680490.43.0.896402665789.issue40755@roundup.psfhosted.org> Raymond Hettinger added the comment: I would also have preferred to use the operators <, >, <=, >=, and ==. The docs in the patch explain why we can't go down this path. Also, while counters have support for multiset operations, they continue to support other use cases a well (negative counts and fractional counts). That support can't be removed without breaking existing code that relies on it. >From the outset, a Counter was just a dictionary that return 0 for missing keys. Users are free to use that concept however they want. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 11:43:27 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 28 May 2020 15:43:27 +0000 Subject: [issue40806] itertools.product not lazy In-Reply-To: <1590670546.03.0.0667180087022.issue40806@roundup.psfhosted.org> Message-ID: <1590680607.86.0.248775084879.issue40806@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 11:47:12 2020 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 28 May 2020 15:47:12 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1590680832.97.0.639159397194.issue24416@roundup.psfhosted.org> Petr Viktorin added the comment: This broke compilation with mingw; see https://bugs.python.org/issue40777 ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 11:47:18 2020 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 28 May 2020 15:47:18 +0000 Subject: [issue40777] _datetimemodule.c:3328:16: error: initializer element is not constant In-Reply-To: <1590486941.4.0.263574761351.issue40777@roundup.psfhosted.org> Message-ID: <1590680838.29.0.143435377236.issue40777@roundup.psfhosted.org> Change by Petr Viktorin : ---------- keywords: +patch nosy: +petr.viktorin nosy_count: 1.0 -> 2.0 pull_requests: +19742 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20493 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 11:47:53 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 28 May 2020 15:47:53 +0000 Subject: [issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10 In-Reply-To: <1572192430.43.0.755831692199.issue38605@roundup.psfhosted.org> Message-ID: <1590680873.38.0.352875032042.issue38605@roundup.psfhosted.org> Guido van Rossum added the comment: There will still be a lot of code written that way, because people need compatibility with earlier versions of Python. So I think it should be fixed in get_type_hints(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 11:55:15 2020 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 28 May 2020 15:55:15 +0000 Subject: [issue40777] _datetimemodule.c:3328:16: error: initializer element is not constant In-Reply-To: <1590486941.4.0.263574761351.issue40777@roundup.psfhosted.org> Message-ID: <1590681315.91.0.525708950069.issue40777@roundup.psfhosted.org> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 12:01:32 2020 From: report at bugs.python.org (Zachary Ware) Date: Thu, 28 May 2020 16:01:32 +0000 Subject: [issue40801] Expose PyFloat_ToDouble at Python level: operator.as_float? In-Reply-To: <1590657786.78.0.118668826809.issue40801@roundup.psfhosted.org> Message-ID: <1590681692.85.0.70822612945.issue40801@roundup.psfhosted.org> Zachary Ware added the comment: `operator` seems a slightly odd place for this. My naive expectation would be that `float(floatlike_obj)` should do what you want, but it seems that's not the case (too permissive of input types?). So then, what about an alternate constructor on the float object, `float.from_floatlike(obj)`? This could be implemented as effectively: class float: @classmethod def from_floatlike(cls, obj): return cls(PyFloat_FromDouble(PyFloat_AsDouble(obj))) which would work to get an instance of any float subclass after a round-trip through a double. I have no idea whether that's actually useful, though :) ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 12:08:06 2020 From: report at bugs.python.org (Fantix King) Date: Thu, 28 May 2020 16:08:06 +0000 Subject: [issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled In-Reply-To: <1492073709.93.0.33740565749.issue30064@psf.upfronthosting.co.za> Message-ID: <1590682086.28.0.931405667277.issue30064@roundup.psfhosted.org> Change by Fantix King : ---------- pull_requests: +19743 pull_request: https://github.com/python/cpython/pull/20494 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 12:11:10 2020 From: report at bugs.python.org (Fantix King) Date: Thu, 28 May 2020 16:11:10 +0000 Subject: [issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled In-Reply-To: <1492073709.93.0.33740565749.issue30064@psf.upfronthosting.co.za> Message-ID: <1590682270.34.0.565909411348.issue30064@roundup.psfhosted.org> Fantix King added the comment: Thanks for the comments! Added PR 20494 to properly fix/skip the test for (hopefully) all platforms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 12:14:52 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 28 May 2020 16:14:52 +0000 Subject: [issue40777] _datetimemodule.c:3328:16: error: initializer element is not constant In-Reply-To: <1590486941.4.0.263574761351.issue40777@roundup.psfhosted.org> Message-ID: <1590682492.81.0.426826760118.issue40777@roundup.psfhosted.org> miss-islington added the comment: New changeset 459acc551656785bc4a3363d65c7a60f822da8e3 by Petr Viktorin in branch 'master': bpo-40777: Initialize PyDateTime_IsoCalendarDateType.tp_base at run-time (GH-20493) https://github.com/python/cpython/commit/459acc551656785bc4a3363d65c7a60f822da8e3 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 12:15:02 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 28 May 2020 16:15:02 +0000 Subject: [issue40777] _datetimemodule.c:3328:16: error: initializer element is not constant In-Reply-To: <1590486941.4.0.263574761351.issue40777@roundup.psfhosted.org> Message-ID: <1590682502.44.0.823213105883.issue40777@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19744 pull_request: https://github.com/python/cpython/pull/20495 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 12:26:09 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 16:26:09 +0000 Subject: [issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent() In-Reply-To: <1565985235.6.0.212314052144.issue37878@roundup.psfhosted.org> Message-ID: <1590683169.65.0.729734135034.issue37878@roundup.psfhosted.org> STINNER Victor added the comment: New changeset fda7f6d61b13c68f59806db674e892fda4013348 by Victor Stinner in branch 'master': bpo-37878: PyThreadState_DeleteCurrent() was not removed (GH-20489) https://github.com/python/cpython/commit/fda7f6d61b13c68f59806db674e892fda4013348 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 12:26:16 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 28 May 2020 16:26:16 +0000 Subject: [issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent() In-Reply-To: <1565985235.6.0.212314052144.issue37878@roundup.psfhosted.org> Message-ID: <1590683176.71.0.496178465794.issue37878@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +19745 pull_request: https://github.com/python/cpython/pull/20496 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 12:27:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 16:27:27 +0000 Subject: [issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent() In-Reply-To: <1565985235.6.0.212314052144.issue37878@roundup.psfhosted.org> Message-ID: <1590683247.68.0.0884611227834.issue37878@roundup.psfhosted.org> STINNER Victor added the comment: I was very confused by the history of this issue. To be clear, PyThreadState_DeleteCurrent() is now documented in Python 3.9: https://docs.python.org/dev/c-api/init.html#c.PyThreadState_DeleteCurrent ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 12:33:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 May 2020 16:33:12 +0000 Subject: [issue1294959] Add sys.platlibdir and configure --with-platlibdir to use /usr/lib64 on Fedora and SuSE Message-ID: <1590683592.3.0.297193713031.issue1294959@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 242d95659b6b4ff4fb54b58a30454dafa311d4e9 by Micha? G?rny in branch 'master': bpo-1294959: Try to clarify the meaning of platlibdir (GH-20332) https://github.com/python/cpython/commit/242d95659b6b4ff4fb54b58a30454dafa311d4e9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 12:33:20 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 28 May 2020 16:33:20 +0000 Subject: [issue1294959] Add sys.platlibdir and configure --with-platlibdir to use /usr/lib64 on Fedora and SuSE Message-ID: <1590683600.61.0.459634982899.issue1294959@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19746 pull_request: https://github.com/python/cpython/pull/20497 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 12:33:22 2020 From: report at bugs.python.org (chirag maliwal) Date: Thu, 28 May 2020 16:33:22 +0000 Subject: [issue40809] list.Count() isn't working as expected for the series of same numbers in a list Message-ID: <1590683602.43.0.57315900745.issue40809@roundup.psfhosted.org> New submission from chirag maliwal : a = [1,1,1,1] for i in a: if a.count(i) > 1: a.remove(i) print(a) """ Output: [1,1] expected: [1] """ ---------- files: test.py messages: 370239 nosy: cmaliwal priority: normal severity: normal status: open title: list.Count() isn't working as expected for the series of same numbers in a list type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file49200/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 12:34:50 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 28 May 2020 16:34:50 +0000 Subject: [issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent() In-Reply-To: <1565985235.6.0.212314052144.issue37878@roundup.psfhosted.org> Message-ID: <1590683690.52.0.803492622714.issue37878@roundup.psfhosted.org> miss-islington added the comment: New changeset 6a478641c00e5a52be9d595ad804bf848a498d96 by Miss Islington (bot) in branch '3.9': bpo-37878: PyThreadState_DeleteCurrent() was not removed (GH-20489) https://github.com/python/cpython/commit/6a478641c00e5a52be9d595ad804bf848a498d96 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 12:37:19 2020 From: report at bugs.python.org (chirag maliwal) Date: Thu, 28 May 2020 16:37:19 +0000 Subject: [issue40809] list.count() isn't working as expected for the series of same numbers in a list In-Reply-To: <1590683602.43.0.57315900745.issue40809@roundup.psfhosted.org> Message-ID: <1590683839.81.0.871511106324.issue40809@roundup.psfhosted.org> Change by chirag maliwal : ---------- title: list.Count() isn't working as expected for the series of same numbers in a list -> list.count() isn't working as expected for the series of same numbers in a list _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 12:39:12 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Thu, 28 May 2020 16:39:12 +0000 Subject: [issue40809] list.Count() isn't working as expected for the series of same numbers in a list In-Reply-To: <1590683602.43.0.57315900745.issue40809@roundup.psfhosted.org> Message-ID: <1590683952.97.0.875942719185.issue40809@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi cmaliwal! You are mutating the list while iterating over it which can lead to all sorts of issues, to keep the unique elements of a list you can do >>> a = [1, 1, 1, 1] >>> list(set(a)) [1] If you think you found a bug in Python please check in the python-help mailing list or StackOverflow. ---------- nosy: +remi.lapeyre title: list.count() isn't working as expected for the series of same numbers in a list -> list.Count() isn't working as expected for the series of same numbers in a list _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 12:41:39 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 28 May 2020 16:41:39 +0000 Subject: [issue1294959] Add sys.platlibdir and configure --with-platlibdir to use /usr/lib64 on Fedora and SuSE Message-ID: <1590684099.72.0.296231826329.issue1294959@roundup.psfhosted.org> miss-islington added the comment: New changeset a5936ad6323b2cda712726a25d9301f766146cff by Miss Islington (bot) in branch '3.9': bpo-1294959: Try to clarify the meaning of platlibdir (GH-20332) https://github.com/python/cpython/commit/a5936ad6323b2cda712726a25d9301f766146cff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 12:41:45 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 28 May 2020 16:41:45 +0000 Subject: [issue40777] _datetimemodule.c:3328:16: error: initializer element is not constant In-Reply-To: <1590486941.4.0.263574761351.issue40777@roundup.psfhosted.org> Message-ID: <1590684105.17.0.440960076539.issue40777@roundup.psfhosted.org> miss-islington added the comment: New changeset eceee544de4b0f885729022c135c53291b6bbb23 by Miss Islington (bot) in branch '3.9': [3.9] bpo-40777: Initialize PyDateTime_IsoCalendarDateType.tp_base at run-time (GH-20493) (GH-20495) https://github.com/python/cpython/commit/eceee544de4b0f885729022c135c53291b6bbb23 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 12:44:03 2020 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 28 May 2020 16:44:03 +0000 Subject: [issue40801] Expose PyFloat_ToDouble at Python level: operator.as_float? In-Reply-To: <1590657786.78.0.118668826809.issue40801@roundup.psfhosted.org> Message-ID: <1590684243.81.0.218288133784.issue40801@roundup.psfhosted.org> Mark Dickinson added the comment: > `operator` seems a slightly odd place for this. Yes, it's not ideal. It's by analogy with operator.index, which provides the equivalent duck-typing for integers, and calls __index__. Similarly, operator.as_float is primarily there to call __float__, except that now that PyFloat_AsDouble also makes use of __index__, it'll call that, too. My other thought was putting this in math, since it's what the math module is already doing implicitly to most inputs. An alternative float constructor could work. Though we then run into the messy question of what it should do for float subclasses ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 12:44:29 2020 From: report at bugs.python.org (chirag maliwal) Date: Thu, 28 May 2020 16:44:29 +0000 Subject: [issue40809] list.Count() isn't working as expected for the series of same numbers in a list In-Reply-To: <1590683602.43.0.57315900745.issue40809@roundup.psfhosted.org> Message-ID: <1590684269.11.0.445023481204.issue40809@roundup.psfhosted.org> chirag maliwal added the comment: a = [0, 1, 2, 3, 4, 1, 2, 3, 5] for i in a: if a.count(i) > 1: a.remove(i) print(a) """ Output [0, 4, 1, 2, 3, 5] """ It's working fine for the above code. Yes I can use set for this but I tried with count and remove. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 12:46:26 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 28 May 2020 16:46:26 +0000 Subject: [issue40806] itertools.product not lazy In-Reply-To: <1590670546.03.0.0667180087022.issue40806@roundup.psfhosted.org> Message-ID: <1590684386.56.0.796416327254.issue40806@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset cfc6ce4d40f2f01314b7e283fb972a7bb3ed3faa by Ramil Nugmanov in branch 'master': bpo-40806: Clarify that itertools.product immediately consumes its inpt (GH-20492) https://github.com/python/cpython/commit/cfc6ce4d40f2f01314b7e283fb972a7bb3ed3faa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 12:46:34 2020 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 28 May 2020 16:46:34 +0000 Subject: [issue40801] Expose PyFloat_ToDouble at Python level: operator.as_float? In-Reply-To: <1590657786.78.0.118668826809.issue40801@roundup.psfhosted.org> Message-ID: <1590684394.86.0.300701452058.issue40801@roundup.psfhosted.org> Mark Dickinson added the comment: On naming, maybe float.from_number or float.from_numeric? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 12:46:36 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 28 May 2020 16:46:36 +0000 Subject: [issue40806] itertools.product not lazy In-Reply-To: <1590670546.03.0.0667180087022.issue40806@roundup.psfhosted.org> Message-ID: <1590684396.55.0.65995068208.issue40806@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +19747 pull_request: https://github.com/python/cpython/pull/20498 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 12:47:21 2020 From: report at bugs.python.org (=?utf-8?b?TWljaGHFgiBHw7Nybnk=?=) Date: Thu, 28 May 2020 16:47:21 +0000 Subject: [issue1294959] Add sys.platlibdir and configure --with-platlibdir to use /usr/lib64 on Fedora and SuSE Message-ID: <1590684441.35.0.83352919897.issue1294959@roundup.psfhosted.org> Micha? G?rny added the comment: Thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 12:50:13 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 28 May 2020 16:50:13 +0000 Subject: [issue40806] itertools.product not lazy In-Reply-To: <1590670546.03.0.0667180087022.issue40806@roundup.psfhosted.org> Message-ID: <1590684613.29.0.885665721918.issue40806@roundup.psfhosted.org> Raymond Hettinger added the comment: Updated the docs to note that inputs are fully consumed before the iterator is run. FYI, notes on infinite iterable inputs likely belong the FAQs because they aren't specific to product(). Similar effects would be seen with list(x(1)), sorted(x(1)), set(x(1)), tuple(x(1)), etc. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 12:58:37 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 28 May 2020 16:58:37 +0000 Subject: [issue40806] itertools.product not lazy In-Reply-To: <1590670546.03.0.0667180087022.issue40806@roundup.psfhosted.org> Message-ID: <1590685117.0.0.346195372387.issue40806@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset e4cc3a7c1f5ba9ea2c3015a5bf09cb5b93db5d47 by Miss Islington (bot) in branch '3.9': bpo-40806: itertools.product immediately consumes its inputs (GH-20492) (GH-20498) https://github.com/python/cpython/commit/e4cc3a7c1f5ba9ea2c3015a5bf09cb5b93db5d47 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 13:04:50 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 28 May 2020 17:04:50 +0000 Subject: [issue40809] list.Count() isn't working as expected for the series of same numbers in a list In-Reply-To: <1590683602.43.0.57315900745.issue40809@roundup.psfhosted.org> Message-ID: <1590685490.19.0.339477446481.issue40809@roundup.psfhosted.org> Steven D'Aprano added the comment: R?mi is correct, this is not a bug. The problem isn't with list.count. If you print list.count each time through the loop, you will see that it is working perfectly. The problem is that you are modifying the list as you are iterating over it. That means that you skip every second item. It isn't easy to see when all the items are the same, but we can alternate int and float values (which are equal) to see how every second value is skipped. py> a = [1, 1.0, 1, 1.0, 1, 1.0, 1, 1.0] py> for i in a: ... print(a, i, a.count(i)) ... if a.count(i) > 1: ... a.remove(i) ... [1, 1.0, 1, 1.0, 1, 1.0, 1, 1.0] 1 8 [1.0, 1, 1.0, 1, 1.0, 1, 1.0] 1 7 [1, 1.0, 1, 1.0, 1, 1.0] 1 6 [1.0, 1, 1.0, 1, 1.0] 1 5 py> a [1, 1.0, 1, 1.0] Notice that every one of the float 1.0 values gets skipped. That's because when you resize the list as you walk over it, the value which *would have been* the next value gets pushed back into the current position, and then you advance to the next position, and skip it. So there's no bug in list.count, it is working perfectly each time. There's no bug in iteration either, it is walking the list correctly too. But there is a bug in your code: you are shrinking the list while walking over it, so on each step, you delete one item from the from and step forward, so you skip items. The lesson here is not to delete items from a list while you are iterating over it. Technically, it's okay to delete items so long as they are *ahead* of the current item, but not if they are *behind* it. But it is easiest to just use the rule, never delete items while iterating over the same list. If you must delete items from a list, iterate over a copy. ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 13:06:35 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 28 May 2020 17:06:35 +0000 Subject: [issue40809] list.Count() isn't working as expected for the series of same numbers in a list In-Reply-To: <1590683602.43.0.57315900745.issue40809@roundup.psfhosted.org> Message-ID: <1590685595.47.0.376141376598.issue40809@roundup.psfhosted.org> Steven D'Aprano added the comment: Typo: "on each step, you delete one item from the from and step forward" Should be, you delete one item from the FRONT and step forward. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 13:17:29 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 28 May 2020 17:17:29 +0000 Subject: [issue40801] Expose PyFloat_ToDouble at Python level: operator.as_float? In-Reply-To: <1590657786.78.0.118668826809.issue40801@roundup.psfhosted.org> Message-ID: <1590686249.94.0.137463869414.issue40801@roundup.psfhosted.org> Serhiy Storchaka added the comment: I think an alternative constructor is the best option. Some time ago I proposed to add more alternative constructors: https://mail.python.org/archives/list/python-ideas at python.org/thread/5JKQMIC6EUVCD7IBWMRHY7DRTTNSBOWG/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 13:17:44 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 28 May 2020 17:17:44 +0000 Subject: [issue40801] Expose PyFloat_AsDouble at Python level: operator.as_float? In-Reply-To: <1590657786.78.0.118668826809.issue40801@roundup.psfhosted.org> Message-ID: <1590686264.76.0.380211171583.issue40801@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- title: Expose PyFloat_ToDouble at Python level: operator.as_float? -> Expose PyFloat_AsDouble at Python level: operator.as_float? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 13:18:23 2020 From: report at bugs.python.org (Domenico Ragusa) Date: Thu, 28 May 2020 17:18:23 +0000 Subject: [issue40358] pathlib's relative_to should behave like os.path.relpath In-Reply-To: <1587513783.17.0.6950267733.issue40358@roundup.psfhosted.org> Message-ID: <1590686303.76.0.550162326128.issue40358@roundup.psfhosted.org> Domenico Ragusa added the comment: I've solved the conflicts with GH-19611 (bpo-23082: Better error message for PurePath.relative_to() from pathlib) that was merged in the mean time and improved the documentation. Everything appears to be in order, can you take a look at it? ---------- versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 13:27:56 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 28 May 2020 17:27:56 +0000 Subject: [issue40801] Expose PyFloat_AsDouble at Python level: operator.as_float? In-Reply-To: <1590657786.78.0.118668826809.issue40801@roundup.psfhosted.org> Message-ID: <1590686876.93.0.758851621751.issue40801@roundup.psfhosted.org> Serhiy Storchaka added the comment: The problem with the roundtrip PyFloat_FromDouble(PyFloat_AsDouble(obj)) is that (in contrary to PyNumber_Index()) it is lossy. Converting Decimal, Fraction, float128 to float before using it in expression can lead to loss of precision. So such conversion looks to me less useful than operator.index(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 13:47:38 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 28 May 2020 17:47:38 +0000 Subject: [issue40810] sqlite3 test CheckTraceCallbackContent fails for sqlite v3.7.3 through 3.7.14.1 Message-ID: <1590688058.38.0.22519081316.issue40810@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : `CheckTraceCallbackContent()` in `Lib/sqlite3/test/hooks.py` fails for SQLite versions 3.7.3 through 3.7.14.1, apparently because of an SQLite bug that was fixed in 3.7.15 (2012-12-12). Extract from the changelog https://sqlite.org/changes.html: ``` Avoid invoking the sqlite3_trace() callback multiple times when a statement is automatically reprepared due to SQLITE_SCHEMA errors. ``` Either we fix tests for SQLite < 3.7.15, or we drop support for SQLite < 3.7.15. (I'm +1 for the latter.) NB: Versions pre 3.7.3 does not build at all, because of `sqlite3_create_function_v2()`. See bpo-40744 and GH-20330. ---------- components: Library (Lib) messages: 370256 nosy: erlendaasland priority: normal severity: normal status: open title: sqlite3 test CheckTraceCallbackContent fails for sqlite v3.7.3 through 3.7.14.1 versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 13:54:39 2020 From: report at bugs.python.org (Christian Exposito) Date: Thu, 28 May 2020 17:54:39 +0000 Subject: [issue40811] Allow to create new Event Loops on Threads Message-ID: <1590688479.36.0.418054824205.issue40811@roundup.psfhosted.org> New submission from Christian Exposito : Right now, Async IO module is not automatically creating a new event loop on threads that are not the main thread (https://github.com/python/cpython/blob/master/Lib/asyncio/events.py#L638), but it should be interesting to do it. For example, WSGI applications handle web requests by spawning a new thread. If we allow Async IO module to create event loops on those threads, we will improve its adoption for developing web applications. ---------- components: asyncio messages: 370257 nosy: Christian Exposito, asvetlov, yselivanov priority: normal severity: normal status: open title: Allow to create new Event Loops on Threads type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 13:56:26 2020 From: report at bugs.python.org (Roundup Robot) Date: Thu, 28 May 2020 17:56:26 +0000 Subject: [issue40811] Allow to create new Event Loops on Threads In-Reply-To: <1590688479.36.0.418054824205.issue40811@roundup.psfhosted.org> Message-ID: <1590688586.42.0.603534149564.issue40811@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 3.0 -> 4.0 pull_requests: +19748 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20500 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 14:08:42 2020 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 28 May 2020 18:08:42 +0000 Subject: [issue40801] Expose PyFloat_AsDouble at Python level: operator.as_float? In-Reply-To: <1590657786.78.0.118668826809.issue40801@roundup.psfhosted.org> Message-ID: <1590689322.97.0.144712197022.issue40801@roundup.psfhosted.org> Mark Dickinson added the comment: > So such conversion looks to me less useful than operator.index(). That may be true, but it's still useful, and currently very hard to write without core Python support. The problem is that duck-typing for something float-like is easy and widespread in the Python C code (in the math module, in float formatting, in *any* function that uses the "d" converter with PyArg_ParseTuple), but it's hard to correctly spell the equivalent in pure Python. I've needed this in a few places. Most recently, I needed it for the Enthought Traits library: the "Float" trait type accepts something float-like and needs to convert it to something of exact Python type float. (That float is then often consumed by other third-party libraries that can't reliably be expected to do their own duck-typing.) It would also be useful when trying to create pure Python equivalents for modules written in C (e.g., for things like datetime and decimal). Where the C code uses PyFloat_AsDouble, there's really no equivalent that can be used in Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 14:26:20 2020 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 28 May 2020 18:26:20 +0000 Subject: [issue40801] Expose PyFloat_AsDouble at Python level: operator.as_float? In-Reply-To: <1590657786.78.0.118668826809.issue40801@roundup.psfhosted.org> Message-ID: <1590690380.09.0.51201956724.issue40801@roundup.psfhosted.org> Mark Dickinson added the comment: > Converting Decimal, Fraction, float128 to float before using it in expression can lead to loss of precision. My experience is that this loss of precision is hardly ever a practical problem in the real world of scientific development; in practice floating-point numbers are almost universally IEEE 754 doubles (perhaps sometimes single-precision in large datasets, like seismic SEG-Y files; occasionally IBM format hex floats; but IEEE 754 doubles are by far the majority). It's very rare to be using float128 or Decimal or Fraction in practice for scientific data. That's not to say that people outside that world won't be using these things, but there's a big ecosystem where float64 is pretty much all you need. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 14:51:51 2020 From: report at bugs.python.org (Brett Cannon) Date: Thu, 28 May 2020 18:51:51 +0000 Subject: [issue40474] Code coverage report not entirely accurate In-Reply-To: <1588381882.86.0.0551558198731.issue40474@roundup.psfhosted.org> Message-ID: <1590691911.94.0.481946396764.issue40474@roundup.psfhosted.org> Brett Cannon added the comment: New changeset d9c1f1991969e99791de75b2bc935e6445bc5dcd by lrjball in branch 'master': bpo-40474: Updated coverage.yml to better report coverage stats (#19851) https://github.com/python/cpython/commit/d9c1f1991969e99791de75b2bc935e6445bc5dcd ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 14:52:33 2020 From: report at bugs.python.org (Brett Cannon) Date: Thu, 28 May 2020 18:52:33 +0000 Subject: [issue40474] Code coverage report not entirely accurate In-Reply-To: <1588381882.86.0.0551558198731.issue40474@roundup.psfhosted.org> Message-ID: <1590691953.57.0.977505787878.issue40474@roundup.psfhosted.org> Change by Brett Cannon : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 14:55:11 2020 From: report at bugs.python.org (Christian Heimes) Date: Thu, 28 May 2020 18:55:11 +0000 Subject: [issue40811] Allow to create new Event Loops on Threads In-Reply-To: <1590688479.36.0.418054824205.issue40811@roundup.psfhosted.org> Message-ID: <1590692111.53.0.991314997789.issue40811@roundup.psfhosted.org> Christian Heimes added the comment: The default policy of asyncio deliberately limits automatic creation of event loops to the main thread. You can't just mix asyncio with a threaded web application and expect it to work correctly. See https://github.com/python/cpython/blob/a487a39dca4c41305928c7dfdbcb0b3aa344683b/Lib/asyncio/events.py#L609-L620 In this policy, each thread has its own event loop. However, we only automatically create an event loop by default for the main thread; other threads by default have no event loop. Other policies may have different rules (e.g. a single global event loop, or automatically creating an event loop per thread, or using some other notion of context to which an event loop is associated). ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 14:59:05 2020 From: report at bugs.python.org (Malcolm Smith) Date: Thu, 28 May 2020 18:59:05 +0000 Subject: [issue34931] os.path.splitext with more dots In-Reply-To: <1539000361.1.0.545547206417.issue34931@psf.upfronthosting.co.za> Message-ID: <1590692345.8.0.214972469978.issue34931@roundup.psfhosted.org> Malcolm Smith added the comment: > Try for example create/rename .somename.jpg file in Ubuntu. > It is normal image with .jpg extension. You could open it etc. > > You can't use standard python splitext() function to detect extension. Yes you can (Python 3.8.2): >>> splitext(".somename.jpg") ('.somename', '.jpg') Only leading dots are treated specially. If there are non-leading dots later in the name, then the filename will be split at the last one. So the only remaining question is weird filenames like ".....jpg". There's no way to know whether that's supposed to be a name with an extension, or a dot-file with multiple leading dots. Either choice would be reasonable, but we've already gone with the second one. Maybe sometimes you might prefer the other way, but such filenames are so rare that I can't imagine we'd ever add an option for this. So I think this issue can be closed. ---------- nosy: +Malcolm Smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 15:29:31 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 28 May 2020 19:29:31 +0000 Subject: [issue40810] sqlite3 test CheckTraceCallbackContent fails for sqlite v3.7.3 through 3.7.14.1 In-Reply-To: <1590688058.38.0.22519081316.issue40810@roundup.psfhosted.org> Message-ID: <1590694171.02.0.0740876117951.issue40810@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 15:29:49 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 28 May 2020 19:29:49 +0000 Subject: [issue40744] Explicitly drop support for SQLite version < 3.7.3 In-Reply-To: <1590252054.91.0.549618457347.issue40744@roundup.psfhosted.org> Message-ID: <1590694189.63.0.740419984142.issue40744@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 15:31:04 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 28 May 2020 19:31:04 +0000 Subject: [issue40810] sqlite3 test CheckTraceCallbackContent fails for sqlite v3.7.3 through 3.7.14.1 In-Reply-To: <1590688058.38.0.22519081316.issue40810@roundup.psfhosted.org> Message-ID: <1590694264.65.0.105260257264.issue40810@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Also related to bpo-26187 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 16:02:30 2020 From: report at bugs.python.org (Christian Heimes) Date: Thu, 28 May 2020 20:02:30 +0000 Subject: [issue40810] sqlite3 test CheckTraceCallbackContent fails for sqlite v3.7.3 through 3.7.14.1 In-Reply-To: <1590688058.38.0.22519081316.issue40810@roundup.psfhosted.org> Message-ID: <1590696150.34.0.810732897268.issue40810@roundup.psfhosted.org> Christian Heimes added the comment: Could you please check https://distrowatch.com/ and verify that all major Linux distributions have a sufficient version of sqlite. Please also check LTS like Debian oldstable, Ubuntu, and CentOS. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 16:18:06 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 28 May 2020 20:18:06 +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: <1590697086.75.0.627189500698.issue9338@roundup.psfhosted.org> Raymond Hettinger added the comment: Paul, do you have any thoughts on this one. ISTM that this issue isn't well suited for a newcomer because it's somewhat complex and it isn't clear what if anything should be done. ---------- nosy: +rhettinger priority: high -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 16:38:07 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 28 May 2020 20:38:07 +0000 Subject: [issue40810] sqlite3 test CheckTraceCallbackContent fails for sqlite v3.7.3 through 3.7.14.1 In-Reply-To: <1590688058.38.0.22519081316.issue40810@roundup.psfhosted.org> Message-ID: <1590698287.39.0.104825733995.issue40810@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Debian oldstable (jessie) has sqlite 3.8.7.1 Ubuntu 14.04 LTS (trusty) has sqlite 3.8.2 CentOS 7 and 8 has sqlite versions > 3.7.15 The following distributions include sqlite version _less than_ 3.7.15: ? Porteus (release v2.1 and older) ? OLPC OS ? HardenedBSD ? 0Linux / FreePBX (release v10 and older) ? ToOpPy Linux ? Baruwa Enterprise Edition The other hits were inactive distros. https://distrowatch.com/search.php?pkg=sqlite&relation=less&pkgver=3.7.15&distrorange=InLatest#pkgsearch ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 17:30:46 2020 From: report at bugs.python.org (Brian May) Date: Thu, 28 May 2020 21:30:46 +0000 Subject: [issue39685] Python 3.8 regression Socket operation on non-socket In-Reply-To: <1582092460.6.0.713532643736.issue39685@roundup.psfhosted.org> Message-ID: <1590701446.34.0.0240786856781.issue39685@roundup.psfhosted.org> Brian May added the comment: Consensus seems to be that this is a bug in sshuttle, not a bug in python. Thanks for the feedback. I think this bug can be closed now... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 17:32:49 2020 From: report at bugs.python.org (Christian Heimes) Date: Thu, 28 May 2020 21:32:49 +0000 Subject: [issue39685] Python 3.8 regression Socket operation on non-socket In-Reply-To: <1582092460.6.0.713532643736.issue39685@roundup.psfhosted.org> Message-ID: <1590701569.38.0.547488525144.issue39685@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> third party stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 17:56:48 2020 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 28 May 2020 21:56:48 +0000 Subject: [issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled In-Reply-To: <1492073709.93.0.33740565749.issue30064@psf.upfronthosting.co.za> Message-ID: <1590703008.88.0.893880007188.issue30064@roundup.psfhosted.org> Yury Selivanov added the comment: New changeset dc4eee9e266267498a6b783a0abccc23c06f2b87 by Fantix King in branch 'master': bpo-30064: Properly skip unstable loop.sock_connect() racing test (GH-20494) https://github.com/python/cpython/commit/dc4eee9e266267498a6b783a0abccc23c06f2b87 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 17:56:57 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 28 May 2020 21:56:57 +0000 Subject: [issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled In-Reply-To: <1492073709.93.0.33740565749.issue30064@psf.upfronthosting.co.za> Message-ID: <1590703017.18.0.249423891861.issue30064@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19749 pull_request: https://github.com/python/cpython/pull/20503 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 18:17:40 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 28 May 2020 22:17:40 +0000 Subject: [issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled In-Reply-To: <1492073709.93.0.33740565749.issue30064@psf.upfronthosting.co.za> Message-ID: <1590704260.11.0.434038964133.issue30064@roundup.psfhosted.org> miss-islington added the comment: New changeset 6637bd45163024f2187e40d2cc12c473f78bf5da by Miss Islington (bot) in branch '3.9': bpo-30064: Properly skip unstable loop.sock_connect() racing test (GH-20494) https://github.com/python/cpython/commit/6637bd45163024f2187e40d2cc12c473f78bf5da ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 18:19:13 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 28 May 2020 22:19:13 +0000 Subject: [issue40770] RFE: Run linkchecker on documentation on the CI In-Reply-To: <1590422942.58.0.668271802455.issue40770@roundup.psfhosted.org> Message-ID: <1590704353.61.0.660279551704.issue40770@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 18:25:23 2020 From: report at bugs.python.org (Ned Deily) Date: Thu, 28 May 2020 22:25:23 +0000 Subject: [issue40770] RFE: Run linkchecker on documentation on the CI In-Reply-To: <1590422942.58.0.668271802455.issue40770@roundup.psfhosted.org> Message-ID: <1590704723.67.0.101953965959.issue40770@roundup.psfhosted.org> Ned Deily added the comment: I think our CI checks already take too long to run and use possibly more than our fair share of global open source resources (provided by GitHub, Travis, MS Azure) especially considering how infrequently you would expect to find a problem and the low severity of missing one immediately. I think a more appropriate choice would be to set up a buildbot to do such a check, perhaps weekly is often enough, not more than daily. Julien, what do you think? ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 18:47:25 2020 From: report at bugs.python.org (Berker Peksag) Date: Thu, 28 May 2020 22:47:25 +0000 Subject: [issue40810] sqlite3 test CheckTraceCallbackContent fails for sqlite v3.7.3 through 3.7.14.1 In-Reply-To: <1590688058.38.0.22519081316.issue40810@roundup.psfhosted.org> Message-ID: <1590706045.75.0.57602410322.issue40810@roundup.psfhosted.org> Berker Peksag added the comment: +1 for dropping support for < 3.7.15 in master. We should fix or skip tests in maintenance branches. ---------- stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 19:27:40 2020 From: report at bugs.python.org (Berker Peksag) Date: Thu, 28 May 2020 23:27:40 +0000 Subject: [issue40784] test_sqlite: CheckFuncDeterministic() fails with SQLite 3.32 In-Reply-To: <1590514380.08.0.324391488999.issue40784@roundup.psfhosted.org> Message-ID: <1590708460.05.0.143599260698.issue40784@roundup.psfhosted.org> Berker Peksag added the comment: New changeset c610d970f5373b143bf5f5900d4645e6a90fb460 by Erlend Egeberg Aasland in branch 'master': bpo-40784: Fix sqlite3 deterministic test (GH-20448) https://github.com/python/cpython/commit/c610d970f5373b143bf5f5900d4645e6a90fb460 ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 19:28:09 2020 From: report at bugs.python.org (Berker Peksag) Date: Thu, 28 May 2020 23:28:09 +0000 Subject: [issue40784] test_sqlite: CheckFuncDeterministic() fails with SQLite 3.32 In-Reply-To: <1590514380.08.0.324391488999.issue40784@roundup.psfhosted.org> Message-ID: <1590708489.97.0.600164981025.issue40784@roundup.psfhosted.org> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 19:29:45 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 28 May 2020 23:29:45 +0000 Subject: [issue37218] Default hmac.new() digestmod has not been removed from documentation In-Reply-To: <1560200535.68.0.253007657272.issue37218@roundup.psfhosted.org> Message-ID: <1590708585.53.0.945259746383.issue37218@roundup.psfhosted.org> Cheryl Sabella added the comment: The wording for this was fixed with the PR for #33604. ---------- nosy: +cheryl.sabella resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> HMAC default to MD5 marked as to be removed in 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 19:39:20 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 28 May 2020 23:39:20 +0000 Subject: [issue25567] shlex.quote doesn't work on bytestrings In-Reply-To: <1446814343.82.0.823951892686.issue25567@psf.upfronthosting.co.za> Message-ID: <1590709160.08.0.151918818668.issue25567@roundup.psfhosted.org> Cheryl Sabella added the comment: The first pull request has been closed, so this issue is available to be worked on. If the original patch or PR are used, please credit the original authors. Thanks! ---------- nosy: +cheryl.sabella versions: +Python 3.10 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 19:50:57 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 28 May 2020 23:50:57 +0000 Subject: [issue37198] _parse_localename fail to parse 'en_IL' In-Reply-To: <1559925201.97.0.400746291459.issue37198@roundup.psfhosted.org> Message-ID: <1590709857.98.0.0093940028086.issue37198@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- stage: patch review -> needs patch versions: +Python 3.10 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 19:54:56 2020 From: report at bugs.python.org (mathias44) Date: Thu, 28 May 2020 23:54:56 +0000 Subject: [issue36207] robotsparser deny all with some rules In-Reply-To: <1551865321.24.0.407834320039.issue36207@roundup.psfhosted.org> Message-ID: <1590710096.77.0.00911437629019.issue36207@roundup.psfhosted.org> mathias44 added the comment: I can't display my robot.TXT. I want to ban robots https://ereputation-dereferencement.fr/ ---------- nosy: +mathias44 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 20:05:13 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 29 May 2020 00:05:13 +0000 Subject: [issue39040] Wrong attachement filename when mail mime header was too long In-Reply-To: <1576256391.68.0.734335189474.issue39040@roundup.psfhosted.org> Message-ID: <1590710713.63.0.733551367577.issue39040@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +19750 pull_request: https://github.com/python/cpython/pull/20504 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 20:05:04 2020 From: report at bugs.python.org (R. David Murray) Date: Fri, 29 May 2020 00:05:04 +0000 Subject: [issue39040] Wrong attachement filename when mail mime header was too long In-Reply-To: <1576256391.68.0.734335189474.issue39040@roundup.psfhosted.org> Message-ID: <1590710704.1.0.95974081869.issue39040@roundup.psfhosted.org> R. David Murray added the comment: New changeset 21017ed904f734be9f195ae1274eb81426a9e776 by Abhilash Raj in branch 'master': bpo-39040: Fix parsing of email mime headers with whitespace between encoded-words. (gh-17620) https://github.com/python/cpython/commit/21017ed904f734be9f195ae1274eb81426a9e776 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 20:05:22 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 29 May 2020 00:05:22 +0000 Subject: [issue39040] Wrong attachement filename when mail mime header was too long In-Reply-To: <1576256391.68.0.734335189474.issue39040@roundup.psfhosted.org> Message-ID: <1590710722.02.0.972840194571.issue39040@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19751 pull_request: https://github.com/python/cpython/pull/20505 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 20:05:29 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 29 May 2020 00:05:29 +0000 Subject: [issue39040] Wrong attachement filename when mail mime header was too long In-Reply-To: <1576256391.68.0.734335189474.issue39040@roundup.psfhosted.org> Message-ID: <1590710729.93.0.682564450185.issue39040@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19752 pull_request: https://github.com/python/cpython/pull/20506 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 28 22:48:45 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 29 May 2020 02:48:45 +0000 Subject: [issue39189] Use io.DEFAULT_BUFFER_SIZE for filecmp BUFSIZE variable In-Reply-To: <1577962528.13.0.543315983881.issue39189@roundup.psfhosted.org> Message-ID: <1590720525.43.0.981840769356.issue39189@roundup.psfhosted.org> Benjamin Peterson added the comment: Is there some reason a priori that these constants should be defined to be the same rather than being the same coincidentally? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 01:41:50 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 29 May 2020 05:41:50 +0000 Subject: [issue40810] sqlite3 test CheckTraceCallbackContent fails for sqlite v3.7.3 through 3.7.14.1 In-Reply-To: <1590688058.38.0.22519081316.issue40810@roundup.psfhosted.org> Message-ID: <1590730910.38.0.539789240657.issue40810@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: All right, will do, Berker Persag. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 02:46:11 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 29 May 2020 06:46:11 +0000 Subject: [issue40810] sqlite3 test CheckTraceCallbackContent fails for sqlite v3.7.3 through 3.7.14.1 In-Reply-To: <1590688058.38.0.22519081316.issue40810@roundup.psfhosted.org> Message-ID: <1590734771.66.0.172231196137.issue40810@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +19753 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20330 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 03:04:52 2020 From: report at bugs.python.org (U.W.) Date: Fri, 29 May 2020 07:04:52 +0000 Subject: [issue40793] print() performance problem with very large numbers In-Reply-To: <1590581039.49.0.292614137466.issue40793@roundup.psfhosted.org> Message-ID: <1590735892.71.0.248479188088.issue40793@roundup.psfhosted.org> U.W. added the comment: That's ok for me. It *is* a rare edge case. FYI, printing this 60 Million digit number took about 12 hours on my i7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 04:16:12 2020 From: report at bugs.python.org (Ammar Askar) Date: Fri, 29 May 2020 08:16:12 +0000 Subject: [issue39943] Meta: Clean up various issues in C internals In-Reply-To: <1583983387.49.0.277830283994.issue39943@roundup.psfhosted.org> Message-ID: <1590740172.52.0.130408489461.issue39943@roundup.psfhosted.org> Ammar Askar added the comment: For sre.c, this is definitely a bug in MSVC, see: * https://stackoverflow.com/questions/10403713/why-does-visual-c-warn-on-implicit-cast-from-const-void-to-void-in-c-but * https://godbolt.org/z/BpMqA_ I'm trying to get rid of MSVC warnings to unblock https://github.com/python/cpython/pull/18532 so I'll make a pull request that adds explicit casts for this. ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 05:17:07 2020 From: report at bugs.python.org (zhang) Date: Fri, 29 May 2020 09:17:07 +0000 Subject: [issue40812] _tkinter build failed when install Python-3.6.10 Message-ID: <1590743827.01.0.590826565689.issue40812@roundup.psfhosted.org> New submission from zhang : building '_tkinter' extension gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -DWITH_APPINIT=1 -I./Include -I/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python/Python-3.6.10/include -I. -I/usr/local/include -I/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python-3.6.10/Include -I/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python-3.6.10 -c /YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python-3.6.10/Modules/_tkinter.c -o build/temp.linux-x86_64-3.6/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python-3.6.10/Modules/_tkinter.o -I/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/tcltk/8.6.8/include/ gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -DWITH_APPINIT=1 -I./Include -I/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python/Python-3.6.10/include -I. -I/usr/local/include -I/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python-3.6.10/Include -I/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python-3.6.10 -c /YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python-3.6.10/Modules/tkappinit.c -o build/temp.linux-x86_64-3.6/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python-3.6.10/Modules/tkappinit.o -I/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/tcltk/8.6.8/include/ gcc -pthread -shared build/temp.linux-x86_64-3.6/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python-3.6.10/Modules/_tkinter.o build/temp.linux-x86_64-3.6/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python-3.6.10/Modules/tkappinit.o -L/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python/Python-3.6.10/lib -L/usr/local/lib -o build/lib.linux-x86_64-3.6/_tkinter.cpython-36m-x86_64-linux-gnu.so -L/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/tcltk/8.6.8/lib/ warning: building with the bundled copy of libffi is deprecated on this platform. It will not be distributed with Python 3.7 *** WARNING: renaming "_tkinter" since importing it failed: build/lib.linux-x86_64-3.6/_tkinter.cpython-36m-x86_64-linux-gnu.so: undefined symbol: Tcl_GetCharLength ---------- components: Build messages: 370281 nosy: zhang priority: normal severity: normal status: open title: _tkinter build failed when install Python-3.6.10 type: compile error versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 05:19:02 2020 From: report at bugs.python.org (zhang) Date: Fri, 29 May 2020 09:19:02 +0000 Subject: [issue40812] _tkinter build failed when install Python-3.6.10 In-Reply-To: <1590743827.01.0.590826565689.issue40812@roundup.psfhosted.org> Message-ID: <1590743942.72.0.210925807462.issue40812@roundup.psfhosted.org> zhang added the comment: configure command :./configure --prefix=/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T/zzz/software/Python/Python-3.6.10/ --with-tcltk-includes='-I/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T/zzz/software/tcltk/8.6.8/include/' --with-tcltk-libs='-L/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T/zzz/software/tcltk/8.6.8/lib/' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 05:22:00 2020 From: report at bugs.python.org (Ammar Askar) Date: Fri, 29 May 2020 09:22:00 +0000 Subject: [issue39943] Meta: Clean up various issues in C internals In-Reply-To: <1583983387.49.0.277830283994.issue39943@roundup.psfhosted.org> Message-ID: <1590744120.78.0.0759096032941.issue39943@roundup.psfhosted.org> Change by Ammar Askar : ---------- pull_requests: +19754 pull_request: https://github.com/python/cpython/pull/20508 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 05:52:56 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 29 May 2020 09:52:56 +0000 Subject: [issue30710] getaddrinfo raises OverflowError In-Reply-To: <1497964795.93.0.432091390159.issue30710@psf.upfronthosting.co.za> Message-ID: <1590745976.83.0.705864143295.issue30710@roundup.psfhosted.org> Cheryl Sabella added the comment: The original pull request has been closed as inactive. If the original author is interested in pursuing this issue, it can be reopened or someone else can create a new pull request to replace it. ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 05:54:41 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 29 May 2020 09:54:41 +0000 Subject: [issue30986] Add --include-py argument to Tools/msi/make_zip.py In-Reply-To: <1500674773.9.0.384713319634.issue30986@psf.upfronthosting.co.za> Message-ID: <1590746081.31.0.744353195152.issue30986@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 05:54:47 2020 From: report at bugs.python.org (zhang) Date: Fri, 29 May 2020 09:54:47 +0000 Subject: [issue31817] Compilation Error with Python 3.6.1/3.6.3 with Tkinter In-Reply-To: <1508407674.96.0.213398074469.issue31817@psf.upfronthosting.co.za> Message-ID: <1590746087.35.0.660165423418.issue31817@roundup.psfhosted.org> zhang added the comment: Josh,Did you solve this problem?I met the same error when install python. *** WARNING: renaming "_tkinter" since importing it failed: build/lib.linux-x86_64-3.6/_tkinter.cpython-36m-x86_64-linux-gnu.so: undefined symbol: Tcl_GetCharLength ---------- nosy: +zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 05:57:44 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Fri, 29 May 2020 09:57:44 +0000 Subject: [issue30710] getaddrinfo raises OverflowError In-Reply-To: <1497964795.93.0.432091390159.issue30710@psf.upfronthosting.co.za> Message-ID: <1590746264.67.0.193152857628.issue30710@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi Cheryl Sabella, the pull request that got closed is the one for issue 30711. The pull request for this one has never been reviewed. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 06:00:07 2020 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 29 May 2020 10:00:07 +0000 Subject: [issue40801] Expose PyFloat_AsDouble at Python level: operator.as_float? In-Reply-To: <1590657786.78.0.118668826809.issue40801@roundup.psfhosted.org> Message-ID: <1590746407.18.0.547036510483.issue40801@roundup.psfhosted.org> Mark Dickinson added the comment: I started a python-ideas thread: https://mail.python.org/archives/list/python-ideas at python.org/thread/3YGNHGWZOU5AIBS3A52CAHPJJLY7J2CS/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 06:08:32 2020 From: report at bugs.python.org (timofej) Date: Fri, 29 May 2020 10:08:32 +0000 Subject: [issue40813] Output SyntaxError is not defective Message-ID: <1590746912.78.0.622485430276.issue40813@roundup.psfhosted.org> New submission from timofej : a SyntaxError must be look like: File "main.py", line 7 print("hello world" ^ SyntaxError: unexpected EOF while parsing but instead of this i'm get this: File "main.py", line 3 ^ SyntaxError: unexpected EOF while parsing It seems to me that this problem is only in windows. ---------- components: Build messages: 370287 nosy: timofej priority: normal severity: normal status: open title: Output SyntaxError is not defective type: compile error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 06:15:11 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 29 May 2020 10:15:11 +0000 Subject: [issue34240] Convert test_mmap to use tempfile In-Reply-To: <1532632974.46.0.56676864532.issue34240@psf.upfronthosting.co.za> Message-ID: <1590747311.63.0.690984944102.issue34240@roundup.psfhosted.org> Cheryl Sabella added the comment: @tim.golden, I closed this pull request as it was from an unknown repository and new pull request would need to be created with the changes in order to move it forward. ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 06:17:37 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 29 May 2020 10:17:37 +0000 Subject: [issue31817] Compilation Error with Python 3.6.1/3.6.3 with Tkinter In-Reply-To: <1508407674.96.0.213398074469.issue31817@psf.upfronthosting.co.za> Message-ID: <1590747457.34.0.0732199984432.issue31817@roundup.psfhosted.org> Ned Deily added the comment: @zhang, Did you try the solution given by dplusplus in the previous message (msg319861)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 06:18:58 2020 From: report at bugs.python.org (TJG) Date: Fri, 29 May 2020 10:18:58 +0000 Subject: [issue34240] Convert test_mmap to use tempfile In-Reply-To: <1590747311.63.0.690984944102.issue34240@roundup.psfhosted.org> Message-ID: TJG added the comment: Thanks, Cheryl. It was getting pretty stale. If I think it's worthwhile I'll resurrect it. I suspect what happened was that my cpython fork got borked somehow between then and now. I probably ditched the repo and re-forked. That's for doing the housekeeping work here. ---------- nosy: +tjguk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 06:24:15 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 29 May 2020 10:24:15 +0000 Subject: [issue40812] _tkinter build failed when install Python-3.6.10 In-Reply-To: <1590743827.01.0.590826565689.issue40812@roundup.psfhosted.org> Message-ID: <1590747855.26.0.120863006098.issue40812@roundup.psfhosted.org> Ned Deily added the comment: Since you have already found and commented on Issue31817, closing this as a duplicate of it. ---------- nosy: +ned.deily resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Compilation Error with Python 3.6.1/3.6.3 with Tkinter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 06:26:45 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 29 May 2020 10:26:45 +0000 Subject: [issue25247] Tkinter modules built successfully but removed because they could not be imported In-Reply-To: <1443362955.97.0.479963022327.issue25247@psf.upfronthosting.co.za> Message-ID: <1590748005.16.0.543181749654.issue25247@roundup.psfhosted.org> Ned Deily added the comment: It looks like this is the same issue that has been discussed in later Issue31817. Since there has been more discussion there, let's close this as a duplicate of that one. ---------- nosy: +ned.deily resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Compilation Error with Python 3.6.1/3.6.3 with Tkinter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 06:37:43 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 29 May 2020 10:37:43 +0000 Subject: [issue33111] Merely importing tkinter breaks parallel code (multiprocessing, sharedmem) In-Reply-To: <1521573656.32.0.467229070634.issue33111@psf.upfronthosting.co.za> Message-ID: <1590748663.1.0.341965778978.issue33111@roundup.psfhosted.org> Ned Deily added the comment: In Python 3.8, the default start method for multiprocessing when run on macOS is now "spawn" instead of "fork". "Changed in version 3.8: On macOS, the spawn start method is now the default. The fork start method should be considered unsafe as it can lead to crashes of the subprocess. See bpo-33725." ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Python crashes on macOS after fork with no exec versions: -Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 06:38:02 2020 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 29 May 2020 10:38:02 +0000 Subject: [issue40793] print() performance problem with very large numbers In-Reply-To: <1590581039.49.0.292614137466.issue40793@roundup.psfhosted.org> Message-ID: <1590748682.67.0.294714949891.issue40793@roundup.psfhosted.org> Mark Dickinson added the comment: > FYI, printing this 60 Million digit number took about 12 hours on my i7. That sounds about right: on my machine, it takes around 10 seconds to convert a 1 million-digit number to a string. Multiplying by 60**2 gives 10 hours. I do have to wonder what you're doing with all those digits now that you have them, though ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 06:43:18 2020 From: report at bugs.python.org (TJG) Date: Fri, 29 May 2020 10:43:18 +0000 Subject: [issue34240] Convert test_mmap to use tempfile In-Reply-To: Message-ID: TJG added the comment: That last should clearly have said: Thanks for doing the housekeeping work here :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 07:15:18 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 29 May 2020 11:15:18 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1590750918.99.0.692651658614.issue33725@roundup.psfhosted.org> Terry J. Reedy added the comment: Since the default has been different on different systems for as long as I remember, I see no reason to break code on *nix in the name of 'consistency'. Asyncio also works different on different systems. Aside from that idea, is there anything else left for this issue? Especially at this time as opposed to some possible future when macOS changes? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 07:17:53 2020 From: report at bugs.python.org (Deomid Ryabkov) Date: Fri, 29 May 2020 11:17:53 +0000 Subject: [issue35621] asyncio.create_subprocess_exec() only works with main event loop In-Reply-To: <1546210778.19.0.43686311162.issue35621@roundup.psfhosted.org> Message-ID: <1590751073.44.0.682187171304.issue35621@roundup.psfhosted.org> Deomid Ryabkov added the comment: is there a workaround for earlier Python versions that does not involve patching the standard library? ---------- nosy: +rojer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 07:43:10 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 29 May 2020 11:43:10 +0000 Subject: [issue39040] Wrong attachement filename when mail mime header was too long In-Reply-To: <1576256391.68.0.734335189474.issue39040@roundup.psfhosted.org> Message-ID: <1590752590.0.0.81634961997.issue39040@roundup.psfhosted.org> miss-islington added the comment: New changeset a6ae02d7e91cfe63c9b65b803ae24a40d2864bc0 by Miss Islington (bot) in branch '3.9': bpo-39040: Fix parsing of email mime headers with whitespace between encoded-words. (gh-17620) https://github.com/python/cpython/commit/a6ae02d7e91cfe63c9b65b803ae24a40d2864bc0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 07:43:30 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 29 May 2020 11:43:30 +0000 Subject: [issue39040] Wrong attachement filename when mail mime header was too long In-Reply-To: <1576256391.68.0.734335189474.issue39040@roundup.psfhosted.org> Message-ID: <1590752610.53.0.599619344195.issue39040@roundup.psfhosted.org> miss-islington added the comment: New changeset 6381ee077d3c69d2f947f7bf87d8ec76e0caf189 by Miss Islington (bot) in branch '3.8': bpo-39040: Fix parsing of email mime headers with whitespace between encoded-words. (gh-17620) https://github.com/python/cpython/commit/6381ee077d3c69d2f947f7bf87d8ec76e0caf189 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 07:43:51 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 29 May 2020 11:43:51 +0000 Subject: [issue39040] Wrong attachement filename when mail mime header was too long In-Reply-To: <1576256391.68.0.734335189474.issue39040@roundup.psfhosted.org> Message-ID: <1590752631.61.0.929156911286.issue39040@roundup.psfhosted.org> miss-islington added the comment: New changeset 5f977e09e8a29dbd5972ad79c4fd17a394d1857f by Miss Islington (bot) in branch '3.7': bpo-39040: Fix parsing of email mime headers with whitespace between encoded-words. (gh-17620) https://github.com/python/cpython/commit/5f977e09e8a29dbd5972ad79c4fd17a394d1857f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 07:59:47 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 29 May 2020 11:59:47 +0000 Subject: [issue25872] multithreading traceback KeyError when modifying file In-Reply-To: <1450200064.35.0.872448112145.issue25872@psf.upfronthosting.co.za> Message-ID: <1590753587.55.0.432956795863.issue25872@roundup.psfhosted.org> miss-islington added the comment: New changeset b86636bff4b29ce23c886df079715dd951f13a07 by Andrew Kuchling in branch '3.8': [3.8] bpo-25872: Fix KeyError in linecache when multithreaded (GH-18007) (GH-20092) https://github.com/python/cpython/commit/b86636bff4b29ce23c886df079715dd951f13a07 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 07:59:57 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 29 May 2020 11:59:57 +0000 Subject: [issue25872] multithreading traceback KeyError when modifying file In-Reply-To: <1450200064.35.0.872448112145.issue25872@psf.upfronthosting.co.za> Message-ID: <1590753597.96.0.0411820018198.issue25872@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19755 pull_request: https://github.com/python/cpython/pull/20511 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 08:15:58 2020 From: report at bugs.python.org (Ruairidh MacLeod) Date: Fri, 29 May 2020 12:15:58 +0000 Subject: [issue40805] Can no longer patch flask.g In-Reply-To: <1590668397.14.0.891806096405.issue40805@roundup.psfhosted.org> Message-ID: <1590754558.94.0.300878637908.issue40805@roundup.psfhosted.org> Change by Ruairidh MacLeod : ---------- nosy: +rkm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 08:17:46 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 29 May 2020 12:17:46 +0000 Subject: [issue25872] multithreading traceback KeyError when modifying file In-Reply-To: <1450200064.35.0.872448112145.issue25872@psf.upfronthosting.co.za> Message-ID: <1590754666.16.0.782381272359.issue25872@roundup.psfhosted.org> miss-islington added the comment: New changeset 852e8a7ed4d3d48e5c1c8120cfc932eb6a84bb8e by Miss Islington (bot) in branch '3.7': [3.8] bpo-25872: Fix KeyError in linecache when multithreaded (GH-18007) (GH-20092) https://github.com/python/cpython/commit/852e8a7ed4d3d48e5c1c8120cfc932eb6a84bb8e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 08:24:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 29 May 2020 12:24:24 +0000 Subject: [issue39573] [C API] Make PyObject an opaque structure in the limited C API In-Reply-To: <1581030432.16.0.48160379721.issue39573@roundup.psfhosted.org> Message-ID: <1590755064.38.0.126647396713.issue39573@roundup.psfhosted.org> STINNER Victor added the comment: > bpo-39573: Convert Py_TYPE() to a static inline function (GH-20290) This change broke two projects: * Cython: https://github.com/cython/cython/commit/d8e93b332fe7d15459433ea74cd29178c03186bd (FIXED) * immutables: https://github.com/MagicStack/immutables/issues/46 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 08:26:31 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 29 May 2020 12:26:31 +0000 Subject: [issue40784] test_sqlite: CheckFuncDeterministic() fails with SQLite 3.32 In-Reply-To: <1590514380.08.0.324391488999.issue40784@roundup.psfhosted.org> Message-ID: <1590755191.92.0.0654620792368.issue40784@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +19756 pull_request: https://github.com/python/cpython/pull/20512 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 08:26:41 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 29 May 2020 12:26:41 +0000 Subject: [issue40784] test_sqlite: CheckFuncDeterministic() fails with SQLite 3.32 In-Reply-To: <1590514380.08.0.324391488999.issue40784@roundup.psfhosted.org> Message-ID: <1590755201.21.0.731908898887.issue40784@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19757 pull_request: https://github.com/python/cpython/pull/20513 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 08:26:54 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 29 May 2020 12:26:54 +0000 Subject: [issue40810] sqlite3 test CheckTraceCallbackContent fails for sqlite v3.7.3 through 3.7.14.1 In-Reply-To: <1590688058.38.0.22519081316.issue40810@roundup.psfhosted.org> Message-ID: <1590755214.76.0.814677194163.issue40810@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: FYI, the #if in line 1563 in `Modules/_sqlite/connection.c` is wrong, but the comment five lines below is correct: https://github.com/python/cpython/blob/e56ce3ce865cb5539cdedbeae54eaa11ec563922/Modules/_sqlite/connection.c#L1563-L1589 `sqlite3_errstr()` was introduced in 3.7.15, so the #if comparison operator should have been '>=', not '>'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 08:28:26 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 29 May 2020 12:28:26 +0000 Subject: [issue40784] test_sqlite: CheckFuncDeterministic() fails with SQLite 3.32 In-Reply-To: <1590514380.08.0.324391488999.issue40784@roundup.psfhosted.org> Message-ID: <1590755306.15.0.940245836075.issue40784@roundup.psfhosted.org> STINNER Victor added the comment: Python 3.8 and Python 3.9 are also affected, I created backports. Python 3.7 is not affected: deterministic parameter was added to Python 3.8. https://docs.python.org/dev/library/sqlite3.html#sqlite3.Connection.create_function ---------- versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 08:28:33 2020 From: report at bugs.python.org (=?utf-8?b?TWF0w7rFoSBWYWxv?=) Date: Fri, 29 May 2020 12:28:33 +0000 Subject: [issue40814] Update typing module documentation based on PEP 585 Message-ID: <1590755313.42.0.558710518983.issue40814@roundup.psfhosted.org> New submission from Mat?? Valo : In documentation of typing module there is no mention of new possibilities based on PEP 585. Moreover, should be old constructs like List, Dict,... marked as deprecated? ---------- assignee: docs at python components: Documentation messages: 370306 nosy: Mat?? Valo, docs at python, gvanrossum, levkivskyi priority: normal severity: normal status: open title: Update typing module documentation based on PEP 585 type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 08:36:25 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 29 May 2020 12:36:25 +0000 Subject: [issue39359] zipfile: add missing "pwd: expected bytes, got str" exception message In-Reply-To: <1579180814.8.0.49279033626.issue39359@roundup.psfhosted.org> Message-ID: <1590755785.6.0.928740938951.issue39359@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- nosy: +serhiy.storchaka, twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 08:46:37 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 29 May 2020 12:46:37 +0000 Subject: [issue40784] test_sqlite: CheckFuncDeterministic() fails with SQLite 3.32 In-Reply-To: <1590514380.08.0.324391488999.issue40784@roundup.psfhosted.org> Message-ID: <1590756397.8.0.519122510902.issue40784@roundup.psfhosted.org> miss-islington added the comment: New changeset 00a240bf7f95bbd220f1cfbf9eb58484a5f9681a by Miss Islington (bot) in branch '3.8': bpo-40784: Fix sqlite3 deterministic test (GH-20448) https://github.com/python/cpython/commit/00a240bf7f95bbd220f1cfbf9eb58484a5f9681a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 08:46:55 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 29 May 2020 12:46:55 +0000 Subject: [issue40784] test_sqlite: CheckFuncDeterministic() fails with SQLite 3.32 In-Reply-To: <1590514380.08.0.324391488999.issue40784@roundup.psfhosted.org> Message-ID: <1590756415.83.0.906019519216.issue40784@roundup.psfhosted.org> miss-islington added the comment: New changeset 8fcc1474ef5d819c144309e048e71e6013544063 by Miss Islington (bot) in branch '3.9': bpo-40784: Fix sqlite3 deterministic test (GH-20448) https://github.com/python/cpython/commit/8fcc1474ef5d819c144309e048e71e6013544063 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 09:13:38 2020 From: report at bugs.python.org (sgaist) Date: Fri, 29 May 2020 13:13:38 +0000 Subject: [issue29017] Docs: PySide is provided by 'The Qt Company' and not by 'Nokia' In-Reply-To: <1482174228.93.0.510062905066.issue29017@psf.upfronthosting.co.za> Message-ID: <1590758018.37.0.968857962697.issue29017@roundup.psfhosted.org> Change by sgaist : ---------- keywords: +patch nosy: +sgaist nosy_count: 2.0 -> 3.0 pull_requests: +19758 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20149 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 09:24:04 2020 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 29 May 2020 13:24:04 +0000 Subject: =?utf-8?b?W2lzc3VlNDA3ODBdIGZsb2F0Ll9fZm9ybWF0X18oKSBoYW5kbGVzIHRyYWls?= =?utf-8?q?ing_zeros_inconsistently_in_=E2=80=9Cgeneral=E2=80=9D_format?= In-Reply-To: <1590502519.54.0.593108276962.issue40780@roundup.psfhosted.org> Message-ID: <1590758644.61.0.121848411977.issue40780@roundup.psfhosted.org> Mark Dickinson added the comment: New changeset 895c9c1d438367722f74f437fda96767d770662b by Mark Dickinson in branch 'master': bpo-40780: Fix failure of _Py_dg_dtoa to remove trailing zeros (GH-20435) https://github.com/python/cpython/commit/895c9c1d438367722f74f437fda96767d770662b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 09:24:16 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 29 May 2020 13:24:16 +0000 Subject: =?utf-8?b?W2lzc3VlNDA3ODBdIGZsb2F0Ll9fZm9ybWF0X18oKSBoYW5kbGVzIHRyYWls?= =?utf-8?q?ing_zeros_inconsistently_in_=E2=80=9Cgeneral=E2=80=9D_format?= In-Reply-To: <1590502519.54.0.593108276962.issue40780@roundup.psfhosted.org> Message-ID: <1590758656.69.0.287705794223.issue40780@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +19759 pull_request: https://github.com/python/cpython/pull/20514 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 09:25:00 2020 From: report at bugs.python.org (Ben) Date: Fri, 29 May 2020 13:25:00 +0000 Subject: [issue40815] Multiprocessing docs don't describe thread-safety Message-ID: <1590758700.82.0.757809403714.issue40815@roundup.psfhosted.org> New submission from Ben : The Multiprocessing docs specifically say that Queue is process- and thread- safe: https://docs.python.org/3/library/multiprocessing.html#exchanging-objects-between-processes. But this information is not given for the various synchronisation primitives and such (Lock, Semaphore, Event, etc) Are they thread-safe? Should the docs say whether they are or are not? ---------- assignee: docs at python components: Documentation messages: 370310 nosy: bjs, docs at python priority: normal severity: normal status: open title: Multiprocessing docs don't describe thread-safety _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 09:32:00 2020 From: report at bugs.python.org (Alan Briolat) Date: Fri, 29 May 2020 13:32:00 +0000 Subject: [issue40815] Multiprocessing docs don't describe thread-safety In-Reply-To: <1590758700.82.0.757809403714.issue40815@roundup.psfhosted.org> Message-ID: <1590759120.25.0.449156849631.issue40815@roundup.psfhosted.org> Change by Alan Briolat : ---------- nosy: +alan.briolat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 09:46:58 2020 From: report at bugs.python.org (Zachary Ware) Date: Fri, 29 May 2020 13:46:58 +0000 Subject: [issue40813] Output SyntaxError is not defective In-Reply-To: <1590746912.78.0.622485430276.issue40813@roundup.psfhosted.org> Message-ID: <1590760018.04.0.6151690494.issue40813@roundup.psfhosted.org> Zachary Ware added the comment: Without some example code, there's no way to really tell what's going on here. In particular, it's suspicious that you're expecting an error on line 7 but seeing one on line 3. Can you attach your `main.py` file to the issue? ---------- components: +Interpreter Core -Build nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 09:47:02 2020 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 29 May 2020 13:47:02 +0000 Subject: =?utf-8?b?W2lzc3VlNDA3ODBdIGZsb2F0Ll9fZm9ybWF0X18oKSBoYW5kbGVzIHRyYWls?= =?utf-8?q?ing_zeros_inconsistently_in_=E2=80=9Cgeneral=E2=80=9D_format?= In-Reply-To: <1590502519.54.0.593108276962.issue40780@roundup.psfhosted.org> Message-ID: <1590760022.62.0.0541081256389.issue40780@roundup.psfhosted.org> Mark Dickinson added the comment: New changeset ad088ca5c6adc4a107411cad62b83f5c6e06b5ed by Miss Islington (bot) in branch '3.9': bpo-40780: Fix failure of _Py_dg_dtoa to remove trailing zeros (GH-20435) (GH-20514) https://github.com/python/cpython/commit/ad088ca5c6adc4a107411cad62b83f5c6e06b5ed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 09:47:09 2020 From: report at bugs.python.org (Zachary Ware) Date: Fri, 29 May 2020 13:47:09 +0000 Subject: [issue40813] Output SyntaxError is not defective In-Reply-To: <1590746912.78.0.622485430276.issue40813@roundup.psfhosted.org> Message-ID: <1590760029.54.0.572929079472.issue40813@roundup.psfhosted.org> Change by Zachary Ware : ---------- type: compile error -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 09:48:02 2020 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 29 May 2020 13:48:02 +0000 Subject: =?utf-8?b?W2lzc3VlNDA3ODBdIGZsb2F0Ll9fZm9ybWF0X18oKSBoYW5kbGVzIHRyYWls?= =?utf-8?q?ing_zeros_inconsistently_in_=E2=80=9Cgeneral=E2=80=9D_format?= In-Reply-To: <1590502519.54.0.593108276962.issue40780@roundup.psfhosted.org> Message-ID: <1590760082.33.0.200149935848.issue40780@roundup.psfhosted.org> Mark Dickinson added the comment: Fixed in master and 3.9; not backporting to 3.8 or 3.7, as discussed. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 10:02:26 2020 From: report at bugs.python.org (timofej) Date: Fri, 29 May 2020 14:02:26 +0000 Subject: [issue40813] Output SyntaxError is not defective In-Reply-To: <1590746912.78.0.622485430276.issue40813@roundup.psfhosted.org> Message-ID: <1590760946.18.0.385993119298.issue40813@roundup.psfhosted.org> timofej added the comment: here attached file with SyntaxError ---------- Added file: https://bugs.python.org/file49201/main.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 10:14:02 2020 From: report at bugs.python.org (timofej) Date: Fri, 29 May 2020 14:14:02 +0000 Subject: [issue40813] Output SyntaxError is not defective In-Reply-To: <1590746912.78.0.622485430276.issue40813@roundup.psfhosted.org> Message-ID: <1590761642.33.0.539633726193.issue40813@roundup.psfhosted.org> timofej added the comment: About of numbers of line. I tested on different files and i forget change number of line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 10:43:20 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Fri, 29 May 2020 14:43:20 +0000 Subject: [issue40813] Output SyntaxError is not defective In-Reply-To: <1590746912.78.0.622485430276.issue40813@roundup.psfhosted.org> Message-ID: <1590763400.32.0.769986654169.issue40813@roundup.psfhosted.org> R?mi Lapeyre added the comment: Indeed, the exception has the correct line number when compiling manually: >>> try: ... compile('if __name__ == "__main__":\n print("hello world"\n', '', 'exec') ... except SyntaxError as e: ... print(e.lineno) ... 2 but not when running `python3 main.py`: File "main.py", line 3 ^ SyntaxError: unexpected EOF while parsing I tried with all version of Python >= 3.6 and Python2 and they all exhibit the same behavior. ---------- nosy: +remi.lapeyre versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 10:53:13 2020 From: report at bugs.python.org (=?utf-8?b?0JDQvdC00YDQtdC5INCa0LDQt9Cw0L3RhtC10LI=?=) Date: Fri, 29 May 2020 14:53:13 +0000 Subject: [issue40816] Add missed AsyncContextDecorator to contextlib Message-ID: <1590763993.17.0.319482222949.issue40816@roundup.psfhosted.org> New submission from ?????? ???????? : I can use context manager as decorator but can't use async context manager. Seems it because didn't implemented AsyncContextDecorator class ---------- components: Library (Lib) messages: 370317 nosy: heckad priority: normal severity: normal status: open title: Add missed AsyncContextDecorator to contextlib versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 11:00:35 2020 From: report at bugs.python.org (=?utf-8?b?0JDQvdC00YDQtdC5INCa0LDQt9Cw0L3RhtC10LI=?=) Date: Fri, 29 May 2020 15:00:35 +0000 Subject: [issue40816] Add missed AsyncContextDecorator to contextlib In-Reply-To: <1590763993.17.0.319482222949.issue40816@roundup.psfhosted.org> Message-ID: <1590764435.16.0.351636580558.issue40816@roundup.psfhosted.org> Change by ?????? ???????? : ---------- keywords: +patch pull_requests: +19760 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20516 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 11:05:44 2020 From: report at bugs.python.org (Florian Dahlitz) Date: Fri, 29 May 2020 15:05:44 +0000 Subject: [issue40814] Update typing module documentation based on PEP 585 In-Reply-To: <1590755313.42.0.558710518983.issue40814@roundup.psfhosted.org> Message-ID: <1590764744.96.0.478433559925.issue40814@roundup.psfhosted.org> Change by Florian Dahlitz : ---------- nosy: +DahlitzFlorian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 11:39:50 2020 From: report at bugs.python.org (E. Paine) Date: Fri, 29 May 2020 15:39:50 +0000 Subject: [issue40734] /usr/bin surprisingly in sys.path under IDLE In-Reply-To: <1590179721.27.0.0407406629035.issue40734@roundup.psfhosted.org> Message-ID: <1590766790.88.0.443855656087.issue40734@roundup.psfhosted.org> E. Paine added the comment: This is simply because the Python interpreter is running from /usr/bin. This is shown if you call: cp /usr/bin/idle idle ./idle In this case, the Python interpreter is running from the directory you are in and /usr/bin shouldn't(!) show in the path (at least on my system...) ---------- nosy: +epaine _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 12:02:21 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Fri, 29 May 2020 16:02:21 +0000 Subject: [issue40817] Document the asyncio shell Message-ID: <1590768141.96.0.0419564634839.issue40817@roundup.psfhosted.org> New submission from R?mi Lapeyre : Python 3.8 introduced `python -m asyncio` to run a Python shell with asyncio support. It had a note in What's New but was not documented, I think a note in https://docs.python.org/3/library/asyncio.html should be helpful. This could be a good issue for a new contributor. ---------- assignee: docs at python components: Documentation messages: 370319 nosy: docs at python, remi.lapeyre priority: normal severity: normal status: open title: Document the asyncio shell versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 12:03:57 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 29 May 2020 16:03:57 +0000 Subject: [issue40817] Document the asyncio shell In-Reply-To: <1590768141.96.0.0419564634839.issue40817@roundup.psfhosted.org> Message-ID: <1590768237.6.0.381538375629.issue40817@roundup.psfhosted.org> STINNER Victor added the comment: I understood that it was more added as an "experimental" feature. Not sure if it's still considered as experimental in Python 3.9? A few more bugs have been fixed in the parser/compiler recently for async/await keywords. ---------- nosy: +vstinner, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 12:06:44 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Fri, 29 May 2020 16:06:44 +0000 Subject: [issue40818] Run sys.__interactivehook__ for asyncio REPLs Message-ID: <1590768404.22.0.270974343811.issue40818@roundup.psfhosted.org> New submission from R?mi Lapeyre : As a nice side effect, it gives the same completion than the standard shell. ---------- components: Library (Lib) messages: 370321 nosy: remi.lapeyre priority: normal severity: normal status: open title: Run sys.__interactivehook__ for asyncio REPLs versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 12:11:12 2020 From: report at bugs.python.org (Tal Einat) Date: Fri, 29 May 2020 16:11:12 +0000 Subject: [issue38035] shared_semaphores cannot be shared across unrelated processes In-Reply-To: <1567659668.43.0.186142682202.issue38035@roundup.psfhosted.org> Message-ID: <1590768672.75.0.360840735768.issue38035@roundup.psfhosted.org> Tal Einat added the comment: Sorry this hasn't been followed up. I think this would best be discussed a bit on the Python-Ideas mailing list. Please send an email there suggesting this feature, and link to the discussion thread in the mailing list archives here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 12:15:30 2020 From: report at bugs.python.org (pmp-p) Date: Fri, 29 May 2020 16:15:30 +0000 Subject: [issue40818] Run sys.__interactivehook__ for asyncio REPLs In-Reply-To: <1590768404.22.0.270974343811.issue40818@roundup.psfhosted.org> Message-ID: <1590768930.61.0.806320598241.issue40818@roundup.psfhosted.org> Change by pmp-p : ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 12:15:44 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Fri, 29 May 2020 16:15:44 +0000 Subject: [issue40818] Run sys.__interactivehook__ for asyncio REPLs In-Reply-To: <1590768404.22.0.270974343811.issue40818@roundup.psfhosted.org> Message-ID: <1590768944.66.0.725799025086.issue40818@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch pull_requests: +19761 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20517 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 12:28:08 2020 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 29 May 2020 16:28:08 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1590769688.57.0.707690951237.issue29882@roundup.psfhosted.org> Mark Dickinson added the comment: New changeset 8bd216dfede9cb2d5bedb67f20a30c99844dbfb8 by Niklas Fiekas in branch 'master': bpo-29882: Add an efficient popcount method for integers (#771) https://github.com/python/cpython/commit/8bd216dfede9cb2d5bedb67f20a30c99844dbfb8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 12:28:39 2020 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 29 May 2020 16:28:39 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1590769719.18.0.208003033614.issue29882@roundup.psfhosted.org> Change by Mark Dickinson : ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.10 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 12:39:31 2020 From: report at bugs.python.org (Bev) Date: Fri, 29 May 2020 16:39:31 +0000 Subject: [issue40819] Idle Context Menu Copy/Cut Grayed Out Message-ID: <1590770371.71.0.221082302956.issue40819@roundup.psfhosted.org> New submission from Bev : In Idle on macOS, when I select text in either the Shell or a file, both copy and cut should be available in the context menu, but they are grayed out (not selectable). Both copy and cut are still available via the menu bar Edit menu and keyboard shortcuts, c and x, respectively. I tried this on macOS El Capitan 10.11.6 and Catalina 10.15.4 ---------- assignee: terry.reedy components: IDLE files: copy and cut missinf from context menu.png messages: 370324 nosy: BevInTX, terry.reedy priority: normal severity: normal status: open title: Idle Context Menu Copy/Cut Grayed Out type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file49202/copy and cut missinf from context menu.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 12:49:45 2020 From: report at bugs.python.org (Sylvain Corlay) Date: Fri, 29 May 2020 16:49:45 +0000 Subject: [issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone In-Reply-To: <1561315344.64.0.509844893886.issue37380@roundup.psfhosted.org> Message-ID: <1590770985.79.0.668586770877.issue37380@roundup.psfhosted.org> Sylvain Corlay added the comment: Hello, Is there a means to work around that bug for Python 3.6 ? It seems that the fix was only backported to 3.7, and we were not planning on dropping Python 3.6 support quite yet in our project. ---------- nosy: +sylvain.corlay _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 12:53:15 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 29 May 2020 16:53:15 +0000 Subject: [issue40744] Explicitly drop support for SQLite version < 3.7.3 In-Reply-To: <1590252054.91.0.549618457347.issue40744@roundup.psfhosted.org> Message-ID: <1590771195.58.0.898728035193.issue40744@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- versions: -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 13:14:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 29 May 2020 17:14:17 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1590772457.2.0.325778477398.issue29882@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +19762 pull_request: https://github.com/python/cpython/pull/20518 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 13:29:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 29 May 2020 17:29:04 +0000 Subject: [issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone In-Reply-To: <1561315344.64.0.509844893886.issue37380@roundup.psfhosted.org> Message-ID: <1590773344.2.0.54481947952.issue37380@roundup.psfhosted.org> STINNER Victor added the comment: Sadly, 3.6 no longer get bug fixes, only security fixes: https://devguide.python.org/#status-of-python-branches ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 13:40:37 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 29 May 2020 17:40:37 +0000 Subject: [issue24651] Mock.assert* API is in user namespace In-Reply-To: <1437119760.12.0.974021198911.issue24651@psf.upfronthosting.co.za> Message-ID: <1590774037.81.0.156370401292.issue24651@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 13:44:16 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 29 May 2020 17:44:16 +0000 Subject: [issue24391] Better repr for threading objects In-Reply-To: <1433586102.76.0.662503832113.issue24391@psf.upfronthosting.co.za> Message-ID: <1590774256.41.0.159601186198.issue24391@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 13:44:11 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 29 May 2020 17:44:11 +0000 Subject: [issue24391] Better repr for threading objects In-Reply-To: <1433586102.76.0.662503832113.issue24391@psf.upfronthosting.co.za> Message-ID: <1590774251.49.0.451682486103.issue24391@roundup.psfhosted.org> Brett Cannon added the comment: Assigning to Serhiy in case he wants to finish this. ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 13:46:31 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 29 May 2020 17:46:31 +0000 Subject: [issue24165] Free list for single-digits ints In-Reply-To: <1431352769.3.0.375640200007.issue24165@psf.upfronthosting.co.za> Message-ID: <1590774391.82.0.593179038589.issue24165@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 13:47:00 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 29 May 2020 17:47:00 +0000 Subject: [issue23967] Make inspect.signature expression evaluation more powerful In-Reply-To: <1429123957.6.0.780975142449.issue23967@psf.upfronthosting.co.za> Message-ID: <1590774420.15.0.23723246179.issue23967@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 13:47:48 2020 From: report at bugs.python.org (Sylvain Corlay) Date: Fri, 29 May 2020 17:47:48 +0000 Subject: [issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone In-Reply-To: <1590773344.2.0.54481947952.issue37380@roundup.psfhosted.org> Message-ID: Sylvain Corlay added the comment: Yes, I understand that. I was wondering if there was a workaround that we could use to not drop 3.6 support right away! On Fri, May 29, 2020, 19:29 STINNER Victor wrote: > > STINNER Victor added the comment: > > Sadly, 3.6 no longer get bug fixes, only security fixes: > https://devguide.python.org/#status-of-python-branches > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 13:48:58 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 29 May 2020 17:48:58 +0000 Subject: [issue24048] remove_module() needs to save/restore exception state In-Reply-To: <1429855118.66.0.488857300303.issue24048@psf.upfronthosting.co.za> Message-ID: <1590774538.23.0.26126469235.issue24048@roundup.psfhosted.org> Brett Cannon added the comment: Assigning to Nick to decide if he wants to backport it to 3.7 before it's no longer possible. ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 13:49:12 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 29 May 2020 17:49:12 +0000 Subject: [issue24048] remove_module() needs to save/restore exception state In-Reply-To: <1429855118.66.0.488857300303.issue24048@psf.upfronthosting.co.za> Message-ID: <1590774552.12.0.282616677317.issue24048@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 14:04:01 2020 From: report at bugs.python.org (Andrius Gobis) Date: Fri, 29 May 2020 18:04:01 +0000 Subject: [issue40820] Mock Call attributes args and kwargs have no changeversion Message-ID: <1590775441.68.0.287476629705.issue40820@roundup.psfhosted.org> New submission from Andrius Gobis : In Python 3.8, the ``args`` and ``kwargs`` properties were added to Mock ``Call`` objects (PR: https://github.com/python/cpython/pull/11807 Issue: https://bugs.python.org/issue21269). However, the change did not add a change version to the documentation. The ``Doc/library/unittest.mock.rst`` file should include the following in the ``Call`` section: ``` The ``Doc/library/unittest.mock.rst`` file should include the following in the ``Call`` section: ``` .. versionchanged:: 3.8 Added the ``args`` and ``kwargs`` properties to more easily access the positional args and keyword args within a ``Call`` object tuple. ``` ---------- assignee: docs at python components: Documentation messages: 370330 nosy: Andrius Gobis, docs at python priority: normal severity: normal status: open title: Mock Call attributes args and kwargs have no changeversion type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 14:09:22 2020 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 29 May 2020 18:09:22 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1590775762.23.0.156631956978.issue33725@roundup.psfhosted.org> Barry A. Warsaw added the comment: I don't think there's really anything more to do here. I'm closing the issue. Let's open a new one if needed at some future point. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 14:16:00 2020 From: report at bugs.python.org (Roundup Robot) Date: Fri, 29 May 2020 18:16:00 +0000 Subject: [issue40820] Mock Call attributes args and kwargs have no changeversion In-Reply-To: <1590775441.68.0.287476629705.issue40820@roundup.psfhosted.org> Message-ID: <1590776160.42.0.147515066236.issue40820@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 2.0 -> 3.0 pull_requests: +19763 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20519 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 14:53:49 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 29 May 2020 18:53:49 +0000 Subject: [issue40741] Upgrade to SQLite v3.32.1 in Windows and macOS builds In-Reply-To: <1590229958.06.0.659446886323.issue40741@roundup.psfhosted.org> Message-ID: <1590778429.02.0.518942408153.issue40741@roundup.psfhosted.org> Steve Dower added the comment: I've checked and merged the cpython-source-deps update. (For everyone's info, I downloaded the sources myself and checked hashes/etc. as per normal, even though I eventually merged the PR and tagged it manually.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 14:55:01 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 29 May 2020 18:55:01 +0000 Subject: [issue40741] Upgrade to SQLite v3.32.1 in Windows and macOS builds In-Reply-To: <1590229958.06.0.659446886323.issue40741@roundup.psfhosted.org> Message-ID: <1590778501.65.0.796125397428.issue40741@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Thanks, Steve! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 15:00:45 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 29 May 2020 19:00:45 +0000 Subject: [issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone In-Reply-To: <1561315344.64.0.509844893886.issue37380@roundup.psfhosted.org> Message-ID: <1590778845.25.0.84995375971.issue37380@roundup.psfhosted.org> Steve Dower added the comment: > import subprocess > subprocess._cleanup = lambda: None ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 15:01:58 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 29 May 2020 19:01:58 +0000 Subject: [issue40741] Upgrade to SQLite v3.32.1 in Windows and macOS builds In-Reply-To: <1590229958.06.0.659446886323.issue40741@roundup.psfhosted.org> Message-ID: <1590778918.2.0.226712727324.issue40741@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +19764 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20520 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 15:17:32 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 29 May 2020 19:17:32 +0000 Subject: [issue24048] remove_module() needs to save/restore exception state In-Reply-To: <1429855118.66.0.488857300303.issue24048@psf.upfronthosting.co.za> Message-ID: <1590779852.18.0.00722588983507.issue24048@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +19765 pull_request: https://github.com/python/cpython/pull/20521 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 15:35:28 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 29 May 2020 19:35:28 +0000 Subject: [issue24048] remove_module() needs to save/restore exception state In-Reply-To: <1429855118.66.0.488857300303.issue24048@psf.upfronthosting.co.za> Message-ID: <1590780928.46.0.820881207006.issue24048@roundup.psfhosted.org> miss-islington added the comment: New changeset 5aa40e587e63bcad22c7e196fc3559e2b5e0792b by Miss Islington (bot) in branch '3.7': bpo-24048: Save the live exception during import.c's remove_module() (GH-13005) https://github.com/python/cpython/commit/5aa40e587e63bcad22c7e196fc3559e2b5e0792b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 15:41:13 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 29 May 2020 19:41:13 +0000 Subject: [issue20353] Hanging bug with multiprocessing + sqlite3 + tkinter (OS X 10.9 only) In-Reply-To: <1390415067.55.0.719190169135.issue20353@psf.upfronthosting.co.za> Message-ID: <1590781273.81.0.959234737002.issue20353@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 15:48:15 2020 From: report at bugs.python.org (Andrius Gobis) Date: Fri, 29 May 2020 19:48:15 +0000 Subject: [issue40820] Mock Call attributes args and kwargs have no changeversion In-Reply-To: <1590775441.68.0.287476629705.issue40820@roundup.psfhosted.org> Message-ID: <1590781695.74.0.82352969642.issue40820@roundup.psfhosted.org> Change by Andrius Gobis : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 16:31:30 2020 From: report at bugs.python.org (Manickaraja Kumarappan) Date: Fri, 29 May 2020 20:31:30 +0000 Subject: [issue40821] os.getlogin() not working Message-ID: <1590784290.42.0.113469889536.issue40821@roundup.psfhosted.org> New submission from Manickaraja Kumarappan : Hi, We are using below command to get the original login user. In some cases folks sudo as different user and run commands. In some cases folks use switch to different user (su - <>) and then run command. In all cases we would like to get original user who logged into the terminal to run the command. We are using below command to get the same. user=os.getlogin() We got three RHEL linux systems with Python 3 and strangely on two of them this command works fine. However only on third system it is failing with below error OSError: [Errno 6] No such device or address Not sure if it is some o/s env setup which is causing this command to fail. Any pointers to run this command will be of great help so that we can pin point the issue. Please note on faiing system if I do python and then run the command it works fine without any issue. However if it is triggered through our Scheduler (Control M) it is failing with above message. Give below is the command how Scheduler triggers the job. /bin/su - edwadm -c /bin/sh -x <> Thanks Manick. ---------- components: Extension Modules messages: 370336 nosy: Manickaraja Kumarappan priority: normal severity: normal status: open title: os.getlogin() not working type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 18:54:28 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 29 May 2020 22:54:28 +0000 Subject: [issue39885] IDLE right click outside of any selection should clear it In-Reply-To: <1583557689.84.0.838761374918.issue39885@roundup.psfhosted.org> Message-ID: <1590792868.43.0.253159615939.issue39885@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19766 pull_request: https://github.com/python/cpython/pull/20522 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 18:54:35 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 29 May 2020 22:54:35 +0000 Subject: [issue39885] IDLE right click outside of any selection should clear it In-Reply-To: <1583557689.84.0.838761374918.issue39885@roundup.psfhosted.org> Message-ID: <1590792875.7.0.33284083296.issue39885@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19767 pull_request: https://github.com/python/cpython/pull/20523 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 18:54:42 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 29 May 2020 22:54:42 +0000 Subject: [issue39885] IDLE right click outside of any selection should clear it In-Reply-To: <1583557689.84.0.838761374918.issue39885@roundup.psfhosted.org> Message-ID: <1590792882.79.0.164688675817.issue39885@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19768 pull_request: https://github.com/python/cpython/pull/20524 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 19:01:23 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 29 May 2020 23:01:23 +0000 Subject: [issue40819] IDLE: Test right-click and context menu tests In-Reply-To: <1590770371.71.0.221082302956.issue40819@roundup.psfhosted.org> Message-ID: <1590793283.0.0.332088377224.issue40819@roundup.psfhosted.org> Terry J. Reedy added the comment: Thanks for the report. I verified the context menu defect on Windows and Mac Mohave. The menu and shortcuts still work on both. This regression was introduced by the first PR for #39885. I mistakenly delayed the fixer, PR-18951, to finish new tests. (On current Win10, disabled items are nearly black dark gray that I easily confuse with enabled black. On Mac, the contrast between its light-medium gray and black is unmistakable.) I polished the fixer and merged it, with only manual testing, to immediately fix the regression. I re-labelled this issue to add an automated test that would have caught it. ---------- title: Idle Context Menu Copy/Cut Grayed Out -> IDLE: Test right-click and context menu tests versions: +Python 3.10, Python 3.7, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 18:54:18 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 29 May 2020 22:54:18 +0000 Subject: [issue39885] IDLE right click outside of any selection should clear it In-Reply-To: <1583557689.84.0.838761374918.issue39885@roundup.psfhosted.org> Message-ID: <1590792858.65.0.206133526387.issue39885@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 97e4e0f53d6690db6b942678489716a30925b8af by Terry Jan Reedy in branch 'master': bpo-39885: Make IDLE context menu cut and copy work again (GH-18951) https://github.com/python/cpython/commit/97e4e0f53d6690db6b942678489716a30925b8af ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 19:11:35 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 29 May 2020 23:11:35 +0000 Subject: [issue39885] IDLE right click outside of any selection should clear it In-Reply-To: <1583557689.84.0.838761374918.issue39885@roundup.psfhosted.org> Message-ID: <1590793895.56.0.770075291102.issue39885@roundup.psfhosted.org> miss-islington added the comment: New changeset 80b6a05d38ce34ef543a2376b8132eef4ada67ce by Miss Islington (bot) in branch '3.7': bpo-39885: Make IDLE context menu cut and copy work again (GH-18951) https://github.com/python/cpython/commit/80b6a05d38ce34ef543a2376b8132eef4ada67ce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 19:13:03 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 29 May 2020 23:13:03 +0000 Subject: [issue39885] IDLE right click outside of any selection should clear it In-Reply-To: <1583557689.84.0.838761374918.issue39885@roundup.psfhosted.org> Message-ID: <1590793983.45.0.0710527518927.issue39885@roundup.psfhosted.org> miss-islington added the comment: New changeset 3dcccd1186febe0bca5936aed750d55c68b78bcd by Miss Islington (bot) in branch '3.8': bpo-39885: Make IDLE context menu cut and copy work again (GH-18951) https://github.com/python/cpython/commit/3dcccd1186febe0bca5936aed750d55c68b78bcd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 19:13:25 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 29 May 2020 23:13:25 +0000 Subject: [issue39885] IDLE right click outside of any selection should clear it In-Reply-To: <1583557689.84.0.838761374918.issue39885@roundup.psfhosted.org> Message-ID: <1590794005.28.0.565676296965.issue39885@roundup.psfhosted.org> miss-islington added the comment: New changeset 9f3f70fd0b6922840b3ef8018c446a6c8ac74ece by Miss Islington (bot) in branch '3.9': bpo-39885: Make IDLE context menu cut and copy work again (GH-18951) https://github.com/python/cpython/commit/9f3f70fd0b6922840b3ef8018c446a6c8ac74ece ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 19:25:34 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 29 May 2020 23:25:34 +0000 Subject: [issue20353] Hanging bug with multiprocessing + sqlite3 + tkinter (OS X 10.9 only) In-Reply-To: <1390415067.55.0.719190169135.issue20353@psf.upfronthosting.co.za> Message-ID: <1590794734.65.0.541334903893.issue20353@roundup.psfhosted.org> Terry J. Reedy added the comment: hang.py uses the default multiprocessing start method, which was then 'fork'. It is now 'spawn' on macOS. And there have been many other changes. When I run the following from IDLE, it finishes immediately. import multiprocessing, sqlite3 def hang(): sqlite3.connect('/tmp/foo') if __name__ == '__main__': multiprocessing.Pool(2).apply_async(hang, []).get(999) print('done') Unless I am missing something, this should be closed as 'out of date'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 19:31:23 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 29 May 2020 23:31:23 +0000 Subject: [issue39885] IDLE right click outside of any selection should clear it In-Reply-To: <1583557689.84.0.838761374918.issue39885@roundup.psfhosted.org> Message-ID: <1590795083.23.0.958466253763.issue39885@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 19:48:42 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 29 May 2020 23:48:42 +0000 Subject: [issue39343] Travis CI: documentation job fails in library/nntplib.rst with random network issue on news.gmane.io In-Reply-To: <1579083774.85.0.947952738007.issue39343@roundup.psfhosted.org> Message-ID: <1590796122.47.0.770977778767.issue39343@roundup.psfhosted.org> Terry J. Reedy added the comment: gmane was down for maybe a day early this week. We should expect this to continue happening on and off, as it has for years (I use it daily). I suggest that we run the test when we can and skip (or connect elsewhere) when we cannot. try: s = NNTP('news.gmane.io') except ConnectionRefusedError as e: self.skipTest(f'Gmane down: {e}') ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 19:57:16 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 29 May 2020 23:57:16 +0000 Subject: [issue40133] Provide additional matchers for unittest.mock In-Reply-To: <1585735205.76.0.306632606173.issue40133@roundup.psfhosted.org> Message-ID: <1590796636.06.0.637339367003.issue40133@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 20:41:18 2020 From: report at bugs.python.org (Chris Meyer) Date: Sat, 30 May 2020 00:41:18 +0000 Subject: [issue39010] ProactorEventLoop raises unhandled ConnectionResetError In-Reply-To: <1575924458.67.0.403977169674.issue39010@roundup.psfhosted.org> Message-ID: <1590799278.18.0.665526366326.issue39010@roundup.psfhosted.org> Change by Chris Meyer : ---------- keywords: +patch pull_requests: +19769 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20525 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 20:57:03 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 30 May 2020 00:57:03 +0000 Subject: [issue40754] Test installers before releasing (ModuleNotFoundErrors) In-Reply-To: <1590324430.61.0.117510991737.issue40754@roundup.psfhosted.org> Message-ID: <1590800223.22.0.211679492991.issue40754@roundup.psfhosted.org> Terry J. Reedy added the comment: I verified that running tests for installed 64-bit 3.9.0b1 on Win10 is somewhat a joke. I got 22 failures. Multiple tests failed on missing _testinternalcapi, and at least 1 on _xxtestfuzz. Several tests had multiple failures and would need to be run individually and verbosely to see why. For instance, test_itertools tries to run test.support.__init__.checksizeof 4 times, and the latter imports _testinternalcapi, resulting is 4 failures. Release managers: I think installers should be run and the suite run with the result. This is not the first time a file has been omitted. One needed by IDLE was once omitted, I believe on Windows. There is now a test that reads it, but is useless unless run. (And I should add checks for all the other 'not .py' files.) honglei: Thank you for both posts. Next time, please remove the quoted message when replying by email. Once posted on the web page, below the quoted message, the quote becomes redundant noise. ---------- nosy: +lukasz.langa, ned.deily, pablogsal, terry.reedy title: ModuleNotFoundError: No module named '_testinternalcapi' under Win10 -> Test installers before releasing (ModuleNotFoundErrors) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 21:07:11 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 30 May 2020 01:07:11 +0000 Subject: [issue40759] Deprecate the symbol module In-Reply-To: <1590353506.35.0.123027767636.issue40759@roundup.psfhosted.org> Message-ID: <1590800831.93.0.972979623875.issue40759@roundup.psfhosted.org> Terry J. Reedy added the comment: If PEG does not use this file, then not deprecating it along with parser in 3.9 could be considered a bug. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 21:08:32 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 30 May 2020 01:08:32 +0000 Subject: [issue40754] Test installers before releasing (ModuleNotFoundErrors) In-Reply-To: <1590324430.61.0.117510991737.issue40754@roundup.psfhosted.org> Message-ID: <1590800912.83.0.204998045093.issue40754@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: We have a bunch of buildbots that test the installed Python. For instance, if you search for "installed" in https://buildbot.python.org/all/#/builders?tags=%2B3.x we have: aarch64 Fedora Rawhide Clang Installed 3.x aarch64 Fedora Stable Clang Installed 3.x AMD64 Fedora Rawhide Clang Installed 3.x AMD64 Fedora Stable Clang Installed 3.x PPC64LE Fedora Rawhide Clang Installed 3.x PPC64LE Fedora Stable Clang Installed 3.x s390x Fedora Clang Installed 3.x s390x Fedora Rawhide Clang Installed 3.x x86 Gentoo Installed with X So it seems that only Linux has "installed" builbot tests. I suppose the next step is adding some macOS and Windows ones. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 21:33:12 2020 From: report at bugs.python.org (Ned Deily) Date: Sat, 30 May 2020 01:33:12 +0000 Subject: [issue40754] Test installers before releasing (ModuleNotFoundErrors) In-Reply-To: <1590324430.61.0.117510991737.issue40754@roundup.psfhosted.org> Message-ID: <1590802392.02.0.559512171045.issue40754@roundup.psfhosted.org> Ned Deily added the comment: > So it seems that only Linux has "installed" builbot tests. I suppose the next step is adding some macOS and Windows ones. Having more buildbots test from "installed" locations, rather than the build directory, is good. But that's not the whole issue here. Those "installed" tests are only testing that a Python runs from an installed location on the same system it was built. The Windows and macOS installers use various packaging methods to provide complete Python installations, including binaries, that can be installed on other systems using various OS-native install methods familiar to users of each platform. And the binaries are generally built in such a way to support running on multiple release versions of its operating system. For example, the current Python installers for macOS from python.org are usable on macOS 10.9 through 10.15. To produce the various installer packages, there are other layers of tooling involved, say, on top of "make install" in the Unixy build process for macOS; something similar is true for Windows releases. FWIW, every macOS installer is test installed on a vanilla system, the whole standard test suite is run, and an IDLE smoke test is run to ensure there are no noticeable regressions before handing the build artifacts off to the release manager. Every installer is tested on at least one supported macOS version and usually more than one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 21:56:53 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 30 May 2020 01:56:53 +0000 Subject: [issue40762] Writing bytes using CSV module results in b prefixed strings In-Reply-To: <1590385758.36.0.528402625132.issue40762@roundup.psfhosted.org> Message-ID: <1590803813.55.0.979467061674.issue40762@roundup.psfhosted.org> Terry J. Reedy added the comment: I make 5 core developers who agree that csv should definitely *not* assume that bytes given to it represent encoded text, reverting to the confusion of Python 1 and 2. (And even it if did, it should not assume that the encoding of the given to it and the encoding of the file are the same, or even that all bytes given to it have the same encoding!) If a user does not like the current default wonky mixed ascii-hex string representation of bytes, the user should explicitly convert bytes to the representation they want. Here are just 3 examples, 2 with possible variations. >>> b'\xc2a9'.hex() # One might want to add prefix '0x' or r'\x'. 'c26139' # Or add a separator. >>> str(list(b'\xc2a9')) # One might want to change or strip brackets, '[194, 97, 57]' # change separator, or strip spaces. >>> b'\xc2a9'.decode('latin-1') '?a9' What is best depends on the expected reader of the output. Pandas users who don't like Pandas' csv output should talk to its authors. They are welcome to ask advice on python-list. Eric: I agree that adding 'strict=False' might be a good idea (in a new issue). ---------- nosy: +terry.reedy resolution: -> rejected stage: patch review -> resolved status: open -> closed type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 21:57:09 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 30 May 2020 01:57:09 +0000 Subject: [issue29017] Docs: PySide is provided by 'The Qt Company' and not by 'Nokia' In-Reply-To: <1482174228.93.0.510062905066.issue29017@psf.upfronthosting.co.za> Message-ID: <1590803829.88.0.632257804933.issue29017@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 4649202ea75d48e1496e99911709824ca2d3170e by Samuel Gaist in branch 'master': closes bpo-29017: Update the bindings for Qt information with PySide2 (GH-20149) https://github.com/python/cpython/commit/4649202ea75d48e1496e99911709824ca2d3170e ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 21:57:33 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 30 May 2020 01:57:33 +0000 Subject: [issue29017] Docs: PySide is provided by 'The Qt Company' and not by 'Nokia' In-Reply-To: <1482174228.93.0.510062905066.issue29017@psf.upfronthosting.co.za> Message-ID: <1590803853.17.0.881553205129.issue29017@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19771 pull_request: https://github.com/python/cpython/pull/20527 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 21:57:26 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 30 May 2020 01:57:26 +0000 Subject: [issue29017] Docs: PySide is provided by 'The Qt Company' and not by 'Nokia' In-Reply-To: <1482174228.93.0.510062905066.issue29017@psf.upfronthosting.co.za> Message-ID: <1590803846.25.0.0802660859454.issue29017@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +19770 pull_request: https://github.com/python/cpython/pull/20526 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 21:57:40 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 30 May 2020 01:57:40 +0000 Subject: [issue29017] Docs: PySide is provided by 'The Qt Company' and not by 'Nokia' In-Reply-To: <1482174228.93.0.510062905066.issue29017@psf.upfronthosting.co.za> Message-ID: <1590803860.07.0.0714816244061.issue29017@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19772 pull_request: https://github.com/python/cpython/pull/20528 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 22:03:14 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 30 May 2020 02:03:14 +0000 Subject: [issue29017] Docs: PySide is provided by 'The Qt Company' and not by 'Nokia' In-Reply-To: <1482174228.93.0.510062905066.issue29017@psf.upfronthosting.co.za> Message-ID: <1590804194.2.0.582981828857.issue29017@roundup.psfhosted.org> miss-islington added the comment: New changeset f165647e3d2addd03d0393f4f5d31bd1cc9b74a2 by Miss Islington (bot) in branch '3.7': closes bpo-29017: Update the bindings for Qt information with PySide2 (GH-20149) https://github.com/python/cpython/commit/f165647e3d2addd03d0393f4f5d31bd1cc9b74a2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 22:04:28 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 30 May 2020 02:04:28 +0000 Subject: [issue29017] Docs: PySide is provided by 'The Qt Company' and not by 'Nokia' In-Reply-To: <1482174228.93.0.510062905066.issue29017@psf.upfronthosting.co.za> Message-ID: <1590804268.68.0.95593859942.issue29017@roundup.psfhosted.org> miss-islington added the comment: New changeset 78cf711d1ff261b6be359d6c12f47dd0997546b2 by Miss Islington (bot) in branch '3.9': closes bpo-29017: Update the bindings for Qt information with PySide2 (GH-20149) https://github.com/python/cpython/commit/78cf711d1ff261b6be359d6c12f47dd0997546b2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 22:04:27 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 30 May 2020 02:04:27 +0000 Subject: [issue29017] Docs: PySide is provided by 'The Qt Company' and not by 'Nokia' In-Reply-To: <1482174228.93.0.510062905066.issue29017@psf.upfronthosting.co.za> Message-ID: <1590804267.78.0.268123824859.issue29017@roundup.psfhosted.org> miss-islington added the comment: New changeset ef2f9acf8fc813f66523e7702654f919d20ff0c3 by Miss Islington (bot) in branch '3.8': closes bpo-29017: Update the bindings for Qt information with PySide2 (GH-20149) https://github.com/python/cpython/commit/ef2f9acf8fc813f66523e7702654f919d20ff0c3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 22:09:04 2020 From: report at bugs.python.org (Tiago Illipronti Girardi) Date: Sat, 30 May 2020 02:09:04 +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: <1590804544.69.0.322763924261.issue38324@roundup.psfhosted.org> Change by Tiago Illipronti Girardi : ---------- nosy: +TIGirardi nosy_count: 7.0 -> 8.0 pull_requests: +19773 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20529 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 22:13:19 2020 From: report at bugs.python.org (Tiago Illipronti Girardi) Date: Sat, 30 May 2020 02:13:19 +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: <1590804799.75.0.807480838498.issue38324@roundup.psfhosted.org> Change by Tiago Illipronti Girardi : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 22:14:20 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 30 May 2020 02:14:20 +0000 Subject: [issue40770] RFE: Run linkchecker on documentation on the CI In-Reply-To: <1590422942.58.0.668271802455.issue40770@roundup.psfhosted.org> Message-ID: <1590804860.61.0.52122365582.issue40770@roundup.psfhosted.org> Terry J. Reedy added the comment: Something rebuilds the online docs once a day. That same something might be appropriate for running a link checker (including external links) once a week, say. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 22:45:41 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 30 May 2020 02:45:41 +0000 Subject: [issue40804] Bug report in python3.6.8 using argparse module In-Reply-To: <1590660145.62.0.878153960448.issue40804@roundup.psfhosted.org> Message-ID: <1590806741.44.0.375083450931.issue40804@roundup.psfhosted.org> Terry J. Reedy added the comment: 3.6 has only gotten security fixed for 1.5 years. We need a test file that can be run as is in the master branch to see if there is a current bug. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 22:49:41 2020 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 30 May 2020 02:49:41 +0000 Subject: [issue35621] asyncio.create_subprocess_exec() only works with main event loop In-Reply-To: <1546210778.19.0.43686311162.issue35621@roundup.psfhosted.org> Message-ID: <1590806981.5.0.793552115414.issue35621@roundup.psfhosted.org> Kyle Stanley added the comment: > is there a workaround for earlier Python versions that does not involve patching the standard library? You could potentially try using the new default watcher, `ThreadedChildWatcher`, by implementing it locally and setting it as the child watcher to use (instead of `SafeChildWatcher`) with `set_child_watcher()`. AFAICT, the current implementation should work well for earlier versions of Python that don't have it, we just can't include it earlier than 3.8 since it's a new feature. See https://github.com/python/cpython/blob/4649202ea75d48e1496e99911709824ca2d3170e/Lib/asyncio/unix_events.py#L1326 for reference. ---------- nosy: +aeros _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 29 23:01:56 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 30 May 2020 03:01:56 +0000 Subject: [issue40805] Can no longer patch flask.g In-Reply-To: <1590668397.14.0.891806096405.issue40805@roundup.psfhosted.org> Message-ID: <1590807716.58.0.753554131312.issue40805@roundup.psfhosted.org> Terry J. Reedy added the comment: Sorry, but I believe you were misdirected*. mock, as opposed to unittest.mock, pytest, flask, and werkzeug are 3rd party modules. The error report seems to be missing part of the stacktrace at both ends. What line is your file resulted in the error? (This time we can guess == @patch. @What called _lookup_app_object in flask? (I have no idea.) However, once contextlib._GeneratorContextManager calls next(self.gen), the rest of the trace is outside the stdlib. At the end, the RuntimeError is raised by flask, not by python, because the flask _app_ctx_stack.top does not exist. If you do not understand their error message, ask flask people. * I assume that cjw296 *glanced* at your report, saw 'RuntimeError', and too quickly assumed 'cpython error'. flask could have defined, for instance, FlaskRuntimeError for its error reporting. ---------- nosy: +terry.reedy resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 01:00:15 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 30 May 2020 05:00:15 +0000 Subject: [issue37824] IDLE: Handle Shell input warnings properly. In-Reply-To: <1565541132.63.0.273797082992.issue37824@roundup.psfhosted.org> Message-ID: <1590814815.38.0.60985216698.issue37824@roundup.psfhosted.org> Terry J. Reedy added the comment: To review: Serhiy reported 3 'IDLE' bugs: tripled DeprecationWarning (now joined by SyntaxWarning), printing to console (if available) instead of Shell, and an exit exception. 1. Codeop generates the tripicates; #40807 will fix that. 2. PR-15311 prints warnings to Shell, but I held off pending some fix. 3. The exception (a duplicate report) was fixed on #35623. 4. PR-15500 stopped turning a SyntaxWarning into a SyntaxError. Additional issues, semi-independent. 5. REPL prints warning after code, IDLE before 6. REPL prints 1 line, IDLE 4, but this is related to Shell warnings going to the console. IDLE should use 1 and highlight. 7. Should IDLE extend scope of deduplication? Yes with 4 lines, maybe not with 1 line. 8. REPL partially deduplicates within compound statement; see #40807. ---------- versions: -Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 01:09:07 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 30 May 2020 05:09:07 +0000 Subject: [issue37824] IDLE: Handle Shell input warnings properly. In-Reply-To: <1565541132.63.0.273797082992.issue37824@roundup.psfhosted.org> Message-ID: <1590815347.95.0.891340080366.issue37824@roundup.psfhosted.org> Terry J. Reedy added the comment: The new items can be new issues, with 6 maybe the highest priority. Currently :1: DeprecationWarning: invalid escape sequence \e becomes Warning (from warnings module): File "", line 1 '\e' DeprecationWarning: invalid escape sequence \e For both Shell and Editor input, the Warning Line is not really needed. For Shell, the fake filename is not needed, nor is the line # and line if somehow otherwise marked. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 02:06:29 2020 From: report at bugs.python.org (Daniel Jewell) Date: Sat, 30 May 2020 06:06:29 +0000 Subject: [issue27580] CSV Null Byte Error In-Reply-To: <1469077368.13.0.160030895608.issue27580@psf.upfronthosting.co.za> Message-ID: <1590818789.14.0.720058282601.issue27580@roundup.psfhosted.org> Daniel Jewell added the comment: Forgive my frustration, but @Skip I really don't see how the definition of CSV relating to Excel (or Gnumeric or LibreOffice) has any relevance as to whether or not the module (and perhaps Python more generally) supports chr(0x00) as a delimiter. (Neither you nor I get to decide how someone else might write output data...) While the module is called CSV, it's really not just *Comma* Separated Values - rather it's a rough approximation of a database table with an optional header row where rows/records are separated by and fields are separated by . Sometimes the record separator is chr(0x2c) (e.g. a comma) sometimes it's chr(0x09) (e.g. a tab - or in ASCII parlance "Horizontal Tab/HT") ... or maybe even the actual ASCII "Record Separator" character (e.g. chr(0x1e)) ... or maybe NUL chr(0x00). (1) The module should be 100% agnostic about the separator - the current (3.8.3) error text when trying to use csv.reader(..., delimiter=chr(0x00)) is "TypeError: "delimiter" must be a 1-character string" ... well, chr(0x00) *is* a 1-character string. It's not a 1-character *printable* string... But then again neither is chr(0x1e) (ASCII "RS" Record Separator) .. and csv.reader(..., delimiter=chr(0x1e)) appears to work (I haven't tried actual data yet). (1a) The use of chr(0x00) or '\0' is used quite often in the *NIX world as a convenient record separator that doesn't have escaping problems because by it's very nature it's non-printable. e.g. "find . -iname "*something*" -print0 | xargs -0 " ... As to the difficulty in handling 0x00 characters, I dunno ... it appears that GNU find, xargs, gawk... same with FreeBSD. FreeBSD writes the output for "-print0" like this: https://github.com/freebsd/freebsd/blob/508f3673dec94b03f89b9ce9569390d6d9b86a89/usr.bin/find/function.c#L1383 ... and bsd xargs handles it too. I haven't looked at the CPython source to see what's going on - it might be tricky to modify the code to support this... (but then again, IMHO, this sort of thing should have been a consideration in the first place....) I suppose in many ways, the very existence of this specific issue at all is just one example of what seems to be a larger issue with Python's overall development: It's a great language for *many* things and in many ways. But I've run into so many little fringe "gotchas" where something doesn't work or is limited in some way because, seemingly, functionality is designed around/defined by a practical-example-use-case and not what is or might be *possible* (e.g. the CSV-as-only-a-spreadsheet-interface example -- and I really *don't* mean that as a personal attack @Skip - I am very appreciative of the time and effort you and everyone has poured into the project...) Is it possible to write a NUL (0x00) character to a file? Through a *NIX pipe? You bet. (I got a little rant-y .. sorry... I'm sure there's a _lot_ more going on underneath the covers and there are a lot of factors - not limited to just the csv module - as you mentioned. I just really feel like something is "off". Maybe it's my brain - ha. :)) ---------- nosy: +danieljewell type: enhancement -> behavior versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 03:11:48 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sat, 30 May 2020 07:11:48 +0000 Subject: [issue40810] sqlite3 test CheckTraceCallbackContent fails for sqlite v3.7.3 through 3.7.14.1 In-Reply-To: <1590688058.38.0.22519081316.issue40810@roundup.psfhosted.org> Message-ID: <1590822708.65.0.386804612096.issue40810@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +19774 pull_request: https://github.com/python/cpython/pull/20530 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 03:47:38 2020 From: report at bugs.python.org (Julien Palard) Date: Sat, 30 May 2020 07:47:38 +0000 Subject: [issue40798] The deprecated-removed Sphinx extension need to change the error message based on the Python version In-Reply-To: <1590616618.29.0.703498404088.issue40798@roundup.psfhosted.org> Message-ID: <1590824858.79.0.600408490744.issue40798@roundup.psfhosted.org> Julien Palard added the comment: New changeset 735d902b363b759df9ff00e58bbf4f7e2bde78cd by Florian Dahlitz in branch 'master': bpo-40798: Generate a different message for already removed elements (GH-20483) https://github.com/python/cpython/commit/735d902b363b759df9ff00e58bbf4f7e2bde78cd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 03:47:49 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 30 May 2020 07:47:49 +0000 Subject: [issue40798] The deprecated-removed Sphinx extension need to change the error message based on the Python version In-Reply-To: <1590616618.29.0.703498404088.issue40798@roundup.psfhosted.org> Message-ID: <1590824869.1.0.968978590387.issue40798@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +19775 pull_request: https://github.com/python/cpython/pull/20531 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 03:48:03 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 30 May 2020 07:48:03 +0000 Subject: [issue40798] The deprecated-removed Sphinx extension need to change the error message based on the Python version In-Reply-To: <1590616618.29.0.703498404088.issue40798@roundup.psfhosted.org> Message-ID: <1590824883.63.0.225458223517.issue40798@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19777 pull_request: https://github.com/python/cpython/pull/20533 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 03:47:56 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 30 May 2020 07:47:56 +0000 Subject: [issue40798] The deprecated-removed Sphinx extension need to change the error message based on the Python version In-Reply-To: <1590616618.29.0.703498404088.issue40798@roundup.psfhosted.org> Message-ID: <1590824876.19.0.392739008761.issue40798@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19776 pull_request: https://github.com/python/cpython/pull/20532 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 03:49:32 2020 From: report at bugs.python.org (Julien Palard) Date: Sat, 30 May 2020 07:49:32 +0000 Subject: [issue40798] The deprecated-removed Sphinx extension need to change the error message based on the Python version In-Reply-To: <1590616618.29.0.703498404088.issue40798@roundup.psfhosted.org> Message-ID: <1590824972.6.0.966992798307.issue40798@roundup.psfhosted.org> Change by Julien Palard : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 03:50:16 2020 From: report at bugs.python.org (Julien Palard) Date: Sat, 30 May 2020 07:50:16 +0000 Subject: [issue40798] The deprecated-removed Sphinx extension need to change the error message based on the Python version In-Reply-To: <1590616618.29.0.703498404088.issue40798@roundup.psfhosted.org> Message-ID: <1590825016.67.0.325169062816.issue40798@roundup.psfhosted.org> Julien Palard added the comment: Thanks @R?mi for this great idea and Florian for the implementation! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 03:51:26 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 May 2020 07:51:26 +0000 Subject: [issue24391] Better repr for threading objects In-Reply-To: <1433586102.76.0.662503832113.issue24391@psf.upfronthosting.co.za> Message-ID: <1590825086.26.0.0704785835385.issue24391@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +19778 pull_request: https://github.com/python/cpython/pull/20534 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 03:52:31 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 30 May 2020 07:52:31 +0000 Subject: [issue40798] The deprecated-removed Sphinx extension need to change the error message based on the Python version In-Reply-To: <1590616618.29.0.703498404088.issue40798@roundup.psfhosted.org> Message-ID: <1590825151.02.0.582771917888.issue40798@roundup.psfhosted.org> miss-islington added the comment: New changeset a9dbae434f26b2c419a1cd0a8233143f40fd00db by Miss Islington (bot) in branch '3.7': bpo-40798: Generate a different message for already removed elements (GH-20483) https://github.com/python/cpython/commit/a9dbae434f26b2c419a1cd0a8233143f40fd00db ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 03:54:33 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 30 May 2020 07:54:33 +0000 Subject: [issue40798] The deprecated-removed Sphinx extension need to change the error message based on the Python version In-Reply-To: <1590616618.29.0.703498404088.issue40798@roundup.psfhosted.org> Message-ID: <1590825273.87.0.730164130079.issue40798@roundup.psfhosted.org> miss-islington added the comment: New changeset 588efc29c5dc4ffaac116a214d13cca936e346a9 by Miss Islington (bot) in branch '3.9': bpo-40798: Generate a different message for already removed elements (GH-20483) https://github.com/python/cpython/commit/588efc29c5dc4ffaac116a214d13cca936e346a9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 03:55:02 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 30 May 2020 07:55:02 +0000 Subject: [issue40798] The deprecated-removed Sphinx extension need to change the error message based on the Python version In-Reply-To: <1590616618.29.0.703498404088.issue40798@roundup.psfhosted.org> Message-ID: <1590825302.25.0.746738608471.issue40798@roundup.psfhosted.org> miss-islington added the comment: New changeset ba1c2c85b39fbcb31584c20f8a63fb87f9cb9c02 by Miss Islington (bot) in branch '3.8': bpo-40798: Generate a different message for already removed elements (GH-20483) https://github.com/python/cpython/commit/ba1c2c85b39fbcb31584c20f8a63fb87f9cb9c02 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 04:22:06 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 30 May 2020 08:22:06 +0000 Subject: [issue40061] Possible refleak in _asynciomodule.c future_add_done_callback() In-Reply-To: <1585129013.48.0.185605805596.issue40061@roundup.psfhosted.org> Message-ID: <1590826926.32.0.440913699621.issue40061@roundup.psfhosted.org> miss-islington added the comment: New changeset 7b78e7f9fd77bb3280ee39fb74b86772a7d46a70 by Zackery Spytz in branch 'master': bpo-40061: Fix a possible refleak in _asynciomodule.c (GH-19748) https://github.com/python/cpython/commit/7b78e7f9fd77bb3280ee39fb74b86772a7d46a70 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 04:25:36 2020 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 30 May 2020 08:25:36 +0000 Subject: [issue40061] Possible refleak in _asynciomodule.c future_add_done_callback() In-Reply-To: <1585129013.48.0.185605805596.issue40061@roundup.psfhosted.org> Message-ID: <1590827136.08.0.698162940632.issue40061@roundup.psfhosted.org> Kyle Stanley added the comment: Thanks for the PR, Zackery. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 05:01:45 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sat, 30 May 2020 09:01:45 +0000 Subject: [issue40822] Drop support for SQLite 3.7.15 Message-ID: <1590829305.32.0.448529686599.issue40822@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : Ref. bpo-40810 and GH-20330 ---------- components: Library (Lib) messages: 370367 nosy: erlendaasland priority: normal severity: normal status: open title: Drop support for SQLite 3.7.15 versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 05:09:14 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sat, 30 May 2020 09:09:14 +0000 Subject: [issue40822] Drop support for SQLite pre 3.7.15 In-Reply-To: <1590829305.32.0.448529686599.issue40822@roundup.psfhosted.org> Message-ID: <1590829754.51.0.0904054122889.issue40822@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- title: Drop support for SQLite 3.7.15 -> Drop support for SQLite pre 3.7.15 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 06:35:56 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sat, 30 May 2020 10:35:56 +0000 Subject: [issue40759] Deprecate the symbol module In-Reply-To: <1590353506.35.0.123027767636.issue40759@roundup.psfhosted.org> Message-ID: <1590834956.34.0.749081308248.issue40759@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 06:42:18 2020 From: report at bugs.python.org (Rob Taft) Date: Sat, 30 May 2020 10:42:18 +0000 Subject: [issue40805] Can no longer patch flask.g In-Reply-To: <1590807716.58.0.753554131312.issue40805@roundup.psfhosted.org> Message-ID: Rob Taft added the comment: The test was supposed to patch the flask component during the unit test, the error indicates the patch did not work. The actual error message is not relevant to the actual issue. I don't know why I was directed to here. When I replace it with unittest.mock, it appears to work fine, so my solution might end up being to dump the 3rd party mock library. On Fri, May 29, 2020 at 11:02 PM Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > Sorry, but I believe you were misdirected*. mock, as opposed to > unittest.mock, pytest, flask, and werkzeug are 3rd party modules. The > error report seems to be missing part of the stacktrace at both ends. What > line is your file resulted in the error? (This time we can guess == > @patch. @What called _lookup_app_object in flask? (I have no idea.) > > However, once contextlib._GeneratorContextManager calls next(self.gen), > the rest of the trace is outside the stdlib. At the end, the RuntimeError > is raised by flask, not by python, because the flask _app_ctx_stack.top > does not exist. If you do not understand their error message, ask flask > people. > > * I assume that cjw296 *glanced* at your report, saw 'RuntimeError', and > too quickly assumed 'cpython error'. flask could have defined, for > instance, FlaskRuntimeError for its error reporting. > > ---------- > nosy: +terry.reedy > resolution: -> third party > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 06:52:09 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sat, 30 May 2020 10:52:09 +0000 Subject: [issue40810] sqlite3 test CheckTraceCallbackContent fails for sqlite v3.7.3 through 3.7.14.1 In-Reply-To: <1590688058.38.0.22519081316.issue40810@roundup.psfhosted.org> Message-ID: <1590835929.5.0.504425402077.issue40810@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 07:24:08 2020 From: report at bugs.python.org (Christian Heimes) Date: Sat, 30 May 2020 11:24:08 +0000 Subject: [issue40821] os.getlogin() not working In-Reply-To: <1590784290.42.0.113469889536.issue40821@roundup.psfhosted.org> Message-ID: <1590837848.11.0.207126480563.issue40821@roundup.psfhosted.org> Christian Heimes added the comment: On POSIX os.getlogin() is a thin wrapper around the glibc function getlogin() https://linux.die.net/man/3/getlogin . The error is coming from glibc. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 07:33:29 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sat, 30 May 2020 11:33:29 +0000 Subject: [issue27580] CSV Null Byte Error In-Reply-To: <1469077368.13.0.160030895608.issue27580@psf.upfronthosting.co.za> Message-ID: <1590838409.53.0.922529081336.issue27580@roundup.psfhosted.org> R?mi Lapeyre added the comment: I feel like the CSV module could support using NULL as separator and could send a PR with some test to add this but Daniel could you give more information regarding why you need explicit CSV support for this? The CSV parser is needed to read and write CSV files to can be produced by other programs and has been extended to support the various dialects, most of them produced by spreadsheet programs. > The use of chr(0x00) or '\0' is used quite often in the *NIX world as a convenient record separator that doesn't have escaping problems because by it's very nature it's non-printable. e.g. "find . -iname "*something*" -print0 | xargs -0 " ... > > As to the difficulty in handling 0x00 characters, I dunno ... it appears that GNU find, xargs, gawk... > Is it possible to write a NUL (0x00) character to a file? Through a *NIX pipe? You bet. Yes and all of those are supported natively by Python already: find . -type f -depth 1 -print0 | python -c "from pprint import pp; pp(input().split('\x00'))" Multilines input can be supported as easily doing: data = [ line.split('\x00') for line in input() ] Is this not enough? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 07:35:53 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sat, 30 May 2020 11:35:53 +0000 Subject: [issue40823] Don't use obsolete unittest.makeSuite() in sqlite3 tests Message-ID: <1590838553.12.0.97963003429.issue40823@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : Use `loadTestsFromTestCase()` iso. `makeSuite()` in sqlite3 tests. Implies changing the prefix for all test methods. Ref. bpo-5846 ---------- components: Tests messages: 370371 nosy: erlendaasland priority: normal severity: normal status: open title: Don't use obsolete unittest.makeSuite() in sqlite3 tests versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 07:36:12 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 May 2020 11:36:12 +0000 Subject: [issue40824] Unexpected errors in __iter__ are masked in "in" and the operator module Message-ID: <1590838572.36.0.635736065326.issue40824@roundup.psfhosted.org> New submission from Serhiy Storchaka : All errors raised in the __iter__ method are masked by the TypeError exception in the "in" operator and functions operator.contains(), operator.indexOf() and operator.countOf(). >>> class BadIterable: ... def __iter__(self): ... 1/0 ... >>> >>> 1 in BadIterable() Traceback (most recent call last): File "", line 1, in TypeError: argument of type 'BadIterable' is not iterable It includes exceptions out of control of the programmer like MemoryError and KeyboardInterrupt. Converting them to TypeError can lead to weird errors or incorrect results. See also similar issue26407. ---------- components: Interpreter Core messages: 370372 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Unexpected errors in __iter__ are masked in "in" and the operator module type: behavior versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 07:40:43 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 May 2020 11:40:43 +0000 Subject: [issue26407] csv.writer.writerows masks exceptions from __iter__ In-Reply-To: <1456144733.82.0.26880413097.issue26407@psf.upfronthosting.co.za> Message-ID: <1590838843.96.0.364264376157.issue26407@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch nosy: +serhiy.storchaka nosy_count: 2.0 -> 3.0 pull_requests: +19779 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/20536 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 07:40:58 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sat, 30 May 2020 11:40:58 +0000 Subject: [issue27580] CSV Null Byte Error In-Reply-To: <1469077368.13.0.160030895608.issue27580@psf.upfronthosting.co.za> Message-ID: <1590838858.54.0.744903534259.issue27580@roundup.psfhosted.org> R?mi Lapeyre added the comment: Writing to those files is obviously as easy, since like you said "because by it's very nature it's non-printable" and you will probably not find it in your data: with open('file', 'w') as f: f.write('\x00'.join(data)) It will break if there is a NULL byte in your data, and CSV would quote the element properly instead, but so would "find . -iname "*something*" -print0 | xargs -0 " if one of the file had a NULL byte in their name. I don't think Python is being unreasonable here, especially considering it has the same drawbacks as the other Unix utilities. If those solutions to read and write NULL separated files are not enough for your use-case, please give more information so that it can be supported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 07:41:48 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 May 2020 11:41:48 +0000 Subject: [issue40824] Unexpected errors in __iter__ are masked in "in" and the operator module In-Reply-To: <1590838572.36.0.635736065326.issue40824@roundup.psfhosted.org> Message-ID: <1590838908.52.0.095988600878.issue40824@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +19780 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20537 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 07:43:45 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sat, 30 May 2020 11:43:45 +0000 Subject: [issue40823] Don't use obsolete unittest.makeSuite() in sqlite3 tests In-Reply-To: <1590838553.12.0.97963003429.issue40823@roundup.psfhosted.org> Message-ID: <1590839025.14.0.363721694337.issue40823@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +19781 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20538 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 07:45:12 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 May 2020 11:45:12 +0000 Subject: [issue26407] csv.writer.writerows masks exceptions from __iter__ In-Reply-To: <1456144733.82.0.26880413097.issue26407@psf.upfronthosting.co.za> Message-ID: <1590839112.83.0.527852781226.issue26407@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is definitely a bug. It can mask exceptions out of the control of the programmer like MemoryError and KeyboardInterrupt. ---------- components: +Library (Lib) type: enhancement -> behavior versions: +Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 07:56:29 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 May 2020 11:56:29 +0000 Subject: [issue26407] csv.writer.writerows masks exceptions from __iter__ In-Reply-To: <1456144733.82.0.26880413097.issue26407@psf.upfronthosting.co.za> Message-ID: <1590839789.65.0.74184077072.issue26407@roundup.psfhosted.org> Serhiy Storchaka added the comment: This bug occurred not only in writerows(), but also in writerow() and csv.reader(). See also more general issue40824. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 08:00:39 2020 From: report at bugs.python.org (Skip Montanaro) Date: Sat, 30 May 2020 12:00:39 +0000 Subject: [issue27580] CSV Null Byte Error In-Reply-To: <1469077368.13.0.160030895608.issue27580@psf.upfronthosting.co.za> Message-ID: <1590840039.01.0.471673649812.issue27580@roundup.psfhosted.org> Skip Montanaro added the comment: I'm sorry, but why is this issue coming up again after nearly four years? Especially without a patch? (I apologize. I've gotten a bit more grumpy as I've aged.) Let me summarize a bit of history. Back in the early 2000s, Dave Cole at Object Craft in Australia implemented a C-based CSV module for Python. I don't know exactly what version was his initial target, but I have a vague memory that it was Python 1.5-ish. A few years later that was cleaned up and adapted for inclusion into the Python standard library, being added to Python 2.3. I helped with some of the Python stuff and steered it into the core. Much later (Python 3.x - with the great Unicode unification), it acquired Unicode support. At the time of creation, the only "standard" for CSV files was what Excel could read and write. One of the initial requirements as I recall was that CSV files generated by the module had to be able to survive a round trip to Excel and back. As I indicated in at least one of my previous messages to this thread, knowing how Excel handles CSV files with NUL bytes would be (at least) interesting. I still think so. Can anyone test that? I'm not trying to suggest that gracefully handling NUL bytes wouldn't be useful in certain contexts (I also use find with -print0 routinely to preserve filenames with spaces), and if the CSV module was being written from scratch today, perhaps NUL support would be included. I am happy with the current CSV module as it exists today. I still use it routinely. Adding NUL support wouldn't scratch any itch I have. If you want NUL byte support, either as a delimiter or as a character in a cell, I think you're going to have to submit a patch. Otherwise I suggest this be closed rather than languishing for another four years. ---------- nosy: -remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 08:08:21 2020 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 30 May 2020 12:08:21 +0000 Subject: [issue31869] commentary on ssl.PROTOCOL_TLS In-Reply-To: <1508947295.4.0.213398074469.issue31869@psf.upfronthosting.co.za> Message-ID: <1590840501.2.0.361939194277.issue31869@roundup.psfhosted.org> Zackery Spytz added the comment: Python 2 is EOL. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 08:10:31 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sat, 30 May 2020 12:10:31 +0000 Subject: [issue40696] exception chain cycles cause hangs (was "Exception handling with "await" can hang in Python3.9.0b1") In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1590840631.21.0.414116802269.issue40696@roundup.psfhosted.org> Change by Dennis Sweeney : ---------- pull_requests: +19782 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20539 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 08:21:51 2020 From: report at bugs.python.org (Christian Heimes) Date: Sat, 30 May 2020 12:21:51 +0000 Subject: [issue31869] commentary on ssl.PROTOCOL_TLS In-Reply-To: <1508947295.4.0.213398074469.issue31869@psf.upfronthosting.co.za> Message-ID: <1590841311.0.0.113441827176.issue31869@roundup.psfhosted.org> Christian Heimes added the comment: SSL is dead, too! ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 08:28:54 2020 From: report at bugs.python.org (Skip Montanaro) Date: Sat, 30 May 2020 12:28:54 +0000 Subject: [issue27580] CSV Null Byte Error In-Reply-To: <1469077368.13.0.160030895608.issue27580@psf.upfronthosting.co.za> Message-ID: <1590841734.78.0.687021451485.issue27580@roundup.psfhosted.org> Skip Montanaro added the comment: Looks like my comment removed Remi from the nosy list. Restoring that... ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 08:31:33 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 30 May 2020 12:31:33 +0000 Subject: [issue40825] Add a "strict" parameter to csv.writer and csv.DictWriter Message-ID: <1590841893.39.0.979050889653.issue40825@roundup.psfhosted.org> New submission from Eric V. Smith : Currently, the csv library calls str() on each value it writes. This can lead to surprising behavior, see issue40762 for example. On the other hand, for writing the documentation says that the values must be strings or numbers. The proposed "strict" argument would raise a TypeError if the supplied values are not strings, numbers, or None. See https://github.com/python/cpython/blob/ba1c2c85b39fbcb31584c20f8a63fb87f9cb9c02/Modules/_csv.c#L1203 for where str() is called. The documentation should be changed to note that None is allowed. Currently, None results in an empty string. I'm not proposing to change this, just document it as one of the allowed types. How to check for "value is a number" needs to be decided. ---------- messages: 370380 nosy: eric.smith priority: normal severity: normal status: open title: Add a "strict" parameter to csv.writer and csv.DictWriter type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 08:32:16 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 30 May 2020 12:32:16 +0000 Subject: [issue40762] Writing bytes using CSV module results in b prefixed strings In-Reply-To: <1590385758.36.0.528402625132.issue40762@roundup.psfhosted.org> Message-ID: <1590841936.94.0.0877882482205.issue40762@roundup.psfhosted.org> Eric V. Smith added the comment: I've created issue40825 for adding a "strict" parameter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 08:32:47 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 30 May 2020 12:32:47 +0000 Subject: [issue40825] Add a "strict" parameter to csv.writer and csv.DictWriter In-Reply-To: <1590841893.39.0.979050889653.issue40825@roundup.psfhosted.org> Message-ID: <1590841967.57.0.404352801201.issue40825@roundup.psfhosted.org> Eric V. Smith added the comment: For backward compatibility, strict would have to default to False. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 08:35:17 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sat, 30 May 2020 12:35:17 +0000 Subject: [issue40696] exception chain cycles cause hangs (was "Exception handling with "await" can hang in Python3.9.0b1") In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1590842117.91.0.80804038483.issue40696@roundup.psfhosted.org> Dennis Sweeney added the comment: I believe PR 20539 solves the more general problem (using Floyd's Tortoise and Hare Algorithm), and I would appreciate review / some more ideas for test cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 09:02:49 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 May 2020 13:02:49 +0000 Subject: [issue26369] unicode.decode and str.encode are unnecessarily confusing for non-ascii In-Reply-To: <1455623938.04.0.928922751587.issue26369@psf.upfronthosting.co.za> Message-ID: <1590843769.75.0.0759540114181.issue26369@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 09:25:58 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sat, 30 May 2020 13:25:58 +0000 Subject: [issue27580] CSV Null Byte Error In-Reply-To: <1469077368.13.0.160030895608.issue27580@psf.upfronthosting.co.za> Message-ID: <1590845158.7.0.31840600173.issue27580@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi Skip, I'm on a Mac so I tried Numbers, the spreadsheet tool that comes with MacOS: Opening and exporting to CSV again works: ? ~ cat -v ~/Documents/nul.csv abc;def;1234.5;^@^M a-c;d^@f;1234.5;^@^M ABC;DEF;1.5;^@ When exporting to TSV, it makes the correct changes: ? ~ cat -v ~/Documents/nul.tsv abc def 1234.5 ^M a-c d^@f 1234.5 ^@^M ABC DEF 1.5 ^@ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 10:01:41 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 May 2020 14:01:41 +0000 Subject: [issue40696] exception chain cycles cause hangs (was "Exception handling with "await" can hang in Python3.9.0b1") In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1590847301.46.0.794993320594.issue40696@roundup.psfhosted.org> Serhiy Storchaka added the comment: I it related to issue25782? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 10:19:46 2020 From: report at bugs.python.org (Jelle Zijlstra) Date: Sat, 30 May 2020 14:19:46 +0000 Subject: [issue40826] Segfaults on io.FileIO(0).name in 3.9 Message-ID: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> New submission from Jelle Zijlstra : $ gdb ./python ... (gdb) r ... Python 3.9.0b1 (tags/v3.9.0b1:97fe9cfd9f8, May 30 2020, 05:26:48) ... >>> import io >>> io.FileIO(0).name 0 >>> Program received signal SIGSEGV, Segmentation fault. _PyInterpreterState_GET () at ./Include/internal/pycore_pystate.h:100 100 return tstate->interp; (gdb) bt #0 _PyInterpreterState_GET () at ./Include/internal/pycore_pystate.h:100 #1 PyOS_InterruptOccurred () at ./Modules/signalmodule.c:1785 #2 0x0000000000673905 in my_fgets (buf=buf at entry=0xa40780 "8LJ\367\377\177", len=len at entry=100, fp=fp at entry=0x7ffff74a48e0 <_IO_2_1_stdin_>) at Parser/myreadline.c:87 #3 0x000000000067397b in PyOS_StdioReadline (sys_stdin=sys_stdin at entry=0x7ffff74a48e0 <_IO_2_1_stdin_>, sys_stdout=sys_stdout at entry=0x7ffff74a5620 <_IO_2_1_stdout_>, prompt=prompt at entry=0x7ffff6f8d8e0 ">>> ") at Parser/myreadline.c:269 #4 0x0000000000673b4f in PyOS_Readline (sys_stdin=0x7ffff74a48e0 <_IO_2_1_stdin_>, sys_stdout=0x7ffff74a5620 <_IO_2_1_stdout_>, prompt=0x7ffff6f8d8e0 ">>> ") at Parser/myreadline.c:355 #5 0x00000000005d90d9 in tok_nextc (tok=0xa3fd30) at Parser/tokenizer.c:856 #6 0x00000000005dad02 in tok_get (tok=tok at entry=0xa3fd30, p_start=p_start at entry=0x7fffffffd508, p_end=p_end at entry=0x7fffffffd510) at Parser/tokenizer.c:1194 #7 0x00000000005dcb69 in PyTokenizer_Get (tok=0xa3fd30, p_start=p_start at entry=0x7fffffffd508, p_end=p_end at entry=0x7fffffffd510) at Parser/tokenizer.c:1842 #8 0x0000000000653c73 in _PyPegen_fill_token (p=0x7ffff6f8f540) at Parser/pegen/pegen.c:551 #9 0x0000000000670355 in statement_newline_rule (p=0x7ffff6f8f540) at Parser/pegen/parse.c:1143 #10 interactive_rule (p=0x7ffff6f8f540) at Parser/pegen/parse.c:725 #11 _PyPegen_parse (p=p at entry=0x7ffff6f8f540) at Parser/pegen/parse.c:19388 #12 0x0000000000654b32 in _PyPegen_run_parser (p=0x7ffff6f8f540) at Parser/pegen/pegen.c:1037 #13 0x0000000000654e4c in _PyPegen_run_parser_from_file_pointer (fp=fp at entry=0x70f74a48e0, start_rule=start_rule at entry=80, filename_ob=filename_ob at entry=0x7ffff6f84eb0, enc=enc at entry=0x7ffff704ec60 "utf-8", ps1=ps1 at entry=0x7ffff6f8d8e0 ">>> ", ps2=ps2 at entry=0x90000000d0 , flags=0x7fffffffd7b8, errcode=0x7fffffffd6e4, arena=0x7ffff6ff6b30) at Parser/pegen/pegen.c:1097 #14 0x00000000005d6bea in PyPegen_ASTFromFileObject (fp=0x70f74a48e0, fp at entry=0x7ffff74a48e0 <_IO_2_1_stdin_>, filename_ob=filename_ob at entry=0x7ffff6f84eb0, mode=80, mode at entry=256, enc=enc at entry=0x7ffff704ec60 "utf-8", ps1=ps1 at entry=0x7ffff6f8d8e0 ">>> ", ps2=0x90000000d0 , ps2 at entry=0x7ffff6f8dbe0 "... ", flags=, errcode=, arena=) at Parser/pegen/peg_api.c:52 #15 0x00000000005460d9 in PyRun_InteractiveOneObjectEx (fp=fp at entry=0x7ffff74a48e0 <_IO_2_1_stdin_>, filename=filename at entry=0x7ffff6f84eb0, flags=flags at entry=0x7fffffffd7b8) at Python/pythonrun.c:243 #16 0x000000000054631e in PyRun_InteractiveLoopFlags (fp=fp at entry=0x7ffff74a48e0 <_IO_2_1_stdin_>, filename_str=filename_str at entry=0x673e32 "", flags=flags at entry=0x7fffffffd7b8) at Python/pythonrun.c:122 #17 0x0000000000546d4c in PyRun_AnyFileExFlags (fp=0x7ffff74a48e0 <_IO_2_1_stdin_>, filename=0x673e32 "", closeit=0, flags=0x7fffffffd7b8) at Python/pythonrun.c:81 #18 0x0000000000429fb7 in pymain_run_stdin (cf=0x7fffffffd7b8, config=0x9bd800) at Modules/main.c:467 #19 pymain_run_python (exitcode=0x7fffffffd7b0) at Modules/main.c:556 #20 Py_RunMain () at Modules/main.c:632 #21 0x000000000042a2d6 in pymain_main (args=0x7fffffffd8a0) at Modules/main.c:662 #22 Py_BytesMain (argc=, argv=) at Modules/main.c:686 #23 0x00007ffff7100830 in __libc_start_main (main=0x41ef30
, argc=1, argv=0x7fffffffd9f8, init=, fini=, rtld_fini=, stack_end=0x7fffffffd9e8) at ../csu/libc-start.c:291 #24 0x0000000000429089 in _start () (gdb) Same happens with Python 3.9.0b1+ (heads/3.9:588efc29c5d, May 30 2020, 14:16:10) (current HEAD of the 3.9 branch). In previous versions of Python this would exit the interpreter but not segfault. ---------- keywords: 3.9regression messages: 370386 nosy: Jelle Zijlstra, benjamin.peterson, stutzbach priority: normal severity: normal status: open title: Segfaults on io.FileIO(0).name in 3.9 versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 10:29:34 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 30 May 2020 14:29:34 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1590848974.97.0.893819027957.issue1635741@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +19783 pull_request: https://github.com/python/cpython/pull/20540 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 10:32:01 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 30 May 2020 14:32:01 +0000 Subject: [issue40826] Segfaults on io.FileIO(0).name in 3.9 In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1590849121.14.0.428397433354.issue40826@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 10:37:15 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sat, 30 May 2020 14:37:15 +0000 Subject: [issue40826] Segfaults on io.FileIO(0).name in 3.9 In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1590849435.75.0.195415375291.issue40826@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- nosy: +remi.lapeyre, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 10:45:20 2020 From: report at bugs.python.org (Niklas Fiekas) Date: Sat, 30 May 2020 14:45:20 +0000 Subject: [issue19915] int.bit_at(n) - Accessing a single bit in O(1) In-Reply-To: <1386376026.32.0.661343465084.issue19915@psf.upfronthosting.co.za> Message-ID: <1590849920.75.0.757368371025.issue19915@roundup.psfhosted.org> Change by Niklas Fiekas : ---------- nosy: +niklasf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 11:01:08 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 30 May 2020 15:01:08 +0000 Subject: [issue40826] Segfaults on io.FileIO(0).name in 3.9 In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1590850868.37.0.520557186978.issue40826@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 11:01:45 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 30 May 2020 15:01:45 +0000 Subject: [issue40826] Segfaults on io.FileIO(0).name in 3.9 In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1590850905.73.0.76499151817.issue40826@roundup.psfhosted.org> Dong-hee Na added the comment: Thanks for report, I can reproduce it ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 12:11:19 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 May 2020 16:11:19 +0000 Subject: [issue40826] Segfaults when close file descriptor 0 In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1590855079.73.0.84332466035.issue40826@roundup.psfhosted.org> Serhiy Storchaka added the comment: Simpler reproducer: import os os.close(0) ---------- components: +Interpreter Core nosy: +serhiy.storchaka title: Segfaults on io.FileIO(0).name in 3.9 -> Segfaults when close file descriptor 0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 12:31:07 2020 From: report at bugs.python.org (Eryk Sun) Date: Sat, 30 May 2020 16:31:07 +0000 Subject: [issue40827] os.readlink should support getting the target's printname in Windows Message-ID: <1590856267.7.0.74543194815.issue40827@roundup.psfhosted.org> New submission from Eryk Sun : As discussed in issue 40654, os.readlink should provide a way to get the print name of a symlink target. This is the target path that was actually passed to WinAPI CreateSymbolicLinkW (except for drive-relative paths) and is what a shell would display as the link target (e.g. CMD's "dir" command). Perhaps a keyword-only parameter could be supported to query the print name, e.g. readlink(path, printname=True). In POSIX, passing printname=True would make no difference, since a POSIX symlink only has a substitute name. ---------- components: Library (Lib), Windows messages: 370389 nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: os.readlink should support getting the target's printname in Windows type: enhancement versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 13:02:38 2020 From: report at bugs.python.org (Steve Dower) Date: Sat, 30 May 2020 17:02:38 +0000 Subject: [issue40754] Test installers before releasing (ModuleNotFoundErrors) In-Reply-To: <1590324430.61.0.117510991737.issue40754@roundup.psfhosted.org> Message-ID: <1590858158.6.0.0505700562808.issue40754@roundup.psfhosted.org> Steve Dower added the comment: There are non-binding CI tests run with Github Actions (post-merge) that test from a layout, and last I checked they were all passing. Nobody is really monitoring it but me though, as it isn't a buildbot. The Windows installer also runs pip and IDLE tests before being published, though not a full test suite. Honestly, it's pretty quick to generate an install layout for Windows now I have the PC/layout script. We could do it for every test run if we wanted, though then a number of build-tree only tests would be skipped. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 13:07:34 2020 From: report at bugs.python.org (Eryk Sun) Date: Sat, 30 May 2020 17:07:34 +0000 Subject: [issue13702] relative symlinks in tarfile.extract broken (windows) In-Reply-To: <1325608963.69.0.695216553795.issue13702@psf.upfronthosting.co.za> Message-ID: <1590858454.46.0.876165993211.issue13702@roundup.psfhosted.org> Eryk Sun added the comment: This is still a problem with WinAPI CreateSymbolicLinkW. It fails to replace slashes with backslashes in the substitute path if it's a relative path, which creates a broken link. As a workaround, os.symlink should replace slashes with backslashes in relative target paths. Except drive-relative targets such as "C:spam" can be ignored, since CreateSymbolicLinkW is forced to normalize them as fully-qualified paths. Non-UNC rooted paths such as "/Program Files/Python38" are also relative paths. (ntpath.isabs incorrectly classifies them as absolute.) A relative target path gets resolved against the parsed, opened path of the symlink. For example, consider a symlink on a volume at r"Eggs\spam.txt" that targets r"\spam.txt". If the volume is mounted at "W:\\", then accessing r"W:\Eggs\spam.txt" resolves to r"W:\spam.txt". But if the volume is mounted at r"C:\Mount\Work", then accessing r"C:\Mount\Work\Eggs\spam.txt" resolves to r"C:\spam.txt". ---------- components: +Library (Lib) nosy: +paul.moore, steve.dower, zach.ware stage: test needed -> needs patch versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 13:16:57 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 30 May 2020 17:16:57 +0000 Subject: [issue40826] Segfaults when close file descriptor 0 In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1590859017.66.0.0262641507265.issue40826@roundup.psfhosted.org> Dong-hee Na added the comment: FYI this change fix this issue. --- a/Modules/signalmodule.c +++ b/Modules/signalmodule.c @@ -1782,7 +1782,11 @@ PyOS_FiniInterrupts(void) int PyOS_InterruptOccurred(void) { - PyInterpreterState *interp = _PyInterpreterState_GET(); + PyThreadState *tstate = _PyThreadState_GET(); + if (!tstate) { + return 0; + } + PyInterpreterState *interp = tstate->interp; if (!_Py_ThreadCanHandleSignals(interp)) { return 0; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 13:25:47 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 30 May 2020 17:25:47 +0000 Subject: [issue40825] Add a "strict" parameter to csv.writer and csv.DictWriter In-Reply-To: <1590841893.39.0.979050889653.issue40825@roundup.psfhosted.org> Message-ID: <1590859547.01.0.915624698465.issue40825@roundup.psfhosted.org> Dong-hee Na added the comment: I am +1 on with strict mode. But I want to hear other core developers opinions. ---------- nosy: +corona10, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 13:38:05 2020 From: report at bugs.python.org (Mark Sapiro) Date: Sat, 30 May 2020 17:38:05 +0000 Subject: [issue40597] generated email message exceeds RFC-mandated limit of 998 characters In-Reply-To: <1589223619.93.0.38032538849.issue40597@roundup.psfhosted.org> Message-ID: <1590860285.26.0.581297144744.issue40597@roundup.psfhosted.org> Mark Sapiro added the comment: With the fix in PR 20038, committed at https://github.com/python/cpython/commit/6f2f475d5a2cd7675dce844f3af436ba919ef92b it is no longer possible to set_content(''). Attempts to do so produce the following ``` File "/var/MM/3/hk_39/hyperkitty/.tox/py39-django30/lib/python3.9/site-packages/django_mailman3/lib/scrub.py", line 95, in _get_all_attachments part.set_content('') File "/usr/local/lib/python3.9/email/message.py", line 1171, in set_content super().set_content(*args, **kw) File "/usr/local/lib/python3.9/email/message.py", line 1101, in set_content content_manager.set_content(self, *args, **kw) File "/usr/local/lib/python3.9/email/contentmanager.py", line 37, in set_content handler(msg, obj, *args, **kw) File "/usr/local/lib/python3.9/email/contentmanager.py", line 185, in set_text_content cte, payload = _encode_text(string, charset, cte, msg.policy) File "/usr/local/lib/python3.9/email/contentmanager.py", line 149, in _encode_text if max(len(x) for x in lines) <= policy.max_line_length: ValueError: max() arg is an empty sequence ``` ---------- nosy: +msapiro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 13:57:21 2020 From: report at bugs.python.org (trapezoid677) Date: Sat, 30 May 2020 17:57:21 +0000 Subject: [issue40828] shared memory problems with multiprocessing.Pool Message-ID: <1590861441.57.0.917224278177.issue40828@roundup.psfhosted.org> New submission from trapezoid677 : Under Linux, the resource_tracker throws warnings about not released memory blocks after the programs has finished and when used together with multiprocessing.Pool. This depends on the sequence of initialization of the shared memory block and the multiprocessing pool. In addition, .close() on the shared memory block generates a segmentation fault in the example code. Under MS Windows, the shared memory block holds arbitrary values when being read in the worker routines, but no warnings are thrown and no segmentation fault occurs when closing the memory block. ---------- components: Library (Lib) files: shared_memory.py messages: 370396 nosy: trapezoid677 priority: normal severity: normal status: open title: shared memory problems with multiprocessing.Pool type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file49203/shared_memory.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 14:23:57 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sat, 30 May 2020 18:23:57 +0000 Subject: [issue40829] Add a what's new entry about deprecation of random.shuffle Message-ID: <1590863037.59.0.754503500546.issue40829@roundup.psfhosted.org> New submission from Batuhan Taskaya : random.shuffle deprecated with bpo-40465 but a what's news entry didn't exist about it. ---------- assignee: docs at python components: Documentation messages: 370397 nosy: BTaskaya, docs at python priority: normal severity: normal status: open title: Add a what's new entry about deprecation of random.shuffle versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 14:25:29 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sat, 30 May 2020 18:25:29 +0000 Subject: [issue40829] Add a what's new entry about deprecation of random.shuffle In-Reply-To: <1590863037.59.0.754503500546.issue40829@roundup.psfhosted.org> Message-ID: <1590863129.39.0.363570688995.issue40829@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch pull_requests: +19785 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20541 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 15:38:45 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sat, 30 May 2020 19:38:45 +0000 Subject: [issue40696] exception chain cycles cause hangs (was "Exception handling with "await" can hang in Python3.9.0b1") In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1590867525.02.0.978928236469.issue40696@roundup.psfhosted.org> Dennis Sweeney added the comment: > I it related to issue25782? Yes -- I didn't see that issue. I'm a little confused about the resolution of that issue though. For clarification, the existing behavior on master: When trying to raise the exception H, F -> G -> H -> I -> NULL becomes H -> F -> G -> NULL But when trying to set the exception A on top of B -> C -> D -> E -> C -> ..., it gets stuck in an infinite loop from the existing cycle. My PR keeps the first behavior and resolves the infinite loop by making it A -> B -> C -> D -> E -> NULL, which seems consistent with the existing behavior. So it should be strictly a bugfix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 15:55:11 2020 From: report at bugs.python.org (Mark Sapiro) Date: Sat, 30 May 2020 19:55:11 +0000 Subject: [issue40597] generated email message exceeds RFC-mandated limit of 998 characters In-Reply-To: <1589223619.93.0.38032538849.issue40597@roundup.psfhosted.org> Message-ID: <1590868511.09.0.558609237271.issue40597@roundup.psfhosted.org> Change by Mark Sapiro : ---------- pull_requests: +19786 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/20542 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 16:05:30 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 May 2020 20:05:30 +0000 Subject: [issue40696] exception chain cycles cause hangs (was "Exception handling with "await" can hang in Python3.9.0b1") In-Reply-To: <1589962083.82.0.703924093729.issue40696@roundup.psfhosted.org> Message-ID: <1590869130.97.0.279594565915.issue40696@roundup.psfhosted.org> Serhiy Storchaka added the comment: In issue25782 two different solutions for general problem was proposed. When trying to raise the exception H, F -> G -> H -> I -> NULL with Yury's patch you would get H -> NULL and with my path you would get H -> F -> G -> I -> NULL The issue was closed because we did not have realistic example when raising exception from the __context__ list would be reasonable and the more concrete original issue was fixed in other way. Now we have other example of creating cycles with __context__, so we can reopen yhat issue and decide what solution is better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 16:07:09 2020 From: report at bugs.python.org (Kodiologist) Date: Sat, 30 May 2020 20:07:09 +0000 Subject: [issue40830] Certain uses of dictionary unpacking raise TypeError Message-ID: <1590869229.29.0.66661660878.issue40830@roundup.psfhosted.org> New submission from Kodiologist : On Python 3.8.2, the below program runs without errors. On Python 3.9.0b1, it raises "TypeError: 'tuple' object is not callable" for the last line. d1 = {'a': 1} d2 = {'c': 3} def fun(a, b, c): return a, b, c print(fun(**d1, b='b', **d2)) ---------- messages: 370400 nosy: Kodiologist priority: normal severity: normal status: open title: Certain uses of dictionary unpacking raise TypeError type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 16:07:42 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 May 2020 20:07:42 +0000 Subject: [issue25782] CPython hangs on error __context__ set to the error itself In-Reply-To: <1449076441.38.0.963505882098.issue25782@psf.upfronthosting.co.za> Message-ID: <1590869262.45.0.119497790823.issue25782@roundup.psfhosted.org> Serhiy Storchaka added the comment: Issue40696 is other example of creating a cycle. I think we should solve general problem preventing loops by merging one of proposed patches. ---------- resolution: fixed -> stage: commit review -> status: closed -> open versions: +Python 3.10, Python 3.7, Python 3.8, Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 16:10:05 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 30 May 2020 20:10:05 +0000 Subject: [issue40825] Add a "strict" parameter to csv.writer and csv.DictWriter In-Reply-To: <1590841893.39.0.979050889653.issue40825@roundup.psfhosted.org> Message-ID: <1590869405.68.0.419342988562.issue40825@roundup.psfhosted.org> Eric V. Smith added the comment: I guess an isinstance check against numbers.Number would be the best way to check if an argument is a number. I'm not sure how convenient that is from C code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 16:11:57 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 30 May 2020 20:11:57 +0000 Subject: [issue25782] CPython hangs on error __context__ set to the error itself In-Reply-To: <1449076441.38.0.963505882098.issue25782@psf.upfronthosting.co.za> Message-ID: <1590869517.84.0.492721841804.issue25782@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- nosy: -gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 16:19:23 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sat, 30 May 2020 20:19:23 +0000 Subject: [issue40830] Certain uses of dictionary unpacking raise TypeError In-Reply-To: <1590869229.29.0.66661660878.issue40830@roundup.psfhosted.org> Message-ID: <1590869963.32.0.72647378036.issue40830@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 16:22:00 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sat, 30 May 2020 20:22:00 +0000 Subject: [issue40830] Certain uses of dictionary unpacking raise TypeError In-Reply-To: <1590869229.29.0.66661660878.issue40830@roundup.psfhosted.org> Message-ID: <1590870120.52.0.593463111592.issue40830@roundup.psfhosted.org> Batuhan Taskaya added the comment: @Kodiologist do you have a setup to try your cause before the commit 8a4cd700a7426341c2074a2b580306d2d60ec839? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 16:22:38 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sat, 30 May 2020 20:22:38 +0000 Subject: [issue40830] Certain uses of dictionary unpacking raise TypeError In-Reply-To: <1590869229.29.0.66661660878.issue40830@roundup.psfhosted.org> Message-ID: <1590870158.33.0.721839455539.issue40830@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 16:23:12 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sat, 30 May 2020 20:23:12 +0000 Subject: [issue40830] Certain uses of dictionary unpacking raise TypeError In-Reply-To: <1590869229.29.0.66661660878.issue40830@roundup.psfhosted.org> Message-ID: <1590870192.01.0.787550044482.issue40830@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- components: +Interpreter Core keywords: +3.9regression versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 16:33:09 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sat, 30 May 2020 20:33:09 +0000 Subject: [issue25782] CPython hangs on error __context__ set to the error itself In-Reply-To: <1449076441.38.0.963505882098.issue25782@psf.upfronthosting.co.za> Message-ID: <1590870789.36.0.273644226224.issue25782@roundup.psfhosted.org> Dennis Sweeney added the comment: For clarification, the existing behavior on master: When trying to raise the exception H, F -> G -> H -> I -> NULL becomes H -> F -> G -> NULL But when trying to set the exception A on top of B -> C -> D -> E -> C -> ..., it gets stuck in an infinite loop from the existing cycle. My PR 20539 keeps the first behavior and resolves the infinite loop by making it A -> B -> C -> D -> E -> NULL, which seems consistent with the existing behavior. So it should be strictly a bugfix. It also only changes the PyErr_SetObject code and not the PyException_SetContext code. ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 16:34:54 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 May 2020 20:34:54 +0000 Subject: [issue25782] CPython hangs on error __context__ set to the error itself In-Reply-To: <1449076441.38.0.963505882098.issue25782@psf.upfronthosting.co.za> Message-ID: <1590870894.01.0.287171446352.issue25782@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +19787 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20543 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 16:40:27 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sat, 30 May 2020 20:40:27 +0000 Subject: [issue25782] CPython hangs on error __context__ set to the error itself In-Reply-To: <1449076441.38.0.963505882098.issue25782@psf.upfronthosting.co.za> Message-ID: <1590871227.77.0.387664200428.issue25782@roundup.psfhosted.org> Change by Dennis Sweeney : ---------- pull_requests: +19788 pull_request: https://github.com/python/cpython/pull/20539 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 18:15:12 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 30 May 2020 22:15:12 +0000 Subject: [issue40829] Add a what's new entry about deprecation of random.shuffle In-Reply-To: <1590863037.59.0.754503500546.issue40829@roundup.psfhosted.org> Message-ID: <1590876912.36.0.959280093049.issue40829@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 007bb06a2de9e64fa978f5dd9131d0100227b4cf by Batuhan Taskaya in branch 'master': bpo-40829: Add a what's new entry about deprecation of shuffle's random parameter (GH-20541) https://github.com/python/cpython/commit/007bb06a2de9e64fa978f5dd9131d0100227b4cf ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 18:15:53 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 30 May 2020 22:15:53 +0000 Subject: [issue40829] Add a what's new entry about deprecation of random.shuffle In-Reply-To: <1590863037.59.0.754503500546.issue40829@roundup.psfhosted.org> Message-ID: <1590876953.69.0.54121979398.issue40829@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +19789 pull_request: https://github.com/python/cpython/pull/20544 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 18:18:12 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sat, 30 May 2020 22:18:12 +0000 Subject: [issue40829] Add a what's new entry about deprecation of random.shuffle's random= parameter In-Reply-To: <1590863037.59.0.754503500546.issue40829@roundup.psfhosted.org> Message-ID: <1590877092.33.0.414145136687.issue40829@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- title: Add a what's new entry about deprecation of random.shuffle -> Add a what's new entry about deprecation of random.shuffle's random= parameter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 18:18:29 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sat, 30 May 2020 22:18:29 +0000 Subject: [issue40829] Add a what's new entry about deprecation of random.shuffle's random= parameter In-Reply-To: <1590876912.36.0.959280093049.issue40829@roundup.psfhosted.org> Message-ID: <1590877109.57.0.367077229598.issue40829@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- Removed message: https://bugs.python.org/msg370397 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 18:33:12 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 30 May 2020 22:33:12 +0000 Subject: [issue40829] Add a what's new entry about deprecation of random.shuffle's random= parameter In-Reply-To: <1590876912.36.0.959280093049.issue40829@roundup.psfhosted.org> Message-ID: <1590877992.37.0.871273803928.issue40829@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 44400e88f906bf99cd2c57791f1201c400daf6af by Miss Islington (bot) in branch '3.9': bpo-40829: Add a what's new entry about deprecation of shuffle's random parameter (GH-20541) (GH-20544) https://github.com/python/cpython/commit/44400e88f906bf99cd2c57791f1201c400daf6af ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 18:33:35 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Sat, 30 May 2020 22:33:35 +0000 Subject: [issue40829] Add a what's new entry about deprecation of random.shuffle's random= parameter In-Reply-To: <1590876912.36.0.959280093049.issue40829@roundup.psfhosted.org> Message-ID: <1590878015.26.0.910760474725.issue40829@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 18:34:17 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 30 May 2020 22:34:17 +0000 Subject: [issue25782] CPython hangs on error __context__ set to the error itself In-Reply-To: <1449076441.38.0.963505882098.issue25782@psf.upfronthosting.co.za> Message-ID: <1590878057.71.0.682587841025.issue25782@roundup.psfhosted.org> Change by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 19:27:45 2020 From: report at bugs.python.org (Mark Shannon) Date: Sat, 30 May 2020 23:27:45 +0000 Subject: [issue40830] Certain uses of dictionary unpacking raise TypeError In-Reply-To: <1590869229.29.0.66661660878.issue40830@roundup.psfhosted.org> Message-ID: <1590881265.65.0.047877835714.issue40830@roundup.psfhosted.org> Mark Shannon added the comment: Thanks for the report. I'm looking in to it. ---------- assignee: -> Mark.Shannon priority: normal -> release blocker stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 20:29:15 2020 From: report at bugs.python.org (Huon Wilson) Date: Sun, 31 May 2020 00:29:15 +0000 Subject: [issue40630] tracemalloc: allow resetting peak memory metric without touching other traces In-Reply-To: <1589508756.01.0.239997467276.issue40630@roundup.psfhosted.org> Message-ID: <1590884955.42.0.000310426115453.issue40630@roundup.psfhosted.org> Change by Huon Wilson : ---------- pull_requests: +19790 pull_request: https://github.com/python/cpython/pull/20545 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 20:30:44 2020 From: report at bugs.python.org (Huon Wilson) Date: Sun, 31 May 2020 00:30:44 +0000 Subject: [issue40630] tracemalloc: allow resetting peak memory metric without touching other traces In-Reply-To: <1589508756.01.0.239997467276.issue40630@roundup.psfhosted.org> Message-ID: <1590885044.21.0.160619453863.issue40630@roundup.psfhosted.org> Change by Huon Wilson : ---------- pull_requests: +19791 pull_request: https://github.com/python/cpython/pull/20546 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 21:12:46 2020 From: report at bugs.python.org (Ned Deily) Date: Sun, 31 May 2020 01:12:46 +0000 Subject: [issue40754] Test installers before releasing (ModuleNotFoundErrors) In-Reply-To: <1590324430.61.0.117510991737.issue40754@roundup.psfhosted.org> Message-ID: <1590887566.95.0.284944605554.issue40754@roundup.psfhosted.org> Ned Deily added the comment: > The Windows installer also runs pip and IDLE tests before being published [...] That's good and reminds me that I forgot to mention that for the macOS installer, besides the already mentioned tests, we also download, install, and smoke test a third-party wheel from PyPI using the bundled pip and we also do a visual inspection of the release's changelog by launching through IDLE the docset bundled with each installer. If the Python binaries included with the installer are built for multiple CPU architectures (macOS universal binaries), we would also attempt to ensure that the test suite is run at least once on each architecture (as of several months ago, we no longer regularly distribute such binaries but there's a good chance we may need to do so again in the not-too-distant future, for example, if Apple introduces macOS machines based on ARM CPUs). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 21:51:32 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 31 May 2020 01:51:32 +0000 Subject: [issue40755] Add missing multiset predicates to collections.Counter In-Reply-To: <1590333060.51.0.256014570882.issue40755@roundup.psfhosted.org> Message-ID: <1590889892.7.0.524362563721.issue40755@roundup.psfhosted.org> Raymond Hettinger added the comment: After more thought, I've found a way to use the rich comparisons as requested. Doing so consistently required that the __eq__ method treat missing elements as having a zero count. See attached PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 21:53:34 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 31 May 2020 01:53:34 +0000 Subject: [issue40755] Add missing multiset predicates to collections.Counter In-Reply-To: <1590333060.51.0.256014570882.issue40755@roundup.psfhosted.org> Message-ID: <1590890014.51.0.520849682759.issue40755@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +19792 pull_request: https://github.com/python/cpython/pull/20548 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 30 22:24:25 2020 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Sun, 31 May 2020 02:24:25 +0000 Subject: [issue40755] Add missing multiset predicates to collections.Counter In-Reply-To: <1590333060.51.0.256014570882.issue40755@roundup.psfhosted.org> Message-ID: <1590891865.67.0.175424110296.issue40755@roundup.psfhosted.org> Vedran ?a?i? added the comment: I'm very glad for that. :-) For the other part of my message, I never intended to remove the support for non-natural counts. I just wanted to add some more methods to the natural part of Counter's API. It already has some methods which assume natural counts: .elements(), for example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 00:23:35 2020 From: report at bugs.python.org (Chitrank-Dixit) Date: Sun, 31 May 2020 04:23:35 +0000 Subject: [issue16954] Add docstrings for ElementTree module In-Reply-To: <1358090813.12.0.93631082121.issue16954@psf.upfronthosting.co.za> Message-ID: <1590899015.26.0.944937198502.issue16954@roundup.psfhosted.org> Chitrank-Dixit added the comment: I think the current ticket should be closed as there are no doxygen comments left to convert to docstrings. So I think this issue can be closed. There are places where there is no docstrings for those we can create a new ticket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 00:36:58 2020 From: report at bugs.python.org (Chitrank-Dixit) Date: Sun, 31 May 2020 04:36:58 +0000 Subject: [issue39710] "will be returned as unicode" reminiscent from Python 2 In-Reply-To: <1582300708.21.0.335550003251.issue39710@roundup.psfhosted.org> Message-ID: <1590899818.3.0.973216718701.issue39710@roundup.psfhosted.org> Chitrank-Dixit added the comment: I would like to take this issue. ---------- nosy: +Chitrank-Dixit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 00:58:39 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 31 May 2020 04:58:39 +0000 Subject: [issue40826] Segfaults when close file descriptor 0 In-Reply-To: <1590848386.77.0.354375723351.issue40826@roundup.psfhosted.org> Message-ID: <1590901119.82.0.420268169472.issue40826@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +19793 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20549 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 01:08:44 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 31 May 2020 05:08:44 +0000 Subject: [issue38938] Possible performance improvement for heapq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1590901723.99.0.413104448622.issue38938@roundup.psfhosted.org> Change by Dennis Sweeney : ---------- pull_requests: +19794 pull_request: https://github.com/python/cpython/pull/20550 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 01:17:02 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 31 May 2020 05:17:02 +0000 Subject: [issue38938] Possible performance improvement for heapq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1590902222.36.0.316021464567.issue38938@roundup.psfhosted.org> Dennis Sweeney added the comment: PR 20550 uses a linked structure like what we've been talking about. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 01:40:41 2020 From: report at bugs.python.org (Eric L.) Date: Sun, 31 May 2020 05:40:41 +0000 Subject: [issue40831] Wrong statement that bytes paths are deprecated under Windows regarding MAX_PATH docs Message-ID: <1590903641.69.0.63227467071.issue40831@roundup.psfhosted.org> New submission from Eric L. : In chapter 3.1.2. Removing the MAX_PATH Limitation of https://docs.python.org/3/using/windows.html#removing-the-max-path-limitation (also in 3.9 and 3.10), it is written that "(Use of bytes as paths is deprecated on Windows, and this feature is not available when using bytes.)" but my understanding is that since 3.8 bytes paths are _not_ deprecated any more under Windows (and it is good so!), which makes unclear if the feature is still not available with bytes paths. In which case, it should be implemented. I'm sorry I couldn't test if it actually works or not but I'm stuck with Python 3.7 where I guess the statement is still correct, but I hope to see the issue fixed once I can upgrade :-) ---------- components: Windows messages: 370414 nosy: ericzolf, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Wrong statement that bytes paths are deprecated under Windows regarding MAX_PATH docs type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 01:57:51 2020 From: report at bugs.python.org (Chitrank-Dixit) Date: Sun, 31 May 2020 05:57:51 +0000 Subject: [issue39710] "will be returned as unicode" reminiscent from Python 2 In-Reply-To: <1582300708.21.0.335550003251.issue39710@roundup.psfhosted.org> Message-ID: <1590904671.72.0.558105505896.issue39710@roundup.psfhosted.org> Change by Chitrank-Dixit : ---------- pull_requests: +19795 pull_request: https://github.com/python/cpython/pull/20551 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 03:14:11 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 31 May 2020 07:14:11 +0000 Subject: [issue40686] Compiler warnings in _zoneinfo.c on Windows build in 64-bit In-Reply-To: <1589906488.33.0.285207996013.issue40686@roundup.psfhosted.org> Message-ID: <1590909251.35.0.0812582072818.issue40686@roundup.psfhosted.org> Dong-hee Na added the comment: @pablogsal GH-20342 looks like related to this issue. Can you update the current status? ---------- nosy: +corona10, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 03:16:01 2020 From: report at bugs.python.org (Vikash Raja Samuel Selvin) Date: Sun, 31 May 2020 07:16:01 +0000 Subject: [issue40832] hi param in bisect module should not accept negative values Message-ID: <1590909361.92.0.18411743492.issue40832@roundup.psfhosted.org> New submission from Vikash Raja Samuel Selvin : >>> bisect.bisect_right(l, 5.1, -1) Traceback (most recent call last): File "", line 1, in ValueError: lo must be non-negative >>> l [0, 1, 2, 3, 4, 5, 5, 5, 6, 7, 8, 9] >>> bisect.bisect_right(l, 5.1, 0, -2) 0 In order to be consistent with the behavior for lo and not return wrong answers when hi is provided with a negative value ---------- components: Library (Lib) messages: 370416 nosy: samuel72 priority: normal severity: normal status: open title: hi param in bisect module should not accept negative values type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 03:26:45 2020 From: report at bugs.python.org (SilentGhost) Date: Sun, 31 May 2020 07:26:45 +0000 Subject: [issue40832] hi param in bisect module should not accept negative values In-Reply-To: <1590909361.92.0.18411743492.issue40832@roundup.psfhosted.org> Message-ID: <1590910005.29.0.814438456953.issue40832@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +rhettinger versions: +Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 03:32:03 2020 From: report at bugs.python.org (SilentGhost) Date: Sun, 31 May 2020 07:32:03 +0000 Subject: [issue40828] shared memory problems with multiprocessing.Pool In-Reply-To: <1590861441.57.0.917224278177.issue40828@roundup.psfhosted.org> Message-ID: <1590910323.84.0.883722709735.issue40828@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +davin, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 03:55:35 2020 From: report at bugs.python.org (Anthony Sottile) Date: Sun, 31 May 2020 07:55:35 +0000 Subject: [issue40465] Deprecate the optional *random* argument to random.shuffle() In-Reply-To: <1588321901.81.0.617278241299.issue40465@roundup.psfhosted.org> Message-ID: <1590911735.59.0.472465504756.issue40465@roundup.psfhosted.org> Anthony Sottile added the comment: pre-commit uses this to do deterministic shuffling, please don't remove this https://github.com/pre-commit/pre-commit/issues/1479 ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 04:14:51 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 08:14:51 +0000 Subject: [issue40465] Deprecate the optional *random* argument to random.shuffle() In-Reply-To: <1588321901.81.0.617278241299.issue40465@roundup.psfhosted.org> Message-ID: <1590912891.51.0.365466473063.issue40465@roundup.psfhosted.org> Serhiy Storchaka added the comment: Raymond, could you please add an entry in What's New? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 04:27:28 2020 From: report at bugs.python.org (Steve Dower) Date: Sun, 31 May 2020 08:27:28 +0000 Subject: [issue40831] Wrong statement that bytes paths are deprecated under Windows regarding MAX_PATH docs In-Reply-To: <1590903641.69.0.63227467071.issue40831@roundup.psfhosted.org> Message-ID: <1590913648.85.0.0537448246643.issue40831@roundup.psfhosted.org> Steve Dower added the comment: That's correct, though I thought PEP 528 and 529 applied earlier than that? Around 3.6, I thought. Feel free to make a doc update though. That reference is definitely out of date. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 05:02:54 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 31 May 2020 09:02:54 +0000 Subject: [issue40832] hi param in bisect module should not accept negative values In-Reply-To: <1590909361.92.0.18411743492.issue40832@roundup.psfhosted.org> Message-ID: <1590915774.68.0.178368240225.issue40832@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: -> rhettinger versions: -Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 05:28:45 2020 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 31 May 2020 09:28:45 +0000 Subject: [issue25782] CPython hangs on error __context__ set to the error itself In-Reply-To: <1449076441.38.0.963505882098.issue25782@psf.upfronthosting.co.za> Message-ID: <1590917325.07.0.844611729939.issue25782@roundup.psfhosted.org> Chris Jerdonek added the comment: I think this issue needs deeper discussion to know how to proceed. > If there is a chain A -> B -> C -> D -> E, after assignment C.__context__ = A we will get a chain C -> A -> B -> D -> E. No exception is lost. I understand not wanting to lose exceptions here. However, if there were a separate exception F and the assignment were instead C.__context__ = F without raising C, the new chain would be A -> B -> C -> F. We would again lose D -> E. So why is that not a problem here, and yet it's a problem above? If we really didn't want to lose the exception, we could make it A -> B -> C -> F -> D -> E (and if raising C, it would become C -> F -> D -> E). Thus, I think we may want to consider separately the cases of explicitly setting the context (calling PyException_SetContext) and implicitly setting it (calling PyErr_SetObject). Maybe when setting explicitly, losing the previous value is okay. Also, there's another option for the top example in the implicit case of raising C. We could create a copy C' of C, so the new chain would be C -> A -> B -> C' -> D -> E. The code already has logic to create a new exception in certain cases: both _PyErr_SetObject and _PyErr_NormalizeException call _PyErr_CreateException. There are yet more options but I don't want to lengthen this comment further. Lastly, regarding Dennis's patch, I think the question of how to detect cycles should be discussed separately from what the behavior should be. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 05:56:38 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 31 May 2020 09:56:38 +0000 Subject: [issue40832] hi param in bisect module should not accept negative values In-Reply-To: <1590909361.92.0.18411743492.issue40832@roundup.psfhosted.org> Message-ID: <1590918998.1.0.39164851186.issue40832@roundup.psfhosted.org> Raymond Hettinger added the comment: I'm -0 on this one. Originally, there were no range checks at all. This kept the code small and fast which was important because bisect() is a building block sometimes used in tight loops, random.choices() for example. Later, a test for negative lo values was added when it was shown that that case sometimes arose in practice. At that time, a check for negative hi value was skipped because it either didn't seem to arise in practice or that it would occur in conjunction with a negative lo value. Another issue is that the C implementation already uses a default of -1 when hi=None. So adding another check, one that we likely don't really need, would be more invasive and complicated than it seems at first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 06:49:10 2020 From: report at bugs.python.org (Eric L.) Date: Sun, 31 May 2020 10:49:10 +0000 Subject: [issue40831] Wrong statement that bytes paths are deprecated under Windows regarding MAX_PATH docs In-Reply-To: <1590903641.69.0.63227467071.issue40831@roundup.psfhosted.org> Message-ID: <1590922150.39.0.772482777691.issue40831@roundup.psfhosted.org> Eric L. added the comment: The question is if only the statement that bytes are deprecated is wrong, but also if the long path feature is supported with bytes or not. As written, I'm a Linux guy, I don't feel like I have the pre-requisites to check this properly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 07:02:30 2020 From: report at bugs.python.org (Mark Shannon) Date: Sun, 31 May 2020 11:02:30 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1590922950.31.0.585228804764.issue29882@roundup.psfhosted.org> Mark Shannon added the comment: Why are calling a population count method "bit_count()"? That seems likely to cause confusion with "bit_length()". I might reasonable expect that 0b1000.bit_count() be 4, not 1. It does have 4 bits. Whereas 0b1000.population_count() is clearly 1. I have no objection to adding this method, just the choice of name. ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 07:23:51 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 11:23:51 +0000 Subject: [issue40825] Add a "strict" parameter to csv.writer and csv.DictWriter In-Reply-To: <1590841893.39.0.979050889653.issue40825@roundup.psfhosted.org> Message-ID: <1590924231.42.0.852280265585.issue40825@roundup.psfhosted.org> Serhiy Storchaka added the comment: There is PyNumber_Check(). It is not direct analog of isinstance(obj, numbers.Number), it checks that the object can be explicitly converted to the real number (int or float). UUID and IPv4Address pass this check. As a narrow check we can use isinstance(obj, (str, int, float)). It does not accept Fraction, Decimal and numpy numbers, but it is what such modules like json or plistlib accept. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 07:42:31 2020 From: report at bugs.python.org (Mark Shannon) Date: Sun, 31 May 2020 11:42:31 +0000 Subject: [issue40830] Certain uses of dictionary unpacking raise TypeError In-Reply-To: <1590869229.29.0.66661660878.issue40830@roundup.psfhosted.org> Message-ID: <1590925351.0.0.326343741539.issue40830@roundup.psfhosted.org> Change by Mark Shannon : ---------- keywords: +patch pull_requests: +19796 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20553 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 07:43:05 2020 From: report at bugs.python.org (Mark Shannon) Date: Sun, 31 May 2020 11:43:05 +0000 Subject: [issue40830] Certain uses of dictionary unpacking raise TypeError In-Reply-To: <1590869229.29.0.66661660878.issue40830@roundup.psfhosted.org> Message-ID: <1590925385.5.0.181071863714.issue40830@roundup.psfhosted.org> Change by Mark Shannon : ---------- keywords: -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 07:46:38 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 31 May 2020 11:46:38 +0000 Subject: [issue36464] Python 2.7 build install fails intermittently with -j on MacOS In-Reply-To: <1553811277.77.0.695389248612.issue36464@roundup.psfhosted.org> Message-ID: <1590925598.65.0.702688171511.issue36464@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- versions: +Python 3.10 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 07:49:38 2020 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 31 May 2020 11:49:38 +0000 Subject: [issue36464] Python 2.7 build install fails intermittently with -j on MacOS In-Reply-To: <1553811277.77.0.695389248612.issue36464@roundup.psfhosted.org> Message-ID: <1590925778.17.0.0409018830044.issue36464@roundup.psfhosted.org> Cheryl Sabella added the comment: Even though this mentions Python 2, the pull request is against master. ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 07:55:40 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 11:55:40 +0000 Subject: [issue1706039] Added clearerr() to clear EOF state Message-ID: <1590926140.59.0.319567121864.issue1706039@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 08:00:07 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 12:00:07 +0000 Subject: [issue11722] mingw64 does not link when building extensions In-Reply-To: <1301502105.52.0.181374026279.issue11722@psf.upfronthosting.co.za> Message-ID: <1590926407.6.0.837454239914.issue11722@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 08:02:04 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 12:02:04 +0000 Subject: [issue9326] Error message for incorrect number of (function) args is incorrect In-Reply-To: <1279745047.45.0.24813200138.issue9326@psf.upfronthosting.co.za> Message-ID: <1590926524.98.0.317290821055.issue9326@roundup.psfhosted.org> Serhiy Storchaka added the comment: In Python 3: TypeError: f() missing 1 required positional argument: 'a' ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 08:04:06 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 12:04:06 +0000 Subject: [issue9329] freeze tool cannot handle JSON module properly In-Reply-To: <1279815656.66.0.596140100357.issue9329@psf.upfronthosting.co.za> Message-ID: <1590926646.35.0.36545034931.issue9329@roundup.psfhosted.org> Serhiy Storchaka added the comment: .decode('hex') no longer used in Python 3. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 08:07:21 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 12:07:21 +0000 Subject: [issue13171] Bug in file.read(), can access unknown data. In-Reply-To: <1318531210.93.0.392401137226.issue13171@psf.upfronthosting.co.za> Message-ID: <1590926841.13.0.948957030681.issue13171@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 08:11:06 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 12:11:06 +0000 Subject: [issue15952] format(value) and value.__format__() behave differently with unicode format In-Reply-To: <1347825591.49.0.625826586182.issue15952@psf.upfronthosting.co.za> Message-ID: <1590927066.03.0.0674839064813.issue15952@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 08:11:35 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 12:11:35 +0000 Subject: [issue15276] unicode format does not really work in Python 2.x In-Reply-To: <1341668447.61.0.319523039673.issue15276@psf.upfronthosting.co.za> Message-ID: <1590927095.26.0.332773988966.issue15276@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 08:11:58 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 12:11:58 +0000 Subject: [issue15951] string.Formatter returns str for empty unicode template In-Reply-To: <1347796556.49.0.9624827569.issue15951@psf.upfronthosting.co.za> Message-ID: <1590927118.62.0.184780431414.issue15951@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 08:24:15 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 12:24:15 +0000 Subject: [issue15918] subprocess.Popen reads errpipe_read incorrectly, can result in short read In-Reply-To: <1347354377.74.0.358322632323.issue15918@psf.upfronthosting.co.za> Message-ID: <1590927855.58.0.148219718938.issue15918@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 08:24:53 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 12:24:53 +0000 Subject: [issue8893] file.{read,readlines} behaviour on Solaris In-Reply-To: <1275609044.71.0.537925857344.issue8893@psf.upfronthosting.co.za> Message-ID: <1590927893.56.0.44077513224.issue8893@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 08:26:44 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 12:26:44 +0000 Subject: [issue14978] distutils Extension fails to be created with unicode package names In-Reply-To: <1338545385.38.0.440171490662.issue14978@psf.upfronthosting.co.za> Message-ID: <1590928004.65.0.280832337024.issue14978@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 08:28:24 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 12:28:24 +0000 Subject: [issue2481] locale.strxfrm does not work with Unicode strings In-Reply-To: <1206455635.63.0.674389192114.issue2481@psf.upfronthosting.co.za> Message-ID: <1590928104.65.0.0478932037728.issue2481@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 08:30:25 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 12:30:25 +0000 Subject: [issue5184] Add -3 warning for extension types that implement tp_compare but not tp_richcompare In-Reply-To: <1234089256.12.0.28890692519.issue5184@psf.upfronthosting.co.za> Message-ID: <1590928225.83.0.49098144023.issue5184@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 08:34:31 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 12:34:31 +0000 Subject: [issue12398] Sending binary data with a POST request in httplib can cause Unicode exceptions In-Reply-To: <1308929993.57.0.810230060664.issue12398@psf.upfronthosting.co.za> Message-ID: <1590928471.06.0.986683409838.issue12398@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 08:37:23 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 12:37:23 +0000 Subject: [issue12886] datetime.strptime parses input wrong In-Reply-To: <1314974007.55.0.285568781981.issue12886@psf.upfronthosting.co.za> Message-ID: <1590928643.4.0.916773178295.issue12886@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- versions: +Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 -Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 08:39:15 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 12:39:15 +0000 Subject: [issue1294232] Error in metaclass search order Message-ID: <1590928755.47.0.171585211228.issue1294232@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 08:49:41 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 12:49:41 +0000 Subject: [issue16739] texttestresult should decorate the stream with _WritelnDecorator In-Reply-To: <1356020181.84.0.076442170736.issue16739@psf.upfronthosting.co.za> Message-ID: <1590929381.06.0.703453108182.issue16739@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- versions: +Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 08:50:42 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 12:50:42 +0000 Subject: [issue17112] Some doctest-based tests fail when run with python -OO In-Reply-To: <1359883648.75.0.520386861217.issue17112@psf.upfronthosting.co.za> Message-ID: <1590929442.19.0.523187771403.issue17112@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 08:51:09 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 12:51:09 +0000 Subject: [issue17191] pdb list shows unexpected code when stack frame includes a try / finally block In-Reply-To: <1360666057.12.0.723928905172.issue17191@psf.upfronthosting.co.za> Message-ID: <1590929469.43.0.130575318553.issue17191@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 08:52:02 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 12:52:02 +0000 Subject: [issue15276] unicode format does not really work in Python 2.x In-Reply-To: <1341668447.61.0.319523039673.issue15276@psf.upfronthosting.co.za> Message-ID: <1590929522.28.0.0334197756996.issue15276@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 08:53:21 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 12:53:21 +0000 Subject: [issue17387] Error in C API documentation of PySequenceMethods In-Reply-To: <1362790710.8.0.92948490889.issue17387@psf.upfronthosting.co.za> Message-ID: <1590929601.2.0.310442795561.issue17387@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 08:55:07 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 12:55:07 +0000 Subject: [issue11767] Maildir iterator leaks file descriptors by default In-Reply-To: <1301958670.39.0.218079408331.issue11767@psf.upfronthosting.co.za> Message-ID: <1590929707.32.0.153499902018.issue11767@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 08:55:44 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 12:55:44 +0000 Subject: [issue17420] bdist_wininst does not play well with unicode descriptions In-Reply-To: <1363280381.66.0.144650085618.issue17420@psf.upfronthosting.co.za> Message-ID: <1590929744.35.0.800356440395.issue17420@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:04:50 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:04:50 +0000 Subject: [issue20686] Confusing statement about unicode strings in tutorial introduction In-Reply-To: <1392827095.92.0.836578340147.issue20686@psf.upfronthosting.co.za> Message-ID: <1590930290.73.0.319434757794.issue20686@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:09:37 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:09:37 +0000 Subject: [issue21547] '!s' formatting documentation bug In-Reply-To: <1400654359.7.0.699720681212.issue21547@psf.upfronthosting.co.za> Message-ID: <1590930577.06.0.953516266001.issue21547@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:09:11 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:09:11 +0000 Subject: [issue9196] Improve docs for string interpolation "%s" re Unicode strings In-Reply-To: <1278572830.17.0.148747735024.issue9196@psf.upfronthosting.co.za> Message-ID: <1590930551.93.0.213132258596.issue9196@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:10:03 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:10:03 +0000 Subject: [issue20296] PyArg_ParseTuple 2.X docs mention int for "t#", but "Py_ssize_t" for "w#", etc. In-Reply-To: <1390072970.58.0.165278841581.issue20296@psf.upfronthosting.co.za> Message-ID: <1590930603.51.0.0239323623161.issue20296@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:11:27 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:11:27 +0000 Subject: [issue23514] multiprocessing documentation - little more examples for parallel computing In-Reply-To: <1424797939.13.0.206434175912.issue23514@psf.upfronthosting.co.za> Message-ID: <1590930687.3.0.958737568817.issue23514@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> multiprocessing doc organization impedes understanding _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:13:24 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:13:24 +0000 Subject: [issue23557] Misc/SpecialBuilds.txt contains outdated information about PYMALLOC_DEBUG In-Reply-To: <1425212242.29.0.401382556458.issue23557@psf.upfronthosting.co.za> Message-ID: <1590930804.19.0.756195333275.issue23557@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +vstinner versions: +Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:15:22 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:15:22 +0000 Subject: [issue24921] Operator precedence table in 5.15 should be highest to lowest precedence In-Reply-To: <1440421712.73.0.607673856693.issue24921@psf.upfronthosting.co.za> Message-ID: <1590930922.73.0.795593671129.issue24921@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- versions: +Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:19:14 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:19:14 +0000 Subject: [issue22052] Comparison operators called in reverse order for subclasses with no override. In-Reply-To: <1406149410.09.0.756154064568.issue22052@psf.upfronthosting.co.za> Message-ID: <1590931154.38.0.0804011355123.issue22052@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:19:57 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:19:57 +0000 Subject: [issue25377] Mention octal format of mode argument of os.chmod In-Reply-To: <1444577786.91.0.966567920628.issue25377@psf.upfronthosting.co.za> Message-ID: <1590931197.15.0.8416457726.issue25377@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +easy versions: +Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:20:34 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:20:34 +0000 Subject: [issue25511] multiprocessing pool blocks SIGTERM from being handled In-Reply-To: <1446132531.63.0.0289004562765.issue25511@psf.upfronthosting.co.za> Message-ID: <1590931234.5.0.358990442436.issue25511@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:22:52 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:22:52 +0000 Subject: [issue24256] threading.Timer is not a class In-Reply-To: <1432189781.3.0.318420798275.issue24256@psf.upfronthosting.co.za> Message-ID: <1590931372.07.0.9210348949.issue24256@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:23:20 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:23:20 +0000 Subject: [issue26433] urllib.urlencode() does not explain how to handle unicode In-Reply-To: <1456393719.44.0.187138588042.issue26433@psf.upfronthosting.co.za> Message-ID: <1590931400.32.0.152457580982.issue26433@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:24:02 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:24:02 +0000 Subject: [issue27037] Universal newline support for zipFile.ZipExtFile.read() is not working (deprecated?), and the missing functionality not documented In-Reply-To: <1463410014.02.0.132222711737.issue27037@psf.upfronthosting.co.za> Message-ID: <1590931442.73.0.180239755113.issue27037@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:24:31 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:24:31 +0000 Subject: [issue28403] Porting guide: disabling & warning on implicit unicode conversions In-Reply-To: <1476071532.35.0.73217429855.issue28403@psf.upfronthosting.co.za> Message-ID: <1590931471.61.0.613084400288.issue28403@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:24:57 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:24:57 +0000 Subject: [issue29323] Wrong documentation (Library) for unicode and str comparison In-Reply-To: <1484836831.64.0.870722472975.issue29323@psf.upfronthosting.co.za> Message-ID: <1590931497.4.0.768865690941.issue29323@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:26:40 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:26:40 +0000 Subject: [issue29257] Possible error in discussion of Abstract Base Classes and abstract properties In-Reply-To: <1484268516.3.0.750896526181.issue29257@psf.upfronthosting.co.za> Message-ID: <1590931600.37.0.995269660305.issue29257@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- versions: +Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:27:43 2020 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 31 May 2020 13:27:43 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1590931663.66.0.259326315815.issue29882@roundup.psfhosted.org> Mark Dickinson added the comment: > Why are calling a population count method "bit_count()"? Naming things is hard, but I don't think this is an unreasonable name, and it's not without precedent. Java similarly has Integer.bitCount and BigInteger.bitCount. MySQL has BIT_COUNT. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:29:11 2020 From: report at bugs.python.org (Keelung Yang) Date: Sun, 31 May 2020 13:29:11 +0000 Subject: [issue35228] Index search in CHM help crashes viewer In-Reply-To: <1542107217.87.0.788709270274.issue35228@psf.upfronthosting.co.za> Message-ID: <1590931751.51.0.105819762844.issue35228@roundup.psfhosted.org> Keelung Yang added the comment: It's reoccurable in Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:37:02) [MSC v.1924 64 bit (AMD64)] on windows version 10.0.19041.264 Just need to open "Python 3.8 Manuals (64-bit)" --> index --> input 'p' on keyboard. ---------- nosy: +Keelung Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:29:56 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:29:56 +0000 Subject: [issue29236] 'an ASCII string of one or more PEM-encoded certificates' needs to be unicode In-Reply-To: <1484097460.25.0.906949156541.issue29236@psf.upfronthosting.co.za> Message-ID: <1590931796.41.0.0427558709335.issue29236@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:31:16 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:31:16 +0000 Subject: [issue16700] Document that bytes OS API can returns unusable results on Windows In-Reply-To: <1355677117.39.0.191453655217.issue16700@psf.upfronthosting.co.za> Message-ID: <1590931876.13.0.70314860436.issue16700@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:31:56 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:31:56 +0000 Subject: [issue22167] iglob() has misleading documentation (does indeed store names internally) In-Reply-To: <1407460141.27.0.298063472331.issue22167@psf.upfronthosting.co.za> Message-ID: <1590931916.05.0.330469545072.issue22167@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- versions: +Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:32:52 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:32:52 +0000 Subject: [issue33491] mistype of method's name In-Reply-To: <1526283531.17.0.682650639539.issue33491@psf.upfronthosting.co.za> Message-ID: <1590931972.72.0.912586144913.issue33491@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:33:31 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:33:31 +0000 Subject: [issue23850] Missing documentation for Py_TPFLAGS_HAVE_NEWBUFFER In-Reply-To: <1427969373.72.0.801261679654.issue23850@psf.upfronthosting.co.za> Message-ID: <1590932011.29.0.664728168056.issue23850@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:34:13 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:34:13 +0000 Subject: [issue35151] Python 2 xml.etree.ElementTree documentation tutorial uses undocumented arguments In-Reply-To: <1541204418.39.0.788709270274.issue35151@psf.upfronthosting.co.za> Message-ID: <1590932053.25.0.434728375082.issue35151@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:38:09 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:38:09 +0000 Subject: [issue19670] SimpleCookie Generates Non-RFC6265-Compliant Cookies In-Reply-To: <1384979004.61.0.0353093814459.issue19670@psf.upfronthosting.co.za> Message-ID: <1590932289.72.0.638668429404.issue19670@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- versions: +Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:38:39 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:38:39 +0000 Subject: [issue11315] unicode support in Cookie module In-Reply-To: <1298606703.83.0.56959729812.issue11315@psf.upfronthosting.co.za> Message-ID: <1590932319.94.0.111001502964.issue11315@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:39:09 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:39:09 +0000 Subject: [issue1724366] cPickle module doesn't work with universal line endings Message-ID: <1590932349.51.0.559119364082.issue1724366@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:40:22 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:40:22 +0000 Subject: [issue21889] https://docs.python.org/2/library/multiprocessing.html#process-and-exceptions doesn't explain exception In-Reply-To: <1404165638.91.0.279596288902.issue21889@psf.upfronthosting.co.za> Message-ID: <1590932422.19.0.825918363464.issue21889@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:41:07 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:41:07 +0000 Subject: [issue8387] use universal newline mode in csv module examples In-Reply-To: <1271193086.18.0.201846291594.issue8387@psf.upfronthosting.co.za> Message-ID: <1590932467.89.0.320309112108.issue8387@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:44:17 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:44:17 +0000 Subject: [issue13649] termios.ICANON is not documented In-Reply-To: <1324566585.96.0.744911903947.issue13649@psf.upfronthosting.co.za> Message-ID: <1590932657.09.0.210351206751.issue13649@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- versions: +Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:44:57 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:44:57 +0000 Subject: [issue34249] Full set of format codes applies to strftime only In-Reply-To: <1532704035.87.0.56676864532.issue34249@psf.upfronthosting.co.za> Message-ID: <1590932697.32.0.0348359805443.issue34249@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- versions: +Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:45:22 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:45:22 +0000 Subject: [issue31743] Proportional Width Font on Generated Python Docs PDFs In-Reply-To: <1507633217.5.0.213398074469.issue31743@psf.upfronthosting.co.za> Message-ID: <1590932722.37.0.408679717537.issue31743@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- versions: +Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:46:50 2020 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 31 May 2020 13:46:50 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1590932810.58.0.279430362113.issue29882@roundup.psfhosted.org> Mark Dickinson added the comment: A couple of other data points: - Swift has nonzeroBitCount: https://developer.apple.com/documentation/swift/int/2886050-nonzerobitcount - Rust has count_ones: https://doc.rust-lang.org/std/primitive.u64.html - Go's math/bits package has OnesCount - The closest thing in Mathematica appears to be DigitCount, which isn't base-specific. @Mark Shannon: what name would you suggest, and why? The term "population count" feels too non-obvious and specialist to me, and anything involving "Hamming" likewise. "count_ones" isn't obviously a bit operation. "count_set_bits"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:46:51 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:46:51 +0000 Subject: [issue8502] support plurals in pygettext In-Reply-To: <1271985007.3.0.675755685137.issue8502@psf.upfronthosting.co.za> Message-ID: <1590932811.37.0.633611512034.issue8502@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:47:36 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:47:36 +0000 Subject: [issue37602] nonzero fixer problem In-Reply-To: <1563255027.06.0.811777029402.issue37602@roundup.psfhosted.org> Message-ID: <1590932856.46.0.813207021835.issue37602@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- versions: +Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:50:01 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:50:01 +0000 Subject: [issue23019] pyexpat.errors wrongly bound to message strings instead of message codes In-Reply-To: <1418111127.16.0.333870475533.issue23019@psf.upfronthosting.co.za> Message-ID: <1590933001.84.0.227285750035.issue23019@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: wont fix -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:50:39 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:50:39 +0000 Subject: [issue33740] PyByteArray_AsString C-API description lacks the assurance, that the trailing null-byte is appended. In-Reply-To: <1527973856.37.0.592728768989.issue33740@psf.upfronthosting.co.za> Message-ID: <1590933039.37.0.981601796111.issue33740@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:50:48 2020 From: report at bugs.python.org (Ram Rachum) Date: Sun, 31 May 2020 13:50:48 +0000 Subject: [issue40833] Clarify docstring of Path.rename Message-ID: <1590933048.45.0.441602956173.issue40833@roundup.psfhosted.org> New submission from Ram Rachum : Writing the PR now. ---------- assignee: docs at python components: Documentation messages: 370459 nosy: brandtbucher, cool-RR, docs at python priority: normal severity: normal status: open title: Clarify docstring of Path.rename type: enhancement versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:52:03 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 13:52:03 +0000 Subject: [issue16891] Fix docs about module search order In-Reply-To: <1357632871.49.0.196561776247.issue16891@psf.upfronthosting.co.za> Message-ID: <1590933123.15.0.313582434484.issue16891@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 09:52:11 2020 From: report at bugs.python.org (Ram Rachum) Date: Sun, 31 May 2020 13:52:11 +0000 Subject: [issue40833] Clarify docstring of Path.rename In-Reply-To: <1590933048.45.0.441602956173.issue40833@roundup.psfhosted.org> Message-ID: <1590933131.45.0.70993886574.issue40833@roundup.psfhosted.org> Change by Ram Rachum : ---------- keywords: +patch pull_requests: +19797 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20554 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 10:08:38 2020 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Sun, 31 May 2020 14:08:38 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1590934118.25.0.132757351147.issue1635741@roundup.psfhosted.org> Change by Jim Fasarakis-Hilliard : ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 10:08:54 2020 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Sun, 31 May 2020 14:08:54 +0000 Subject: [issue38938] Possible performance improvement for heapq.merge() In-Reply-To: <1574995461.08.0.901532396583.issue38938@roundup.psfhosted.org> Message-ID: <1590934134.39.0.634441247312.issue38938@roundup.psfhosted.org> Change by Jim Fasarakis-Hilliard : ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 10:21:45 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 14:21:45 +0000 Subject: [issue17544] regex code re-raises exceptions on success In-Reply-To: <1364225248.29.0.538486263378.issue17544@psf.upfronthosting.co.za> Message-ID: <1590934905.9.0.16220663817.issue17544@roundup.psfhosted.org> Serhiy Storchaka added the comment: When function sets an exception, it should return NULL. Otherwise the behavior of the interpreter is undefined, it can crash in debug build or developing mode. See for example https://docs.python.org/3/extending/extending.html#intermezzo-errors-and-exceptions ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 10:28:52 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 14:28:52 +0000 Subject: [issue11309] #include in Objects/unicodetype_db.h and Objects/unicodectype.c In-Reply-To: <1298559104.85.0.0545098544646.issue11309@psf.upfronthosting.co.za> Message-ID: <1590935332.96.0.347191432254.issue11309@roundup.psfhosted.org> Serhiy Storchaka added the comment: In Python 3.3+ functions like iswlower() are no longer used for Py_UNICODE_ISLOWER etc. And Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 10:29:43 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 14:29:43 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL Message-ID: <1590935383.33.0.423078063361.issue1712522@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: accepted -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 10:32:36 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 14:32:36 +0000 Subject: [issue1295179] termios.c in qnx4.25 Message-ID: <1590935556.39.0.594286364819.issue1295179@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. Not sure that QNX is supported in Python 3, but if you want to merge your patch in Python 3 convert it please to a pull request on GitHub. ---------- nosy: +serhiy.storchaka status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 10:33:05 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 14:33:05 +0000 Subject: [issue20785] Missing symbols in Python27.lib (Windows 64bit) In-Reply-To: <1393450221.97.0.598907595215.issue20785@psf.upfronthosting.co.za> Message-ID: <1590935585.27.0.567656621618.issue20785@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 10:33:53 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 14:33:53 +0000 Subject: [issue20989] XML File I/O Misbehavior with open() when the flag is 'r+' In-Reply-To: <1395291138.56.0.807224188986.issue20989@psf.upfronthosting.co.za> Message-ID: <1590935633.38.0.0731365183932.issue20989@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 10:42:33 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 14:42:33 +0000 Subject: [issue18695] os.statvfs() not working well with unicode paths In-Reply-To: <1376050003.6.0.904056390722.issue18695@psf.upfronthosting.co.za> Message-ID: <1590936153.49.0.702405092182.issue18695@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 10:43:04 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 14:43:04 +0000 Subject: [issue21785] __getitem__ and __setitem__ try to be smart when invoked with negative slice indices In-Reply-To: <1402982163.43.0.0546629268469.issue21785@psf.upfronthosting.co.za> Message-ID: <1590936184.04.0.114930334176.issue21785@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 10:43:42 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 14:43:42 +0000 Subject: [issue21561] help() on enum34 enumeration class creates only a dummy documentation In-Reply-To: <1400866031.36.0.493061688069.issue21561@psf.upfronthosting.co.za> Message-ID: <1590936222.8.0.659800453443.issue21561@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 10:44:01 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 14:44:01 +0000 Subject: [issue21796] tempfile.py", line 83, in once_lock = _allocate_lock() thread.error: can't allocat lock In-Reply-To: <1403035861.92.0.338846597048.issue21796@psf.upfronthosting.co.za> Message-ID: <1590936241.51.0.143104268367.issue21796@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 10:47:20 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 14:47:20 +0000 Subject: [issue21929] Rounding properly In-Reply-To: <1404729306.28.0.45044219182.issue21929@psf.upfronthosting.co.za> Message-ID: <1590936440.31.0.0568538808533.issue21929@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 10:49:03 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 14:49:03 +0000 Subject: [issue14847] AttributeError: NoneType has no attribute 'utf_8_decode' In-Reply-To: <1337311331.2.0.610588604888.issue14847@psf.upfronthosting.co.za> Message-ID: <1590936543.73.0.422926713301.issue14847@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 10:49:41 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 14:49:41 +0000 Subject: [issue22720] Obscure error w/ windows online-only file In-Reply-To: <1414168455.92.0.21171948536.issue22720@psf.upfronthosting.co.za> Message-ID: <1590936581.9.0.685851955154.issue22720@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 10:50:17 2020 From: report at bugs.python.org (Darryl Hall Jr) Date: Sun, 31 May 2020 14:50:17 +0000 Subject: [issue39326] Python-3.8.1 "test_importlib" failed In-Reply-To: <1578977546.19.0.0039726161306.issue39326@roundup.psfhosted.org> Message-ID: <1590936617.03.0.297291074836.issue39326@roundup.psfhosted.org> Darryl Hall Jr added the comment: @Divyansh_tiwari I had the same issue, but on Python-3.8.3. I ran `sudo apt-get install zlib1g-dev` then `sudo apt-get install zlibc`. After installing those 2 packages, I reran `make test` and had test results = success. I hope this might work for you as well. ---------- nosy: +Darryl Hall Jr status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 10:52:23 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 14:52:23 +0000 Subject: [issue23567] os.stat() tuple access vs named attribute access int vs float In-Reply-To: <1425345371.02.0.709789700046.issue23567@psf.upfronthosting.co.za> Message-ID: <1590936743.99.0.671200001305.issue23567@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 10:50:47 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 14:50:47 +0000 Subject: [issue22750] xmlapp.py display bug when validate XML by DTD In-Reply-To: <1414490220.27.0.963002484178.issue22750@psf.upfronthosting.co.za> Message-ID: <1590936647.52.0.110872762303.issue22750@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 10:51:52 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 14:51:52 +0000 Subject: [issue22666] email.Header no encoding of unicode strings containing newlines In-Reply-To: <1413637685.41.0.262065905558.issue22666@psf.upfronthosting.co.za> Message-ID: <1590936712.72.0.681439073399.issue22666@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 10:59:08 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 14:59:08 +0000 Subject: [issue20192] pprint chokes on set containing frozenset In-Reply-To: <1389202631.98.0.662803177988.issue20192@psf.upfronthosting.co.za> Message-ID: <1590937148.27.0.995586765286.issue20192@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 11:05:44 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 15:05:44 +0000 Subject: [issue16125] open accepts arbitrary mode strings as long as they contain U In-Reply-To: <1349331092.45.0.724908738028.issue16125@psf.upfronthosting.co.za> Message-ID: <1590937544.08.0.574306762762.issue16125@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 11:06:30 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 15:06:30 +0000 Subject: [issue24126] newlines attribute does not get set after calling readline() In-Reply-To: <1430817708.97.0.91476502488.issue24126@psf.upfronthosting.co.za> Message-ID: <1590937590.89.0.914528192298.issue24126@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 11:08:05 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 15:08:05 +0000 Subject: [issue24652] C-API Pure Embedding enhancement In-Reply-To: <1437120649.64.0.570799865816.issue24652@psf.upfronthosting.co.za> Message-ID: <1590937685.97.0.852277068585.issue24652@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, vstinner type: enhancement -> behavior versions: +Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 11:09:40 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 15:09:40 +0000 Subject: [issue24880] ctypeslib patch for regular expression for symbols to include In-Reply-To: <1439796006.75.0.0781056689434.issue24880@psf.upfronthosting.co.za> Message-ID: <1590937780.49.0.889355694191.issue24880@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 11:10:26 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 15:10:26 +0000 Subject: [issue25714] Consider isinstance(..., numbers.Integral) instead of isinstance(..., int) or isinstance(..., (int, long)) in datetime.py In-Reply-To: <1448304139.86.0.253570018979.issue25714@psf.upfronthosting.co.za> Message-ID: <1590937826.63.0.535995636472.issue25714@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 11:11:09 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 15:11:09 +0000 Subject: [issue23315] tempfile.mkdtemp fails with non-ascii paths on Python 2 In-Reply-To: <1422183736.06.0.60780511869.issue23315@psf.upfronthosting.co.za> Message-ID: <1590937869.0.0.955515994725.issue23315@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 11:15:10 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 15:15:10 +0000 Subject: [issue25589] test_ascii_formatd fails on Mac when built with Intel compiler In-Reply-To: <1447093853.5.0.154282338345.issue25589@psf.upfronthosting.co.za> Message-ID: <1590938110.89.0.833115731799.issue25589@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 11:19:57 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 15:19:57 +0000 Subject: [issue9751] _PyInstance_Lookup() defeats its purpose In-Reply-To: <1283506212.5.0.831864167364.issue9751@psf.upfronthosting.co.za> Message-ID: <1590938397.18.0.605670066201.issue9751@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 11:20:17 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 15:20:17 +0000 Subject: [issue24341] Test suite emits many DeprecationWarnings about sys.exc_clear() when -3 is enabled In-Reply-To: <1433098290.5.0.721765999777.issue24341@psf.upfronthosting.co.za> Message-ID: <1590938417.68.0.456225289071.issue24341@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 11:21:12 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 15:21:12 +0000 Subject: [issue25661] tokenize.untokenize does not maintain the order of tabbed indentations and leading spaces In-Reply-To: <1447881207.88.0.934848299376.issue25661@psf.upfronthosting.co.za> Message-ID: <1590938472.2.0.769165847185.issue25661@roundup.psfhosted.org> Serhiy Storchaka added the comment: Python 2.7 is no longer supported. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 11:22:18 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 31 May 2020 15:22:18 +0000 Subject: [issue40825] Add a "strict" parameter to csv.writer and csv.DictWriter In-Reply-To: <1590841893.39.0.979050889653.issue40825@roundup.psfhosted.org> Message-ID: <1590938538.36.0.636099209612.issue40825@roundup.psfhosted.org> Eric V. Smith added the comment: Losing Decimal would be a problem. I use those a lot in CSV files, and I assume others do, too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 11:25:03 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 15:25:03 +0000 Subject: [issue40825] Add a "strict" parameter to csv.writer and csv.DictWriter In-Reply-To: <1590841893.39.0.979050889653.issue40825@roundup.psfhosted.org> Message-ID: <1590938703.65.0.467159058786.issue40825@roundup.psfhosted.org> Serhiy Storchaka added the comment: We can check only nb_index and nb_float. It will include Fraction, Decimal and NumPy numbers and exclude UUID and IPv4Address. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 11:28:00 2020 From: report at bugs.python.org (Sam Bull) Date: Sun, 31 May 2020 15:28:00 +0000 Subject: [issue36484] Can't reorder TLS 1.3 ciphersuites In-Reply-To: <1553945035.34.0.303610202958.issue36484@roundup.psfhosted.org> Message-ID: <1590938880.56.0.453046281292.issue36484@roundup.psfhosted.org> Change by Sam Bull : ---------- nosy: +dreamsorcerer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 11:29:37 2020 From: report at bugs.python.org (Sam Bull) Date: Sun, 31 May 2020 15:29:37 +0000 Subject: [issue33618] Support TLS 1.3 In-Reply-To: <1527086323.78.0.682650639539.issue33618@psf.upfronthosting.co.za> Message-ID: <1590938977.99.0.290363920221.issue33618@roundup.psfhosted.org> Change by Sam Bull : ---------- nosy: +dreamsorcerer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 11:45:43 2020 From: report at bugs.python.org (AnLong) Date: Sun, 31 May 2020 15:45:43 +0000 Subject: [issue40834] sending str via channel caused truncate on last character Message-ID: <1590939942.99.0.486356064631.issue40834@roundup.psfhosted.org> New submission from AnLong : Sending a str object for example "asdf" via channel, the received str object turn into "asd". The attachment file test.py can re-produce this issue, with python3.8 and 3.9a1. ---------- components: Subinterpreters files: test.py messages: 370487 nosy: asaka priority: normal severity: normal status: open title: sending str via channel caused truncate on last character type: behavior versions: Python 3.8, Python 3.9 Added file: https://bugs.python.org/file49204/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 11:49:03 2020 From: report at bugs.python.org (AnLong) Date: Sun, 31 May 2020 15:49:03 +0000 Subject: [issue40834] sending str via channel caused truncate on last character In-Reply-To: <1590939942.99.0.486356064631.issue40834@roundup.psfhosted.org> Message-ID: <1590940143.02.0.210021270775.issue40834@roundup.psfhosted.org> Change by AnLong : ---------- keywords: +patch pull_requests: +19798 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20555 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 12:01:29 2020 From: report at bugs.python.org (Ben Mares) Date: Sun, 31 May 2020 16:01:29 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1590940889.84.0.780226723951.issue17005@roundup.psfhosted.org> Ben Mares added the comment: It's great to have this feature in the standard library, but it really seems to clutter the functools documentation. Everything else in functools applies directly to functions and methods. Suddenly reading graph theory terminology was disorienting for me. (Due to context, I expected "node" to mean some new type of Python function.) It makes the documentation significantly longer, and IMHO abstruse. Would it be sensible to move this to a separate module? ---------- nosy: +maresb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 12:47:49 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 31 May 2020 16:47:49 +0000 Subject: [issue22167] iglob() has misleading documentation (does indeed store names internally) In-Reply-To: <1407460141.27.0.298063472331.issue22167@psf.upfronthosting.co.za> Message-ID: <1590943669.27.0.65077907206.issue22167@roundup.psfhosted.org> Guido van Rossum added the comment: Serhiy, what do you mean by "otherwise we could run out of file descriptiors"? I looked a bit at the code and there are different kinds of algorithms involved for different forms of patterns, and the code also takes vastly different paths for recursive matches. I found one bit of code that looked like it *could* be improved, with some effort: _glob1(). This constructs a list of all files in one directory and then filters then. It looks like this could be a problem if there are e.g. 100_000 files in one directory. To fix, we could implement fnmatch.ifilter() which would be like fnmatch.filter() but uses `yield name` instead of `result.append(name)`; then _glob1() could be rewritten as follows (untested): def _glob1(dirname, pattern, dironly): names = _iterdir(dirname, dironly)) if not _ishidden(pattern): yield from fnmatch.ifilter(x for x in names if not _ishidden(x)) else: yield from fnmatch.ifilter(names, pattern) Thoughts? Would this increase the number of open file descriptors in some edge case? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 13:17:35 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 31 May 2020 17:17:35 +0000 Subject: [issue40825] Add a "strict" parameter to csv.writer and csv.DictWriter In-Reply-To: <1590841893.39.0.979050889653.issue40825@roundup.psfhosted.org> Message-ID: <1590945455.24.0.191367557601.issue40825@roundup.psfhosted.org> Eric V. Smith added the comment: That seems like a good plan. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 13:47:03 2020 From: report at bugs.python.org (SilentGhost) Date: Sun, 31 May 2020 17:47:03 +0000 Subject: [issue40834] sending str via channel caused truncate on last character In-Reply-To: <1590939942.99.0.486356064631.issue40834@roundup.psfhosted.org> Message-ID: <1590947223.62.0.987217014173.issue40834@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 13:50:02 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 17:50:02 +0000 Subject: [issue22167] iglob() has misleading documentation (does indeed store names internally) In-Reply-To: <1407460141.27.0.298063472331.issue22167@psf.upfronthosting.co.za> Message-ID: <1590947402.43.0.653333084413.issue22167@roundup.psfhosted.org> Serhiy Storchaka added the comment: Yes, for the pattern 'a*/b*/c*' you will have an open file descriptor for every component with metacharacters: for a in scandir('.'): if fnmatch(a.name, 'a*'): for b in scandir(a.path): if fnmatch(b.name, 'b*'): for c in scandir(b.path): if fnmatch(c.name, 'c*'): yield c.path You can have hundreds nested directories. Looks not bad, because by default the limit on the number of file descriptors is 1024 on Linux. But imagine you run a server and it handles tens requests simultaneously. Some of them or all of them will fail, and not just return an error, but return an incorrect result, because all OSError, including "Too many open files", are silenced in glob(). Also all these file descriptors will not be closed until you finish the iteration, or, in case of error, until the garbage collector close them (because interrupted generators tend to create reference loops). So it is vital to close the file descriptor before you open other file descriptors in the recursion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 13:50:16 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 31 May 2020 17:50:16 +0000 Subject: [issue4356] Add "key" argument to "bisect" module functions In-Reply-To: <1227115048.67.0.318831592843.issue4356@psf.upfronthosting.co.za> Message-ID: <1590947416.45.0.258890161735.issue4356@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +19799 pull_request: https://github.com/python/cpython/pull/20556 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 14:00:25 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 31 May 2020 18:00:25 +0000 Subject: [issue22167] iglob() has misleading documentation (does indeed store names internally) In-Reply-To: <1590947402.43.0.653333084413.issue22167@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: Hm, yeah. Perhaps we can add some buffering so that for directories with a small number of files (say < 1000) the FD is closed before recursing into it, while for large directories it keeps the FD open until the last block of 1000 DirEntries is read? It's unlikely that someone has a tree that's both deep *and* wide at many levels, since that would mean an inordinate number of files indeed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 14:42:05 2020 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 31 May 2020 18:42:05 +0000 Subject: [issue23885] urllib.quote horribly mishandles unicode as second parameter In-Reply-To: <1428441015.17.0.142718858432.issue23885@psf.upfronthosting.co.za> Message-ID: <1590950525.8.0.231688974938.issue23885@roundup.psfhosted.org> Zackery Spytz added the comment: Python 2 is EOL, so I think this issue should be closed. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 14:42:30 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 31 May 2020 18:42:30 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1590950550.18.0.654230602494.issue17005@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Any suggestions for the new module? I assume we can move this to a new topsort/topological_sort or similar... What do people think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 14:43:44 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 31 May 2020 18:43:44 +0000 Subject: [issue40686] Compiler warnings in _zoneinfo.c on Windows build in 64-bit In-Reply-To: <1589906488.33.0.285207996013.issue40686@roundup.psfhosted.org> Message-ID: <1590950624.93.0.938957181783.issue40686@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Can you update the current status? Sorry, what do you mean by "current status"? Do you meant this issue or the status of that PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 14:46:53 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 31 May 2020 18:46:53 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1590950813.36.0.34431379953.issue17005@roundup.psfhosted.org> R?mi Lapeyre added the comment: Could it make sense to have this in the often proposed imath module? It's integers per se but Both number theory and graph theory are part of discrete mathematics so it may feel more at home there? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 14:47:10 2020 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 31 May 2020 18:47:10 +0000 Subject: [issue24048] remove_module() needs to save/restore exception state In-Reply-To: <1429855118.66.0.488857300303.issue24048@psf.upfronthosting.co.za> Message-ID: <1590950830.22.0.278271568984.issue24048@roundup.psfhosted.org> Zackery Spytz added the comment: It seems that Serhiy backported the fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 15:03:35 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 19:03:35 +0000 Subject: [issue40825] Add a "strict" parameter to csv.writer and csv.DictWriter In-Reply-To: <1590841893.39.0.979050889653.issue40825@roundup.psfhosted.org> Message-ID: <1590951815.5.0.697884218574.issue40825@roundup.psfhosted.org> Serhiy Storchaka added the comment: Yes, converting Decimal to float can lose precision, so we cannot require this. PyNumber_Check() is already used for QUOTE_NONNUMERIC, so it would be logical to use it in determining that the object is a number in the cvs module. But now the problem is with determining what is a "string". There is no way to check whether the object is "string-like", because virtually all objects can be converted to string. The only standard exception is bytes and bytearray for which str() may emit BytesWarning, so this conversion is not reliable. If restrict it only to an instance of str or its subclasses, it may break other user cases, for example writing Path in CVS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 15:18:55 2020 From: report at bugs.python.org (Warren Hardy) Date: Sun, 31 May 2020 19:18:55 +0000 Subject: [issue40788] Build issue Solaris 10 Sparc In-Reply-To: <1590548322.5.0.995785667003.issue40788@roundup.psfhosted.org> Message-ID: <1590952735.55.0.597855718502.issue40788@roundup.psfhosted.org> Change by Warren Hardy : ---------- type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 15:21:07 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 31 May 2020 19:21:07 +0000 Subject: [issue22167] iglob() has misleading documentation (does indeed store names internally) In-Reply-To: <1407460141.27.0.298063472331.issue22167@psf.upfronthosting.co.za> Message-ID: <1590952867.66.0.985496699653.issue22167@roundup.psfhosted.org> Serhiy Storchaka added the comment: This is an interesting idea, but I afraid it will complicate the code too much, destroying the remnants of the initial elegant design. I am going to try to experiment with this idea after implementing other features, so it will not block them. For now we need to document that iglob() may collect some names internally before starting to emit them. If my English be better I would did it myself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 15:32:30 2020 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Sun, 31 May 2020 19:32:30 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1590953550.28.0.359324895732.issue17005@roundup.psfhosted.org> Jim Fasarakis-Hilliard added the comment: It does seem out of place in functools, intensified by it's odd interjection among the other functools objects. Considering heapq and bisect exist as standalone modules, the idea that topological sorting could go in its own module wouldn't be without precedent. ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 15:36:27 2020 From: report at bugs.python.org (Christian Heimes) Date: Sun, 31 May 2020 19:36:27 +0000 Subject: [issue33618] Support TLS 1.3 In-Reply-To: <1527086323.78.0.682650639539.issue33618@psf.upfronthosting.co.za> Message-ID: <1590953787.33.0.0971005550898.issue33618@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 16:53:31 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 31 May 2020 20:53:31 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1590958411.34.0.678815519887.issue17005@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: If we move it, I would prefer a new module that somehow makes clear the scope, something like graphutils or graphtheory or graph (although this las one will probably collide with many existing things). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 16:56:52 2020 From: report at bugs.python.org (Doug Addy) Date: Sun, 31 May 2020 20:56:52 +0000 Subject: [issue40835] Incorrect handling for msgctxt in msgfmt.py Message-ID: <1590958612.57.0.0461215305569.issue40835@roundup.psfhosted.org> New submission from Doug Addy : Running msgfmt.py with the attached po file will produce an incorrect context for the entry "test". Looking at the script, we require a comment to follow a contexted section for the context to be cleared. The gettext documentation makes clear that all comments are optional, so this is not desired behaviour. My reading of the gettext documentation has a "msgctxt" line applying only to the current entry, so it should be cleared once the last msgstr has been written for that entry. I will endeavour to provide a patch within the next day or two. ---------- components: Demos and Tools messages: 370502 nosy: da1910 priority: normal severity: normal status: open title: Incorrect handling for msgctxt in msgfmt.py type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 16:57:59 2020 From: report at bugs.python.org (gaborbernat) Date: Sun, 31 May 2020 20:57:59 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1590958679.72.0.726255824993.issue17005@roundup.psfhosted.org> gaborbernat added the comment: I like graphutils for what it's worth. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 16:58:35 2020 From: report at bugs.python.org (Doug Addy) Date: Sun, 31 May 2020 20:58:35 +0000 Subject: [issue40835] Incorrect handling for msgctxt in msgfmt.py In-Reply-To: <1590958612.57.0.0461215305569.issue40835@roundup.psfhosted.org> Message-ID: <1590958715.11.0.782061957663.issue40835@roundup.psfhosted.org> Doug Addy added the comment: Test po file included ---------- Added file: https://bugs.python.org/file49205/test.po _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 17:05:33 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 31 May 2020 21:05:33 +0000 Subject: [issue22167] iglob() has misleading documentation (does indeed store names internally) In-Reply-To: <1590952867.66.0.985496699653.issue22167@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: I hope some volunteer will submit a doc PR. In the meantime, throwing out one more idea: perhaps my first idea, to make _glob1() an iterator, could work if we only do it for leaves of the pattern, so for the a*/b*/c* example, only for the c* part. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 17:09:35 2020 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Sun, 31 May 2020 21:09:35 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1590959375.07.0.224107802089.issue17005@roundup.psfhosted.org> Jim Fasarakis-Hilliard added the comment: The downside I see with any graph prefixed names is the fact that it implies a larger collection of graph operations. Add that to the fact that people might be more tempted to propose many graph related algorithms/utilities to a module with the same name. A more localized name solves that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 17:16:05 2020 From: report at bugs.python.org (Doug Addy) Date: Sun, 31 May 2020 21:16:05 +0000 Subject: [issue40835] Incorrect handling for msgctxt in msgfmt.py In-Reply-To: <1590958612.57.0.0461215305569.issue40835@roundup.psfhosted.org> Message-ID: <1590959765.38.0.400418496831.issue40835@roundup.psfhosted.org> Doug Addy added the comment: And a patch: After the end of a message entry the options for the next line are: 1. A comment - we already reset msgctxt to None here 2. A blank line - we can have empty lines anywhere we want, so do nothing 3. A new msgctxt line - Set msgctxt to the new context 4. A msgid - This is the current failing behaviour. Fix sets msgctxt back to None. ---------- keywords: +patch Added file: https://bugs.python.org/file49206/40835.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 17:18:08 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 31 May 2020 21:18:08 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1590959888.55.0.438307491416.issue17005@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > The downside I see with any graph prefixed names is the fact that it implies a larger collection of graph operations. I don't see that an issue. In the general term is better to have a general name and discuss further improvements than just name the module "topological_sort" and now being cornered if we ever want to add new graph-related stuff. We can always say "no" to new functionality but changing the name of the module is not possible once is released. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 17:21:20 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 31 May 2020 21:21:20 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1590960080.15.0.189266322482.issue17005@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I would like to hear Raymond and Tim advise on what the best name for the new module should be :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 17:54:59 2020 From: report at bugs.python.org (Ben Mares) Date: Sun, 31 May 2020 21:54:59 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1590962099.78.0.236462717562.issue17005@roundup.psfhosted.org> Ben Mares added the comment: dependencytools? But I don't think it qualifies yet for the plural... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 17:56:48 2020 From: report at bugs.python.org (Tim Peters) Date: Sun, 31 May 2020 21:56:48 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1590962208.8.0.952587335661.issue17005@roundup.psfhosted.org> Tim Peters added the comment: `functools` is clearly a poor place for this. `imath` would also be. `graph_stuff_probably_limited_to_a_topsort` is the only accurate name ;-) Off-the-wall possibilities include `misclib` (stuff that just doesn't fit anywhere else - yet) and `cslib` (Computer Science-y stuff). Whichever name wins, we should probably look to ensure the name isn't also of a package already in (non-trivial) use. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 17:57:48 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 31 May 2020 21:57:48 +0000 Subject: [issue40755] Add missing multiset predicates to collections.Counter In-Reply-To: <1590333060.51.0.256014570882.issue40755@roundup.psfhosted.org> Message-ID: <1590962268.57.0.752279170119.issue40755@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset b7d79b4f36787874128c439d38397fe95c48429b by Raymond Hettinger in branch 'master': bpo-40755: Add rich comparisons to Counter (GH-20548) https://github.com/python/cpython/commit/b7d79b4f36787874128c439d38397fe95c48429b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 18:01:57 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 31 May 2020 22:01:57 +0000 Subject: [issue40759] Deprecate the symbol module In-Reply-To: <1590353506.35.0.123027767636.issue40759@roundup.psfhosted.org> Message-ID: <1590962517.76.0.518442189103.issue40759@roundup.psfhosted.org> miss-islington added the comment: New changeset cf88871d6a9c12e7b7e5f4d65abc2ec6e2fe952e by Batuhan Taskaya in branch 'master': bpo-40759: Deprecate the symbol module (GH-20364) https://github.com/python/cpython/commit/cf88871d6a9c12e7b7e5f4d65abc2ec6e2fe952e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 18:02:21 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 31 May 2020 22:02:21 +0000 Subject: [issue40759] Deprecate the symbol module In-Reply-To: <1590353506.35.0.123027767636.issue40759@roundup.psfhosted.org> Message-ID: <1590962541.26.0.202326707554.issue40759@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +19800 pull_request: https://github.com/python/cpython/pull/20557 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 18:02:24 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 31 May 2020 22:02:24 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1590962544.52.0.0826045606921.issue17005@roundup.psfhosted.org> Raymond Hettinger added the comment: I vote for it being in its own module (like difflib). That would also be a good place to put my proposed tsort() function with its simpler API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 18:14:04 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 31 May 2020 22:14:04 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1590963244.16.0.302508820243.issue17005@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I checked and from the list of proposed names with "graph" prefixes, only "graphutils" is not colliding with something on Pypi. For the record "cslib" and "misclib" are also available but the scope of those feel much much bigger. I am going to open a PR to move this to "graphutils" for now. We can discuss better in the PR for better names given that seems that there is an agreement on moving this out of functools. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 18:17:34 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 31 May 2020 22:17:34 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1590963454.31.0.525282510639.issue17005@roundup.psfhosted.org> Eric V. Smith added the comment: I'd prefer a new module just for this. As for names, I like toposort over topsort. I already have a library on PyPI named toposort. Personally, I don't have a problem with the stdlib taking over that name, and I'd just deprecate mine at 3.9, or whatever. I'm not sure if there are any ramifications of doing that, however. Or, pick another unused name, like toposortlib or something. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 18:18:53 2020 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Sun, 31 May 2020 22:18:53 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1590963533.78.0.308955276179.issue17005@roundup.psfhosted.org> Jim Fasarakis-Hilliard added the comment: Another option, `graphlib`[1], does exist on PyPI but is not maintained and currently read-only by the author. Other flavors[2][3] of the same name also don't seem to have much adoption so they shouldn't confuse if a name like `graphlib` was chosen. [1] https://github.com/bruth/graphlib/ [2] https://github.com/MengLiuPurdue/graph_lib [3] https://github.com/EmileTrotignon/GraphLib ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 18:23:32 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 31 May 2020 22:23:32 +0000 Subject: [issue40759] Deprecate the symbol module In-Reply-To: <1590353506.35.0.123027767636.issue40759@roundup.psfhosted.org> Message-ID: <1590963812.53.0.341954679309.issue40759@roundup.psfhosted.org> miss-islington added the comment: New changeset 96d91071c0279fe3b10f97b581970a85ccba9ebe by Miss Islington (bot) in branch '3.9': bpo-40759: Deprecate the symbol module (GH-20364) https://github.com/python/cpython/commit/96d91071c0279fe3b10f97b581970a85ccba9ebe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 18:31:25 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 31 May 2020 22:31:25 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1590964285.65.0.0305305551372.issue17005@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +19801 pull_request: https://github.com/python/cpython/pull/20558 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 18:35:21 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 31 May 2020 22:35:21 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1590964521.79.0.290840901188.issue17005@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Opened https://github.com/python/cpython/pull/20558. I have *initially* proposed "graphlib" as it feels more in-line with other stdlib module names and as Jim pointed it does not collide with anything major. Also, I have proposed this initial name to not keep the scope too short in case we want to add new things in the future (although we can always say "no" and just keep this functionality). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 19:41:17 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 31 May 2020 23:41:17 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1590968477.46.0.275467418858.issue17005@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 2f172d8f1525defe9bba4d49e967fdfc69151731 by Pablo Galindo in branch 'master': bpo-17005: Move topological sort functionality to its own module (GH-20558) https://github.com/python/cpython/commit/2f172d8f1525defe9bba4d49e967fdfc69151731 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 19:41:27 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 31 May 2020 23:41:27 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1590968487.1.0.902186218932.issue17005@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 19.0 -> 20.0 pull_requests: +19802 pull_request: https://github.com/python/cpython/pull/20561 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 20:01:43 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jun 2020 00:01:43 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1590969703.81.0.321112289532.issue17005@roundup.psfhosted.org> miss-islington added the comment: New changeset 0a674638a3de14dc86b5294a5db067e0c2177a51 by Miss Islington (bot) in branch '3.9': bpo-17005: Move topological sort functionality to its own module (GH-20558) https://github.com/python/cpython/commit/0a674638a3de14dc86b5294a5db067e0c2177a51 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 20:19:06 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 01 Jun 2020 00:19:06 +0000 Subject: [issue39314] (readline) Autofill the closing parenthesis during auto-completion for functions which accept no arguments at all In-Reply-To: <1578846697.93.0.381295981609.issue39314@roundup.psfhosted.org> Message-ID: <1590970746.48.0.978913480496.issue39314@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch nosy: +remi.lapeyre nosy_count: 1.0 -> 2.0 pull_requests: +19803 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20562 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 20:39:39 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 01 Jun 2020 00:39:39 +0000 Subject: [issue40836] logging.fatal() and logging.Logger.fatal() should raise a DeprecationWarning Message-ID: <1590971979.28.0.133253133772.issue40836@roundup.psfhosted.org> New submission from R?mi Lapeyre : Both are not documented and synonymous for critical() but don't raise a DeprecationWarning. ---------- components: Library (Lib) messages: 370522 nosy: remi.lapeyre priority: normal severity: normal status: open title: logging.fatal() and logging.Logger.fatal() should raise a DeprecationWarning versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 20:41:26 2020 From: report at bugs.python.org (laike9m) Date: Mon, 01 Jun 2020 00:41:26 +0000 Subject: [issue40790] Python should enable computed gotos on Mac by default In-Reply-To: <1590563583.44.0.646993465948.issue40790@roundup.psfhosted.org> Message-ID: <1590972086.6.0.274910558206.issue40790@roundup.psfhosted.org> laike9m added the comment: Thanks Ronald. I wrote an answer to summarize what I got so far: https://stackoverflow.com/a/62037189/2142577 There's nothing wrong with the current behavior, so nothing really needs to be changed. But we still lack a way for users to check whether computed gotos is enabled out of the box, and `HAVE_COMPUTED_GOTOS` can't do the job either since it only detects the compiler's capability. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 20:46:12 2020 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 01 Jun 2020 00:46:12 +0000 Subject: [issue40836] logging.fatal() and logging.Logger.fatal() should raise a DeprecationWarning In-Reply-To: <1590971979.28.0.133253133772.issue40836@roundup.psfhosted.org> Message-ID: <1590972372.46.0.0151454228569.issue40836@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch pull_requests: +19804 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20563 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 20:57:52 2020 From: report at bugs.python.org (Ma Lin) Date: Mon, 01 Jun 2020 00:57:52 +0000 Subject: [issue35859] Capture behavior depends on the order of an alternation In-Reply-To: <1548857774.3.0.1614070954.issue35859@roundup.psfhosted.org> Message-ID: <1590973072.0.0.559526485057.issue35859@roundup.psfhosted.org> Ma Lin added the comment: Is there hope to merge to 3.9 branch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 21:29:21 2020 From: report at bugs.python.org (Manuel Jacob) Date: Mon, 01 Jun 2020 01:29:21 +0000 Subject: [issue40457] Python fails to compile/load _ssl module if OpenSSL is compiled with no-tls1-method In-Reply-To: <1588286494.27.0.412005858691.issue40457@roundup.psfhosted.org> Message-ID: <1590974961.44.0.508391253276.issue40457@roundup.psfhosted.org> Manuel Jacob added the comment: For the record, I?ve added a comment to the pull request about that ssl.PROTOCOL_TLSv1_1 / ssl.PROTOCOL_TLSv1_2 are now defined unconditionally. https://github.com/python/cpython/commit/6e8cda91d92da72800d891b2fc2073ecbc134d98#r39569316 ---------- nosy: +mjacob _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 22:17:06 2020 From: report at bugs.python.org (SpaceOne) Date: Mon, 01 Jun 2020 02:17:06 +0000 Subject: [issue40837] email.utils.encode_rfc2231(string, None, None) returns broken value Message-ID: <1590977826.25.0.0895335032044.issue40837@roundup.psfhosted.org> New submission from SpaceOne : `encode_rfc2231()` must not change the returned value if no transformation of the input was done. This is also mentioned in the docstring of that function. Actual behavior: encode_rfc2231('foo bar', None, None) 'foo%20bar' Expected behavior: encode_rfc2231('foo bar', None, None) 'foo bar' ---------- components: Library (Lib) messages: 370526 nosy: spaceone priority: normal pull_requests: 19805 severity: normal status: open title: email.utils.encode_rfc2231(string, None, None) returns broken value type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 23:55:36 2020 From: report at bugs.python.org (Asmi Ariv) Date: Mon, 01 Jun 2020 03:55:36 +0000 Subject: [issue40776] Python 3.7.6 installation issue on mac os x 10.6.8 In-Reply-To: <1590549141.8.0.834940154531.issue40776@roundup.psfhosted.org> Message-ID: Asmi Ariv added the comment: Thanks a lot for your reply! Much appreciated! Regards Asmi Ariv Data Science & Business Analytics Expert On Wed, 27 May, 2020, 8:42 am Ned Deily, wrote: > > Ned Deily added the comment: > > Thanks for your report. Because of very low usage and the increasing > difficulty of supporting new features and bug fixes on very old versions of > macOS, like 10.6.x, we no longer provide binary installers on python.org > for macOS versions earlier than 10.9. On top of that, there was a specific > problem with using the last several 10.6+ installers on 10.6 itself, due to > changes in Apple packaging tools. This is the problem you are seeing and > was first reported and tracked in Issue36890. As noted there, there is a > link to a 3.7.4 installer that will work on macOS 10.6. However, we do not > recommend you use it as the most recent release of Python 3.7 is now 3.7.7 > with the final bugfix release of 3.7.x coming next month; Python 3.8.3 is > now current. > > Instead, if you expect to continue using 10.6 Snow Leopard, I would > strongly suggest you look at installing Python(s) from the MacPorts > project. They do an excellent job of providing up-to-date versions of open > source software, like Python, for multiple versions of macOS, including > 10.6. They have pre-built packages of the most recent versions of python37 > and python38 for 10.6. See > https://www.macports.org/install.php#installing for a link to their base > package installer for 10.6. You can then install Python with: > > sudo port selfupdate > sudo port install python37 > or > sudo port install python38 > > Many third-party Python packages have also been ported and pre-built. You > can search for them with: > > sudo port search py37 # (or py38) > > or on their website at https://ports.macports.org > > Good luck! > > ---------- > nosy: +ned.deily > resolution: -> duplicate > stage: -> resolved > status: open -> closed > superseder: -> python-3.7.3-macosx10.6.pkg verification error on macOS > 10.6 Snow Leopard > type: compile error -> > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 31 23:58:09 2020 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jun 2020 03:58:09 +0000 Subject: [issue40836] logging.fatal() and logging.Logger.fatal() should raise a DeprecationWarning In-Reply-To: <1590971979.28.0.133253133772.issue40836@roundup.psfhosted.org> Message-ID: <1590983889.41.0.18969525016.issue40836@roundup.psfhosted.org> Vinay Sajip added the comment: Well, I'm not planning to actually deprecate and then remove them - as they're not documented, it's unlikely that new code will use them, and there's no particular reason to break old code that happens to use them. ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________